/* ==========================================================================
   IYG Auction Listings — Styles
   Covers: grid, card, stats widget, slider, responsive
   @version: 1.0.3
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
  --iyg-color-current: #22c55e;
  /* green  */
  --iyg-color-comingsoon: #3b82f6;
  /* blue   */
  --iyg-color-completed: #9ca3af;
  /* gray   */
  /* Card colors — use site theme vars with reasonable fallbacks */
  --iyg-color-text: var(--genesisauto-header-font-color, #111827);
  --iyg-color-muted: var(--genesisauto-content-color, #6b7280);
  --iyg-color-border: #DEDEDE;
  --iyg-color-bg: #ffffff;
  --iyg-color-accent: var(--genesisauto-primary-color, #1d4ed8);
  --iyg-color-btn-text: var(--genesisauto-button-color-idle, #ffffff);
  --iyg-color-btn-bg: var(--genesisauto-button-bg-idle, var(--genesisauto-primary-color, #1d4ed8));
  --iyg-color-btn-hover: var(--genesisauto-button-bg-hover, var(--genesisauto-secondary-color, #0f2644));
  --iyg-radius-card: 0;
  --iyg-shadow-card: none;
  --iyg-shadow-hover: 0 4px 16px rgba(0, 0, 0, .12);
  --iyg-transition: 0.4s ease;
  --text: #1C1C1C;
  --reverse_text: #fff;
  --footer_text: #8E8E8E;
  --footer_links: #D5D5D5;
  --background: #1C1C1C;
  --accent: #C8B29A;
  --accent-hover: #222;
  --gradient: linear-gradient(-20deg, rgba(255, 255, 255, 1) 0%, rgba(230, 230, 230, 1) 74%);
}

/* --------------------------------------------------------------------------
   Grid
   -------------------------------------------------------------------------- */
.iyg-auctions-wrap {
  width: 100%;
}


/* AUCTION TILES */
.iyg-auctions-grid ul.buttons {
  padding: 0;
}

.iyg-auctions-grid .auction {
  position: relative;
}

.iyg-auctions-grid .auction .iyg-auction-pill-wrapper {
  padding-top: 0;
}

.iyg-auctions-grid .auction .iyg-auction-pill-data a {
  padding: 4px 4px 4px 10px;
}

.iyg-auctions-grid .auction .iyg-auction-pill-data .eicon-clock-o {
  margin-right: 5px;
}

.iyg-auctions-grid .auction .iyg-auction-body {
  margin-bottom: 100px;
}

.iyg-auctions-grid .auction .iyg-auction-footer {
  position: absolute;
  bottom: 15px;
  width: 90%;
  display: flex;
  left: 5%;
  
}

.iyg-auctions-grid .auction .iyh-list-metadata {
  position: absolute;
  bottom: 69px;
  color: #6c757d;
  text-align: center;
  display: flex;
  width: calc(100% - 45px);
  height: 30px;
  padding: 0;
  margin: 20px 0;
  text-align: center;
  flex-direction: column;
}

.iyg-auctions-grid .auction .iyh-list-metadata .fas {
  margin-right: 5px;
  color: var(--accent);
}

.iyg-auctions-grid .auction .iyg-view-auction-btn {
  margin-left: 0;
}

.iyg-auctions-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(1, 1fr);
  /* mobile-first */
}

@media (min-width: 640px) {
  .iyg-auctions-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .iyg-auctions-grid.columns-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .iyg-auctions-grid.columns-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .iyg-auctions-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .iyg-auctions-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* --------------------------------------------------------------------------
   Auction Card
   -------------------------------------------------------------------------- */
.auction {
  background: var(--iyg-color-bg);
  border: 1px solid var(--iyg-color-border);
  border-radius: var(--iyg-radius-card);
  box-shadow: var(--iyg-shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: background var(--iyg-transition), box-shadow var(--iyg-transition);
}

.auction:hover {
  background: rgba(245, 245, 245, 0.6);
  box-shadow: var(--iyg-shadow-hover);
}

/* Image wrapper */
.iyg-auction-image-wrapper {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: #f3f4f6;
}

.iyg-auction-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
  display: block;
}

.auction:hover .iyg-auction-image-wrapper img {
  transform: scale(1.04);
}

.iyg-no-image {
  width: 100%;
  height: 100%;
  background: #e5e7eb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='1.5'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='m21 15-5-5L5 21'/%3E%3C/svg%3E") center/48px no-repeat;
}

/* No-reserve badge on image */
.iyg-no-reserve-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  background: linear-gradient(135deg, #8B0000 0%, #B22222 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 0;
  pointer-events: none;
  z-index: 2;
}

/* Card body */
.iyg-auction-body {
  padding: 16px 22px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0;
}

.iyg-auction-title {
  margin: 7px 0 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.333em;
  text-transform: uppercase;
  word-wrap: break-word;
}

.iyg-auction-title a {
  color: var(--iyg-color-text);
  text-decoration: underline;
  -webkit-text-decoration-color: transparent;
  text-decoration-color: transparent;
  text-decoration-thickness: 0.05em;
  text-underline-offset: 0.1em;
  transition: text-decoration-color var(--iyg-transition);
}

.iyg-auction-title a:hover {
  -webkit-text-decoration-color: currentColor;
  text-decoration-color: currentColor;
}

/* Excerpt */
.iyg-auction-excerpt {
  font-size: 14px;
  margin-top: 8px;
  line-height: 2;
  margin-bottom: 0;
  min-height: 100px;
  color: var(--iyg-color-muted);
}

/* Metadata row — mileage / transmission / engine */
.iyh-list-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 0 18px;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  line-height: 30px;
  color: var(--iyg-color-text);
  padding-bottom: 16px;
  margin-top: 8px;
}

.iyg-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: pre;
  line-height: 30px;
}

/* Pill wrapper / status area */
.iyg-auction-pill-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(35, 35, 35, 0.2);
  padding-top: 16px;
  margin-top: auto;
}

/* Status badges */
.iyg-auction-status,
.auction-pill-bid,
.auction-pill-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  padding: 0;
  white-space: nowrap;
  color: var(--iyg-color-text);
  background: transparent;
}

.iyg-auction-status.comingsoon {
  color: var(--iyg-color-text);
  font-weight: 700;
  font-size: 14px;
}

.iyg-auction-status.completed {
  color: var(--iyg-color-muted);
  font-size: 13px;
}

.auction-pill-time {
  color: var(--iyg-color-text);
  font-weight: 600;
  font-size: 14px;
}

.auction-pill-bid {
  color: var(--iyg-color-accent);
  font-weight: 700;
  font-size: 14px;
}

.iyg-bid-label {
  font-weight: 400;
  color: var(--iyg-color-muted);
}

.iyg-no-bids {
  color: var(--iyg-color-muted);
}

.iyg-reserve-status {
  font-size: 12px;
  font-weight: 500;
}

.reserve-met {
  color: var(--iyg-color-current);
}

.reserve-not-met {
  color: #ef4444;
}

/* Countdown */
.iyg-countdown {
  font-variant-numeric: tabular-nums;
}

.iyg-countdown.ending-soon {
  color: #ef4444;
}

/* View Auction button — matches theme button style */
.iyg-view-auction-btn {
  color: var(--accent);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.8em;
  padding: 5px 10px;
  margin-left: 10px;
  border: solid 1px var(--accent);
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.3s ease;
  float: left;
}

/* Auction footer — button + location row */
.iyg-auction-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid rgba(35, 35, 35, 0.2);
  padding-top: 16px;
  margin-top: 16px;
}

/* When pill-wrapper is present, footer has no extra top border */
.iyg-auction-pill-wrapper+.iyg-auction-footer {
  border-top: none;
  padding-top: 8px;
  margin-top: -18px;
}

.iyg-auction-pill-data {
  min-width: 150px;
  justify-content: flex-end;
  margin: 0;
  margin-top: -28px;
  margin-left: auto;
  position: relative;
  z-index: 2;
  background: linear-gradient(90deg, rgba(160, 142, 118, 1) 0%, rgba(200, 178, 154, 1) 100%);
}

.iyg-auction-pill-data a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  font-size: 1.1em;
  font-weight: 600;
  padding: 10px;
  white-space: nowrap;
  text-decoration: none;
}

/* Location label */
.iyg-auction-location {
  font-size: 14px;
  font-weight: 500;
  color: var(--iyg-color-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.iyg-auction-location .fas {
  color: var(--accent);
  margin-right: 5px;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.iyg-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
}

.iyg-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--iyg-color-border);
  border-radius: 6px;
  color: var(--iyg-color-text);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  background: var(--iyg-color-bg);
  transition: all var(--iyg-transition);
}

.iyg-page-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.iyg-page-btn.current {
  background: var(--iyg-color-accent);
  color: #fff;
  border-color: var(--iyg-color-accent);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Notices (error / empty state)
   -------------------------------------------------------------------------- */
.iyg-notice {
  padding: 14px 18px;
  border-radius: 6px;
  font-size: 0.9375rem;
}

.iyg-error-message {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.iyg-no-results {
  background: #f9fafb;
  border: 1px solid var(--iyg-color-border);
  color: var(--iyg-color-muted);
}

/* --------------------------------------------------------------------------
   Stats Widget
   -------------------------------------------------------------------------- */
.iyg-auction-stats {
  width: 100%;
}

.iyg-stats-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.iyg-stat-box {
  flex: 1 1 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  border-radius: var(--iyg-radius-card);
  border: 1px solid var(--iyg-color-border);
  background: var(--iyg-color-bg);
  text-align: center;
  box-shadow: var(--iyg-shadow-card);
}

.iyg-stat-number {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  display: block;
  margin-bottom: 6px;
}

.iyg-stat-label {
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
}

.iyg-stat-current .iyg-stat-number {
  color: var(--iyg-color-current);
}

.iyg-stat-comingsoon .iyg-stat-number {
  color: var(--iyg-color-comingsoon);
}

.iyg-stat-completed .iyg-stat-number {
  color: var(--iyg-color-muted);
}

.iyg-stat-current {
  border-top: 3px solid var(--iyg-color-current);
}

.iyg-stat-comingsoon {
  border-top: 3px solid var(--iyg-color-comingsoon);
}

.iyg-stat-completed {
  border-top: 3px solid var(--iyg-color-completed);
}

/* --------------------------------------------------------------------------
   Slider — .iyg-featured-slider-wrapper + .iyg-featured-slider
   -------------------------------------------------------------------------- */

/* Wrapper positions the external prev/next arrows over the slider */
.iyg-featured-slider-wrapper {
  position: relative;
  width: 100%;
  max-height: 750px;
  overflow: hidden;
  background: black;
}

/* External Slick prev/next arrow buttons */
.iyg-featured-slider-wrapper .iyg-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  padding: 0;
  backdrop-filter: blur(4px);
  opacity: 0.5;
}

.iyg-slider-arrow:hover {
  background: rgba(0, 0, 0, 0.75);
  opacity: 1;
}

.iyg-slider-prev {
  left: 16px;
}

.iyg-slider-next {
  right: 16px;
}

.iyg-featured-slider {
  width: 100%;
  overflow: hidden;
  position: relative;
}

/* Hide Slick's FOUC before JS initialises */
.iyg-featured-slider:not(.slick-initialized) .slideshow+.slideshow {
  display: none;
}

/* Slick-initialized wrapper background */
.iyg-featured-slider.slick-slider {
  background: black;
}

/* Each slide */
.iyg-featured-slider .slideshow {
  position: relative;
  width: 100%;
  overflow: hidden;
  display: block !important;
  text-align:center;
}

/* Fade gradient overlay on slides */
.iyg-featured-slider .slideshow.fade_left,
.iyg-featured-slider .slideshow.fade_right,
.iyg-featured-slider .slideshow.fade_up {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 65%, rgba(0, 0, 0, 1) 88%);
  border-bottom: 6px solid black;
}

/* Full-bleed background image */

body div .slideshow img.background {
  position: absolute;
  bottom: 0 !important;
  height: 101%;
  left: 0;
  width: 100%;
  z-index: -1;
  object-fit: cover;
  object-position: center -9vw;
}

@media(min-width:1200px) {
  body div .slideshow img.background {
    object-position: center 60%
  }
}

@media(min-width:1400px) {

  .slideshow .slide {
    padding-top: 580px;
  }

  body div .slideshow img.background {
    object-position: center 73%;
  }

}

@media (max-width: 600px) {
  .iyg-featured-slider .iyg-no-reserve-badge {
    left: -8px;
    top: 0;
    padding: 3px 8px;
    font-size: 10px;
  }
}

@media (max-width: 480px) {

  .iyg-featured-slider .slideshow h1.slide-title {
    font-size: 18px;
    max-width: 95%;
    margin: auto;
    padding-bottom: 30px;
    padding-top: 24px;
}

  .iyg-featured-slider .slideshow .slide {
    max-width: 100%;
    padding-top: 40vw;
  }

}


/* Slide content block */
.iyg-featured-slider .slideshow .slide {
  display:block !important;
  position: relative;
  z-index: 2;
  max-width: 100%;
  width: 100%;
  padding-top: 45vw;
  padding-bottom: 20px;
  margin-right: 0;
  text-align: center;
  color: #fff;
  padding-left: 0px;
}

@media (min-width: 1400px) {
  .iyg-featured-slider .slideshow .slide {
    padding-top: 580px;
  }
}

@media (max-width: 480px) {
  .iyg-featured-slider .slideshow .slide {
    padding-top: 40vw;
  }
}

/* No-reserve badge inside slider */
.iyg-featured-slider .iyg-no-reserve-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  display: inline-block;
  margin-bottom: 0;
  background: linear-gradient(135deg, #8B0000 0%, #B22222 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
}

@media (max-width: 600px) {
  .iyg-featured-slider .iyg-no-reserve-badge {
    top: 12px;
    left: 12px;
    padding: 3px 8px;
    font-size: 10px;
  }
}

/* Slide title */
.iyg-featured-slider h1.slide-title {
  color: #fff;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  max-width: 90%;
  margin: 0 auto 20px auto;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}

@media (max-width: 900px) {
  .iyg-featured-slider h1.slide-title {
    font-size: 30px;
  }
}

@media (max-width: 600px) {
  .iyg-featured-slider h1.slide-title {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .iyg-featured-slider h1.slide-title {
    font-size: 1.5em;
    max-width: 95%;
  }
}


/* Pill wrapper inside slider */
.iyg-featured-slider .iyg-auction-pill-wrapper,
.slide .iyg-auction-pill-wrapper {
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* Pill list (ul.buttons) */
.iyg-featured-slider ul.buttons {
  display: flex;
  flex-direction: row;
  list-style: none;
  margin: 20px auto 0 auto;
  padding: 0 0 0 0;
  width: 100%;
  justify-content: center;
  white-space: nowrap;
  font-size: 15px;
  line-height: 1.1em;
  text-shadow: 1px 1px rgba(0, 0, 0, 0.21);
  /* background: linear-gradient(90deg, rgba(160, 142, 118, 1) 0%, rgba(200, 178, 154, 1) 100%); */
  max-width: 300px;
}

.iyg-featured-slider ul.buttons li {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  min-width: 150px;
  /* background: linear-gradient(90deg, rgba(160, 142, 118, 1) 0%, rgba(200, 178, 154, 1) 100%); */
  padding: 0;
  margin: 0 -2px 0 0;
  border-radius: 2px;
  background: none;
}

.iyg-featured-slider ul.buttons li:first-of-type {
  min-width: 150px;
  background: linear-gradient(90deg, rgba(160, 142, 118, 1) 0%, rgba(200, 178, 154, 1) 100%);
}

.iyg-featured-slider ul.buttons li:nth-child(2) {
  background: linear-gradient(90deg, rgba(200, 178, 154, 1) 0%, rgba(220, 200, 180, 1) 100%);
}

ul.buttons li a:hover {
  background: #222;
}


/* Override pill colours for slider */
.iyg-featured-slider ul.buttons .auction-pill-time a,
.iyg-featured-slider ul.buttons .auction-pill-bid a,
.iyg-featured-slider ul.buttons li a {
  /* display: inline-flex; */
  display: block !important;
  align-items: center;
  width: 100%;
  text-align:center;
  padding: 7px 10px !important;
  /* gap: 5px; */
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  /* padding: 4px 10px; */
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.2s ease;
}

.iyg-featured-slider ul.buttons .auction-pill-bid a {
  font-weight: 700;
}

/* Hide default Slick arrows (we use external .iyg-slider-arrow buttons) */
.iyg-featured-slider .slick-prev,
.iyg-featured-slider .slick-next {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Card Thumbnail Slider
   -------------------------------------------------------------------------- */

.iyg-card-slider {
  position: relative;
  width: 100%;
  height: 100%;
}

/* All slides stacked; only .is-active is visible */
.iyg-card-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.iyg-card-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* better cropping aspect ratio */
.iyg-auctions-grid .auction a.iyg-auction-image-wrapper {
    aspect-ratio: 3 / 1.7;
}

/* Prev / next arrows — revealed on card hover */
.iyg-card-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: rgba(0, 0, 0, 0.45);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 22px;
  line-height: 1em;
  cursor: pointer;
  padding: 5px;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
  font-weight: normal;
  font-size: 18px;
}

.iyg-card-slider-btn:hover {
  background: rgba(0, 0, 0, 0.7) !important;
  color: white !important;  
}

.auction:hover .iyg-card-slider-btn {
  opacity: 1;
}

.iyg-card-slider-prev {
  left: 8px;
}

.iyg-card-slider-next {
  right: 8px;
}

/* Dot indicators */
.iyg-card-slider-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 10;
}

.iyg-card-slider-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.iyg-card-slider-dot.is-active {
  background: #fff;
  transform: scale(1.4);
}

/* "See More Images" slide */
.iyg-card-slide-more {
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
}

.iyg-card-slide-more span {
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-align: center;
  padding: 12px 20px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 6px;
  pointer-events: none;
}


/* AUCTION DETAILS */

.spec-item {
  padding: 12px;
  min-width: 100px;
}

/* --------------------------------------------------------------------------
   Grid Tile Slider  (.iyg-grid-slider-mode)
   -------------------------------------------------------------------------- */

/* Outer wrapper — negative margin compensates for viewport padding so the
   track still aligns with the page edge */
.iyg-grid-slider-outer {
  display: block;
  width: 100%;
  /*
  margin-left: -6px;
  margin-right: -6px;
  width: calc(100% + 12px);
  */
}

/* Viewport clips overflow and scrolls smoothly (scrollbar hidden).
   Padding gives cards breathing room so borders/shadows aren't clipped. */
.iyg-grid-slider-viewport {
  width: 100%;
  overflow-x: scroll;
  scroll-behavior: smooth;
  scrollbar-width: none;       /* Firefox */
  -ms-overflow-style: none;    /* IE / Edge */
  /* padding: 6px; */
  box-sizing: border-box;
}

.iyg-grid-slider-viewport::-webkit-scrollbar {
  display: none;
}

/* Track becomes a horizontal flex strip; JS sets item flex-basis */
.iyg-grid-slider-mode .iyg-auctions-grid.iyg-grid-slider-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  /* Override the CSS-grid layout set on .iyg-auctions-grid */
  grid-template-columns: unset;
}

/* Prevent cards from shrinking below their JS-assigned width */
.iyg-grid-slider-mode .iyg-grid-slider-track .auction {
  flex-shrink: 0;
  flex-grow: 0;
  /* Default width until JS runs — full viewport width on mobile */
  flex-basis: 100%;
  min-width: 0;
  max-width: 100%;
  margin-right: 24px !important;
}

/* Responsive defaults before JS fires (avoids FOUC) */
@media (min-width: 640px) {
  .iyg-grid-slider-mode .iyg-grid-slider-track .auction {
    flex-basis: calc(50% - 12px);
  }
}

@media (min-width: 1024px) {
  .iyg-grid-slider-mode .iyg-grid-slider-track.columns-2 .auction {
    flex-basis: calc(50% - 12px);
  }

  .iyg-grid-slider-mode .iyg-grid-slider-track.columns-3 .auction {
    flex-basis: calc(33.333% - 16px);
  }

  .iyg-grid-slider-mode .iyg-grid-slider-track.columns-4 .auction {
    flex-basis: calc(25% - 18px);
  }
}

/* Controls row — prev/next buttons below the grid */
.iyg-grid-slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

/* Prev / Next navigation buttons */
.iyg-grid-slider-btn {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #000;
  color: #ffffff;
  border: none;
  border-radius: 50%;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, opacity 0.2s ease;
  user-select: none;
}

.iyg-grid-slider-btn:hover {
  background: #333;
}

.iyg-grid-slider-btn:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

/* On mobile, shrink buttons slightly */
@media (max-width: 480px) {
  .iyg-grid-slider-btn {
    width: 32px;
    height: 32px;
    font-size: 20px;
  }
}