/* AUCTIONS CSS */

/* --- PAGE LAYOUT --- */
main {
  display: grid;
  grid-template-columns: 20.8rem 1fr;
  min-height: 100vh;
}

.auctions-main-content {
  /* padding: 3.2rem; */
  display: flex;
  flex-direction: column;
  gap: 4.8rem;
  /* Ensure backgrounds match other pages */
  /* Background removed to use global body background */
  /* Fix for grid item overflow */
  min-width: 0;
  width: 100%;
  overflow-x: hidden;
}

/* --- HEADER SECTION --- */
/* Matching Devices/Store header style */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.6rem 2.4rem;
  background: rgba(18, 18, 24, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.header-title {
  font-family: "Orbitron", sans-serif;
  font-size: 2.4rem;
  color: #fff;
  letter-spacing: 1px;
}

.btn-mint-nft {
  background: linear-gradient(135deg, #ffd900 0%, #ff8c00 100%);
  border: none;
  border-radius: 8px;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  text-decoration: none;
}

.btn-mint-nft:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 140, 0, 0.4);
}

.btn-mint-nft ion-icon {
  font-size: 2rem;
  color: #000;
}

.btn-mint-nft span {
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  color: #000;
  text-transform: uppercase;
}

/* --- COMMON SECTION STYLES --- */
/* --- COMMON SECTION STYLES --- */
/* --- COMMON SECTION STYLES --- */
.section-header-box {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: fit-content;
  padding: 0.8rem 1.6rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border-left: 4px solid #ffd900;
  box-shadow: 0 0 20px rgba(255, 217, 0, 0.2);
  margin-bottom: 2.4rem;
}

/* Remove the previous pseudo-element as we use border-left now */
.section-header-box::before {
  content: none;
}

.section-heading {
  font-family: "Orbitron", sans-serif;
  font-size: 2rem;
  color: #fff;
  margin-bottom: 0;
  text-transform: none; /* Sentence case as requested */
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(255, 217, 0, 0.8);
}

.section-header-box.header-red {
  border-left-color: #fa5252;
  box-shadow: 0 0 20px rgba(250, 82, 82, 0.2);
}

.section-header-box.header-red .section-heading {
  text-shadow: 0 0 10px rgba(250, 82, 82, 0.8);
}

/* Last Call Item Overrides */
.last-call .auction-action {
  flex-direction: column;
  gap: 0.8rem;
}

.last-call .auction-action .btn-bid {
  width: 100%;
}

.auctions-section {
  width: 100%;
}

/* --- CAROUSEL SECTIONS (Last Call & Auctions) --- */
/* Carousel Wrapper for Arrows */
.auctions-carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.auctions-carousel-container {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden; /* Hide scrollbar, controlled by arrows */
  padding-bottom: 0;
}

.auctions-carousel-track {
  display: flex;
  gap: 2.4rem;
  /* Ensure items don't shrink */
}

/* Navigation Buttons */
.auctions-carousel-btn {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  width: 4.8rem;
  height: 4.8rem;
  min-width: 4.8rem; /* prevent shrinking */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 2;
  font-size: 2.4rem;
  backdrop-filter: blur(4px);
}

.auctions-carousel-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.auctions-carousel-btn.prev-btn {
  margin-right: 1.6rem;
}

.auctions-carousel-btn.next-btn {
  margin-left: 1.6rem;
}

/* AUCTION BOX (Used in Carousel) */
.auctions-item-box {
  /* 
     We want exactly 5 items visible in the container width.
     Container width is determined by parent minus buttons.
     Let's calculate flex-basis.
     (100% - (4 * 2.4rem)) / 5 = ~20% minus gap adjustment.
  */
  flex: 0 0 calc((100% - (4 * 2.4rem)) / 5);
  min-width: 0; /* Override previous min-width */
  width: auto;
  background: rgba(35, 35, 45, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
  padding-bottom: 1.6rem;
  transition:
    border-color 0.3s,
    transform 0.3s;
}

.auctions-item-box:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-4px);
}

.auction-img-box {
  width: 100%;
  aspect-ratio: 1 / 0.99;
  overflow: hidden;
  padding: 1.2rem 0;
  /* background: #000; */
  border-radius: 0;
}

.auction-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s;
}

.auctions-item-box:hover .auction-img {
  transform: scale(1.05);
}

.auction-title {
  font-family: "Orbitron", sans-serif;
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 1.6rem;
}

.auction-category {
  font-family: "Rajdhani", sans-serif;
  font-size: 1.4rem;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  padding: 0 1.6rem;
}

.auction-price {
  font-family: "Rajdhani", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #ffd900;
  margin-bottom: 1.6rem;
  padding: 0 1.6rem;
}

.auction-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding: 0 1.6rem;
}

.btn-bid {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 0.8rem 1.6rem;
  border-radius: 6px;
  font-family: "Rajdhani", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-bid:hover {
  background: #ffd900;
  border-color: #ffd900;
  color: #000;
}

.auctions-timer {
  font-family:
    "Roboto", sans-serif; /* Monospace-ish looks good for timers usually, but Roboto is requested */
  font-weight: 700;
  font-size: 1.4rem;
}

.auctions-timer-red {
  color: #fa5252;
}

.auctions-timer-green {
  color: #40c057;
}

.auctions-timer-yellow {
  color: #ffd900;
}

/* --- NFT GALLERY SECTION --- */

/* Pagination / Filter Tabs */
.gallery-header {
  display: flex;
  justify-content: center;
  margin-bottom: 3.2rem;
}

.mobile-filter-dropdown-container {
  display: none;
}

.pagination-box {
  display: flex;
  background: rgba(18, 18, 24, 0.8);
  padding: 0.4rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auctions-filter-tab {
  background: transparent;
  border: none;
  color: #888;
  padding: 0.8rem 2.4rem;
  font-family: "Rajdhani", sans-serif;
  font-weight: 600;
  font-size: 1.4rem;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
}

.auctions-filter-tab:hover {
  color: #fff;
}

.auctions-filter-tab.active {
  background: #2c2c36;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Gallery Grid */
.auctions-gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2.4rem;
}

/* Reuse auction-box styles for gallery items, but handle differences */
.auctions-gallery-item {
  /* Similar to auction-box but as a div block since it's in a grid */
  background: rgba(35, 35, 45, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  padding: 0;
  padding-bottom: 1.6rem;
  transition:
    border-color 0.3s,
    transform 0.3s;
  display: flex;
  flex-direction: column;
}

.auctions-gallery-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-4px);
}

.gallery-img-box {
  width: 100%;
  aspect-ratio: 1 / 0.99;
  border-radius: 0;
  overflow: hidden;
  padding: 1.2rem 0;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s;
}

.auctions-gallery-item:hover .gallery-img {
  transform: scale(1.05);
}

.gallery-title {
  font-family: "Orbitron", sans-serif;
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 1.6rem;
}

.gallery-category {
  font-family: "Rajdhani", sans-serif;
  font-size: 1.3rem;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  padding: 0 1.6rem;
}

.gallery-price {
  font-family: "Rajdhani", sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff; /* Static price in white/default? or theme color? Let's stick to white for distinction from auction or theme color. */
  margin-bottom: 1.6rem;
  color: #ddd;
  padding: 0 1.6rem;
}

/* Button inside gallery item - full width? or just centered? 
   "Poniżej przycisk do wyświetlania większej ilości sztuk na wzór takiego przycisku ze strony Devices" is for the section footer.
   For the item box: "Boxy z konkretną sztuką są takie same jak w przypadku boxów z sekcji 1, z taką różnicą, że brak jest licznika, tylko stała cena."
   So it has a "Licytuj" button? Or "Buy"?
   Let's assume "Licytuj" or "Buy". The user text says "Boxy ... takie same ... brak licznika".
   In Section 1: Button "Licytuj".
   So I will keep "Licytuj" button.
*/
.auctions-gallery-item .btn-bid {
  width: calc(100% - 3.2rem);
  margin: 0 1.6rem;
  text-align: center;
}

/* Hidden initially items - Class preserved in HTML for reference but not used for display logic anymore */
/* .hidden-initially { } */

/* Gallery Extension Container for Smooth Animation */
.auctions-gallery-extension {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    max-height 0.8s ease-in-out,
    opacity 0.5s ease-in-out;
  margin-top: 0;
}

.auctions-gallery-extension.expanded {
  max-height: 2000px; /* Large enough to fit content */
  opacity: 1;
  margin-top: 2.4rem; /* Gap between grids */
}

/* Footer "Show More" Button */
.show-more-container {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.auctions-btn-show-more,
.auctions-btn-hide-art {
  width: 100%; /* Or fixed width? Devices page had width 100% in container */
  max-width: 40rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.6rem;
  text-align: center;
  color: #888;
  font-family: "Rajdhani", sans-serif;
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}

.auctions-btn-show-more:hover,
.auctions-btn-hide-art:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.1);
}

/* --- RESPONSIVE --- */
/* @media (max-width: 1400px) {
  .auctions-gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
} */

@media (max-width: 84em) {
  /* 1. Grid and Layout */
  .auctions-gallery-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 1.6rem;
  }

  .auctions-carousel-track {
    gap: 1.6rem;
  }

  .auctions-item-box {
    flex: 0 0 calc((100% - (4 * 1.6rem)) / 5);
  }

  /* 2. Typography & Scaling */
  .section-heading {
    font-size: 1.7rem;
  }

  .auction-title,
  .gallery-title {
    margin-bottom: 0.2rem;
  }

  .auction-category,
  .gallery-category {
    margin-bottom: 0.4rem;
  }

  /* 3. Navigation (Carousel arrows) */
  .auctions-carousel-btn {
    position: absolute;
    z-index: 10;
  }

  .auctions-carousel-btn.prev-btn {
    left: -1.6rem;
    margin-right: 0;
  }

  .auctions-carousel-btn.next-btn {
    right: -1.6rem;
    margin-left: 0;
  }
}

@media (max-width: 75em) {
  /* 1. Main Layout & Grid */
  .auctions-main-content {
    /* Padding is mostly handled globally, but ensuring container doesn't overflow */
    padding: 0 2.4rem;
  }

  .auctions-gallery-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.6rem;
  }

  .auctions-carousel-track {
    gap: 1.6rem;
  }

  .auctions-item-box {
    flex: 0 0 calc((100% - (3 * 1.6rem)) / 4);
    padding-bottom: 1.6rem;
  }

  /* 2. NFT Card Internals */
  .auction-img-box,
  .gallery-img-box {
    padding: 1.6rem 0; /* Adjusted internal padding implicitly via img box */
  }

  .auction-img,
  .gallery-img {
    width: 100%;
    object-fit: contain; /* Keeping original assumption */
  }

  /* Text layout wrap */
  .auction-action {
    flex-wrap: wrap;
  }

  /* 3. Typography */
  .section-heading {
    font-size: 1.5rem;
  }

  .auction-title,
  .gallery-title {
    font-size: 1.6rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* 4. Navigation & Interface */
  .auctions-carousel-btn {
    display: none;
  }

  .auctions-carousel-container {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    /* Hide scrollbar for cleaner look if desired, but functionality is key */
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .auctions-carousel-container::-webkit-scrollbar {
    display: none;
  }

  .auctions-item-box {
    scroll-snap-align: start;
  }

  .btn-mint-nft {
    padding: 1rem 1.6rem;
  }

  .btn-bid {
    width: 100%;
  }

  .auctions-timer-yellow,
  .auctions-timer-green {
    margin-top: 0.8rem;
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 59em) {
  /* 1. Main Layout & Grid */
  .auctions-main-content {
    padding: 0 1.6rem;
  }

  .auctions-gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.6rem;
  }

  .auctions-carousel-track {
    gap: 1.6rem;
  }

  .auctions-item-box {
    flex: 0 0 calc((100% - (2 * 1.6rem)) / 3);
  }

  /* 2. NFT Card Internals */
  .auction-img-box,
  .gallery-img-box {
    padding: 1.2rem 0;
  }

  /* Already flex-wrap in 75em but adding specific gap/justify-content as requested */
  .auction-action {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: space-between;
  }

  /* 3. Typography */
  .section-heading {
    font-size: 2.2rem;
  }

  .auction-title,
  .gallery-title {
    font-size: 1.6rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .auction-price,
  .gallery-price,
  .auctions-timer {
    font-size: 1.4rem;
  }

  /* 4. Touch Targets */
  .btn-bid {
    width: 100%;
    min-height: 3.6rem;
  }

  /* Carousel setup inherited from 75em, ensuring it applies if not already */
  .auctions-carousel-btn {
    display: none;
  }

  .auctions-carousel-container {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .auctions-carousel-container::-webkit-scrollbar {
    display: none;
  }

  .auctions-item-box {
    scroll-snap-align: start;
  }
}

@media (max-width: 44em) {
  /* 1. Main Layout & Grid */
  .auctions-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }

  /* 2. Last call Carousel Scroll */
  .auctions-carousel-track {
    gap: 1.2rem;
  }

  .auctions-item-box {
    /* Fixed width to show 2 full cards and a peek of the third */
    flex: 0 0 26rem;
    min-width: 26rem;
  }

  /* 3. Header & Navigation */
  .btn-mint-nft span {
    font-size: 1.2rem;
  }

  .btn-mint-nft {
    padding: 0.8rem 1.6rem;
  }

  /* 4. NFT Card Internals & Touch Targets */
  .auction-img-box,
  .gallery-img-box {
    aspect-ratio: 1 / 1;
  }

  .auction-img,
  .gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .auction-title,
  .gallery-title {
    font-size: 1.6rem;
  }

  .auction-price,
  .gallery-price,
  .auctions-timer {
    font-size: 1.4rem;
  }

  .btn-bid {
    width: 100%;
    min-height: 3.6rem;
    font-size: 1.2rem;
  }
}

@media (max-width: 34em) {
  /* 1. Main Layout & Grid */
  .auctions-main-content {
    padding: 0 1.2rem;
  }

  .auctions-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }

  /* 2. Header & Main Navigation */
  .pagination-box .auctions-filter-tab {
    display: none;
  }

  .auctions-filter-mobile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 1.2rem;
    font-size: 1.6rem;
    border-radius: 8px;
    cursor: pointer;
  }

  .mobile-filter-dropdown-container {
    display: block;
    width: 100%;
    position: relative;
    margin-bottom: 2.4rem;
  }

  .auctions-filter-mobile-btn ion-icon {
    font-size: 2.4rem;
  }

  .mobile-filter-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(35, 35, 45, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-top: 0.8rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 100;

    /* Animation defaults */
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    transition:
      max-height 0.3s ease,
      opacity 0.3s ease;
  }

  .mobile-filter-dropdown-menu.show {
    max-height: 300px;
    opacity: 1;
    pointer-events: auto;
  }

  .dropdown-item {
    background: transparent;
    border: none;
    color: #888;
    padding: 1.6rem;
    font-family: "Rajdhani", sans-serif;
    font-weight: 600;
    font-size: 1.6rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .dropdown-item:last-child {
    border-bottom: none;
  }

  .dropdown-item:hover,
  .dropdown-item.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
  }

  .btn-mint-nft {
    padding: 0.8rem 1.2rem;
  }

  .btn-mint-nft span {
    font-size: 1.2rem;
  }

  /* 3. Last Call Carousel */
  .auctions-item-box {
    flex: 0 0 18.7rem;
    min-width: 18.7rem;
  }

  .auctions-carousel-track {
    gap: 1.2rem;
  }

  /* 4. NFT Card Internals & Typography */
  .auction-img-box,
  .gallery-img-box {
    aspect-ratio: 1 / 1;
    width: 100%;
  }

  .auction-img,
  .gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .section-heading {
    font-size: 2rem;
  }

  .auction-title,
  .gallery-title {
    font-size: 1.6rem;
  }

  .auction-price,
  .gallery-price {
    font-size: 1.4rem;
  }

  .auctions-timer {
    font-size: 1.2rem;
  }

  .btn-bid {
    width: 100%;
    min-height: 3.6rem;
    font-size: 1.2rem;
  }
}
