/* ═══════════════════════════════════════════
   Roshluxe Products Page — Luxury Front-end
   ═══════════════════════════════════════════ */
:root {
  --radius-sm:    0.375rem;
  --radius-md:    0.5rem;
  --radius-lg:    0.75rem;
  --radius-xl:    1rem;
  --transition:   160ms cubic-bezier(0.16,1,0.3,1);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', 'Inter', system-ui, sans-serif;

  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem;    --space-5: 1.25rem; --space-6: 1.5rem;
  --space-8: 2rem;    --space-10: 2.5rem; --space-12: 3rem;
}

.products-page-wrap,
.product-page-wrap{
  padding: clamp(32px, 4vw, 56px) 0 clamp(64px, 7vw, 96px);
  background: var(--bg);
}

.products-hero{
  margin-bottom: 28px;
}

.products-hero h1{
  font-family: "Playfair Display", serif;
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  line-height: 1.02;
  color: var(--text);
  margin-bottom: 8px;
}

.products-hero p,
.product-subhouse,
.product-copy-block p,
.products-count,
.product-card-desc{
  color: var(--text-dim);
}

.products-layout{
  display:grid;
  grid-template-columns:280px 1fr;
  gap:32px;
  align-items:start;
}

.filter-mobile-btn{
  display:none;
  align-items:center;
  gap:8px;
  margin-bottom:16px;
}

.filter-sidebar{
  position:sticky;
  top:90px;
  background:var(--bg-card);
  border:1px solid var( --border-bright);
  border-radius:var(--r-xl);
  padding:24px;
  box-shadow:var(--shadow-card);
}

.filter-sidebar-title{
  font-family:"Playfair Display",serif;
  font-size:1.1rem;
  color:var(--text);
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:20px;
}

.filter-section{margin-bottom:24px}

.filter-section-title,
.sort-label{
  font-size:.68rem;
  letter-spacing:.16em;
  color:var(--navy-mid);
  margin-bottom:12px;
  font-weight:700;
  text-transform:uppercase;
}

.filter-option{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 0;
  cursor:pointer;
}

.filter-option input{display:none}

.filter-checkbox{
  width:16px;
  height:16px;
  border:1px solid var(--border);
  border-radius:4px;
  background:var(--bg-raised);
  position:relative;
  flex-shrink:0;
}

.filter-option input:checked + .filter-checkbox{
  background:linear-gradient(135deg,var(--navy-mid),var(--navy-bright));
  border-color:var(--navy-mid);
}

.filter-option input:checked + .filter-checkbox::after{
  content:'✓';
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-size:10px;
  font-weight:800;
}

.filter-option-label{
  color:var(--text-dim);
}

.price-range-inputs{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  gap:8px;
  align-items:center;
}

.price-input,
.sort-select{
  background:var(--bg-raised);
  border:1px solid var(--border);
  color:var(--text);
  border-radius:var(--r-md);
  padding:12px 14px;
  outline:0;
}

.price-input::placeholder{
  color:var(--text-faint);
}

.filter-apply-btn{
  width:100%;
  margin-top:12px;
}

.products-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:24px;
}

.products-count strong{
  color:var(--text);
}

.sort-wrap{
  display:flex;
  align-items:center;
  gap:12px;
}

.products-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  gap:24px;
}

.product-card{
  position:relative;
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--r-lg);
  overflow:hidden;
  box-shadow:var(--shadow-card);
  transition:all var(--t-mid);
}

.product-card:hover{
  transform:translateY(-4px);
  border-color:var( --border-bright-bright);
  box-shadow:var(--shadow-gold-md);
}

.product-card-img{
  position:relative;
  overflow:hidden;
  background:var(--bg-raised);
}

.product-card-img img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .6s var(--ease);
}

.product-card:hover .product-card-img img{
  transform:scale(1.04);
}

.product-card-badge{
  position:absolute;
  top:12px;
  left:12px;
  z-index:2;
  padding:6px 10px;
  border-radius:var(--r-full);
  color:#fff;
  font-size:.58rem;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
  background:linear-gradient(135deg,var(--navy-mid),var(--navy-bright));
}

.badge-oos{
  background:#c65c5c;
}

.badge-low{
  background:#c49319;
}

.product-wishlist-btn{
  position:absolute;
  top:12px;
  right:12px;
  z-index:2;
  width:36px;
  height:36px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,.92);
  border:1px solid var(--border);
  color:var(--text-dim);
}

.product-wishlist-btn.active,
.product-wishlist-btn:hover{
  color:#e05a6a;
  border-color:rgba(224,90,106,.35);
}

.product-card-body{
  padding:18px;
}

.product-card-cat{
  font-size:.62rem;
  font-weight:700;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--navy-mid);
  margin-bottom:6px;
}

.product-card-name{
  color:var(--text);
  font-family:"Playfair Display",serif;
  font-size:1.2rem;
  line-height:1.2;
  margin-bottom:6px;
}

.product-card-desc{
  font-size:.82rem;
  min-height:1.4em;
  margin-bottom:16px;
}

.product-card-footer{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  padding-top:14px;
  border-top:1px solid var(--border);
}

.product-price{
  color:var(--navy-mid);
  font-family:"Playfair Display",serif;
  font-size:1.4rem;
}

.product-stock{
  color:var(--text-dim);
  font-size:.72rem;
  margin-top:4px;
}

.product-stock.low{
  color:#c65c5c;
}

.add-to-cart { border-radius: 5px; background: var(--navy); color: var(--white); font-size: 10px; font-weight: 700; }
.add-to-cart:hover { background: var(--navy-light); }
.products-empty { grid-column: 1 / -1; padding: 35px; text-align: center; }

.active-filters{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:18px;
}

.filter-tag{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border-radius:var(--r-full);
  padding:8px 12px;
  background:rgba(154,114,9,.08);
  border:1px solid var( --border-bright);
  font-size:.72rem;
  font-weight:700;
  color:var(--navy-mid);
}

.filter-tag button{
  display:flex;
  align-items:center;
  justify-content:center;
}

.products-empty{
  grid-column:1/-1;
  text-align:center;
  padding:72px 20px;
  background:var(--bg-card);
  border:1px solid var( --border-bright);
  border-radius:var(--r-xl);
}

.products-empty h3{
  font-family:"Playfair Display",serif;
  color:var(--text);
  margin:10px 0 8px;
}

.pagination{
  display:flex;
  justify-content:center;
  gap:8px;
  margin-top:32px;
}

.page-btn{
  width:38px;
  height:38px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:var(--r-md);
  border:1px solid var(--border);
  background:var(--bg-card);
  color:var(--text-dim);
  transition:all var(--t-fast);
}

.page-btn.active,
.page-btn:hover{
  background:rgba(154,114,9,.08);
  color:var(--navy-bright);
  border-color:var( --border-bright-bright);
}

.product-breadcrumb{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  margin-bottom:28px;
  font-size:.9rem;
  color:var(--text-dim);
}

.product-breadcrumb a{
  color:var(--text);
  text-decoration:none;
}

.product-detail-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,520px);
  gap:56px;
  align-items:start;
}

.product-gallery-col{
  position:sticky;
  top:90px;
}

.gallery-main{
  aspect-ratio:1/1;
  overflow:hidden;
  border-radius:var(--r-md);
  background:var(--bg-card);
  border:1px solid var( --border-bright);
}

.gallery-main img{
  width:100%;
  height:100%;
  object-fit:contain;
}

.gallery-thumbs{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:12px;
}

.gallery-thumb{
  width:72px;
  height:88px;
  border-radius:var(--r-md);
  overflow:hidden;
  border:1px solid var(--border);
  background:var(--bg-card);
}

.gallery-thumb img{
  width:100%;
  height:100%;
  object-fit:contain;
}

.gallery-thumb.active,
.gallery-thumb:hover{
  border-color:var( --border-bright-bright);
}

.product-detail-cat{
  font-size:.68rem;
  font-weight:700;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:var(--navy-mid);
  margin-bottom:10px;
}

.product-detail-name{
  font-family:"Playfair Display",serif;
  font-size:clamp(2rem,4vw,3.2rem);
  line-height:1.05;
  color:var(--text);
  margin-bottom:8px;
}

.product-price-row{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin:18px 0 22px;
}

.product-detail-price{
  font-family:"Playfair Display",serif;
  font-size:2.2rem;
  color:var(--navy-mid);
}

.stock-pill{
  display:inline-flex;
  align-items:center;
  padding:8px 12px;
  border-radius:var(--r-full);
  font-size:.68rem;
  font-weight:700;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.stock-pill.in-stock{
  background:rgba(60,140,90,.1);
  color:#2f7a49;
  border:1px solid rgba(60,140,90,.2);
}

.stock-pill.out-stock{
  background:rgba(224,90,106,.1);
  color:#b94d5d;
  border:1px solid rgba(224,90,106,.2);
}

.product-copy-block{
  margin-top:22px;
}

.product-copy-block h3{
  font-family:"Playfair Display",serif;
  color:var(--text);
  margin-bottom:10px;
}

.size-options-wrap{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.size-option{
  padding:10px 18px;
  border-radius:var(--r-full);
  border:1px solid var(--border);
  background:var(--bg-card);
  color:var(--text-dim);
  font-size:.8rem;
  font-weight:700;
}

.size-option.active-size,
.size-option:hover{
  border-color:var( --border-bright-bright);
  color:var(--navy-bright);
  background:rgba(154,114,9,.08);
}

.product-divider{
  border:none;
  border-top:1px solid var(--border);
  margin:24px 0 0;
}

.product-meta-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px;
  margin-top:24px;
}

.meta-card{
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--r-lg);
  padding:16px;
}

.meta-card span{
  display:block;
  font-size:.65rem;
  color:var(--navy-mid);
  margin-bottom:8px;
  font-weight:700;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.meta-card strong{
  color:var(--text);
  font-size:.92rem;
}

.product-cta-row{
  display:flex;
  gap:12px;
  margin-top:24px;
}

.btn-add-cart-lg{
  flex:1;
  justify-content:center;
}

.btn-wishlist-lg{
  width:54px;
  height:54px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:var(--r-md);
  border:1px solid var(--border);
  background:var(--bg-card);
  color:var(--text-dim);
}

.btn-wishlist-lg.active,
.btn-wishlist-lg:hover{
  color:#e05a6a;
  border-color:rgba(224,90,106,.3);
}

.related-products-block{
  margin-top:72px;
}

@media (max-width: 1024px){
  .products-layout,
  .product-detail-grid{
    grid-template-columns:1fr;
  }

  .filter-sidebar,
  .product-gallery-col{
    position:static;
  }
}

@media (max-width: 768px){
  .filter-mobile-btn{
    display:inline-flex;
  }

  .filter-sidebar{
    display:none;
  }

  .filter-sidebar.open{
    display:block;
  }

  .product-meta-grid{
    grid-template-columns:1fr;
  }

  .product-cta-row{
    flex-direction:column;
  }
}
.products-page-section{
    padding: var(--space-8) 0;
    padding-bottom: 64px;
}

.products-page-container{
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.products-page-head{
    margin-bottom: var(--space-6);
}

.products-page-head h1{
    font-family: var(--font-display, serif);
    font-size: var(--text-xl);
    margin-bottom: var(--space-2);
}

.products-page-head p{
    color: #8a87a0;
    font-size: var(--text-sm);
}

.products-layout{
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

.filter-sidebar{
    position: sticky;
    top: 110px;
    width: 100%;
    max-width: 280px;
    padding: 24px;
    border-radius: 24px;
    background: rgba(255,255,255,0.78);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(184,134,11,0.18);
    box-shadow: 0 12px 34px rgba(0,0,0,0.06);
}

.filter-sidebar-title{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}

.filter-section + .filter-section{
    margin-top: 24px;
}

.price-range-inputs{
    display: grid;
    grid-template-columns: minmax(0,1fr) 18px minmax(0,1fr);
    gap: 12px;
    align-items: center;
}

.price-input{
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(26,26,46,0.14);
}

.price-range-sep{
    text-align: center;
    color: #7a5a06;
    font-weight: 700;
}

.apply-filter-btn {
    width: 100%;
    margin-top: 14px;
    height: 46px;
    border: 1px solid rgba(184, 138, 36, 0.32);
    border-radius: 999px;
    background: linear-gradient(135deg, var(--navy-mid), var(--navy-bright));
    color: var(--white);
    font-size: 12px;
    letter-spacing: .16em;
    text-transform: uppercase;
    font-weight: 700;
}

.products-main{
    min-width: 0;
}

.products-grid{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.product-card-img{
    aspect-ratio: auto;
    overflow: hidden;
    border-radius: 28px 28px 0 0;
    background: #efe8dc;
}

.product-card-img img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card-body{
    background: rgba(255,255,255,0.86);
    border: 1px solid rgba(184,134,11,0.14);
    border-top: none;
    border-radius: 0 0 24px 24px;
    padding: 18px 18px 20px;
}

.product-card-footer{
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
}

.product-wishlist-btn{
    position: absolute;
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(184,134,11,0.45);
    background: rgba(255,255,255,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.product-wishlist-btn.active{
    color: #e05a6a;
    border-color: rgba(224,90,106,0.45);
}

@media (max-width: 1100px){
    .products-layout{
        grid-template-columns: 1fr;
    }

    .filter-sidebar{
        position: static;
        max-width: 100%;
    }
}

@media (max-width: 768px){
    .products-page-container{
        padding: 0 16px;
    }

    .products-grid{
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-card-footer{
        flex-direction: column;
        align-items: stretch;
    }

    .add-to-cart{
        width: 100%;
        min-width: 0;
    }
}

.cart-action,
.wishlist-action,
.action-btn {
  position: relative;
}

#wishlistBadge,
#cartBadge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--navy-mid), var(--navy-bright));
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  line-height: 1;
  border: 2px solid var(--bg);
  z-index: 3;
}

#wishlistBadge:empty,
#cartBadge:empty {
  display: none;
}

#cartSidebarMount,
#wishlistSidebarMount {
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
}

#cartSidebarMount:has(#cartSidebar.open),
#wishlistSidebarMount:has(#wishlistSidebar.open) {
  pointer-events: all;
}

#wishlistSidebar {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100vw);
  transform: translateX(100%);
  background: rgba(255,255,255,.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var( --border-bright);
  box-shadow: -8px 0 48px rgba(0,0,0,.12);
  transition: transform var(--t-slow);
  pointer-events: none;
}

#wishlistSidebar.open {
  transform: translateX(0);
  pointer-events: all;
}

.product-action-stack{
    display:flex;
    flex-direction:column;
    gap:16px;
    margin-top:18px;
}

.enhanced-cta-row{
    display:grid;
    grid-template-columns:160px minmax(220px,1fr) minmax(180px,.9fr);
    gap:14px;
    align-items:stretch;
}

.qty-box{
    display:grid;
    grid-template-columns:52px 1fr 52px;
    align-items:center;
    height:58px;
    border:1px solid #e7dccf;
    background:#fff;
    border-radius:0;
    overflow:hidden;
}

.qty-btn{
    height:100%;
    border:none;
    background:#fff;
    color:#181818;
    font-size:24px;
    font-weight:500;
    cursor:pointer;
    transition:background .2s ease, color .2s ease;
}

.qty-btn:hover{
    background:#f8f3ec;
    color:#a17612;
}

.qty-input{
    width:100%;
    border:none;
    background:#fff;
    text-align:center;
    font-size:18px;
    font-weight:700;
    color:#181818;
    outline:none;
}

.btn-add-cart-lg{
    min-height:58px;
    padding:0 20px;
    border-radius:0 !important;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    font-size:15px;
    font-weight:700;
    letter-spacing:.08em;
    text-transform:uppercase;
    box-shadow:none !important;
}

.icon-square-btn{
    width:58px;
    min-width:58px;
    height:58px;
    border:1px solid #e7dccf;
    background:#fff;
    color:#181818;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    border-radius:0;
    transition:all .2s ease;
    padding:0;
}

.icon-square-btn:hover{
    background:#f8f3ec;
    border-color:#d5bf98;
    color:#a17612;
}

.product-disclaimer{
    color:#b43c3c;
    font-size:14px;
    line-height:1.8;
    font-weight:600;
    max-width:60ch;
}

@media (max-width: 1100px){
    .enhanced-cta-row{
        grid-template-columns:1fr 1fr;
    }

    .qty-box{
        grid-column:1 / -1;
    }
}

@media (max-width: 640px){
    .enhanced-cta-row{
        grid-template-columns:1fr;
    }

    .qty-box,
    .btn-add-cart-lg,
    .icon-square-btn{
        width:100%;
        min-width:100%;
    }
}
.gallery-main{
    position:relative;
}

.image-wishlist-btn{
    position:absolute;
    top:16px;
    right:16px;
    width:46px;
    height:46px;
    border-radius:999px;
    background:rgba(255,255,255,.92);
    border:1px solid rgba(154,114,9,.14);
    backdrop-filter:blur(8px);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:3;
    box-shadow:0 10px 24px rgba(0,0,0,.08);
}

.image-wishlist-btn:hover{
    background:#fff;
    border-color:rgba(154,114,9,.3);
    transform:translateY(-1px);
}

/* Add this at the END of assets/css/products.css */
.prod-card .prod-info {
  display: flex;
  flex-direction: column;
}

.prod-card .prod-notes {
  min-height: 3.2em;
}

.prod-card .prod-footer {
  margin-top: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "price action"
    "stock action";
  align-items: center;
  column-gap: 14px;
  row-gap: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

.prod-card .prod-footer > div:first-child {
  grid-area: price;
  min-width: 0;
}

.prod-card .prod-footer > div:nth-child(2) {
  grid-area: stock;
  min-width: 0;
  margin-top: 0 !important;
}

.prod-card .prod-footer .add-to-cart {
  grid-area: action;
  align-self: center;
  min-width: 132px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.25;
}

@media (max-width: 640px) {
  .prod-card .prod-info { min-height: auto; }
  .prod-card .prod-footer {
    grid-template-columns: 1fr;
    grid-template-areas:
      "price"
      "stock"
      "action";
  }
  .prod-card .prod-footer .add-to-cart { width: 100%; }
}