:root {
  --gd: #1a4d2e;
  --gm: #1f6035;
  --ga: #2e7d4f;
  --gl: #a8d5b5;
  --gp: #cde8d4;
  --wh: #ffffff;
  --bg: #f3f8f5;
  --bdr: #dce9e1;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: "Nunito", sans-serif;
  background: var(--bg);
  color: #1a1a1a;
  overflow-x: hidden;
}

/* ══════════════════════════════════════
   TOP BAR
══════════════════════════════════════ */
.top-bar {
  background: var(--gd);
  color: #fff;
  font-size: 13px;
  padding: 20px 0 35px 0;
  /* 20px Top, 30px Bottom per request */
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 8000;
  /* Lower than category buttons and logo */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.top-bar-inner {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.logo-pill {
  position: fixed;
  left: 50%;
  top: 55px;
  /* Centered relative to the sticky header height */
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  z-index: 10000;
  /* Top tier layer */
  text-decoration: none;
  border-radius: 50%;
  overflow: hidden;
  /* background: #fff; */
  /* border: 3.5px solid var(--gd); */
  /* box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Mobile Vertical Centering for Fixed Logo */
@media (max-width: 991px) {
  .logo-pill {
    top: 40px;
    /* Adjusted midpoint for mobile header height */
    width: 70px;
    /* Slightly smaller for mobile */
    height: 70px;
  }
}

.logo-pill:hover {
  transform: translate(-50%, -50%) scale(1.1);
  text-decoration: none;
  /* box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); */
}

.logo-pill img {
  width: 85%;
  height: 85%;
  object-fit: contain;
}

.steps {
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-arrow {
  color: rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  font-size: 11px;
  margin: 0 2px;
}

.step-arrow.active {
  color: #fff;
}

.cat-slider-wrap {
  /* Hard split 50/50 Background (Transparent Top, Solid Body Color Bottom) */
  background: linear-gradient(to bottom, transparent 50%, var(--bg) 50%);
  /* 3-Way Mask: Vanishes Top, Left, and Right edges */
  border-radius: 0px;
  position: sticky;
  top: 52px;
  width: 100%;
  overflow: hidden;
  margin: -32px 0 3px 0;
  padding: 7.5px 0;
  z-index: 9500;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.cat-slider-wrap.cat-slider-auth {
  margin: 18px 0 3px 0 !important;
}

/* Gradient mask to suggest more content on sides */
.cat-slider-wrap::before,
.cat-slider-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40px;
  z-index: 5;
  pointer-events: none;
}

/* .cat-slider-wrap::before {
  left: 0;
  background: linear-gradient(to right, #f3f8f5, rgba(243, 248, 245, 0));
}

.cat-slider-wrap::after {
  right: 0;
  background: linear-gradient(to left, #f3f8f5, rgba(243, 248, 245, 0));
} */

.cat-container {
  display: flex;
  gap: 13px;
  overflow-x: auto;
  padding: 5px 0px;
  /* Padding for the mask areas */
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  flex-wrap: nowrap;
  /* Single row */
  scrollbar-width: none;
  /* Hide scrollbar Firefox */
}

/* Guard elements to maintain 40px left-alignment on overflow while centering by default */
.cat-container::before,
.cat-container::after {
  content: '';
  flex: 1;
  min-width: 0;
  display: block;
  visibility: hidden;
}

.cat-container::-webkit-scrollbar {
  display: none;
  /* Hide scrollbar Chrome/Safari */
}

.step {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  transition: opacity 0.3s ease;
  opacity: 0.5;
}

.step.active,
.step.completed {
  opacity: 1;
}

.step span {
  transform: translateY(1px);
}

.step-n {
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  transition: all 0.3s;
}

.step.active .step-n {
  border-color: #fff;
  background: #fff;
  color: var(--gd);
  font-weight: 900;
}

.step.completed .step-n {
  border-color: #fff;
  background: #fff;
  color: var(--gd);
}

.step.completed .step-n::after {
  content: '✓';
  font-weight: 900;
  font-size: 9px;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.top-phone {
  display: flex;
  align-items: center;
  gap: 0;
  color: #fff;
  text-decoration: none;
  position: relative;
}

.custom-phone-icon {
  position: relative;
  height: 30px;
  width: auto;
  top: 1px; /* Slight adjustment for alignment */
  margin-right: -13px;
  margin-top: -4px;
}

.phone-text {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.cart-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  text-decoration: none;
}

.cart-text {
  font-size: 14px;
  font-weight: 400;
}

.cart-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-cart-icon {
  height: 30px;
  width: auto;
}

.cart-count {
  position: absolute;
  top: 7px;
  left: 60%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
}

.btn-login {
  border: 1.5px solid #fff;
  color: #fff;
  background: transparent;
  padding: 4px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-login:hover {
  background: #fff;
  color: var(--gd);
}

/* ══════════════════════════════════════
   RESPONSIVENESS (MOBILE/TABLET)
══════════════════════════════════════ */
@media (max-width: 991px) {
  .steps {
    display: none !important;
  }

  .top-bar-inner {
    padding: 0 20px;
  }

  .top-right {
    width: 100%;
    gap: 0;
    justify-content: space-between;
  }

  /* Flex ordering to swap sides on mobile */
  .cart-link {
    order: 2;
    /* Right side */
  }

  .btn-login {
    order: 3;
    /* Right side, next to cart */
    margin-left: 10px;
    margin-right: 0;
    padding: 4px 10px;
    font-size: 11px;
  }

  .top-phone {
    order: 1;
    margin-right: auto;
    /* Pushes other items to the far right */
    font-size: 11px;
  }

  .custom-phone-icon {
    margin-left: 0;
    height: 32px;
  }

  .logo-pill {
    width: 55px;
    height: 55px;
    z-index: 10000;
    /* Ensure centered logo stays above side elements if they nudge it */
  }

  .phone-text { font-size: 13px; }
  .cart-text { font-size: 13px; }
  .custom-cart-icon { height: 26px; }
  .cart-count { top: 6px; font-size: 8px; }

  /* On very small devices, hide cart text label to save space */
  @media (max-width: 480px) {
    .phone-text { font-size: 11px; }
    .cart-text { display: none; }
    .custom-phone-icon { height: 28px; }
    .custom-cart-icon { height: 28px; }
    .cart-count { top: 6.5px; font-size: 7.5px; }
    .top-right { gap: 8px; }
    .cart-link { font-size: 0; }
    .top-phone { font-size: 10px; }
  }

  /* Category Pill Resizing for Tablet */
  .c-pill {
    padding: 8px 16px;
    min-width: 100px;
    font-size: 12px;
  }

}

/* ══════════════════════════════════════
   BANNER SLIDER
══════════════════════════════════════ */
.banner-wrap {
  margin: 15px 0 0;
  position: relative;
  display: flex;
  height: 400px;
  gap: 15px; /* Spacing between sections */
}

.banner-wrap.full-slider {
  gap: 0;
}

.banner-left {
  flex: 0 0 72%;
  height: 100%;
  overflow: hidden;
  position: relative;
  border-radius: 2px; /* Individual rounding */
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.12);
  transition: flex 0.3s ease;
}

.banner-wrap.full-slider .banner-left {
  flex: 0 0 100%;
}

.banner-track {
  display: flex;
  height: 100%;
  transition: transform 0.85s cubic-bezier(0.77, 0, 0.18, 1);
}

.banner-right {
  flex: 1;
  background: #1a4d2e; /* Solid brand green as per image */
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 2px; /* Individual rounding */
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.12);
  overflow: hidden; /* Ensure image doesn't bleed out */
}

.br-dynamic {
  width: 100%;
  height: 100%;
  position: relative;
}

.br-dynamic img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.br-header {
  display: flex;
  justify-content: center;
  margin-top: 15px;
  margin-bottom: 20px;
  padding: 0 20px;
}

.br-header-badge {
  background: #154026;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 6px 20px;
  border-radius: 4px;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  position: relative;
  /* Simple badge-like style */
}

.br-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.br-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  transition: background 0.3s;
}

.br-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.br-icon {
  width: 32px;
  height: 32px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #fff;
  padding: 6px;
}

.br-icon svg {
  width: 100%;
  height: 100%;
}

.br-content h4 {
  margin: 0 0 3px 0;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.br-content p {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.8);
}

.slide {
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.sl-1 {
  background: linear-gradient(135deg, #1a4d2e, #2e7d4f);
}

.sl-2 {
  background: linear-gradient(135deg, #1a3a4d, #30a07e);
}

.sl-3 {
  background: linear-gradient(135deg, #4d2a1a, #be7040);
}

.slide-inner {
  text-align: center;
  color: #fff;
  z-index: 2;
}

.sl-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(16px, 3.5vw, 38px);
  line-height: 1.1;
  max-width: 90%;
  margin: 0 auto;
}

.sl-sub {
  color: rgba(255, 255, 255, 0.8);
  font-size: clamp(10px, 1.5vw, 14px);
}

/* ══════════════════════════════════════
   CATEGORY PILLS
══════════════════════════════════════ */
.c-pill {
  background: #fff;
  color: var(--gd);
  padding: 10px 20px;
  min-width: 115px;
  /* Unified button size for all categories */
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 25px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.2s;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.c-pill.active,
.c-pill:hover {
  background: var(--ga);
  color: #fff;
}

/* Flash effect for category pills - sweeps sequentially */
.c-pill::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -150%;
  width: 40%;
  height: 200%;
  background: linear-gradient(to right,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.45) 50%,
      rgba(255, 255, 255, 0) 100%);
  transform: rotate(25deg);
  z-index: 2;
  animation: offerFlash 6s infinite;
  animation-delay: calc(var(--i, 0) * 0.2s);
  pointer-events: none;
}

/* ══════════════════════════════════════
   BREADCRUMB & OFFER TAB
══════════════════════════════════════ */
/* ══════════════════════════════════════
   MAIN CONTENT CARD (Header + Products)
══════════════════════════════════════ */
.main-content-card {
  background: #fff;
  border-radius: 0px 0px 10px 10px;
  /* removed overflow: hidden to allow sticky header */
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  margin: 0 auto 60px;
  /* Seamless stacking */
  position: relative;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
}

/* Branded Flush Header (Breadcrumbs) */
.nav-breadcrumb-wrap {
  background: #0d421d;
  padding: 12px 25px;
  position: sticky;
  /* Sticky behavior as requested */
  top: 116px;
  /* Stacks perfectly below category slider */
  z-index: 9000;
  min-height: 52px;
  display: flex;
  align-items: center;
  margin: 0 !important;
  width: 100%;
  order: -1;
}

.bc-strip {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* ══════════════════════════════════════
   MAIN CONTENT CARD (Product Area Only)
══════════════════════════════════════ */
/* Cleaned up redundant card block */

.offer-tab {
  position: absolute;
  top: 100%;
  /* Centered on the boundary line from image */
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(to bottom, #16b95c 0%, #27bb6e 100%) padding-box,
    linear-gradient(to bottom, #ffffff 50%, transparent 50%) border-box;
  padding: 6px 20px;
  border: 3px solid transparent;
  border-radius: 40px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1850;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  overflow: hidden;
  min-width: 140px;
}

.offer-tab span {
  position: relative;
  z-index: 5;
}

/* Glassy Bottom Highlight */
.offer-tab::before {
  content: "";
  position: absolute;
  top: -30%;
  left: -10%;
  width: 120%;
  height: 100%;
  background: #05ac59;
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
}

/* Moving Flash Effect */
.offer-tab::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -150%;
  /* Start outside */
  width: 40%;
  height: 200%;
  background: linear-gradient(to right,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.45) 50%,
      rgba(255, 255, 255, 0) 100%);
  transform: rotate(25deg);
  z-index: 2;
  animation: offerFlash 3.5s infinite;
  pointer-events: none;
}

@keyframes offerFlash {
  0% {
    left: -150%;
  }

  30% {
    left: 150%;
  }

  /* Sweep across */
  100% {
    left: 150%;
  }

  /* Pause on the other side */
}

/* Removing old glint element as it's now handled by the animated pseudo-element */
.offer-glint {
  display: none;
}

.bc-text {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}

.crumb-dim {
  color: rgba(255, 255, 255, 0.6);
  /* Grey/subtle parent categories */
}

.crumb-active {
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  /* Large bold white active category */
}

.bc-text span.arrow {
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
  margin: 0 4px;
}

.pure-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  margin-left: auto;
  /* Ensures it floats to the far right */
}

.chk-circle {
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

/* ══════════════════════════════════════
   PRODUCT SECTION
══════════════════════════════════════ */
.prod-wrap {
  padding: 20px 20px 20px;
  /* Internal padding to create the horizontal space seen in the image */
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.prod-grid-area {
  flex: 1;
}

.prod-grid {
  display: flex;
  flex-direction: column;
}

.prod-grid-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 25px;
  row-gap: 35px;
  padding-bottom: 30px;
  border-bottom: 1px solid #e8edea;
  margin-bottom: 30px;
}

.prod-grid-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 5px;
}

@media (min-width: 1200px) and (max-width: 1399px) {
  .banner-wrap {
    height: 340px !important;
    gap: 12px !important;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .banner-wrap {
    height: 270px !important;
    gap: 12px !important;
  }
}
/* Tablet Banner (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .banner-wrap {
    height: 270px !important;
    gap: 12px !important;
  }

  .banner-left {
    flex: 0 0 65% !important;
  }

  .banner-right {
    display: flex !important;
    flex: 1 !important;
  }
}

/* Mobile Responsive Optimizations */
@media (max-width: 767px) {

  /* Compact Offer Today Button */
  .offer-tab {
    min-width: 120px;
    height: 38px;
    padding: 3px;
    top: 100% !important;
    transform: translate(-50%, -30%);
    /* Almost fully hanging on mobile for more breathing room */
    background: linear-gradient(to bottom, #16b95c 0%, #2dcb7a 100%) padding-box,
      linear-gradient(to bottom, #ffffff 50%, transparent 50%) border-box;
  }

  /* Compact Category Pills */
  .c-pill {
    padding: 7px 15px;
    /* Decreased height/width */
    min-width: 90px;
    font-size: 12px;
  }

  .offer-tab::before {
    content: "";
    position: absolute;
    top: -30%;
    left: -10%;
    width: 120%;
    height: 100%;
    background: #05ac59;
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
  }

  /* Fixed 200px Mobile Banner */
  .banner-wrap {
    height: 230px !important;
    display: flex;
    gap: 0 !important; /* No gap for single element */
  }

  .banner-left {
    flex: 0 0 100% !important; /* Full width */
    border-radius: 5px !important;
  }

  .banner-right {
    display: none !important; /* Hide on mobile as requested */
  }

  .br-header {
    margin-bottom: 8px !important;
  }

  .br-header-badge {
    font-size: 11px !important;
    padding: 3px 10px !important;
  }

  .br-list {
    gap: 4px !important;
  }

  .br-item {
    padding: 4px !important;
    gap: 6px !important;
  }

  .br-icon {
    width: 22px !important;
    height: 22px !important;
    padding: 4px !important;
  }

  .br-content h4 {
    font-size: 9px !important;
    line-height: 1.1 !important;
  }

  .br-content p {
    display: none !important; /* Hide descriptions on small screens for readability */
  }

  .slide-inner {
    padding: 15px 10px !important;
  }

  .sl-title {
    font-size: 18px !important;
    line-height: 1.1 !important;
  }

  .sl-sub {
    font-size: 11px !important;
  }



  /* Responsive Breadcrumb Bar */
  .nav-breadcrumb-wrap {
    padding: 10px 15px;
    min-height: 48px;
    top: 108px;
    /* Alignment for mobile header */
  }

  .bc-text {
    font-size: 12px;
    gap: 4px;
  }

  .crumb-active {
    font-size: 14px;
  }

  .pure-badge {
    font-size: 11px;
    gap: 6px;
  }

  .chk-circle {
    width: 16px;
    height: 16px;
  }
}

/* Extra Small Devices (Phone) */
@media (max-width: 480px) {
  .nav-breadcrumb-wrap {
    padding: 6px 10px;
    height: auto;
    top: 110px;
  }

  .bc-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .bc-text {
    font-size: 10px;
    gap: 3px;
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .pure-badge {
    font-size: 9px;
    margin-left: 5px;
    flex-shrink: 0;
  }

  .offer-tab {
    min-width: 100px;
    font-size: 11px;
    height: 32px;
    transform: translate(-50%, -30%);
    /* Maintain low position on extra small screens */
  }

  .cat-slider-wrap {
    top: 55.5px;
  }

  /* Extra Small Category Pills */
  .c-pill {
    padding: 7px 15px;
    min-width: 85px;
    font-size: 11px;
  }
}

/* Skip animation during cart/qty updates */
.prod-grid.no-animate .p-card {
  animation: none !important;
}

.p-card {
  width: 225px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--bdr);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  /* Smoother transition */
  margin-top: 15px;
  /* Entrance Animation */
  animation: cardEntrance 0.6s ease backwards;
}

/* Staggered entrance for the grid */
.p-card:nth-child(1) {
  animation-delay: 0.05s;
}

.p-card:nth-child(2) {
  animation-delay: 0.1s;
}

.p-card:nth-child(3) {
  animation-delay: 0.15s;
}

.p-card:nth-child(4) {
  animation-delay: 0.2s;
}

.p-card:nth-child(5) {
  animation-delay: 0.25s;
}

/* Support for subsequent rows */
.p-card:nth-child(n+6) {
  animation-delay: 0.3s;
}

@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.p-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(26, 77, 46, 0.12);
}

.p-card:hover .c-name {
  background: var(--gm);
}

.p-card:hover .q-btn {
  background: var(--gm);
}

.p-card:hover .add-btn {
  background: var(--gm);
}

.p-card:hover .det-badge {
  background: var(--gm);
}

.p-card:active {
  transform: translateY(-4px) scale(0.98);
}

/* Button Hover states */
.q-btn:hover {
  background: var(--ga) !important;
  transform: scale(1.1);
}

.rem-btn:hover {
  background: #a03030 !important;
  transform: scale(1.05);
}

.add-btn:hover {
  background: var(--ga) !important;
  transform: scale(1.05);
}

.det-badge:hover {
  background: var(--ga) !important;
  padding-right: 20px;
}

.p-card:hover .img-ph {
  background: #f0f0f0;
  transform: scale(1.02);
}

.img-ph {
  transition: all 0.5s ease;
}

.p-card:hover .c-name {
  border-color: var(--gl);
}

.c-img-area {
  padding: 15px;
  background: #fafafa;
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.img-ph {
  width: 100%;
  aspect-ratio: 1/1;
  background: #eee;
  border-radius: 8px;
}

.c-header-wrap {
  position: relative;
  width: 100%;
}

.det-badge {
  position: absolute;
  bottom: 100%;
  right: 0;
  background: var(--gd);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 14px;
  border-radius: 10px 10px 0 0;
  text-decoration: none;
}

/* Low stock warning badge — shown when ≤ 5 units remain */
.stock-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: #dc3545;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 6px rgba(220,53,69,0.35);
  z-index: 5;
}


.c-name {
  background: var(--gd);
  color: #fff;
  padding: 10px;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.c-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

.m-item {
  text-align: center;
  padding: 5px;
}

.m-lbl {
  display: block;
  color: var(--gd);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 2px;
}

.m-val {
  color: #555;
  font-size: 12px;
  font-weight: 700;
}

.m-sep {
  height: 26px;
  background: #ddd;
  width: 1px;
}

.c-ctrls {
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  /* Increased gap specifically between the two primary action buttons */
}

.qty-wrap {
  display: flex;
  align-items: center;
  gap: 0px;
}


.q-btn {
  background: var(--gd);
  color: #fff;
  border: none;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 900;
  border-radius: 2px;
  cursor: pointer;
}

.q-val {
  border: none;
  width: 28px;
  text-align: center;
  font-size: 14px;
  font-weight: 900;
  color: var(--gd);
  background: none;
}

.rem-btn,
.add-btn {
  color: #fff;
  border: none;
  border-radius: 25px;
  padding: 6px 18px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-icon {
  display: none;
}

.rem-btn {
  background: #d04040;
}

.add-btn {
  background: var(--gd);
}

@media (max-width: 767px) {
  .c-ctrls {
    padding: 8px 10px;
  }

  .btn-text {
    display: none;
  }

  .btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .rem-btn,
  .add-btn {
    width: 25px;
    height: 25px;
    padding: 2px 15px 2px 15px;
    border-radius: 2px;
  }

  .p-card {
    width: 170px;
  }
}

/* ══════════════════════════════════════
   SIDEBAR CART (FLOATING)
══════════════════════════════════════ */
.cart-sidebar {
  width: 220px;
  background: #fff;
  border-radius: 20px;
  border: 1.5px solid var(--bdr);
  padding: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 50%;
  right: 40px;
  z-index: 20000;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  overflow: hidden;

  /*
   * JS sets transform-origin to the cart button's position in the
   * sidebar's local space before every open/close, so scale(0) and
   * scale(1) animate exactly from/to the button. No translation needed.
   */
  transform-origin: top right;   /* fallback before JS runs */

  /* Hidden: collapsed to a dot at the origin point */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-50%) scale(0);
  transition:
    opacity    0.35s cubic-bezier(0.4, 0, 0.8, 0),
    visibility 0s    0.35s,
    transform  0.35s cubic-bezier(0.4, 0, 1, 1);
}

/* Shown: full size, vertically centred */
.cart-sidebar.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
  transition:
    opacity    0.45s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0s    0s,
    transform  0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cart-head {
  background: var(--gd);
  color: #fff;
  padding: 6px 20px;
  border-radius: 0 0 10px 10px;
  /* Only rounded on bottom */
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  width: fit-content;
  margin: 0 auto 15px;
  /* Center horizontally */
}



.cart-list {
  list-style: none;
  padding: 0 15px;
  margin-bottom: 20px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gd);
  text-align: center;
  line-height: 1.6;
  max-height: 125px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--gd) transparent;
}

.cart-list::-webkit-scrollbar {
  width: 4px;
}

.cart-list::-webkit-scrollbar-track {
  background: transparent;
}

.cart-list::-webkit-scrollbar-thumb {
  background: var(--gd);
  border-radius: 4px;
}

.cart-list li {
  margin-bottom: 4px;
}

.cart-graphic {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: auto;
  padding-bottom: 60px;
  /* Space for the bottom button */
}

/* Tall stack of green boxes */
.cart-stack {
  display: flex;
  flex-direction: column-reverse;
  gap: 3px;
  margin-bottom: 10px;
}

.stack-box {
  width: 44px;
  height: 4.5px;
  background: var(--gd);
  border-radius: 1px;
}

.cart-main-icon {
  position: relative;
  margin-top: 5px;
}

.cart-main-icon svg {
  width: 48px;
  height: 48px;
  stroke: var(--gd);
}

.badge-red {
  position: absolute;
  top: 48%;
  /* Center vertically in basket */
  left: 58%;
  /* Center horizontally in basket */
  transform: translate(-50%, -50%);
  color: #ff4d4d;
  font-size: 15px;
  font-weight: 900;
  pointer-events: none;
}

.checkout-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  background: var(--gd);
  color: #fff;
  border: none;
  border-radius: 0 0 20px 20px;
  /* Match sidebar's bottom corners */
  padding: 12px;
  width: 100%;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  position: absolute;
  bottom: 0;
  left: 0;
  overflow: hidden;
  /* For shimmer effect */
  transition: all 0.3s ease;
}

.checkout-btn:hover {
  background: var(--ga);
  transform: translateY(-2px);
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
}

.checkout-btn.btn-disabled, 
.cart-link.btn-disabled {
  opacity: 0.5;
  pointer-events: none;
  filter: grayscale(1);
  cursor: not-allowed;
}

/* Shimmer Effect Animation */
.checkout-btn::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -60%;
  width: 20%;
  height: 200%;
  background: linear-gradient(to right,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.3) 50%,
      rgba(255, 255, 255, 0) 100%);
  transform: rotate(30deg);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% {
    left: -60%;
  }

  30% {
    left: 120%;
  }

  100% {
    left: 120%;
  }
}

@media (max-width: 1199px) {
  .p-card {
    width: 190px;
  }

  .cart-sidebar {
    position: fixed;
    bottom: 20px;
    top: auto;
    right: 20px;
    /* No translateY here — sidebar anchors to bottom edge, not viewport centre */
    transform: scale(0);
  }

  .cart-sidebar.show {
    transform: scale(1);
  }
}


@media (max-width: 575px) {
  .p-card {
    width: calc(50% - 15px);
    max-width: 160px;
  }
  
  .steps {
    display: none;
  }

  .cart-sidebar {
    display: none;
  }
}

/* ══════════════════════════════════════
   CART ICON PREMIUM ANIMATIONS
══════════════════════════════════════ */

/* Glow ring layer on the icon-wrap */
.cart-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-icon-wrap::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid transparent;
  pointer-events: none;
}

/* ── Absorb animation: fires when the sidebar collapses back into the button ── */
@keyframes cart-absorb-bounce {
  0%   { transform: scale(1)    rotate(0deg); }
  18%  { transform: scale(1.35) rotate(-12deg); }
  35%  { transform: scale(0.88) rotate(8deg); }
  55%  { transform: scale(1.18) rotate(-5deg); }
  72%  { transform: scale(0.95) rotate(3deg); }
  88%  { transform: scale(1.06) rotate(-1deg); }
  100% { transform: scale(1)    rotate(0deg); }
}

@keyframes cart-absorb-glow {
  0%   { box-shadow: 0 0 0px  0px  rgba(168, 213, 181, 0);   border-color: transparent; }
  20%  { box-shadow: 0 0 18px 8px  rgba(168, 213, 181, 0.75); border-color: rgba(255,255,255,0.7); }
  55%  { box-shadow: 0 0 10px 4px  rgba(168, 213, 181, 0.45); border-color: rgba(255,255,255,0.45); }
  100% { box-shadow: 0 0 0px  0px  rgba(168, 213, 181, 0);   border-color: transparent; }
}

/* @keyframes cart-absorb-shimmer {
  0%   { left: -80%; opacity: 0; }
  15%  { opacity: 1; }
  60%  { left: 120%; opacity: 0; }
  100% { left: 120%; opacity: 0; }
} */

/* Shimmer sweep overlay on the icon-wrap */
/* .cart-icon-wrap::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -80%;
  width: 35%;
  height: 200%;
  background: linear-gradient(to right,
    rgba(255,255,255,0)   0%,
    rgba(255,255,255,0.5) 50%,
    rgba(255,255,255,0)   100%);
  transform: rotate(25deg);
  pointer-events: none;
  opacity: 0;
  z-index: 5;
} */

/* ── Active class added by JS ── */
.cart-icon-absorbing .custom-cart-icon {
  animation: cart-absorb-bounce 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) forwards;
}

.cart-icon-absorbing::after {
  animation: cart-absorb-glow 0.5s ease forwards;
}

/* .cart-icon-absorbing::before {
  animation: cart-absorb-shimmer 0.65s 0.08s ease forwards;
} */

/* ── Add-to-cart "pop" on badge ── */
@keyframes badge-pop {
  0%   { transform: translateX(-50%) scale(1); }
  40%  { transform: translateX(-50%) scale(1.7); }
  70%  { transform: translateX(-50%) scale(0.85); }
  100% { transform: translateX(-50%) scale(1); }
}

.cart-count.badge-popping {
  animation: badge-pop 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) forwards;
}

/* ══════════════════════════════════════
   FLY-TO-CART CLONE (Mobile)
   A ghost copy of the product image that
   flies from the card to the cart icon.
══════════════════════════════════════ */
.cart-fly-clone {
  position: fixed;     /* fixed relative to viewport to accurately target floating header */
  z-index: 99999;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(26, 77, 46, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.7);
  pointer-events: none;
  will-change: transform, opacity;
  /* initial state — JS overrides transition & final transform */
  transform: translate(0, 0) scale(1);
  opacity: 1;
}

