/* Hide mobile filters toggle on desktop */
/* Hide only the filter toggle summary on desktop */
details.mobile-filters summary {
  display: none;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

html, body {
    height: 100%;
}

#main-content {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}


a {
    text-decoration: none;
    color: inherit;
}

/* Style for series links to look like standard URLs */
.series-link {
    color: #1a0dab;
    text-decoration: underline;
    cursor: pointer;
}





.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    color: #1e3a8a;
    padding: 0.75em 1.5em;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #e0e7ff;
}

/* Search Bar */
.search-bar {
    display: flex;
    justify-content: center;
    margin: 2em 0 4em; 
}

.search-bar input {
    width: 300px;
    padding: 0.5em;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
}

.search-bar button {
    padding: 0.5em 1em;
    font-size: 1em;
    border: none;
    background-color: #2563eb;
    color: white;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.featured-categories {
    /* original top/bottom padding, move bottom space into padding-bottom */
    padding: 2em 0 4.67em;  /* bottom padding reduced by two thirds */
    text-align: center;
}

.category-cards {
    display: flex;
    justify-content: center;
    gap: 1em;
    margin-top: 1em;
}

.category-card {
    background-color: white;
    padding: 1em 2em;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    font-weight: bold;
    color: #1e3a8a;
    transition: background-color 0.3s;
}

.category-card:hover {
    background-color: #e0f2fe;
}

.new-arrivals {
    /* reset to standard padding */
    border-top: 1px solid #ccc;
    padding: 2em 2em 2em; /* reduced top padding by half */
}

/* New Arrivals Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  justify-items: center;   /* Center cards within the grid */
  gap: 1rem;
  margin: 1rem auto;
}

/* Updated product card layout */
.card-widget {
  display: grid;
  grid-template-rows: 60% 25% 15%; /* Image, title, price */
  width: 250px;            /* Fixed width */
  height: 350px;           /* Fixed height */
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0.5rem;
  box-sizing: border-box;
  text-align: left;
}

.card-widget img {
  grid-row: 1 / 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.card-widget h3 {
  grid-row: 2 / 3;
  margin: 0.5rem 0 0.2rem 0;
  overflow: hidden;
  font-size: 0.9em;  /* reduced one level */
  line-height: 1.2;
  position: relative;
  padding-bottom: 0.3rem;       /* Add padding to ensure space for the border */
}

.card-widget h3::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-bottom: 1px solid #ddd;
}

.card-widget .price {
  grid-row: 3 / 4;
  font-size: 0.9em;
  color: #1e3a8a;
  font-weight: bold;
  margin-top: 0.3rem;
}

/* Carousel Placeholder */
.carousel-placeholder {
    text-align: center;
    background-color: #ffffff;
    padding: 2em;
    margin: 2em;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* Footer */
footer {
    background-color: #1e3a8a;
    color: white;
    text-align: center;
    padding: 1em;
    margin-top: auto;
}

/* Modern Hero Section */

/* Hero Section */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4em 2em;
  background: linear-gradient(120deg, #1e3a8a, #3b82f6);
  color: white;
  text-align: center;
}

.hero-content {
  max-width: 800px;
}

.hero h1 {
  font-size: 2.5em;
  margin-bottom: 0.5em;
}

.hero p {
  font-size: 1.2em;
  margin-bottom: 1em;
}

.hero-full {
    height: 100vh;
    background-image: url('images/main_background.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4em 2em;
    text-align: center;
}

.hero-inner {
    max-width: 900px;
    width: min(900px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-subtext {
  margin: 1em 0 2em;
  font-size: 1.2em;
  color: #555;
}

.expressive-heading {
    font-size: 3em;
    font-weight: 700;
    color: #1e3a8a;
    line-height: 1.2;
}

.expressive-heading .highlight {
    color: #FFD700;
}



.cta-button.large {
    font-size: 1.1em;
    padding: 0.75em 2em;
    border-radius: 6px;
}

.content-shell {
    width: min(1100px, calc(100% - 2rem));
    margin: 0 auto;
}

.homepage-content-band,
.content-section {
    padding: 3rem 0;
}

.homepage-content-band {
    background-color: #ffffff;
    border-bottom: 1px solid #ddd;
}

.homepage-search {
    margin-bottom: 2rem;
}

.homepage-search .search-bar {
    margin: 1.5rem 0 0;
}

.hero-search {
    max-width: 760px;
    width: min(760px, 100%);
    margin-top: 1.5rem;
}

.hero-search .section-title {
    text-align: center;
    color: #ffffff;
    margin-bottom: 0.75rem;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

.hero-search .search-bar {
    justify-content: center;
    margin: 0;
}

.hero-search .search-bar input {
    width: min(420px, 70vw);
    background: rgba(255, 255, 255, 0.96);
}

.hero-categories {
    justify-content: center;
    align-items: stretch;
    margin: 1.5rem 0 0;
    gap: 0.75rem;
    width: min(900px, 100%);
}

.hero-categories section.dropdown {
    flex: 1 1 0;
    min-width: 0;
}

.hero-categories .dropbtn {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-categories .dropdown-content {
    text-align: left;
}

.hero-full .cta-button.large {
    display: flex;
    margin: 0 auto;
    width: fit-content;
}

.hero-full .dropbtn,
.hero-full .dropdown-trigger {
    box-shadow: none;
}

.hero-full .dropbtn:hover,
.hero-full .dropbtn:focus,
.hero-full .dropdown-trigger:active {
    box-shadow: none;
}

.intro-copy {
    max-width: 900px;
    margin: 0 auto 2rem;
    text-align: center;
}

.intro-copy p,
.faq-item p,
.content-page-copy p,
.content-page-copy li {
    color: #444;
    font-size: 1rem;
}

.trust-grid,
.internal-link-grid,
.faq-list {
    display: grid;
    gap: 1.25rem;
}

.trust-grid,
.internal-link-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.faq-list {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.trust-card,
.content-card-link,
.faq-item,
.content-page-copy {
    background-color: #ffffff;
    border: 1px solid #d8d8d8;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.trust-card,
.faq-item,
.content-page-copy {
    padding: 1.25rem;
}

.trust-card h3,
.content-card-link h3,
.faq-item h3,
.content-page-copy h2 {
    color: #1e3a8a;
    margin-bottom: 0.65rem;
}

.content-card-link {
    display: block;
    padding: 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.content-card-link:hover,
.content-card-link:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(30, 58, 138, 0.12);
}

.faq-section {
    background-color: #f8fafc;
    border-top: 1px solid #ddd;
}

.section-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    color: #1e3a8a;
    font-weight: 600;
}

.section-links a,
.content-page-copy a,
.hyperlink-light a {
    color: #1e3a8a;
    text-decoration: underline;
}

.content-page {
    padding: 2.5rem 0 4rem;
}

.content-page-hero {
    width: min(900px, calc(100% - 2rem));
    margin: 0 auto 2rem;
    text-align: center;
}

.content-page-copy {
    width: min(900px, calc(100% - 2rem));
    margin: 0 auto;
}

.content-page-copy ul {
    margin: 1rem 0 1rem 1.25rem;
}

.content-page-copy p + h2,
.content-page-copy ul + h2 {
    margin-top: 1.5rem;
}


/* Section Title */
.section-title {
    text-align: center;
    font-size: 1.8em;
    margin-bottom: 0.5em;
    color: #1e3a8a;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.5em;
    padding: 2em;
    text-align: center;
}

.category-block {
    background-color: white;
    padding: 1.5em;
    border-radius: 6px;
    font-weight: bold;
    color: #1e3a8a;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s, background-color 0.3s;
}

.category-block:hover {
    transform: translateY(-3px);
    background-color: #e0f2fe;
}

/* Footer */
.soft-footer {
    background-color: #f0f0f0;
    color: #333;
    text-align: center;
    padding: 2em;
    font-size: 0.9em;
}

.dropbtn {
    color: #090909;
    padding: 0.7em 1.7em;
    font-size: 18px;
    border-radius: 0.5em;
    background: #e8e8e8;
    cursor: pointer;
    border: 1px solid #e8e8e8;
    transition: all 0.3s;
    box-shadow: 6px 6px 12px #c5c5c5,
                -6px -6px 12px #ffffff;
}
  
.dropbtn:hover, .dropbtn:focus {
    background-color: #2980B9;
}
  
.dropdown {
    position: relative;
    display: inline-block;
}
  
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f1f1f1;
    min-width: 160px;
    overflow: auto;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}
  
.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}
  
.dropdown a:hover {background-color: #ddd;}
  
.show {display: block;}

/* Ensure the dropdown buttons are centered and equal in width */
.dropdown-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  align-items: center;
  margin: 2rem 0;
}

.dropdown-container section.dropdown {
  flex: 1;
}

.dropbtn {
  width: 100%;
}

/* Neuromorphic button style */
.dropdown-trigger {
    color: #090909;
    padding: 0.7em 1.7em;
    font-size: 18px;
    border-radius: 0.5em;
    background: #e8e8e8;
    cursor: pointer;
    border: 1px solid #e8e8e8;
    transition: all 0.3s;
    box-shadow: 6px 6px 12px #c5c5c5,
                -6px -6px 12px #ffffff;
  }
  
  .dropdown-trigger:active {
    color: #666;
    box-shadow: inset 4px 4px 12px #c5c5c5,
                inset -4px -6px 12px #ffffff;
  }


  /* Navigation Styles */
.experimental-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #fafafa;
  color: #333;
  padding: 1em 2em;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  flex-wrap: wrap;
}

.nav-logo-container {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 0.5em 1em;
  max-width: 200px;
}

.nav-logo {
  max-height: 50px;
  width: auto;
  margin-right: 1em;
}

.nav-links {
  display: flex;
  flex: 1;
  justify-content: flex-end;
  align-items: center;
  list-style: none;
  gap: 2em;
  flex-wrap: wrap;
}

.nav-links a {
  color: #333;
  font-weight: 600;
}

.nav-toggle {
  display: none;
}

.nav-links.show {
  display: flex;
}



/* Improve contrast for hero-full section */
.hero-full {
    position: relative;
}
.hero-full::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}
.hero-full .hero-inner {
    position: relative;
    z-index: 2;
    color: #ffffff;
}
.hero-full .expressive-heading {
    color: rgba(255,255,255,0.85);
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

.hero-full .expressive-heading .highlight {
    color: #FFD700;
}

.hero-full .hero-subtext {
    color: #ffffff;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

/* JS‑controlled carousel overrides */
.slider {
    position: relative;
    overflow: hidden;
    padding: 0 4rem; /* leave room for nav arrows */
    box-sizing: border-box;
}

.slides {
    display: flex !important;
    width: auto !important;
    transition: transform 0.5s ease;
    animation: none !important;
}

.slide {
    flex: 0 0 100% !important; /* each slide takes full width for JS control */
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    justify-items: center;
}

.item-images {
    position: relative;
    width: fit-content;
    max-width: 100%;
    margin: 0;
  }
  
  .item-images .carousel-prev,
  .item-images .carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    border: none;
    font-size: 3rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
  }
  
  .item-images .carousel-prev {
    left: 0.5rem;
  }
  
  .item-images .carousel-next {
    right: 0.5rem;
  }

  .item-details-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
  }

  .breadcrumbs {
    width: min(1200px, calc(100% - 2rem));
    margin: 1.5rem auto 1rem;
    color: #4b5563;
    font-size: 0.95rem;
  }

  .breadcrumbs a {
    color: #1e3a8a;
    text-decoration: underline;
  }

  .breadcrumbs span {
    margin: 0 0.35rem;
  }
  
  .item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  #item-title {
    margin-bottom: 0.5rem;
  }

  .item-summary {
    margin-bottom: 0.75rem;
    color: #444;
    line-height: 1.55;
  }
  
  .title-divider {
    border: none;
    border-top: 1px solid #ccc;
    margin: 0.5rem 0 1rem;
  }
  
  .item-price-label {
    font-weight: bold;
    font-size: 1.1em;
    color: #1e3a8a;
  }

  .cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #2563eb;   /* blue */
    color: #ffffff;              /* white text */
    padding: 0.75em 1.5em;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
    width: auto;                 /* remove full width */
    max-width: 100%;
  }
  
  .cta-button:hover {
    background-color: #ffffff;
    color: #2563eb;
    border: 1px solid #2563eb;
  }

  .cta-wrapper {
    width: fit-content;
    margin: 1rem 0 1.5rem; /* space below the button */
  }

  .item-related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    color: #1e3a8a;
    font-weight: 600;
  }

  .item-related-links a {
    color: #1e3a8a;
    text-decoration: underline;
  }
  
  .section-divider {
    border: none;
    border-top: 1px solid #ccc;
    margin-bottom: 1.5rem;
  }

  .item-description {
    margin: 1rem 0;
    font-size: 1em;
    color: #444;
    line-height: 1.5;
  }

  .attributes-grid {
    columns: 2;
    column-gap: 2rem;
    margin-top: 1rem;
  }
  
  .attribute {
    break-inside: avoid;
    padding: 0.3rem 0;
    font-size: 0.9em;
    color: #333;
  }
  
/* Category Logo Styling */
#categoryLogo {
  max-width: 300px;
  height: auto;
  display: none;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .hero-full {
    min-height: 75vh;
    height: auto;
  }

  .expressive-heading {
    font-size: 2.25em;
  }

  .dropdown-container {
    flex-direction: column;
  }

  .dropdown-container section.dropdown {
    width: 100%;
  }

  .section-links {
    flex-direction: column;
    align-items: center;
  }

  .hero-search .search-bar input {
    width: 100%;
    max-width: 320px;
  }

  .breadcrumbs,
  .item-related-links {
    text-align: center;
  }

  .item-related-links {
    justify-content: center;
  }
}
/* Series and Cards Layout for CCG Page */
.series-container {
  display: flex;
  gap: 2rem;
  padding: 0 2rem;
  align-items: flex-start;
}

.series-list ul,
.series-cards ul {
  list-style: none;
  padding-left: 0;
}

.series-list li,
.series-cards li {
  margin-bottom: 0.5rem;
}

.series-cards {
  border-left: 1px solid #ccc;
  padding-left: 1.5rem;
}

#cardsHeader {
  margin-bottom: 1rem;
}

.subcategory-label {
  font-weight: bold;
  margin-top: 8px;
  padding-left: 10px;
}
.dropdown-content a {
  padding-left: 20px; /* indent all links a bit */
}

/* Indent second-level subcategory links visually */
.sublevel {
  padding-left: 40px;
}

.mode-button {
  display: inline-block;
  min-width: 250px;
  margin: 0 1rem;
  padding: 1rem 2rem;
  border: none;
  background-color: #f3f3f3;
  color: #000;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.mode-button:hover {
  background-color: #e0e0e0;
}

.mode-button.active {
  background-color: #333;
  color: #fff;
}

/* Style for hyperlinks */
.hyperlink {
  color: #007bff; /* standard blue */
  font-weight: bold;
  text-decoration: underline;
  cursor: pointer;
}
.hyperlink-light {
  color: #e8e295; /* standard blue */
  font-weight: bold;
  text-decoration: underline;
  cursor: pointer;
}

/* previous / next buttons */
.pagination-button {
  background-color: #007bff;
  color: #ffffff;
  font-weight: bold;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin: 0 0.25rem;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.pagination-button:hover:not(:disabled) {
  background-color: #0056b3;
}

.pagination-button:disabled {
  background-color: #cccccc !important;
  color: #666666 !important;
  cursor: not-allowed;
  border: none;
}

.dropdown-container.featured-categories section.dropdown {
  flex: 1;
  min-width: 0;
}

.dropdown-container.featured-categories .dropbtn {
  width: 100%;
  white-space: normal;
  word-break: break-word;
}

.arrow-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1em 0;
}

/* Force arrow-controls buttons to override slider styles */
.arrow-controls .carousel-prev,
.arrow-controls .carousel-next {
  position: static !important;
  margin: 0 !important;
  top: auto !important;
  transform: none !important;
  font-size: 2.5rem !important;
  width: 4rem !important;
  height: 4rem !important;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s;
}

.arrow-controls .carousel-prev:hover,
.arrow-controls .carousel-next:hover {
  background: rgba(0, 0, 0, 0.8);
}


@media (max-width: 768px) {
  .experimental-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
  }

  .nav-logo-container {
    order: 1;
  }

  .nav-toggle {
    order: 2;
    display: block;
    background: none;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    margin-left: 0;
    padding: 0.25em;
  }

  .nav-links {
    order: 3;
    flex: 0 0 100%;
    display: none;
    flex-direction: column;
    gap: 1em;
    margin-top: 1em;
    align-items: flex-start;
  }

  .nav-links.show {
    display: flex;
  }

  .cta-button,
  .cta-button.large {
    width: 140px;
    height: 48px;
    padding: 0.5em 0.75em;
    font-size: 0.9em;
    line-height: 1.2;
  }

  .dropdown-container.featured-categories .dropdown-trigger {
    width: 140px;
    height: 48px;
    padding: 0.5em 0.75em;
    font-size: 0.9em;
    line-height: 1.2;
  }

  /* Stack the three featured-categories buttons */
  .dropdown-container.featured-categories {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 1rem !important;
    width: 100% !important;
  }

  /* Make each dropdown section full-width and position-relative */
  .dropdown-container.featured-categories section.dropdown {
    width: 100%;
    position: relative;
  }

  /* Button fills its section and wraps text */
  .dropdown-container.featured-categories .dropbtn {
    width: 100%;
    white-space: normal;
    word-break: break-word;
  }

  /* Force the panel to span the full width under the button */
  .dropdown-container.featured-categories .dropdown-content {
    left: 0 !important;
    width: 100% !important;
  }

  /* single card per row in New Arrivals on mobile */
  .new-arrivals .card-grid {
    grid-template-columns: 1fr !important;
  }

  .arrow-controls .carousel-prev,
  .arrow-controls .carousel-next {
    font-size: 3rem;
    width: 5rem;
    height: 5rem;
  }

  /* Center the single card on mobile */
  .new-arrivals .slides {
    justify-content: center !important;
  }

  /* Mobile: Stack series list and cards vertically for ccg.php/nsport.php */
  .series-container {
    flex-direction: column !important;
    gap: 1.5rem !important;
  }

  .series-container .series-list,
  .series-container .series-cards {
    flex: 1 1 100% !important;
    width: 100% !important;
    padding: 0 1rem !important;
  }

  /* Ensure series cards list items stack on mobile */
  .series-cards ul#cardsList li {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    padding-right: 0 !important;
  }

  /* Tidy up back-to-list link and caption spacing */
  #backToFullList,
  #hoverCaption {
    display: block !important;
    margin: 1rem auto !important;
  }

  /* Increase padding on mobile for series list cards */
  .series-list ul#seriesList li {
    padding: 1.5rem !important;
  }

  /* Increase padding on mobile for series-cards grid items */
  .series-cards ul#cardsList li {
    padding: 1.5rem !important;
  }

  /* Stack mode buttons vertically on mobile */
  #modeButtons {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.5rem !important;
  }
  #modeButtons .mode-button {
    width: 100% !important;
    margin: 0 !important;
  }

  /* Mobile: preview popup fixed to viewport */
  .card-preview-popup {
    position: fixed !important;
  }

  /* Prevent mobile browsers from zooming on double-tap or rapid taps */
  button,
  a,
  .carousel-prev,
  .carousel-next {
   touch-action: manipulation;
  }

  .series-list ul#seriesList {
    grid-template-columns: 1fr !important;
  }

    /* Mobile: stack item page image and details vertically */
    .item-details-container {
      flex-direction: column !important;
      align-items: stretch !important;
    }
    .item-images,
    .item-info {
      width: 100% !important;
    }

    /* Center item page title, price label, and buy button */
.item-info {
  text-align: center;
}

.item-info .item-price-label {
  margin: 0.5rem 0 1rem;
}

  /* Center the Buy on eBay button on mobile */
  .item-info .cta-wrapper {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 1rem 0 !important;
  }
  
  /* Filters collapse behavior */
  /* Show filter toggle on mobile */
  details.mobile-filters summary {
    display: block !important;
  }
  details.mobile-filters .filters {
    display: block;
  }
  details.mobile-filters {
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-bottom: 1rem;
  }
  details.mobile-filters summary {
    cursor: pointer;
    padding: 0.75em 1em;
    background: #1e3a8a;
    color: #fff;
    font-weight: bold;
    border-radius: 6px;
    list-style: none;
  }
  details.mobile-filters summary::-webkit-details-marker {
    display: none;
  }
  details.mobile-filters[open] summary {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
  details.mobile-filters .filters {
    padding: 1em;
    background: #fafafa;
  }

   /* Mobile: show and stack result controls vertically */
   .results-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.5rem !important;
    width: 100% !important;
    margin-bottom: 1rem !important;
  }

  .results-header label {
    display: block !important;
    width: auto !important;
  }

  #resultCount {
    display: block !important;
  }

  #paginationControlsTop,
  #paginationControlsBottom {
    display: flex !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    width: 100% !important;
    margin-bottom: 1rem !important;
  }


  /* Mobile: stack search results one card per row */
  .card-grid {
    grid-template-columns: 1fr !important;
  }
  .card-grid .card-widget {
    width: 100% !important;
  }
  

/* Search Results Card Grid */
#cardsList {
  display: grid !important;
  grid-template-columns: 1fr !important;
  justify-items: center !important;
  gap: 1rem !important;
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

#cardsList li {
  background-color: #ffffff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  width: 90% !important;
  margin: 0 auto !important;
}

#cardsList li img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

#cardsList li a.series-link {
  font-weight: 600;
  color: #1e3a8a;
  text-decoration: none;
  margin-bottom: 0.5rem;
}

#cardsList li span {
  font-size: 0.9em;
  color: #333;
  margin-top: auto;
  text-align: right;
}

/* Keep filter panel open while scrolling inside */
details.mobile-filters .filters {
  max-height: 60vh;               /* limit height so it can scroll */
  overflow-y: auto;               /* enable vertical scrolling */
  -webkit-overflow-scrolling: touch; /* smooth native scrolling on iOS */
}

/* Prevent summary toggle when you start swiping in the panel */
details.mobile-filters summary {
  touch-action: manipulation;     /* disable pinch/zoom but allow taps */
}

}


/* Center and evenly distribute cards in New Arrivals */
.new-arrivals .slides {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  box-sizing: border-box;
  padding: 0 1em;
  gap: 1rem;
}

.new-arrivals .slides .card-widget {
  flex: 0 0 auto;
  margin: 0;
}


/* Style series-cards search results as a card grid */
.series-cards ul#cardsList {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.series-cards ul#cardsList li {
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.series-cards ul#cardsList li span,
.series-cards ul#cardsList li a {
  margin-bottom: 0.5rem;
}

.series-cards ul#cardsList li a.series-link {
  font-weight: 600;
  color: #1e3a8a;
  text-decoration: none;
}

.series-cards ul#cardsList li span {
  font-size: 0.9em;
  color: #333;
}

.series-cards ul#cardsList li img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

/* Right-align price in series cards */
.series-cards ul#cardsList li span {
  text-align: right;
  width: 100%;
  align-self: flex-end;
}
.series-list ul#seriesList {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.series-list ul#seriesList li:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.series-list ul#seriesList li a.series-link {
  display: block;
  font-weight: 600;
  color: #1e3a8a;
  text-decoration: none;
  margin-bottom: 0.5rem;
}
