/* ===============================
   HOME PAGE (Shoemor) — CLEAN PRO
   File: assets/frontend/css/pages-home.css
   UPDATED: Fixed hero banner responsiveness
================================ */

/* Base */
.hp-home{padding:0 0 18px;}
.section{padding:18px 0;}

.sectionhead{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin:12px 0 8px;
}
.sectionhead h2{margin:0;font-size:22px;letter-spacing:.02em;}
.sectionhead .sub{color:var(--muted);margin-top:6px;font-size:13px;}

/* ===============================
   HERO - COMPLETELY FIXED
================================ */
.hero-wrap{
  position:relative;
  width:100%;
  height: min(600px, 90vh);
  min-height: 450px;
  max-height: 800px;
  overflow:hidden;
  border-bottom:1px solid rgba(17,17,17,.08);
}

.hero-slide{
  position:absolute;
  inset:0;
  background:#111;
  width:100%;
  height:100%;
}

.hero-slide img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position: center;
  filter:contrast(1.02) saturate(1.05);
  display: block;
}

.hero-overlay{
  position:absolute;
  inset:0;
  background: radial-gradient(900px 520px at 50% 45%,
    rgba(0,0,0,.10),
    rgba(0,0,0,.35) 60%,
    rgba(0,0,0,.55)
  );
  z-index:1;
  pointer-events: none;
}

.hero-content{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:24px;
  color:#fff;
  z-index:2;
  width:100%;
}

.hero-inner{
  max-width:860px;
  width:100%;
  margin:0 auto;
  animation:heroFade .9s ease;
}

@keyframes heroFade{
  from{opacity:0;transform:translateY(18px)}
  to{opacity:1;transform:translateY(0)}
}

.hero-eyebrow{
  letter-spacing:.40em;
  font-size:14px;
  text-transform:uppercase;
  opacity:.92;
  margin-bottom:10px;
}

.hero-title{
  font-family:var(--serif);
  font-weight:900;
  letter-spacing:.02em;
  font-size:clamp(38px, 8vw, 92px);
  line-height:1.02;
  margin:10px 0;
  text-shadow: 0 2px 10px rgba(0,0,0,.2);
}

.hero-sub{
  margin-top:16px;
  font-size:clamp(14px, 2vw, 18px);
  opacity:.92;
  letter-spacing:.02em;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta-wrap{
  margin-top:28px;
}

.hero-btn{
  display:inline-block;
  padding:14px 28px;
  background:#fff;
  color:#000;
  font-weight:800;
  letter-spacing:.10em;
  text-decoration:none;
  border-radius:40px;
  transition:.28s ease;
  font-size:clamp(12px, 1.5vw, 14px);
}

.hero-btn:hover{
  background:#000;
  color:#fff;
  transform: translateY(-3px);
  box-shadow: 0 20px 30px rgba(0,0,0,.2);
}

.hero-dots{
  position:absolute;
  right:22px;
  bottom:18px;
  display:flex;
  gap:10px;
  align-items:center;
  z-index:3;
}

.dotbtn{
  width:9px;
  height:9px;
  border-radius:999px;
  border:0;
  background:rgba(255,255,255,.38);
  cursor:pointer;
  transition: all 0.3s;
  padding:0;
}

.dotbtn.active{
  background:rgba(255,255,255,.92);
  transform: scale(1.2);
}

/* Tablet Responsive */
@media(max-width:900px){ 
  .hero-wrap{
    height: 500px;
    min-height: 400px;
  }
}

/* Mobile Responsive - CRITICAL FIXES */
@media(max-width:600px){
  .hero-wrap{
    height: 70vh;
    min-height: 420px;
    max-height: 560px;
  }

  .hero-slide img{
    object-fit: cover;
    object-position: center;
    filter: none;
    width:100%;
    height:100%;
  }

  /* Lighter overlay on mobile */
  .hero-overlay{
    background: radial-gradient(circle at center,
      rgba(0,0,0,.2) 0%,
      rgba(0,0,0,.45) 100%
    ) !important;
  }

  .hero-content{
    padding: 16px;
  }

  .hero-inner{
    max-width: 95%;
  }

  .hero-eyebrow{
    font-size: 11px;
    letter-spacing: .3em;
    margin-bottom: 8px;
  }

  .hero-title{
    font-size: 32px;
    line-height: 1.1;
    margin: 8px 0;
  }

  .hero-sub{
    font-size: 13px;
    margin-top: 10px;
    padding: 0 10px;
  }

  .hero-cta-wrap{
    margin-top: 20px;
  }

  .hero-btn{
    padding: 12px 24px;
    font-size: 12px;
    letter-spacing: .08em;
  }

  .hero-dots{
    right: 12px;
    bottom: 12px;
    gap: 6px;
  }

  .dotbtn{
    width: 8px;
    height: 8px;
  }
}

/* Small Mobile */
@media(max-width:380px){
  .hero-wrap{
    min-height: 380px;
  }

  .hero-title{
    font-size: 28px;
  }

  .hero-sub{
    font-size: 12px;
  }

  .hero-btn{
    padding: 10px 20px;
    font-size: 11px;
  }
}

/* Landscape Mode */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-wrap{
    height: 100vh;
    min-height: 300px;
  }

  .hero-title{
    font-size: 28px;
  }

  .hero-sub{
    font-size: 12px;
    margin-top: 5px;
  }

  .hero-cta-wrap{
    margin-top: 10px;
  }

  .hero-btn{
    padding: 8px 20px;
  }
}

/* ===============================
   FLASH SALE STRIP
================================ */
.hp-flash-sale{
  width:100%;
  background:linear-gradient(90deg,#111,#1a1a1a,#111);
  color:#fff;
  text-align:center;
  padding:14px 10px;
  position:relative;
  overflow:hidden;
}

.flash-inner{
  font-weight:800;
  font-size:15px;
  letter-spacing:.5px;
  display:flex;
  justify-content:center;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  animation:flashBlink 1.8s infinite;
}

.flash-divider{opacity:.6;}
@keyframes flashBlink{0%{opacity:1}50%{opacity:.75}100%{opacity:1}}

.flash-timer span{
  display:inline-block;
  min-width:30px;
  padding:4px 6px;
  border-radius:6px;
  font-weight:900;
  color:#fff;
}
.ft-h{background:linear-gradient(45deg,#ff512f,#dd2476);}
.ft-m{background:linear-gradient(45deg,#11998e,#38ef7d);}
.ft-s{background:linear-gradient(45deg,#396afc,#2948ff);}
.flash-expired{background:#c00;padding:6px 10px;border-radius:6px;}

.flash-cta{
  margin-left:15px;
  padding:6px 16px;
  background:#fff;
  color:#111;
  font-weight:900;
  font-size:13px;
  border-radius:30px;
  text-decoration:none;
  transition:.25s ease;
  letter-spacing:.05em;
}
.flash-cta:hover{background:#ff3b3b;color:#fff;}

@media(max-width:600px){
  .flash-inner{font-size:13px;gap:6px;}
  .flash-timer span{min-width:26px;padding:3px 5px;}
  .flash-cta{margin-top:6px;margin-left:0;}
}

/* ===============================
   MARQUEE + TRUST
================================ */
.hp-marquee{
  overflow:hidden;
  background:#111;
  color:#fff;
  padding:10px 0;
  font-size:13px;
  letter-spacing:.08em;
}
.marquee-track{
  display:inline-block;
  white-space:nowrap;
  animation:marquee 22s linear infinite;
}
@keyframes marquee{from{transform:translateX(100%)}to{transform:translateX(-100%)}}

.hp-trust{
  display:flex;
  justify-content:center;
  gap:40px;
  padding:16px 0;
  font-size:13px;
  border-bottom:1px solid rgba(17,17,17,.08);
  flex-wrap:wrap;
}
@media(max-width:600px){
  .hp-trust{gap:18px;text-align:center;}
}

/* ===============================
   DYNAMIC CATEGORIES
================================ */
.hp-cats{ margin: 28px 0 12px; }

.hp-cats-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
}

.hp-cats-title{
  font-weight:900;
  letter-spacing:.22em;
  text-transform:uppercase;
  font-size:12px;
  color:rgba(17,17,17,.85);
  display:flex;
  align-items:center;
  gap:6px;
}

.hp-cats-caret{
  opacity:.6;
  animation: hpCaretBlink 1s infinite;
}
@keyframes hpCaretBlink{
  0%{opacity:.2}
  50%{opacity:1}
  100%{opacity:.2}
}

.hp-cats-actions{
  display:flex;
  gap:10px;
  align-items:center;
}

.hp-cats-btn{
  width:38px;
  height:38px;
  border-radius:12px;
  border:1px solid rgba(17,17,17,.12);
  background:#fff;
  cursor:pointer;
  font-size:18px;
  line-height:1;
  display:grid;
  place-items:center;
  box-shadow: var(--shadow-sm);
  transition:.2s ease;
}
.hp-cats-btn:hover{
  border-color:rgba(17,17,17,.25);
  transform: translateY(-1px);
}

/* viewport */
.hp-cats-viewport{
  overflow:hidden;
  border-radius:18px;
}

/* horizontal track */
.hp-cats-track{
  display:flex;
  flex-wrap:nowrap;
  gap:14px;
  padding: 6px 2px 12px;
  overflow-x:auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.hp-cats-track::-webkit-scrollbar{display:none;}

/* category card */
.hp-cat{
  flex: 0 0 280px;
  height:170px;
  border-radius:18px;
  position:relative;
  overflow:hidden;
  background:#111;
  color:#fff;
  scroll-snap-align: start;
  cursor:pointer;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(17,17,17,.08);
  text-decoration:none;
  display:block;
  transform: translateY(0);
  transition: transform .18s ease, box-shadow .18s ease;
}
.hp-cat:hover{ transform: translateY(-3px); }

.hp-cat::before{
  content:"";
  position:absolute;
  inset:0;
  background: none;
  z-index:1;
}

.hp-cat img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  filter:none;
  transform:scale(1.00);
  transition:transform .35s ease;
}

.hp-cat.is-active img{
  transform:scale(1.06);
}

.hp-cat .t{
  position:absolute;
  left:16px;
  bottom:16px;
  z-index:2;
  font-weight:900;
  letter-spacing:.20em;
  text-transform:uppercase;
  font-size:12px;
  color:#fff;
  background:rgba(0,0,0,.25);
  padding:10px 12px;
  border-radius:14px;
  backdrop-filter: blur(8px);
  pointer-events:none;
  text-shadow: 0 2px 10px rgba(0,0,0,.22);
}

.hp-cat.is-active{
  box-shadow: 0 22px 60px rgba(0,0,0,.12);
  border-color: rgba(17,17,17,.14);
}

@media(max-width:600px){
  .hp-cat{ flex-basis:240px; height:150px; }
  .hp-cat .t{ font-size:11px; letter-spacing:.16em; }
}

/* ===============================
   Tabs row (MEN/WOMEN/KIDS)
================================ */
.hp-tabs{
  display:flex;
  justify-content:center;
  gap:22px;
  margin:18px 0 12px;
}
.hp-tab{
  border:0;
  background:transparent;
  cursor:pointer;
  letter-spacing:.32em;
  text-transform:uppercase;
  font-weight:800;
  font-size:12px;
  color:rgba(17,17,17,.72);
  padding:10px 8px;
}
.hp-tab.active{
  color:#000;
  border-bottom:2px solid rgba(17,17,17,.85);
}

/* ===============================
   Featured products (3 big)
================================ */
.hp-feature{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}
.hp-big{
  border:1px solid #000 !important; /* Changed to black */
  border-radius:18px;
  background:#fff;
  box-shadow:var(--shadow-md);
  overflow:hidden;
  cursor:pointer;
  transition:transform .15s ease;
}
.hp-big:hover{transform:translateY(-2px);}
.hp-big .img{
  height:340px;
  background:rgba(17,17,17,.04);
  display:flex;align-items:center;justify-content:center;
}
.hp-big .img img{width:100%;height:100%;object-fit:cover;background:#fff;} /* Changed to cover */
.hp-big .info{padding:14px;text-align:center;}
.hp-big .name{
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
  font-size:11px;
}
.hp-big .price{margin-top:8px;font-size:12px;color:rgba(17,17,17,.72);}
.hp-viewall{display:flex;justify-content:center;margin:14px 0 8px;}

@media(max-width:980px){
  .hp-feature{grid-template-columns:1fr;}
  .hp-big .img{height:280px;}
}

/* ===============================
   New Arrivals grid
================================ */
.hp-newarrivals{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-top:12px;
}
@media(max-width:980px){ .hp-newarrivals{grid-template-columns:repeat(2,1fr);} }
@media(max-width:560px){ .hp-newarrivals{grid-template-columns:1fr;} }

/* ===============================
   Product Cards
================================ */
.pcard{
  border:1px solid #000 !important; /* Changed to black */
  border-radius:16px;
  background:#fff;
  overflow:hidden;
  transition:transform .2s ease;
  height:100%;
  display:flex;
  flex-direction:column;
}
.pcard:hover{transform:translateY(-3px);}
.pcard .pimg{
  height:280px; /* Increased from 240px */
  background:#f8f9fa;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0; /* Removed padding */
}
.pcard .pimg img{
  width:100%;
  height:100%;
  object-fit:cover; /* Changed to cover */
}
.pcard .pbody{
  padding:12px;
  flex:1;
}
.pcard .pname{
  font-weight:700;
  font-size:12px;
  text-transform:uppercase;
  margin-bottom:6px;
}
.pcard .pprice{
  display:flex;
  align-items:baseline;
  gap:8px;
}
.pcard .pprice .now{
  font-weight:800;
  font-size:13px;
}
.pcard .pprice .old{
  font-size:11px;
  color:#999;
  text-decoration:line-through;
}

/* ===============================
   Container & Utilities
================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

@media (max-width: 600px){
  .container {
    padding: 0 12px;
  }
  
  .hp-home{ 
    padding:0 0 12px; 
    overflow-x: hidden;
  }
  
  .section{ 
    padding:14px 0; 
  }
}

/* ===============================
   Product Card Sizes - Added for size display
================================ */
.pcard-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px 12px;
    border-top: 1px solid rgba(0,0,0,0.05);
    margin-top: 4px;
}

.size-btn {
    min-width: 40px;
    height: 32px;
    padding: 0 8px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.size-btn:hover {
    background: #000;
    color: white;
    border-color: #000;
    transform: translateY(-2px);
}

.size-btn:active {
    transform: translateY(0);
}

.pcard-sizes.out-of-stock {
    color: #999;
    font-size: 12px;
    font-weight: 400;
    padding-top: 8px;
    padding-bottom: 12px;
    text-align: center;
}

/* ===============================
   Product Card Action Buttons
   ADD TO CART & BUY NOW - Professional Styling
================================ */
.pcard-actions {
    display: flex;
    gap: 8px;
    padding: 0 12px 12px;
    margin-top: 4px;
}

.pcard-add,
.pcard-buy {
    flex: 1;
    padding: 12px 8px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.pcard-add {
    background: #fff;
    color: #000;
    border: 1.5px solid #000;
}

.pcard-add:hover:not(:disabled) {
    background: #000;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.pcard-buy {
    background: #000;
    color: #fff;
    border: 1.5px solid #000;
}

.pcard-buy:hover:not(:disabled) {
    background: #c7a253;
    border-color: #c7a253;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(199,162,83,0.2);
}

.pcard-add:disabled,
.pcard-buy:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Selected size indicator */
.size-btn.active {
    background: #000;
    color: white;
    border-color: #000;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Mobile responsive */
@media (max-width: 600px) {
    .pcard-actions {
        gap: 6px;
    }
    
    .pcard-add,
    .pcard-buy {
        padding: 10px 4px;
        font-size: 10px;
    }
    
    .size-btn {
        min-width: 36px;
        height: 30px;
        font-size: 11px;
    }
}

/* Toast notification styles (if not already present) */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 12px 20px;
    border-radius: 30px;
    background: #fff;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-left: 4px solid #000;
    animation: slideInRight 0.3s ease;
}

.toast-error {
    border-left-color: #dc3545;
    background: #fff1f0;
    color: #dc3545;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}
/* ==============================
   NEW ARRIVALS (Dynamic Area)
   Option 2: Chips + Option 3: Mobile Carousel
============================== */

.na-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:12px 0 16px;
  padding:10px 12px;
  border:1px solid rgba(17,17,17,.08);
  border-radius:16px;
  background:rgba(255,255,255,.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.na-chips{
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding:2px;
  scroll-snap-type:x proximity;
  -webkit-overflow-scrolling: touch;
}
.na-chips::-webkit-scrollbar{ display:none; }

.na-chip{
  border:1px solid rgba(17,17,17,.12);
  background:#fff;
  color:#111;
  border-radius:999px;
  padding:8px 12px;
  font-size:12px;
  font-weight:700;
  letter-spacing:.4px;
  white-space:nowrap;
  cursor:pointer;
  scroll-snap-align:start;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.na-chip:hover{ transform: translateY(-1px); }
.na-chip.is-active{
  background:#111;
  color:#fff;
  border-color:#111;
}

.na-nav{
  display:flex;
  align-items:center;
  gap:8px;
  flex:0 0 auto;
}
.na-nav-btn{
  width:36px;
  height:36px;
  border-radius:12px;
  border:1px solid rgba(17,17,17,.12);
  background:#fff;
  cursor:pointer;
  font-size:18px;
  line-height:1;
}
.na-viewall{
  display:inline-flex;
  align-items:center;
  gap:6px;
  height:36px;
  padding:0 12px;
  border-radius:12px;
  border:1px solid rgba(17,17,17,.12);
  background:#fff;
  font-weight:800;
  font-size:12px;
  text-decoration:none;
  color:#111;
}

/* Desktop Grid */
.na-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:16px;
}

/* Mobile = Carousel */
@media (max-width: 768px){
  .na-bar{
    flex-direction:column;
    align-items:stretch;
    gap:10px;
  }
  .na-nav{
    justify-content:space-between;
    width:100%;
  }

  .na-grid{
    display:flex;
    gap:12px;
    overflow-x:auto;
    padding:6px 2px 12px;
    scroll-snap-type:x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .na-grid::-webkit-scrollbar{ display:none; }

  .na-grid .sp-card{
    flex:0 0 78vw;
    max-width:340px;
    scroll-snap-align:start;
  }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px){
  .na-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* ==============================
   New Arrivals Heading (Cinematic / Pro)
============================== */
.sectionhead.is-na h2{
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-weight: 800;
  font-size: 34px;
  letter-spacing: .7px;
  position: relative;
  display: inline-block;
  margin: 0;
  padding-bottom: 10px;
}

.sectionhead.is-na h2::after{
  content:"";
  position:absolute;
  left:0;
  bottom:2px;
  height:2px;
  width: clamp(78px, 55%, 170px);
  background: linear-gradient(90deg, #111, rgba(17,17,17,.15), #111);
  background-size: 200% 100%;
  animation: naUnderline 2.6s ease-in-out infinite;
  border-radius: 999px;
}

@keyframes naUnderline{
  0%{ background-position: 0% 0; }
  100%{ background-position: 200% 0; }
}

/* sub text (no count look) */
.sectionhead.is-na .sub{
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(17,17,17,.55);
  margin-top: 4px;
}

@media (max-width:768px){
  .sectionhead.is-na h2{ font-size: 26px; }
}

/* ==============================
   Premium Card Border (Homepage NA only)
============================== */
.hp-home #naGrid .sp-card{
  border: 1px solid #000 !important; /* Changed to black */
  box-shadow: 0 14px 34px rgba(17,17,17,.06);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.hp-home #naGrid .sp-card:hover{
  border-color: #000 !important; /* Changed to black */
  box-shadow: 0 18px 46px rgba(17,17,17,.10);
  transform: translateY(-2px);
}
/* ===============================
   COLOR DOTS STYLES
================================ */
.sp-colors {
    display: flex;
    gap: 6px;
    margin: 6px 0;
    flex-wrap: wrap;
}

.color-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.color-dot:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Mobile responsive */
@media (max-width: 600px) {
    .color-dot {
        width: 16px;
        height: 16px;
    }
}
/* ===============================
   FIXED BUTTON ALIGNMENT & CARD SIZING
================================ */

/* Fix card height consistency */
.sp-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 580px; /* Consistent minimum height */
}

/* Make product body flexible */
.sp-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 14px 12px 16px;
}

/* Push buttons to bottom */
.sp-actions-buttons {
    margin-top: auto !important;
    padding-top: 12px;
    display: flex;
    gap: 10px;
    width: 100%;
}

/* Equal button sizes */
.sp-add-btn,
.sp-buy-btn {
    flex: 1 1 0; /* Equal width */
    min-width: 0; /* Prevent overflow */
    padding: 12px 8px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Smaller card height */
.sp-img {
    height: 240px !important; /* Reduced from 280px */
}

/* Color dots styling */
.sp-colors {
    display: flex;
    gap: 8px;
    margin: 8px 0;
    flex-wrap: wrap;
    min-height: 28px;
}

.color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
    display: inline-block;
}

.color-dot:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* No colors message */
.sp-colors .no-colors {
    font-size: 11px;
    color: #999;
    font-style: italic;
}

/* Stock container fix */
.sp-stock-container {
    margin-top: 12px !important;
    min-height: 32px;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .sp-card {
        min-height: 520px;
    }
    
    .sp-img {
        height: 200px !important;
    }
    
    .color-dot {
        width: 20px;
        height: 20px;
    }
    
    .sp-add-btn,
    .sp-buy-btn {
        padding: 10px 4px;
        font-size: 10px;
    }
}
/* ===============================
   SIZE ALERT POPUP STYLES
================================ */
.size-alert-popup {
    position: absolute !important;
    top: -30px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background-color: #000 !important;
    color: #fff !important;
    padding: 8px 16px !important;
    border-radius: 30px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    z-index: 1000 !important;
    animation: fadeInOut 0.2s ease forwards !important;
    pointer-events: none !important;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
    20% { opacity: 1; transform: translateX(-50%) translateY(0); }
    80% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* Ensure cards have position relative */
.sp-card {
    position: relative !important;
}
/* ===============================
   SIZE SELECTION POPUP STYLES
================================ */
.size-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.size-popup-overlay.active {
    display: flex;
    opacity: 1;
}

.size-popup {
    background: white;
    border-radius: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.size-popup-overlay.active .size-popup {
    transform: scale(1);
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f5f5f5;
    border: none;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 1;
}

.popup-close:hover {
    background: #000;
    color: white;
    transform: rotate(90deg);
}

.popup-product {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.popup-product-image {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
    flex-shrink: 0;
}

.popup-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popup-product-info {
    flex: 1;
}

.popup-product-name {
    font-weight: 700;
    font-size: 18px;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.popup-product-price {
    font-size: 20px;
    font-weight: 800;
    color: #c7a253;
}

.popup-product-price .old {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    margin-left: 8px;
    font-weight: 400;
}

.popup-section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.popup-size-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.popup-size-btn {
    min-width: 70px;
    height: 50px;
    padding: 0 10px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.popup-size-btn.in-stock:hover {
    border-color: #c7a253;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.popup-size-btn.active {
    border-color: #c7a253;
    background: #c7a253;
    color: white;
}

.popup-size-btn.out-of-stock {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
    text-decoration: line-through;
}

.size-stock-badge {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
}

.popup-size-btn.active .size-stock-badge {
    color: rgba(255,255,255,0.8);
}

.popup-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.popup-add-to-cart,
.popup-buy-now {
    flex: 1;
    padding: 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
}

.popup-add-to-cart {
    background: white;
    color: #000;
    border: 2px solid #000;
}

.popup-add-to-cart:hover:not(:disabled) {
    background: #000;
    color: white;
    transform: translateY(-2px);
}

.popup-buy-now {
    background: #000;
    color: white;
    border: 2px solid #000;
}

.popup-buy-now:hover:not(:disabled) {
    background: #c7a253;
    border-color: #c7a253;
    transform: translateY(-2px);
}

.popup-add-to-cart:disabled,
.popup-buy-now:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .size-popup {
        padding: 20px;
    }
    
    .popup-product {
        gap: 15px;
    }
    
    .popup-product-image {
        width: 80px;
        height: 80px;
    }
    
    .popup-product-name {
        font-size: 16px;
    }
    
    .popup-size-btn {
        min-width: 60px;
        height: 45px;
        font-size: 14px;
    }
    
    .popup-actions {
        flex-direction: column;
        gap: 10px;
    }
}
/* =========================================================
   CATEGORY CAROUSEL (Image#1 style) - SAFE UPGRADE
========================================================= */
.cat-carousel{
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 14px 2px 18px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.cat-carousel::-webkit-scrollbar{ height: 0; }

/* single tile/card */
.cat-tile{
  flex: 0 0 310px;              /* desktop width */
  scroll-snap-align: start;
  display: block;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #f3f4f6;
  text-decoration: none;
  box-shadow: 0 10px 25px rgba(0,0,0,.06);
  border: 1px solid rgba(17,17,17,.08);
}

/* ✅ if your card contains 3 images, show only first */
.cat-tile img{ 
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
}
.cat-tile img:nth-of-type(n+2){ display:none !important; } /* hide extra images safely */

/* overlay like Image#1 */
.cat-tile__overlay{
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px 16px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.55) 60%, rgba(0,0,0,.72) 100%);
}

.cat-tile__title{
  color: #fff;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-tile__arrow{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.18);
  color: #fff;
  font-size: 18px;
  flex: 0 0 auto;
}

/* hover premium */
.cat-tile:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 35px rgba(0,0,0,.12);
  border-color: rgba(199,162,83,.6);
}

/* mobile layout like Image#1 (2 cards partially visible) */
@media (max-width: 600px){
  .cat-carousel{ gap: 14px; }
  .cat-tile{
    flex: 0 0 72vw;             /* shows 1.3 cards on mobile */
  }
  .cat-tile img{ height: 190px; }
}