/* products.css */
html, body { margin: 0; padding: 0; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
  width: 100%;
}



/* ===== Back button (upgraded) ===== */
.back-btn {
  --from: var(--accent, #3478F6);      /* fallback to Hyper Blue if --accent missing */
  --to:   var(--accent2, #8C6FF0);     /* optional secondary for gradient */

  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;

  font: 600 14px/1 'Poppins', system-ui, sans-serif;
  color: var(--from);
  text-decoration: none;

  /* gradient ring */
  border: 1px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(90deg, var(--from), var(--to)) border-box;

  box-shadow: 0 6px 16px rgba(18,26,38,.06);
  transition: color .2s ease, box-shadow .2s ease, transform .08s ease, background .2s ease;
}

.back-btn i {
  font-size: 13px;
  translate: 0 0;
  transition: translate .18s ease;
}

/* hover: fill the pill */
.back-btn:hover {
  color: #fff;
  background: linear-gradient(90deg, var(--from), var(--to));
  box-shadow: 0 10px 22px rgba(52,120,246,.25);
}
.back-btn:hover i { translate: -2px 0; } /* nudge left arrow */

/* active press */
.back-btn:active { transform: translateY(1px); box-shadow: 0 6px 14px rgba(18,26,38,.1); }

/* keyboard focus */
.back-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(52,120,246,.25),
    0 10px 24px rgba(18,26,38,.12);
}

/* disabled (supports aria-disabled or disabled attr) */
.back-btn[aria-disabled="true"],
.back-btn:disabled {
  pointer-events: none;
  opacity: .55;
  box-shadow: none;
}

/* compact variant (optional) */
.back-btn--sm { padding: 8px 12px; font-size: 13px; }



.pagination {
  margin-top: 40px;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-link {
  padding: 8px 14px;
  background-color: #e5e7eb;
  border-radius: 6px;
  text-decoration: none;
  color: #1f2937;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.page-link:hover {
  background-color: #d1d5db;
}

.page-link.active {
  background-color: #3b82f6;
  color: white;
}







/* === Ecommerce Banner Section === */
.products-page-wrapper .ecommerce-banner {
  --space: #121A26;   /* Space Graphite */
  --blue:  #3478F6;   /* Hyper Blue */
  --vio:   #8C6FF0;   /* Quantum Violet */
  --bg:    #F4F6FA;   /* Cloud Mist */
  --mint:  #38E6A0;   /* Pulse Mint */
  position: relative;
  margin-bottom: 56px;
  isolation: isolate;
}

/* Swiper shell */
.products-page-wrapper .banner-swiper {
  width: 100%;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 20px 48px rgba(18, 26, 38, 0.20);
  backdrop-filter: saturate(1.02);
}

/* Slide */
.products-page-wrapper .banner-slide {
  position: relative;
  width: 100%;
  height: clamp(380px, 52vw, 640px);
  background: #000;
  perspective: 1000px;
}

/* Hero image */
.products-page-wrapper .banner-slide img {
  width: 100%;
  height: 122%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: translateY(-11%) scale(1.01);
  transition: transform .9s cubic-bezier(.2,.8,.2,1), filter .6s ease;
  filter: saturate(1.08) contrast(1.03);
}
.products-page-wrapper .swiper-slide-active .banner-slide img {
  transform: translateY(-13%) scale(1.025);
}

/* Overlay */
.products-page-wrapper .banner-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  background:
    radial-gradient(120% 150% at 12% 55%, rgba(18,26,38,.58) 0%, rgba(18,26,38,.18) 46%, rgba(18,26,38,0) 72%),
    linear-gradient(90deg, rgba(18,26,38,.62) 0%, rgba(18,26,38,.20) 55%, rgba(18,26,38,0) 85%);
  pointer-events: none;
}
.products-page-wrapper .banner-overlay::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(140% 120% at 50% 100%, rgba(18,26,38,.32), transparent 60%),
    radial-gradient(140% 120% at 50%   0%, rgba(18,26,38,.20), transparent 60%);
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* Inner container */
.products-page-wrapper .banner-overlay .container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex; align-items: center;
  height: 100%;
  pointer-events: none;
}

/* Text box */
.products-page-wrapper .banner-text {
  color: #fff;
  max-width: 760px;
  padding: 22px 24px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
  box-shadow: 0 14px 32px rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.22);
  pointer-events: auto;
  backdrop-filter: blur(1px);
  text-align: left;
}

/* Heading */
.products-page-wrapper .banner-text h2 {
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 800;
  font-size: clamp(1.7rem, 3.9vw, 2.9rem);
  line-height: 1.18;
  margin: 0 0 16px;
  letter-spacing: .2px;
  text-shadow: 0 3px 18px rgba(0,0,0,.30);
}

/* CTA */
.products-page-wrapper .banner-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 12px;
  font: 600 1rem/1 'Poppins', system-ui, sans-serif;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(90deg, var(--blue), var(--vio));
  box-shadow: 0 12px 26px rgba(52,120,246,.38);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease, filter .2s ease;
  will-change: transform;
}
.products-page-wrapper .banner-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(52,120,246,.48);
  filter: brightness(1.03);
}
.products-page-wrapper .banner-cta:active {
  transform: translateY(0);
  box-shadow: 0 12px 22px rgba(52,120,246,.34);
}

/* --- RESPONSIVE FIXES --- */
@media (max-width: 900px) {
  .products-page-wrapper .banner-overlay .container {
    justify-content: center; /* center text box */
    text-align: center;
  }
  .products-page-wrapper .banner-text {
    max-width: 100%;
    background: rgba(18,26,38,0.55); /* darker background for contrast */
    text-align: center;
  }
  .products-page-wrapper .banner-text h2 {
    font-size: clamp(1.3rem, 5vw, 1.9rem);
  }
  .products-page-wrapper .banner-cta {
    margin: 0 auto;   /* center the button */
  }
}

/* Navigation buttons – brand style */
.products-page-wrapper .swiper-button-next,
.products-page-wrapper .swiper-button-prev {
  width: 46px; height: 46px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 12px 26px rgba(18,26,38,.22);
  top: 50%; transform: translateY(-50%);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.products-page-wrapper .swiper-button-next::after,
.products-page-wrapper .swiper-button-prev::after {
  font-size: 17px; color: var(--space);
}
.products-page-wrapper .swiper-button-next:hover,
.products-page-wrapper .swiper-button-prev:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.07);
  box-shadow: 0 16px 32px rgba(18,26,38,.30);
}

/* Pagination – pill bullets with gradient active state */
.products-page-wrapper .swiper-pagination {
  bottom: 18px !important;
}
.products-page-wrapper .swiper-pagination-bullet {
  width: 10px; height: 10px; margin: 0 6px !important;
  background: rgba(255,255,255,.75);
  opacity: 1; border-radius: 999px;
  transition: width .25s ease, background .25s ease, transform .25s ease;
}
.products-page-wrapper .swiper-pagination-bullet-active {
  width: 26px; background: linear-gradient(90deg, var(--blue), var(--vio));
  transform: translateY(-1px);
}

/* Edge vignette for better text contrast on bright images */
.products-page-wrapper .banner-slide::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(120% 100% at 50% 100%, rgba(18,26,38,.34), transparent 60%);
  pointer-events: none;
}

/* Subtle hover polish on desktop: slight tilt */
@media (hover: hover) and (pointer: fine) {
  .products-page-wrapper .swiper-slide-active .banner-slide:hover img {
    transform: translateY(-13%) scale(1.03) rotateX(0.6deg);
  }
}

/* Small screens: center text, adjust paddings */
@media (max-width: 768px) {
  .products-page-wrapper .banner-overlay { 
    background:
      linear-gradient(180deg, rgba(18,26,38,.58), rgba(18,26,38,.22));
    justify-content: center;
    text-align: center;
    padding: 0 12px;
  }
  .products-page-wrapper .banner-text {
    max-width: 92%;
    padding: 16px 18px;
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  }
  .products-page-wrapper .swiper-button-next,
  .products-page-wrapper .swiper-button-prev { display: none; }
}

/* Ultra-narrow screens: reduce height */
@media (max-width: 420px) {
  .products-page-wrapper .banner-slide { height: 340px; } /* still taller than before */
}

/* === COMPACT HERO TUNING (only banner) === */

/* 1) Bring height back in line with header/navigation */
.products-page-wrapper .banner-slide {
  /* from: clamp(380px, 52vw, 640px) */
  height: clamp(320px, 38vw, 520px);
}

/* 2) Nudge the image motion so it feels less “towering” */
.products-page-wrapper .banner-slide img {
  height: 118%;
  transform: translateY(-9%) scale(1.005);
}
.products-page-wrapper .swiper-slide-active .banner-slide img {
  transform: translateY(-10.5%) scale(1.015);
}

/* 3) Slightly lighter overlay so the hero feels airier */
.products-page-wrapper .banner-overlay {
  background:
    radial-gradient(120% 150% at 12% 55%, rgba(18,26,38,.50) 0%, rgba(18,26,38,.16) 46%, rgba(18,26,38,0) 72%),
    linear-gradient(90deg, rgba(18,26,38,.50) 0%, rgba(18,26,38,.18) 55%, rgba(18,26,38,0) 85%);
}

/* 4) Tighten content block: width, padding, and heading size */
.products-page-wrapper .banner-overlay .container { padding: 0 24px; }

.products-page-wrapper .banner-text {
  max-width: 640px;          /* was 720–760px */
  padding: 18px 20px;        /* was ~22–24px */
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0,0,0,.16);
}

.products-page-wrapper .banner-text h2 {
  font-size: clamp(1.55rem, 3.2vw, 2.4rem); /* slightly smaller */
  line-height: 1.16;
  margin-bottom: 14px;
}

/* 5) Make CTA a touch smaller so the block feels lighter */
.products-page-wrapper .banner-cta {
  padding: 12px 22px;
  box-shadow: 0 10px 22px rgba(52,120,246,.34);
}

/* 6) Harmonize outer spacing with header/nav */
.products-page-wrapper .ecommerce-banner {
  margin-bottom: 40px; /* was 56px – brings next section closer */
  /* keep your existing radius/shadow on the swiper shell */
}

/* 7) Desktop-specific refinement: reduce height a bit more on very wide screens */
@media (min-width: 1440px) {
  .products-page-wrapper .banner-slide { height: min(34vw, 500px); }
}

/* 8) Tablet: give a little more height than mobile, less than desktop */
@media (max-width: 1024px) and (min-width: 768px) {
  .products-page-wrapper .banner-slide { height: clamp(340px, 44vw, 520px); }
}

/* 9) Mobile stays readable and compact */
@media (max-width: 768px) {
  .products-page-wrapper .banner-slide { height: 320px; }
  .products-page-wrapper .banner-text { max-width: 92%; padding: 14px 16px; }
  .products-page-wrapper .banner-text h2 { font-size: clamp(1.25rem, 5.2vw, 1.6rem); }
  .products-page-wrapper .banner-cta { padding: 11px 18px; }
}


/* ===========================
   MOBILE DESIGN (drop AFTER your banner CSS)
   =========================== */

/* ---------- Tablets & large phones (≤ 768px) ---------- */
@media (max-width: 768px){
  /* keep everything inside the viewport and centered */
  .products-page-wrapper .banner-overlay{
    background: linear-gradient(180deg, rgba(18,26,38,.55), rgba(18,26,38,.22));
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  /* compact hero height and gentler parallax */
  .products-page-wrapper .banner-slide{
    height: 320px;               /* solid mobile height */
  }
  .products-page-wrapper .banner-slide img{
    height: 116%;
    transform: translateY(-8%) scale(1.003);
  }
  .products-page-wrapper .swiper-slide-active .banner-slide img{
    transform: translateY(-9%) scale(1.01);
  }

  /* lighter card, wider max width */
  .products-page-wrapper .banner-text{
    max-width: 92%;
    padding: 14px 16px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
    box-shadow: 0 10px 24px rgba(0,0,0,.14);
    backdrop-filter: none;
  }

  .products-page-wrapper .banner-text h2{
    font-size: clamp(1.25rem, 5.2vw, 1.6rem);
    line-height: 1.2;
    margin-bottom: 10px;
  }
  .products-page-wrapper .banner-text p{
    font-size: .95rem;
    line-height: 1.6;
    margin-bottom: 12px;
  }

  /* CTA: big, thumb-friendly */
  .products-page-wrapper .banner-cta{
    padding: 11px 18px;
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(52,120,246,.30);
  }

  /* Hide arrow buttons; keep dots */
  .products-page-wrapper .swiper-button-prev,
  .products-page-wrapper .swiper-button-next{ display: none; }

  .products-page-wrapper .swiper-pagination{ bottom: 12px !important; }
  .products-page-wrapper .swiper-pagination-bullet{
    width: 9px; height: 9px; margin: 0 5px !important;
    background: rgba(255,255,255,.85);
  }
  .products-page-wrapper .swiper-pagination-bullet-active{
    width: 22px;
  }

  /* outer spacing tighter below hero */
  .products-page-wrapper .ecommerce-banner{ margin-bottom: 32px; }
}

/* ---------- Phones (≤ 640px) ---------- */
@media (max-width: 640px){
  .products-page-wrapper .banner-slide{ height: 300px; }
  .products-page-wrapper .banner-text{
    max-width: 94%;
    padding: 12px 14px;
    border-radius: 12px;
  }
  .products-page-wrapper .banner-text h2{
    font-size: clamp(1.15rem, 5.4vw, 1.45rem);
    margin-bottom: 8px;
  }
  .products-page-wrapper .banner-cta{
    padding: 10px 16px;
  }
  .products-page-wrapper .swiper-pagination{ bottom: 10px !important; }
}

/* ---------- Small phones (≤ 480px) ---------- */
@media (max-width: 480px){
  .products-page-wrapper .banner-slide{ height: 280px; }

  /* make CTA easy to tap with one hand */
  .products-page-wrapper .banner-cta{
    display: inline-block;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  /* reduce visual weight further on tiny viewports */
  .products-page-wrapper .banner-text{
    padding: 10px 12px;
    box-shadow: 0 8px 18px rgba(0,0,0,.12);
  }
  .products-page-wrapper .banner-text p{ font-size: .92rem; }
}

/* ---------- Ultra-small (≤ 360px) ---------- */
@media (max-width: 360px){
  .products-page-wrapper .banner-slide{ height: 250px; }
  .products-page-wrapper .banner-text h2{
    font-size: 1.1rem;
    margin-bottom: 6px;
  }
  .products-page-wrapper .banner-cta{
    padding: 9px 14px;
    border-radius: 10px;
  }
  .products-page-wrapper .swiper-pagination{ bottom: 8px !important; }
}

/* ---------- Motion safety on mobile ---------- */
@media (prefers-reduced-motion: reduce){
  .products-page-wrapper .banner-slide img,
  .products-page-wrapper .banner-cta{
    transition: none !important;
    transform: none !important;
  }
}




/* === Product Info Section === */
.products-page-wrapper .product-info {
  text-align: center;
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}

.products-page-wrapper .product-info h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: #121A26; /* Space Graphite */
  font-family: 'Poppins', sans-serif;
  margin-bottom: 16px;
  line-height: 1.3;
}

.products-page-wrapper .product-info p {
  font-size: 1rem;
  font-weight: 400;
  color: #555;
  line-height: 1.7;
  font-family: 'Inter', sans-serif;
  margin: 0 auto;
}







/* === Main Group Section === */
.main-group-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 20px;
  font-family: 'Poppins', sans-serif;
}

/* Card wrapper */
.main-group-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  box-shadow: 0 6px 18px rgba(18,26,38,.06);
  transition: transform .25s ease, box-shadow .25s ease;
}

/* Subtle gradient outline */
.main-group-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(52,120,246,.5), rgba(140,111,240,.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

/* Hover effect */
.main-group-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(18,26,38,.12);
}
.main-group-card:hover::after {
  opacity: 1;
}

/* === Card Header === */
.card-header {
  text-align: center;
  padding: 24px 16px 18px;
  position: relative;
}

.card-link-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.card-link-content img {
  max-height: 140px;
  object-fit: contain;
  margin-bottom: 14px;
  transition: transform 0.25s ease;
}
.main-group-card:hover .card-link-content img {
  transform: scale(1.05);
}

.card-info h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #121A26; /* Space Graphite */
  text-align: center;
  margin: 0;
  font-family: 'Inter', sans-serif;
}

/* === Toggle Dropdown Button === */
.toggle-dropdown {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #F4F6FA;
  border: none;
  padding: 6px 10px;
  border-radius: 50%;
  font-size: 14px;
  color: #3478F6; /* Hyper Blue */
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 10;
}
.toggle-dropdown:hover {
  background: #E0E7FF;
  transform: rotate(90deg);
}

/* === Subgroup Dropdown === */
.dropdown-subgroups {
  border-top: 1px solid #e5e7eb;
  padding: 14px 20px;
  background: #f9fafb;
  transition: all 0.3s ease;
}

.dropdown-subgroups a {
  display: block;
  color: #374151;
  text-decoration: none;
  padding: 8px 0;
  font-size: 15px;
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.dropdown-subgroups a:hover {
  color: #3478F6;
  padding-left: 6px;
}

/* === Hide Dropdown if not open === */
.main-group-card:not(.open) .dropdown-subgroups {
  display: none;
}

/* ======= Responsive columns ======= */
@media (max-width: 1200px) {
  .main-group-section { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .main-group-section { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .main-group-section { grid-template-columns: 1fr; }
}


/* ===== Extra Mobile-Friendly Adjustments ===== */
@media (max-width: 768px) {
  .main-group-section {
    gap: 20px;              /* reduce gaps */
    padding: 36px 16px;     /* tighter padding */
  }

  .main-group-card {
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(18,26,38,.08);
  }

  .card-header {
    padding: 18px 12px 14px;
  }

  .card-link-content img {
    max-height: 120px;      /* smaller images on mobile */
    margin-bottom: 10px;
  }

  .card-info h3 {
    font-size: 0.95rem;
  }

  .toggle-dropdown {
    top: 8px;
    right: 8px;
    padding: 5px 8px;
    font-size: 13px;
  }

  .dropdown-subgroups {
    padding: 12px 16px;
  }

  .dropdown-subgroups a {
    font-size: 14px;
    padding: 6px 0;
  }
}

/* Ultra-small screens */
@media (max-width: 420px) {
  .main-group-section {
    padding: 28px 12px;
    gap: 16px;
  }

  .main-group-card {
    border-radius: 12px;
  }

  .card-link-content img {
    max-height: 100px;
  }

  .card-info h3 {
    font-size: 0.9rem;
  }
}


/*************** BEST SELLERS ***************/
.best-sellers {
  --space: #121A26;  /* Space Graphite */
  --blue:  #3478F6;  /* Hyper Blue */
  --vio:   #8C6FF0;  /* Quantum Violet */
  --bg:    #F4F6FA;  /* Cloud Mist */
  --mint:  #38E6A0;  /* Pulse Mint */
  --text:  #5B6676;

  background: var(--bg);
  padding: 56px 20px;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.best-sellers .container {
  max-width: 1200px;
  margin: 0 auto;
  display: block;
}

.best-sellers .section-title {
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: 2rem;
  color: var(--space);
  text-align: center;
  margin: 0 0 18px;
}
.best-sellers .section-title::after {
  content: "";
  display: block;
  width: 64px; height: 4px;
  margin: 12px auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), var(--vio));
}

/* Swiper base spacing */
.best-sellers .best-sellers-swiper {
  padding: 8px 6px 40px; /* leave room for pagination */
}

/* Card */
.best-sellers .product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(18,26,38,.08);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}

/* Gradient edge (subtle “best seller” identity) */
.best-sellers .product-card::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 18px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(52,120,246,.6), rgba(140,111,240,.6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Ribbon */
.best-sellers .product-card::before {
  content: "🔥 Best Seller";
  position: absolute; top: 12px; left: -10px;
  z-index: 2;
  font: 600 12px/1 'Poppins', sans-serif;
  color: #fff;
  padding: 8px 14px 8px 22px;
  background: linear-gradient(90deg, var(--blue), var(--vio));
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(52,120,246,.25);
  transform: rotate(-6deg);
}

/* Media */
.best-sellers .product-image {
  height: 210px;
  display: flex; align-items: center; justify-content: center;
  background: #fff;
}
.best-sellers .product-image img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  transition: transform .25s ease;
}
.best-sellers .product-image.placeholder {
  color: #9aa4b2; font-weight: 600; letter-spacing: .2px;
}

/* Body */
.best-sellers .product-content {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px 18px 18px;
  min-height: 210px;
}

.best-sellers .product-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.35;
  color: var(--space);
  margin: 2px 0 4px;
}

.best-sellers .product-description {
  color: var(--text);
  font-size: .94rem;
  line-height: 1.55;
  margin: 0;
}

.best-sellers .price-row {
  display: flex; align-items: baseline; gap: 8px;
  margin-top: 4px;
}
.best-sellers .product-price {
  font-weight: 800; color: var(--space);
}
.best-sellers .product-discounted {
  color: var(--mint); font-weight: 700; font-size: .92rem;
}

/* CTA */
.best-sellers .btn-primary {
  margin-top: auto;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 16px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600; font-size: .95rem;
  color: #fff;
  background: linear-gradient(90deg, var(--blue), var(--vio));
  box-shadow: 0 8px 18px rgba(52,120,246,.25);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

/* Hovers */
.best-sellers .product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(18,26,38,.14);
}
.best-sellers .product-card:hover .product-image img { transform: scale(1.03); }
.best-sellers .product-card:hover .btn-primary {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(52,120,246,.35);
}

/* Swiper controls styled to brand */
.best-sellers .swiper-button-prev,
.best-sellers .swiper-button-next {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 20px rgba(18,26,38,.12);
}
.best-sellers .swiper-button-prev::after,
.best-sellers .swiper-button-next::after {
  font-size: 16px; color: var(--space);
}
.best-sellers .swiper-pagination-bullet {
  width: 8px; height: 8px; opacity: .5; background: var(--space);
}
.best-sellers .swiper-pagination-bullet-active {
  background: linear-gradient(90deg, var(--blue), var(--vio));
  opacity: 1;
}

/* Fallback: if Swiper isn’t loaded, keep a neat grid */
.best-sellers .best-sellers-swiper:not(.swiper-initialized) .swiper-wrapper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
@media (max-width: 1200px) {
  .best-sellers .best-sellers-swiper:not(.swiper-initialized) .swiper-wrapper {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 900px) {
  .best-sellers .best-sellers-swiper:not(.swiper-initialized) .swiper-wrapper {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .best-sellers .best-sellers-swiper:not(.swiper-initialized) .swiper-wrapper {
    grid-template-columns: 1fr;
  }
}


/* ===== Responsive Tweaks ===== */
@media (max-width: 768px) {
  .best-sellers {
    padding: 40px 16px;
  }

  .best-sellers .section-title {
    font-size: 1.6rem;
    margin-bottom: 14px;
  }

  .best-sellers .product-card {
    border-radius: 14px;
  }

  /* Ribbon smaller, less rotated */
  .best-sellers .product-card::before {
    font-size: 11px;
    padding: 6px 12px 6px 18px;
    top: 10px;
    transform: rotate(-4deg);
  }

  .best-sellers .product-image {
    height: 180px;
  }

  .best-sellers .product-content {
    padding: 14px 16px;
    min-height: 180px;
    gap: 8px;
  }

  .best-sellers .product-name {
    font-size: 0.95rem;
  }

  .best-sellers .product-description {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .best-sellers .btn-primary {
    padding: 10px 14px;
    font-size: 0.9rem;
    border-radius: 10px;
  }
}

/* ===== Small phones (≤480px) ===== */
@media (max-width: 480px) {
  .best-sellers {
    padding: 32px 12px;
  }

  .best-sellers .section-title {
    font-size: 1.4rem;
  }

  .best-sellers .product-image {
    height: 160px;
  }

  .best-sellers .product-content {
    padding: 12px 14px;
    min-height: auto; /* let it flow naturally */
  }

  .best-sellers .product-name {
    font-size: 0.9rem;
  }

  .best-sellers .product-description {
    font-size: 0.85rem;
  }

  .best-sellers .btn-primary {
    padding: 9px 12px;
    font-size: 0.85rem;
  }

  /* Navigation arrows hidden to save space on very small screens */
  .best-sellers .swiper-button-prev,
  .best-sellers .swiper-button-next {
    display: none;
  }
}



/* ======================================================================================= */
/* =================================== MAIN-GROUP.EJS ==================================== */
/* ======================================================================================= */
.breadcrumb {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  color: #4b5563;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 20px 0;
}

.breadcrumb a {
  color: #3478F6;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: #1d5edb;
  text-decoration: underline;
}

.breadcrumb span {
  color: #9ca3af;
  font-weight: 500;
}

.breadcrumb strong {
  font-weight: 600;
  color: #111827;
}

/* === Product Info Section === */
.product-info {
  margin-bottom: 24px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 10px;
}

.product-info h1 {
  font-size: 26px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
  font-family: 'Poppins', sans-serif;
}

.product-info p {
  font-size: 14px;
  color: #6b7280;
  font-weight: 400;
}


/*************** PRODUCT FILTERS – UPGRADED ***************/
.product-filters {
  --space: #121A26;   /* Space Graphite */
  --blue:  #3478F6;   /* Hyper Blue */
  --vio:   #8C6FF0;   /* Quantum Violet */
  --bg:    #F4F6FA;   /* Cloud Mist */
  --muted: #6b7280;

  margin: 28px 0 34px;
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Pill-like container with subtle elevation */
.filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px 20px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 10px 14px;
  box-shadow: 0 8px 20px rgba(18,26,38,.06);
  position: relative;
}

/* Animated gradient edge (very subtle) */
.filter-row::after{
  content:"";
  position:absolute; inset:0;
  border-radius: 999px;
  padding:1px;
  background: linear-gradient(90deg, rgba(52,120,246,.5), rgba(140,111,240,.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events:none; opacity:.25;
}

/* "Filter:" label */
.filter-row::before {
  content: "Filter:";
  font-weight: 700;
  color: var(--space);
  font-size: 14px;
  padding: 6px 10px;
  background: #F7F9FC;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
}

/* ===== Dropdown: Product Type ===== */
.dropdown-filter {
  position: relative;
}

.dropdown-toggle {
  background: #F7F9FC;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  color: #111827;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.dropdown-toggle:hover {
  border-color: #d7dbe3;
  background: #fff;
  box-shadow: 0 6px 16px rgba(18,26,38,.08);
}
.dropdown-toggle .arrow {
  font-size: 11px;
  color: var(--blue);
}

/* Dropdown menu panel */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 260px;
  background-color: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(18,26,38,.14);
  z-index: 20;
  padding: 10px 0;
  display: none;
}
.dropdown-filter.active .dropdown-menu { display: block; }

/* Header row inside dropdown */
.dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  padding: 10px 14px;
  border-bottom: 1px solid #eef1f4;
  color: var(--space);
  font-size: 13px;
  background: linear-gradient(90deg, #F7F9FC, #fff);
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}
.dropdown-header a {
  font-weight: 700;
  font-size: 12px;
  color: var(--blue);
  text-decoration: none;
}
.dropdown-header a:hover { text-decoration: underline; }

/* Options list with custom scrollbar */
.dropdown-options {
  padding: 10px 14px 12px;
  max-height: 260px;
  overflow: auto;
  text-align: left;
  scrollbar-width: thin;
}
.dropdown-options::-webkit-scrollbar { width: 8px; }
.dropdown-options::-webkit-scrollbar-thumb {
  background: #e1e7ef; border-radius: 999px;
}

/* Checkbox row */
.checkbox-option {
  display: flex; align-items: center;
  font-size: 13px; margin-bottom: 10px; color: #374151;
  gap: 8px;
}

/* Pretty checkboxes (without extra markup) */
.checkbox-option input[type="checkbox"]{
  appearance: none;
  width: 16px; height: 16px; border-radius: 4px;
  border: 1.5px solid #cbd5e1; display:inline-grid; place-items:center;
  transition: border-color .2s ease, background .2s ease;
}
.checkbox-option input[type="checkbox"]::before{
  content:"";
  width: 10px; height: 10px; transform: scale(0);
  transition: transform .15s ease-in-out;
  clip-path: polygon(14% 44%, 0 58%, 38% 100%, 100% 24%, 86% 10%, 38% 72%);
  background: linear-gradient(90deg, var(--blue), var(--vio));
}
.checkbox-option input[type="checkbox"]:checked{
  border-color: var(--blue); background: #eef4ff;
}
.checkbox-option input[type="checkbox"]:checked::before{ transform: scale(1); }

/* ===== Price & Sort groups ===== */
.filter-group {
  display: flex; flex-direction: column;
  font-size: 12.5px; font-weight: 600; color: #111827;
  min-width: 110px;
}
.filter-group label { margin-bottom: 4px; color: var(--muted); font-weight: 700; }

.filter-group input,
.filter-group select {
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background-color: #fff;
  width: 120px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.filter-group input:focus,
.filter-group select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(52,120,246,.18);
}

/* Custom caret for select */
.filter-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%233478F6' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px;
}

/* Apply button */
.apply-filters {
  margin-top: 22px;
  padding: 10px 16px;
  background: linear-gradient(90deg, var(--blue), var(--vio));
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  border: none; border-radius: 12px;
  cursor: pointer;
  height: 38px;
  box-shadow: 0 10px 22px rgba(52,120,246,.25);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.apply-filters:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(52,120,246,.35);
}

/* ===== Small screens – stack items nicely ===== */
@media (max-width: 900px){
  .filter-row {
    border-radius: 16px;
    padding: 12px;
    gap: 12px 14px;
  }
  .filter-group input, .filter-group select { width: 100%; }
  .filter-group { min-width: 140px; }
}
@media (max-width: 560px){
  .filter-row::before { display:none; }
  .filter-group { min-width: 100%; }
  .dropdown-menu { min-width: min(92vw, 340px); }
}




/* ---------- Tablets & small laptops (≤1024px) ---------- */
@media (max-width: 1024px){

  /* Breadcrumb: tighter & wrap gracefully */
  .breadcrumb{
    font-size: 13px;
    gap: 6px;
    margin: 16px 0;
    row-gap: 4px;
  }
  .breadcrumb a{ font-weight: 600; }
  .breadcrumb span{ font-size: 12.5px; }

  /* Product title block */
  .product-info{
    margin-bottom: 20px;
    padding-bottom: 10px;
  }
  .product-info h1{
    font-size: 22px;
    margin-bottom: 6px;
  }
  .product-info p{ font-size: 13px; }

  /* Filters pill: slightly denser on tablet */
  .product-filters{ margin: 22px 0 28px; }
  .filter-row{
    gap: 14px 16px;
    padding: 10px 12px;
    border-radius: 18px;
  }

  /* Inputs gain 100% width in their column */
  .filter-group{ min-width: 120px; }
  .filter-group input,
  .filter-group select{ width: 100%; }
}

/* ---------- Large phones & small tablets (≤768px) ---------- */
@media (max-width: 768px){

  /* Breadcrumb becomes a single line with ellipsis on the middle part */
  .breadcrumb{
    font-size: 12.5px;
    margin: 12px 0;
    gap: 4px;
  }
  /* Keep first & last visible, clamp middle via max-width trick */
  .breadcrumb > *{
    max-width: 100%;
  }
  .breadcrumb a, .breadcrumb span, .breadcrumb strong{
    white-space: nowrap;
  }

  /* Title and intro */
  .product-info h1{
    font-size: 20px;
    letter-spacing: -.2px;
  }
  .product-info p{ font-size: 12.5px; }

  /* Filters: stack-friendly, thumb targets bigger */
  .filter-row{
    display: grid;
    grid-template-columns: 1fr 1fr;   /* two-up layout by default */
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
  }

  /* Hide the leading “Filter:” chip to save space */
  .filter-row::before{ display: none; }

  .dropdown-toggle{
    width: 100%;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
  }

  .dropdown-menu{
    top: calc(100% + 8px);
    min-width: min(92vw, 360px);
    border-radius: 14px;
  }
  .dropdown-header{ padding: 10px 12px; }

  /* Options list: bigger touch targets */
  .dropdown-options{ padding: 8px 12px 12px; }
  .checkbox-option{ font-size: 13px; margin-bottom: 8px; }
  .checkbox-option input[type="checkbox"]{
    width: 18px; height: 18px; border-radius: 5px;
  }
  .checkbox-option input[type="checkbox"]::before{ width: 12px; height: 12px; }

  .filter-group{
    min-width: 0;
    width: 100%;
  }
  .filter-group label{
    margin-bottom: 6px;
    font-size: 12px;
  }
  .filter-group input,
  .filter-group select{
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
  }

  /* Apply button spans full width on its grid cell */
  .apply-filters{
    grid-column: 1 / -1;
    width: 100%;
    height: 44px;
    border-radius: 14px;
    font-size: 14px;
    margin-top: 4px;
  }
}

/* ---------- Phones (≤560px) ---------- */
@media (max-width: 560px){

  /* Breadcrumb: reduce visual weight and allow wrap */
  .breadcrumb{
    font-size: 12px;
    gap: 3px;
    margin: 8px 0 10px;
  }
  .breadcrumb a{ font-weight: 600; }
  .breadcrumb span{ color: #a3aab5; }

  /* Product heading */
  .product-info h1{
    font-size: 18px;
    margin-bottom: 4px;
  }
  .product-info p{ font-size: 12px; }

  /* Filters: single-column stack, full-width fields */
  .filter-row{
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(18,26,38,.06);
  }

  .dropdown-toggle{
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 12px;
  }

  /* Make dropdown “dock” to the viewport on small phones for comfort */
  .dropdown-menu{
    left: 50%;
    transform: translateX(-50%);
    width: calc(100vw - 24px);
    max-width: 420px;
    min-width: unset;
    border-radius: 16px;
  }

  .dropdown-options{ max-height: 52vh; }

  .filter-group label{ font-size: 12px; }
  .filter-group input,
  .filter-group select{
    padding: 10px 12px;
    font-size: 13px;
  }

  .apply-filters{
    height: 46px;
    font-size: 14px;
    border-radius: 14px;
  }
}

/* ---------- Small phones (≤400px) ---------- */
@media (max-width: 400px){

  .breadcrumb{ font-size: 11.5px; }

  .product-info h1{ font-size: 17px; }

  .dropdown-toggle{ font-size: 12.5px; padding: 9px 11px; }
  .dropdown-options{ padding: 8px 10px 10px; }

  .filter-group label{ font-size: 11.5px; }
  .filter-group input,
  .filter-group select{
    padding: 9px 10px;
    font-size: 12.5px;
    border-radius: 10px;
  }

  .apply-filters{
    height: 44px;
    font-size: 13.5px;
    border-radius: 12px;
  }
}

/* ---------- Optional: sticky filters on mobile (nice UX) ---------- */
@media (max-width: 768px){
  .product-filters.is-sticky .filter-row{
    position: sticky;
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    z-index: 30;
    background: #ffffff;
    border-radius: 14px;
  }
}

/* ---------- Motion safety ---------- */
@media (prefers-reduced-motion: reduce){
  .dropdown-toggle,
  .apply-filters,
  .filter-row::after{
    transition: none !important;
  }
}



/* === Product Grid Layout === */
/**************** PRODUCT LISTING – UPGRADED ****************/
:root {
  --space: #121A26;    /* Space Graphite */
  --blue:  #3478F6;    /* Hyper Blue */
  --vio:   #8C6FF0;    /* Quantum Violet */
  --bg:    #F4F6FA;    /* Cloud Mist */
  --mint:  #38E6A0;    /* Pulse Mint */
  --text:  #374151;
  --muted: #6b7280;
  --line:  #e5e7eb;
}

/* Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  padding: 20px 0;
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Card */
.product-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #eef1f4;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 8px 22px rgba(18,26,38,.06);
  transition: transform .22s ease, box-shadow .22s ease;
  will-change: transform;
}

/* Subtle gradient edge (brand identity) */
.product-card::after{
  content:"";
  position:absolute; inset:0;
  border-radius:16px;
  padding:1px;
  background: linear-gradient(135deg, rgba(52,120,246,.55), rgba(140,111,240,.55));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events:none; opacity:.75;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(18,26,38,.12);
}

/* Make full card (except the add button) clickable */
.product-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Image */
.product-image {
  width: 100%;
  aspect-ratio: 4/3;            /* prevents layout shift */
  object-fit: contain;
  background: #fff;
  border-bottom: 1px solid #f1f3f6;
  padding: 14px;
  transition: transform .25s ease;
}
.product-card:hover .product-image { transform: scale(1.03); }

/* Details */
.product-details {
  padding: 16px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

/* Title */
.product-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--space);
  line-height: 1.35;
  margin: 0;
  max-height: 2.7em;            /* ~2 lines */
  overflow: hidden;
}

/* Description */
.product-description {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .92rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
  max-height: 2.8em;            /* ~2 lines */
  overflow: hidden;
}

/* Price row */
.product-price {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.price-original {
  font-family: 'Inter', system-ui, sans-serif;
  text-decoration: line-through;
  color: #9ca3af;
  font-size: .92rem;
}
.price-discounted {
  color: #e11d48;
  font-weight: 800;
  font-size: 1rem;
}
.price-current {
  color: var(--space);
  font-weight: 800;
  font-size: 1rem;
}

/* Add to cart (outside the link) */
.add-to-cart-form {
  padding: 12px 16px 16px;
}
.add-to-cart-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 42px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: .95rem;
  color: #fff;
  background: linear-gradient(90deg, var(--blue), var(--vio));
  box-shadow: 0 12px 26px rgba(52,120,246,.28);
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.add-to-cart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(52,120,246,.38);
}
.add-to-cart-btn:active { transform: translateY(0); }
.add-to-cart-btn i { font-size: 14px; }

/* Keyboard focus */
.product-link:focus-visible,
.add-to-cart-btn:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(52,120,246,.25);
  border-radius: 12px;
}

/* Pagination */
.pagination {
  margin-top: 28px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  font-family: 'Poppins', system-ui, sans-serif;
}
.page-link {
  display: inline-flex;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  text-decoration: none;
  color: var(--space);
  background: #fff;
  border: 1px solid #e6ebf2;
  box-shadow: 0 6px 14px rgba(18,26,38,.06);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.page-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(18,26,38,.10);
}
.page-link.active {
  color: #fff;
  background: linear-gradient(90deg, var(--blue), var(--vio));
  border-color: transparent;
  box-shadow: 0 12px 26px rgba(52,120,246,.28);
}
.page-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(52,120,246,.25);
}

/* Small helpers */
@media (max-width: 1200px) {
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}
@media (max-width: 600px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 420px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* Optional badges without HTML changes (auto-shown when discounted) */
.product-card:has(.price-discounted)::before {
  content: "Endirim";
  position: absolute; top: 12px; left: -10px;
  z-index: 2;
  font: 700 11px/1 'Poppins', sans-serif;
  color: #fff;
  padding: 8px 12px 8px 22px;
  background: linear-gradient(90deg, var(--blue), var(--vio));
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(52,120,246,.25);
  transform: rotate(-6deg);
}



/* ===========================
   MOBILE DESIGN — append AFTER your current CSS
   =========================== */

/* ---------- Tablets & large phones (≤ 768px) ---------- */
@media (max-width: 768px){

  /* Grid: keep 2-up but give breathing room */
  .product-grid{
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 16px;
    padding: 16px 0;
  }

  /* Card compactness + softer elevation */
  .product-card{
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(18,26,38,.08);
  }
  .product-card::after{ border-radius: 14px; }

  /* Media: slightly shorter, stronger contain to avoid overflow */
  .product-image{
    aspect-ratio: 4 / 3;
    padding: 12px;
  }

  /* Body spacing */
  .product-details{
    padding: 14px 14px 10px;
    gap: 8px;
  }

  .product-title{
    font-size: .95rem;
    max-height: 2.7em; /* ~2 lines */
  }
  .product-description{
    font-size: .9rem;
    line-height: 1.5;
    max-height: 2.7em;
  }

  /* Price row: tighten */
  .product-price{ gap: 8px; }
  .price-original{ font-size: .9rem; }
  .price-current,
  .price-discounted{ font-size: .98rem; }

  /* CTA button: big enough for thumbs */
  .add-to-cart-form{ padding: 10px 14px 14px; }
  .add-to-cart-btn{
    height: 42px;
    border-radius: 12px;
    font-size: .92rem;
  }

  /* Pagination compact */
  .pagination{ gap: 8px; margin-top: 20px; }
  .page-link{
    min-width: 36px; height: 36px; padding: 0 10px; border-radius: 10px;
  }
}

/* ---------- Phones (≤ 600px) ---------- */
@media (max-width: 600px){

  /* Keep 2-up grid; if you prefer 1-up on tiny screens, see ≤420px */
  .product-grid{
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 14px;
  }

  .product-card{
    border-radius: 12px;
    box-shadow: 0 5px 14px rgba(18,26,38,.07);
  }
  .product-card::after{ border-radius: 12px; }

  .product-image{ padding: 10px; }

  .product-details{
    padding: 12px 12px 10px;
    gap: 7px;
  }

  .product-title{ font-size: .92rem; }
  .product-description{ font-size: .88rem; }

  .add-to-cart-form{ padding: 10px 12px 12px; }
  .add-to-cart-btn{
    height: 40px;
    font-size: .9rem;
    border-radius: 11px;
  }

  .page-link{
    min-width: 34px; height: 34px; padding: 0 8px; border-radius: 10px;
    font-size: .92rem;
  }
}

/* ---------- Small phones (≤ 480px) ---------- */
@media (max-width: 480px){

  /* Option A (recommended): keep 2-up but smaller gutters */
  .product-grid{
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 12px;
    padding: 12px 0;
  }

  /* Option B: uncomment to switch to 1-up below 480px */
  /* .product-grid{ grid-template-columns: 1fr; } */

  .product-card{ border-radius: 12px; }
  .product-card::after{ border-radius: 12px; }

  .product-image{
    aspect-ratio: 4 / 3;
    padding: 10px;
  }

  .product-details{
    padding: 10px 10px 8px;
  }
  .product-title{ font-size: .9rem; }
  .product-description{ font-size: .86rem; }

  .price-original{ font-size: .86rem; }
  .price-current,
  .price-discounted{ font-size: .94rem; }

  .add-to-cart-btn{
    height: 38px;
    font-size: .88rem;
    border-radius: 10px;
  }

  .pagination{ gap: 6px; }
  .page-link{
    min-width: 32px; height: 32px; padding: 0 8px; border-radius: 10px;
    font-size: .9rem;
  }
}

/* ---------- Ultra-small (≤ 360px) ---------- */
@media (max-width: 360px){
  .product-grid{
    grid-template-columns: 1fr; /* single column for very small screens */
    gap: 10px;
  }

  .product-details{
    padding: 10px;
    gap: 6px;
  }
  .product-title{ font-size: .9rem; }
  .product-description{ font-size: .84rem; }

  .add-to-cart-btn{
    height: 36px;
    font-size: .86rem;
  }

  .page-link{
    min-width: 30px; height: 30px; padding: 0 8px;
    font-size: .88rem;
  }
}

/* ---------- Safe-area & motion preferences ---------- */
@media (max-width: 768px){
  .product-grid{
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }
}
@media (prefers-reduced-motion: reduce){
  .product-card,
  .product-image,
  .add-to-cart-btn,
  .page-link{
    transition: none !important;
    transform: none !important;
  }
}





/**************** PRODUCT DETAIL – UPGRADED ****************/
.product-detail-page {
  --space: #121A26;   /* Space Graphite */
  --blue:  #3478F6;   /* Hyper Blue */
  --vio:   #8C6FF0;   /* Quantum Violet */
  --bg:    #F4F6FA;   /* Cloud Mist */
  --text:  #374151;
  --muted: #6b7280;
  --line:  #e5e7eb;

  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  padding: 24px 0 48px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Top section: media + info ===== */
.product-detail-page .top-section {
  display: grid;
  grid-template-columns: minmax(280px, 480px) 1fr;
  gap: 36px;
  align-items: start;
  margin-bottom: 36px;
}

.product-detail-page .product-image-box {
  position: relative;
  aspect-ratio: 1/1;
  background: #fff;
  border: 1px solid #eef1f4;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(18,26,38,.08);
  display: grid;
  place-items: center;
}
.product-detail-page .product-image-box img {
  width: 92%;
  height: 92%;
  object-fit: contain;           /* products look better than cover */
  transition: transform .28s ease;
}
.product-detail-page .product-image-box:hover img {
  transform: scale(1.03);
}

/* Info box */
.product-detail-page .product-info-box {
  background: #fff;
  border: 1px solid #eef1f4;
  border-radius: 18px;
  padding: 22px 22px 18px;
  box-shadow: 0 10px 26px rgba(18,26,38,.06);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}
.product-detail-page .product-info-box::after {
  /* subtle gradient edge */
  content: ""; position: absolute; inset: 0; border-radius: 18px; padding: 1px;
  background: linear-gradient(135deg, rgba(52,120,246,.55), rgba(140,111,240,.55));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}

.product-detail-page .product-info-box h1 {
  font-size: clamp(1.25rem, 2.2vw, 1.8rem);
  font-weight: 800;
  color: var(--space);
  margin: 0 0 6px;
  line-height: 1.25;
}
.product-detail-page .product-info-box .description {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .98rem;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 8px;
}

/* Price area */
.product-detail-page .price-area {
  display: flex; align-items: baseline; gap: 14px; margin-top: 2px;
}
.product-detail-page .old-price {
  font-family: 'Inter', system-ui, sans-serif;
  text-decoration: line-through; color: #9ca3af; font-size: 1rem;
}
.product-detail-page .discounted-price {
  color: #e11d48; font-size: 1.25rem; font-weight: 800;
}
.product-detail-page .regular-price {
  color: var(--space); font-size: 1.25rem; font-weight: 800;
}

/* Purchase row */
.product-detail-page .purchase-section {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 16px; margin-top: 10px;
}

/* Quantity control */
.quantity-control { display: flex; align-items: center; gap: 8px; }
.quantity-control label {
  font-size: .9rem; color: var(--text); font-weight: 700;
}
.quantity-control input[type="number"] {
  width: 76px; height: 40px;
  padding: 6px 10px; font-size: .95rem; font-family: 'Inter', system-ui, sans-serif;
  border: 1px solid #d7dbe3; border-radius: 12px; background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.quantity-control input[type="number"]:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(52,120,246,.18);
}

/* CTA */
.add-to-cart-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 44px; padding: 0 18px;
  background: linear-gradient(90deg, var(--blue), var(--vio));
  color: #fff; border: none; border-radius: 14px;
  font-weight: 800; font-size: .98rem; cursor: pointer;
  box-shadow: 0 14px 30px rgba(52,120,246,.30);
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.add-to-cart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(52,120,246,.40);
}
.add-to-cart-btn i { font-size: 14px; }

/* ===== Spec table (renders from product.tesvir HTML) ===== */
.product-detail-page .spec-table {
  width: 100%;
  background: #fff;
  border: 1px solid #eef1f4;
  border-radius: 18px;
  padding: 0;                     /* table uses its own spacing */
  box-shadow: 0 12px 30px rgba(18,26,38,.08);
  overflow: hidden;
  position: relative;
}

/* Scroll mask for wide tables */
.product-detail-page .spec-table::after {
  content:""; position: absolute; inset: 0 0 0 auto; width: 40px;
  background: linear-gradient(90deg, rgba(255,255,255,0), #fff 70%);
  pointer-events: none; display: none;
}
.product-detail-page .spec-table:has(table) { overflow-x: auto; }
.product-detail-page .spec-table:has(table)::after { display: block; }

.product-detail-page .spec-table table {
  width: 100%;
  border-collapse: separate; border-spacing: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .95rem; color: var(--text);
  min-width: 720px;                /* keep columns readable */
}
.product-detail-page .spec-table thead th {
  position: sticky; top: 0; z-index: 1;
  background: linear-gradient(90deg, #f7f9fc, #fff);
  color: var(--space);
  font-weight: 800; letter-spacing: .2px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}
.product-detail-page .spec-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f2f6;
}
.product-detail-page .spec-table tbody tr:nth-child(odd) td {
  background: #fafbff;
}
.product-detail-page .spec-table tbody tr:hover td {
  background: #f4f7ff;
}

/* Rounded corners on the table block */
.product-detail-page .spec-table table thead th:first-child { border-top-left-radius: 12px; }
.product-detail-page .spec-table table thead th:last-child  { border-top-right-radius: 12px; }

/* ===== Utilities & responsiveness ===== */
@media (max-width: 1024px) {
  .product-detail-page .top-section { grid-template-columns: 1fr; }
  .product-detail-page .product-image-box { max-width: 520px; margin: 0 auto; }
}
@media (max-width: 560px) {
  .product-detail-page .product-info-box { padding: 16px; }
  .quantity-control input[type="number"] { width: 68px; height: 38px; }
  .add-to-cart-btn { height: 42px; border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .product-detail-page .product-image-box img,
  .add-to-cart-btn { transition: none; }
}


/* ===========================
   PRODUCT DETAIL PAGE — Mobile Design
   =========================== */

/* ---------- Tablets & Large Phones (≤ 900px) ---------- */
@media (max-width: 900px){
  .product-detail-page .top-section{
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 28px;
  }

  .product-detail-page .product-image-box{
    max-width: 480px;
    margin: 0 auto;
  }

  .product-detail-page .product-info-box{
    padding: 18px 18px 16px;
    gap: 12px;
  }

  .product-detail-page .product-info-box h1{
    font-size: 1.2rem;
  }
  .product-detail-page .product-info-box .description{
    font-size: .94rem;
    line-height: 1.6;
  }

  .product-detail-page .price-area{
    gap: 10px;
  }

  .quantity-control input[type="number"]{
    width: 72px;
    height: 38px;
    font-size: .9rem;
  }

  .add-to-cart-btn{
    height: 42px;
    font-size: .92rem;
    padding: 0 16px;
  }

  .product-detail-page .spec-table table{
    font-size: .9rem;
    min-width: 620px;   /* less horizontal scroll */
  }
}

/* ---------- Small Phones (≤ 560px) ---------- */
@media (max-width: 560px){
  .product-detail-page{
    padding: 16px 0 32px;
  }

  .container{
    padding: 0 14px;
  }

  .product-detail-page .product-image-box{
    border-radius: 14px;
    max-width: 360px;
  }
  .product-detail-page .product-image-box img{
    width: 88%; height: 88%;
  }

  .product-detail-page .product-info-box{
    border-radius: 14px;
    padding: 14px;
    gap: 10px;
  }
  .product-detail-page .product-info-box h1{
    font-size: 1.05rem;
    line-height: 1.3;
  }
  .product-detail-page .product-info-box .description{
    font-size: .88rem;
    line-height: 1.55;
  }

  .product-detail-page .price-area{
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .product-detail-page .old-price,
  .product-detail-page .discounted-price,
  .product-detail-page .regular-price{
    font-size: 1rem;
  }

  .product-detail-page .purchase-section{
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .quantity-control{
    justify-content: space-between;
  }
  .quantity-control label{ font-size: .85rem; }
  .quantity-control input[type="number"]{
    width: 64px; height: 36px; font-size: .85rem;
  }

  .add-to-cart-btn{
    width: 100%;
    height: 40px;
    font-size: .9rem;
    border-radius: 10px;
  }

  .product-detail-page .spec-table{
    border-radius: 14px;
  }
  .product-detail-page .spec-table table{
    font-size: .86rem;
    min-width: 520px;
  }
}

/* ---------- Ultra-Small Phones (≤ 400px) ---------- */
@media (max-width: 400px){
  .container{ padding: 0 10px; }

  .product-detail-page .product-info-box h1{
    font-size: .95rem;
  }
  .product-detail-page .product-info-box .description{
    font-size: .82rem;
  }

  .quantity-control input[type="number"]{
    width: 58px; height: 34px;
  }
  .add-to-cart-btn{
    height: 38px; font-size: .86rem;
  }

  .product-detail-page .spec-table table{
    font-size: .82rem;
    min-width: 460px;
  }
}

/* ---------- Accessibility: reduce motion ---------- */
@media (prefers-reduced-motion: reduce){
  .product-detail-page .product-image-box img,
  .product-detail-page .add-to-cart-btn,
  .product-detail-page .product-card,
  .product-detail-page .spec-table table tr{
    transition: none !important;
    transform: none !important;
  }
}

/* kill the right-edge glow */
.product-detail-page .spec-table::after{
  display:none !important;
  background:none !important;
}


.add-to-cart-form {
  padding: 0 16px 16px;
  display: flex;
  justify-content: center;
}

.add-to-cart-btn {
  background-color: #3478F6;
  color: white;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  font-family: 'Poppins', sans-serif;
  transition: background-color 0.2s ease;
}

.add-to-cart-btn i {
  margin-right: 6px;
}

.add-to-cart-btn:hover {
  background-color: #255edb;
}





/* Scope EVERYTHING to the cart wrapper */
/**************** CART – UPGRADED ****************/
.cart-wrapper{
  --bg:#F4F6FA; --text:#121A26; --muted:#6B7280; --line:#E5E7EB; --card:#FFF;
  --accent:#0052CC; --accent-900:#0041A8; --danger:#E53935; --radius:14px;
  --shadow-sm:0 6px 18px rgba(18,26,38,.06);
  --shadow:0 12px 28px rgba(18,26,38,.10);
  background: var(--bg);
  font-family:'Poppins',system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}

/* container width */
.cart-wrapper .container{max-width:1200px;margin:0 auto;padding:0 20px;}
.cart-wrapper .cart-page{padding:36px 0 48px;}

/* Back + title */
.cart-wrapper .back-btn{margin-bottom:14px;}
.cart-wrapper .cart-title{
  margin:0 0 22px; font-size:32px; font-weight:800; color:var(--text); letter-spacing:.2px;
}

/* ===== Two-column layout ===== */
.cart-wrapper .cart-container{
  display:grid; grid-template-columns: 1fr 340px; gap:28px;
}

/* LEFT – products list block */
.cart-wrapper .cart-products{
  background:var(--card); border:1px solid #EEF1F5; border-radius:var(--radius);
  box-shadow:var(--shadow-sm); padding:22px;
}

/* header row */
.cart-wrapper .cart-header{
  display:grid; grid-template-columns: 1fr 140px 120px 120px 40px; gap:16px;
  font-weight:700; font-size:13px; color:var(--text); opacity:.9; align-items:end;
}
.cart-wrapper .cart-divider{height:1px;background:var(--line);margin:10px 0 6px;}

/* item row */
.cart-wrapper .item{
  display:grid; grid-template-columns: 1fr 140px 120px 120px 40px; gap:16px;
  align-items:center; padding:14px 0; transition: background .15s ease;
}
.cart-wrapper .item + .item{border-top:1px solid #F0F2F5;}
.cart-wrapper .item:hover{background:#FBFCFE;}

/* image + meta */
.cart-wrapper .item-left{display:grid; grid-template-columns: 84px 1fr; gap:14px; align-items:center;}
.cart-wrapper .item-img{
  width:84px;height:84px;border-radius:12px;background:#F9FAFB;border:1px solid #EEF2F7;
  display:grid;place-items:center; overflow:hidden;
}
.cart-wrapper .item-img img{width:100%;height:100%;object-fit:contain;}

/* meta */
.cart-wrapper .item-meta{display:flex;flex-direction:column;gap:4px;}
.cart-wrapper .item-title{
  font-size:16px;font-weight:700;line-height:1.35;color:var(--text);
  display:-webkit-box;-webkit-line-clamp:2; -webkit-box-orient: vertical; overflow:hidden;
}
.cart-wrapper .item-code{font-size:12px;color:var(--muted);}

/* qty */
.cart-wrapper .item-qty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cart-wrapper .qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 18px;
  line-height: 26px;
  cursor: pointer;
  user-select: none;
}

.cart-wrapper .qty-input {
  width: 64px;
  padding: 6px 8px;
  text-align: center;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}


/* price + total */
.cart-wrapper .price,.cart-wrapper .line-total{
  white-space:nowrap; font-weight:800; color:var(--text);
}

/* delete */
.cart-wrapper .item-actions{display:flex;align-items:center;justify-content:center;}
.cart-wrapper .btn-delete{
  width:36px;height:36px;border-radius:12px;border:1px solid rgba(229,57,53,.25);
  background:#fff;color:var(--danger);cursor:pointer;
  display:grid;place-items:center; transition: background .2s, border-color .2s, transform .05s;
}
.cart-wrapper .btn-delete:hover{background:rgba(229,57,53,.06);border-color:rgba(229,57,53,.45);}
.cart-wrapper .btn-delete:active{transform:scale(.98);}

/* continue link */
.cart-wrapper .continue{
  display:inline-block;margin-top:18px;color:#2563EB;text-decoration:none;font-weight:700;
}
.cart-wrapper .continue:hover{text-decoration:underline;}

/* RIGHT – summary */
.cart-wrapper .cart-summary{
  position:sticky; top:20px;
  background:var(--card); border:1px solid #EEF1F5; border-radius:var(--radius);
  box-shadow:var(--shadow-sm); padding:22px;
}
.cart-wrapper .summary-title{font-size:16px;font-weight:800;margin:0 0 12px;color:var(--text);}
.cart-wrapper .summary-row{font-size:14px;margin:8px 0;color:var(--text);}
.cart-wrapper .grand{
  font-size:22px;font-weight:900;color:var(--accent);margin:12px 0 18px;
  padding:10px 12px;border-radius:12px;background:#F5F9FF;border:1px solid #E6EEFF;
}

/* summary buttons */
.cart-wrapper .clear-btn {
  font-family: 'Poppins', 'Noto Sans', 'Segoe UI', sans-serif; /* Poppins + fallback */
  font-weight: 700;
  font-size: 15px;

  background: #fff;
  color: #E53935;
  border: 2px solid rgba(229,57,53,.6);
  border-radius: 12px;

  padding: 12px 20px;
  cursor: pointer;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
}

/* Hover state */
.cart-wrapper .clear-btn:hover {
  background: rgba(229,57,53,.06);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(229,57,53,.25);
}

/* Active (pressed) state */
.cart-wrapper .clear-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(229,57,53,.18);
}

.cart-wrapper .checkout-btn,.cart-wrapper .clear-btn{
  width:100%; display:inline-flex; align-items:center; justify-content:center; gap:10px;
  border:none; border-radius:12px; padding:12px 14px; font-weight:800; cursor:pointer;
  transition: background .2s, transform .05s, box-shadow .2s;
}
.cart-wrapper .checkout-btn{
  background:linear-gradient(90deg,var(--accent),#2E7BEF); color:#fff;
  box-shadow:0 10px 22px rgba(0,82,204,.25);
}
.cart-wrapper .checkout-btn:hover{transform:translateY(-1px);box-shadow:0 14px 28px rgba(0,82,204,.35);}
.cart-wrapper .checkout-btn:active{transform:translateY(0);}
.cart-wrapper .clear-btn{
  margin-top:10px;background:#fff;color:var(--danger);
  border:1px solid rgba(229,57,53,.35);
}
.cart-wrapper .clear-btn:hover{background:rgba(229,57,53,.06);border-color:rgba(229,57,53,.55);}

/* empty state */
.cart-wrapper .cart-empty{
  margin-top:10px;color:var(--muted);font-size:14px;
}

/* ===== Accessibility: focus rings ===== */
.cart-wrapper a:focus-visible,
.cart-wrapper button:focus-visible,
.cart-wrapper input:focus-visible{
  outline:0; box-shadow:0 0 0 3px rgba(0,82,204,.25);
  border-radius:12px;
}

/* ===== Mobile refinement (stack & label) ===== */
@media (max-width: 980px){
  .cart-wrapper .cart-container{grid-template-columns:1fr;}
  .cart-wrapper .cart-summary{position:static;}
}

@media (max-width: 720px){
  /* hide table header; switch row to stacked grid with labels */
  .cart-wrapper .cart-header{display:none;}
  .cart-wrapper .item,
  .cart-wrapper .item-left{grid-template-columns:1fr;}
  .cart-wrapper .item{gap:10px; padding:16px 0;}

  /* label helpers using pseudo-elements (no HTML change) */
  .cart-wrapper .item-qty::before,
  .cart-wrapper .price::before,
  .cart-wrapper .line-total::before{
    content: attr(data-label); /* default empty; we set below with CSS */
    display:block; font-size:11px; font-weight:700; color:var(--muted); margin-bottom:4px;
  }
  /* Assign labels */
  .cart-wrapper .item-qty::before{ content:"Miqdar"; }
  .cart-wrapper .price::before{ content:"Qiymət"; }
  .cart-wrapper .line-total::before{ content:"Cəmi"; }

  /* align cells */
  .cart-wrapper .item-qty,.cart-wrapper .price,.cart-wrapper .line-total,
  .cart-wrapper .item-actions{display:flex; align-items:center;}
  .cart-wrapper .item-actions{justify-content:flex-start;}
}

/* ===== Ultra-small screens ===== */
@media (max-width: 420px){
  .cart-wrapper .qty-input{width:66px;height:38px;border-radius:10px;}
  .cart-wrapper .checkout-btn,.cart-wrapper .clear-btn{border-radius:10px;}
}


/* ===========================
   CART – RESPONSIVE MOBILE UI
   =========================== */

/* Tablet-ish (≤1024px): soften spacing a bit */
@media (max-width: 1024px){
  .cart-wrapper .cart-page{ padding: 28px 0 40px; }
  .cart-wrapper .cart-products,
  .cart-wrapper .cart-summary{ padding: 18px; }
  .cart-wrapper .cart-title{ font-size: 28px; }
}

/* One column at ≤980px (already stacking summary in your CSS) */
@media (max-width: 980px){
  .cart-wrapper .container{ padding: 0 16px; }
  .cart-wrapper .cart-title{ margin-bottom: 18px; }
  .cart-wrapper .continue{ margin-top: 14px; }
}

/* Phones (≤720px): compact rows, labeled cells, touch sizes */
@media (max-width: 720px){
  /* Hide “table” header; stack each row */
  .cart-wrapper .cart-header{ display: none; }

  .cart-wrapper .cart-products{ padding: 16px; border-radius: 12px; }
  .cart-wrapper .item{
    grid-template-columns: 1fr;   /* stack */
    gap: 10px;
    padding: 14px 0;
  }

  /* Left cell → image + meta stacked nicely */
  .cart-wrapper .item-left{
    grid-template-columns: 72px 1fr;
    gap: 12px;
  }
  .cart-wrapper .item-img{ width:72px; height:72px; border-radius: 10px; }
  .cart-wrapper .item-title{ font-size: 15px; -webkit-line-clamp: 3; }
  .cart-wrapper .item-code{ font-size: 11.5px; }

  /* Labels above fields (no HTML change) */
  .cart-wrapper .item-qty::before,
  .cart-wrapper .price::before,
  .cart-wrapper .line-total::before{
    display:block; margin-bottom: 4px;
    font-size: 11px; font-weight: 700; color: var(--muted);
    content: attr(data-label);
  }
  .cart-wrapper .item-qty::before{ content: "Miqdar"; }
  .cart-wrapper .price::before{ content: "Qiymət"; }
  .cart-wrapper .line-total::before{ content: "Cəmi"; }

  /* Place qty/price/total in a neat 2-col block */
  .cart-wrapper .item-qty,
  .cart-wrapper .price,
  .cart-wrapper .line-total{
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  /* Touch-friendly quantity controls */
  .cart-wrapper .qty-btn{
    width: 32px; height: 32px; border-radius: 8px;
    font-size: 18px; line-height: 30px;
  }
  .cart-wrapper .qty-input{
    width: 70px; height: 36px; border-radius: 8px;
    font-size: 14px;
  }

  /* Delete aligns left under the row */
  .cart-wrapper .item-actions{
    justify-content: flex-start;
  }
  .cart-wrapper .btn-delete{
    width: 36px; height: 36px; border-radius: 10px;
  }

  /* Summary becomes a sticky bottom sheet */
  .cart-wrapper .cart-summary{
    position: sticky;   /* sits at the bottom of viewport while scrolling the list */
    bottom: 0;
    z-index: 30;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    padding: 14px 16px;
    box-shadow:
      0 -8px 24px rgba(18,26,38,.12),
      0  0   0 9999px rgba(255,255,255,.55); /* subtle backdrop */
    backdrop-filter: saturate(1.05) blur(2px);
  }

  .cart-wrapper .summary-title{ font-size: 15px; margin-bottom: 8px; }
  .cart-wrapper .summary-row{ font-size: 13.5px; margin: 6px 0; }
  .cart-wrapper .grand{
    margin: 10px 0 12px;
    font-size: 20px;
    padding: 8px 10px;
    border-radius: 10px;
  }
  .cart-wrapper .checkout-btn,
  .cart-wrapper .clear-btn{
    height: 44px; border-radius: 12px; font-size: 15px;
  }

  /* Title & back link */
  .cart-wrapper .cart-title{ font-size: 24px; }
  .cart-wrapper .back-btn{ margin-bottom: 10px; }
}

/* Compact phones (≤560px): tighter gaps & fonts */
@media (max-width: 560px){
  .cart-wrapper .container{ padding: 0 12px; }
  .cart-wrapper .cart-page{ padding: 24px 0 36px; }

  .cart-wrapper .item-left{
    grid-template-columns: 64px 1fr;
    gap: 10px;
  }
  .cart-wrapper .item-img{ width:64px; height:64px; }
  .cart-wrapper .item-title{ font-size: 14.5px; }
  .cart-wrapper .item-code{ font-size: 11px; }

  .cart-wrapper .price,
  .cart-wrapper .line-total{ font-weight: 800; }

  .cart-wrapper .continue{ font-size: 14px; }
}

/* Ultra-narrow (≤400px): single-column controls; keep tap targets solid */
@media (max-width: 400px){
  .cart-wrapper .cart-summary{ padding: 12px; }
  .cart-wrapper .checkout-btn,
  .cart-wrapper .clear-btn{ height: 42px; border-radius: 10px; font-size: 14.5px; }

  /* Quantity row stacks controls when space is tiny */
  .cart-wrapper .item-qty{
    grid-template-columns: 1fr; gap: 6px;
  }
  .cart-wrapper .qty-input{ width: 100%; max-width: 140px; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .cart-wrapper .item,
  .cart-wrapper .btn-delete,
  .cart-wrapper .checkout-btn,
  .cart-wrapper .clear-btn{ transition: none !important; }
}

@media (max-width: 720px){
  .cart-wrapper .cart-summary{
    box-shadow: 0 -8px 24px rgba(18,26,38,.12); /* keep only the normal shadow */
    backdrop-filter: none;                      /* optional */
  }
}




/* CHECKOUT PAGE BASE */
.checkout-page,
.checkout-page body,
.checkout-page button,
.checkout-page input,
.checkout-page select,
.checkout-page textarea {
  font-family: 'Poppins', 'Noto Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}



.global-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  min-width: 260px;
  max-width: 360px;
  background: rgba(18, 26, 38, 0.95); /* glassy dark */
  color: #fff;
  padding: 14px 18px;
  border-radius: 14px;
  opacity: 0;
  transform: translateY(-20px) translateX(10px);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2147483647; /* 🔥 absolute top */
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  overflow: hidden;
  pointer-events: none; /* click-through */
  position: fixed;
}

.global-toast.show {
  opacity: 1;
  transform: translateY(0) translateX(0);
}

/* --- Icon --- */
.global-toast::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

.global-toast.success::before { content: "\f00c"; color: #38E6A0; } /* check */
.global-toast.error::before   { content: "\f057"; color: #EF4444; } /* cross */

/* --- Text container --- */
.global-toast span {
  flex: 1;
  line-height: 1.4;
  word-break: break-word;
}

/* --- Progress bar --- */
.global-toast::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, #38E6A0, #8C6FF0);
  transform: scaleX(1);
  transform-origin: left;
  animation: toast-progress 3s linear forwards;
}

.global-toast.error::after {
  background: linear-gradient(90deg, #EF4444, #F59E0B);
}

@keyframes toast-progress {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* --- Variants border accent --- */
.global-toast.success { border-left: 5px solid #38E6A0; }
.global-toast.error   { border-left: 5px solid #EF4444; }
