/* =========================================================================
   style.css — shared styles for every page on the site.
   Edit colors/fonts here once and every page updates (see the CSS
   variables in :root below). Section comments mark where each part of
   the UI lives so you can jump straight to what you need.
   ========================================================================= */

:root {
  --theme-surface: #F9F9F8;
  --ink: #2e1c14;
  --ivory: #f7f1e8;
  --ivory-2: #ede5d6;
  --maroon: #7a2035;
  --maroon-dark: #551626;
  --marigold: #c49320;
  --peacock: #1a5a54;
  --blush: #e8c0c0;
  --muted: #7a6558;
  --shadow: 0 8px 24px rgba(43, 24, 16, 0.10);
  --radius: 6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; width: 100%; }
body {
  font-family: 'Jost', sans-serif;
  background: var(--ivory);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  width: 100%;
  opacity: 1;
  transition: opacity 0.1s ease-out;
}
body.page-transitioning {
  opacity: 0;
}
main { flex: 1; }
h1, h2, h3, .display { font-family: 'Cormorant Garamond', serif; font-weight: 600; color: var(--ink); }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; color: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }
.eyebrow { font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--maroon); font-weight: 600; }

.motif-border {
  height: 14px; width: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='14' viewBox='0 0 42 14'%3E%3Cpath d='M6 13c-3 0-5-2.5-5-6s2-6 5-6c2 0 3 1.3 3 3 0 1.3-.8 2-2 2-.9 0-1.5-.5-1.5-1.3' fill='none' stroke='%23E0A527' stroke-width='1.1'/%3E%3Ccircle cx='21' cy='7' r='1.3' fill='%23E0A527'/%3E%3Cpath d='M27 13c-3 0-5-2.5-5-6s2-6 5-6c2 0 3 1.3 3 3 0 1.3-.8 2-2 2-.9 0-1.5-.5-1.5-1.3' fill='none' stroke='%23E0A527' stroke-width='1.1'/%3E%3Ccircle cx='42' cy='7' r='1.3' fill='%23E0A527'/%3E%3C/svg%3E");
  background-repeat: repeat-x; background-size: 42px 14px; background-color: var(--maroon-dark);
}

/* ---- Header / nav ------------------------------------------------------ */
#site-header { position: sticky; top: 0; z-index: 50; }
header { 
  background: rgba(250,243,231,0.92); 
  
  border-bottom: 1px solid rgba(43,24,16,0.08); 
  box-shadow: 0 1px 3px rgba(43,24,16,0.04);
  position: relative; 
}
/* Glass liquid nav — only for custom themes, not default */
body[class*="theme-"] header {
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 4px 16px rgba(0,0,0,0.03);
  isolation: isolate;
}
body[class*="theme-"] header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
  z-index: 0;
}
body[class*="theme-"] header .nav-wrap { position: relative; z-index: 1; }
.nav-wrap { max-width: 1240px; margin: 0 auto; padding: 16px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo { font-family: 'Cormorant Garamond', serif; font-size: 1.9rem; font-weight: 600; color: var(--maroon); }
.logo span { color: var(--marigold); font-style: italic; }
.logo img {
  background: transparent !important;
  
  max-height: 40px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
  /* Prevent white box around logo on light backgrounds */
  border-radius: 4px;
}
/* On dark backgrounds, hide logo image if desired, but keep it visible in admin sidebar */
footer .logo img,
.admin-sidebar .logo img { display: none !important; }
nav.links { display: flex; gap: 30px; align-items: center; }
nav.links a { font-size: 0.86rem; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 500; position: relative; padding-bottom: 4px; }
nav.links a::after { content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 1.5px; background: var(--maroon); transition: width .25s ease; }
nav.links a:hover::after, nav.links a.active::after { width: 100%; }
nav.links a.active { color: var(--maroon); }
.nav-icons { display: flex; align-items: center; gap: 16px; }
.icon-btn { position: relative; font-size: 1.2rem; color: var(--maroon); line-height: 1; }
.cart-count { position: absolute; top: -9px; right: -11px; background: var(--marigold); color: var(--ink); font-size: 0.65rem; font-weight: 600; width: 17px; height: 17px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--ivory-2); border-radius: 20px;
  padding: 4px 10px; width: 38px; overflow: hidden;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s, box-shadow 0.2s;
  border: 1px solid rgba(43,24,16,0.12);
  cursor: pointer;
  flex-shrink: 0;
}
.search-box.open, .search-box:focus-within {
  width: 220px;
  background: var(--theme-surface, #fff);
    
  box-shadow: 0 4px 12px rgba(43,24,16,0.08);
  border-color: var(--marigold);
}
.search-box button {
  background: none; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; line-height: 1; flex-shrink: 0; width: 18px; height: 18px;
}
.search-box input {
  background: none; border: none; outline: none; font-family: 'Jost', sans-serif; font-size: 0.95rem; width: 100%; color: var(--ink); opacity: 0; transition: opacity 0.2s ease;
}
.search-box.open input, .search-box:focus-within input {
  opacity: 1;
}
.user-chip { font-size: 0.82rem; font-weight: 500; color: var(--maroon); display: flex; align-items: center; gap: 8px; }
.user-chip button { font-size: 0.75rem; text-decoration: underline; color: var(--muted); }
.hamburger { display: none; font-size: 1.4rem; color: var(--maroon); cursor: pointer; padding: 6px; border-radius: 6px; line-height: 1; transition: background 0.2s; }
.hamburger:hover { background: rgba(139,30,63,0.08); }

@media (max-width: 900px) {
  nav.links { display: none; }
  .user-chip { display: none !important; }
  .hamburger { display: block; }

  /* Hide wishlist & cart from top nav — they live in the bottom nav now */
  .nav-icons a.icon-btn[href="/wishlist.html"],
  .nav-icons a.icon-btn[href="/cart.html"] { display: none !important; }

  /* Keep search box and bell visible but a bit more compact */
  .nav-icons { gap: 8px; }
}

/* ---- Mobile Navigation Drawer ---- */
.mobile-nav-backdrop {
  position: fixed; inset: 0; background: rgba(43,24,16,0.55);
  z-index: 998; opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}
.mobile-nav-backdrop.show {
  opacity: 1; pointer-events: auto;
}
.mobile-nav-drawer {
  position: fixed; top: 0; left: -320px; width: 290px; height: 100%; height: 100dvh;
  background: var(--ivory); z-index: 999;
  box-shadow: 8px 0 28px rgba(43,24,16,0.18);
  display: flex; flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 24px 20px; overflow-y: auto;
}
.mobile-nav-drawer.open {
  transform: translateX(320px);
}
.mobile-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 16px; border-bottom: 1px solid rgba(43,24,16,0.1);
  margin-bottom: 20px;
}
.mobile-drawer-close {
  font-size: 1.6rem; color: var(--maroon); cursor: pointer;
  background: none; border: none; padding: 4px 8px; line-height: 1;
}
.mobile-drawer-links {
  display: flex; flex-direction: column; gap: 8px;
}
.mobile-drawer-links a {
  font-size: 0.85rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--ink); padding: 10px 14px;
  border-radius: 8px; transition: background 0.2s, color 0.2s;
  display: flex; align-items: center; justify-content: space-between;
}
.mobile-drawer-links a:hover, .mobile-drawer-links a.active {
  background: var(--ivory-2); color: var(--maroon);
}

/* ---- Desktop Mega Menu ---- */
.nav-item-dropdown { position: relative; padding: 20px 0; }
.mega-menu {
  position: absolute; top: 100%; left: -50px; width: 800px;
  max-width: 90vw;
  background: var(--theme-surface, rgba(255,255,255,0.95));
  backdrop-filter: blur(16px) saturate(200%);
  -webkit-backdrop-filter: blur(16px) saturate(200%);
  box-shadow: var(--shadow);
  border-radius: 12px;
  padding: 30px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 30px 20px;
  opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: all 0.25s ease;
  z-index: 100;
  border: 1px solid rgba(43,24,16,0.08);
}
.nav-item-dropdown:hover .mega-menu { opacity: 1; pointer-events: auto; transform: translateY(0); }
.mega-menu-column { display: flex; flex-direction: column; }
.mega-menu-column h4 { margin-bottom: 12px; font-size: 1rem; color: var(--maroon); }
.mega-menu-column h4 a { text-decoration: none; color: inherit; }
.mega-menu-column ul { display: flex; flex-direction: column; gap: 8px; }
.mega-menu-column ul li a { font-size: 0.9rem; text-transform: none; letter-spacing: normal; color: var(--ink); display: block; font-weight: 500; padding-bottom: 0; }
.mega-menu-column ul li a:hover { color: var(--marigold); }
.mega-sub { padding-left: 12px; margin-top: 6px; border-left: 1px solid rgba(43,24,16,0.1); }
.mega-sub li a { font-size: 0.82rem; color: var(--muted); }

/* ---- Mobile Categories Drawer CSS ---- */
.mobile-category-item { margin-bottom: 4px; }
.mobile-category-toggle {
  width: 100%; text-align: left; background: none; border: none; font-size: 0.85rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--ink); padding: 10px 14px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: background 0.2s, color 0.2s;
}
.mobile-category-toggle:hover, .mobile-category-toggle.active { background: var(--ivory-2); color: var(--maroon); }
.mobile-category-toggle.active .arrow { transform: rotate(180deg); }
.mobile-category-drawer { display: none; padding: 4px 0 10px 14px; }
.mobile-cat-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; }
.mobile-cat-row a { font-size: 0.85rem; text-transform: none; letter-spacing: normal; padding: 4px 8px; flex: 1; }
.mobile-cat-expand { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: var(--maroon); border: 1px solid rgba(43,24,16,0.1); border-radius: 4px; cursor: pointer; margin-left: 8px; }
.mobile-cat-sub { padding-left: 16px; border-left: 1px solid rgba(43,24,16,0.1); margin-top: 4px; margin-left: 8px; }

/* ---- Table Responsive Wrapper ---- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 20px;
  border-radius: var(--radius);
}

/* ---- Buttons ------------------------------------------------------------ */
.btn-primary {
  background: var(--maroon);
  color: var(--ivory);
  padding: 15px 32px;
  border-radius: 10px;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  display: inline-block;
  border: none;
  box-shadow: 0 4px 14px rgba(122, 32, 53, 0.18);
  transition: all 0.25s ease;
  cursor: pointer;
}
.btn-primary:hover {
  background: var(--maroon-dark);
  transform: translateY(-1px);
  box-shadow: 0 7px 20px rgba(122, 32, 53, 0.22);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(122, 32, 53, 0.16);
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost { border: 1.5px solid rgba(43,24,16,0.25); padding: 13px 30px; border-radius: 10px; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; display: inline-block; transition: all 0.2s ease; }
.btn-ghost:hover { border-color: var(--maroon); color: var(--maroon); background: rgba(139,30,63,0.04); }
.btn-sm { padding: 9px 18px; font-size: 0.75rem; border-radius: 8px; }

/* ---- Hero ---------------------------------------------------------------- */
.hero-fullwidth {
  position: relative;
  width: 100%;
  height: 80vh;
  min-height: 500px;
  max-height: 800px;
  display: flex;
  align-items: flex-end;
  padding: 60px 5%;
  overflow: hidden;
}
.hero-fullwidth .hero-slider {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1;
}
.hero-fullwidth .hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(15,10,5,0.9) 0%, rgba(15,10,5,0.4) 40%, rgba(15,10,5,0.1) 100%);
  z-index: 2;
}
.hero-fullwidth .hero-content {
  position: relative;
  z-index: 3;
  max-width: 600px;
  padding-bottom: 40px;
}
.hero-fullwidth .slider-dots {
  z-index: 4;
  bottom: 20px;
}
.hero-fullwidth h1 { font-size: 3.6rem; line-height: 1.05; margin: 6px 0 16px; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.hero-fullwidth h1 em { color: #f5e6d3; font-style: italic; }
.hero-fullwidth p { font-size: 1.1rem; max-width: 480px; margin-bottom: 24px; line-height: 1.6; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.hero-fullwidth .eyebrow { text-shadow: 0 1px 2px rgba(0,0,0,0.5); font-weight: 600; letter-spacing: 0.1em; }

@media (max-width: 900px) {
  .hero-fullwidth { height: 70vh; padding: 40px 5%; }
  .hero-fullwidth h1 { font-size: 2.6rem; }
}

/* ---- Page banner (used on shop/about/contact/etc) ------------------------ */
.page-banner {
  background: transparent;
  padding: 52px 28px; 
  text-align: center;
  border-bottom: 1px solid var(--theme-border, color-mix(in srgb, var(--ink) 10%, transparent));
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.page-banner h1 { font-size: 2.8rem; margin-top: 8px; margin-bottom: 4px; color: var(--theme-heading, var(--ink)); }
.page-banner p { color: var(--theme-paragraph, var(--muted)); max-width: 600px; margin: 0 auto; }

/* ---- Sections / product grid --------------------------------------------- */
.section { max-width: 1240px; margin: 0 auto; padding: 64px 28px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 32px; flex-wrap: wrap; gap: 16px; }
.section-head h2 { font-size: 2.1rem; }
.cat-strip { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 12px; -webkit-overflow-scrolling: touch; width: 100%; } .cat-strip::-webkit-scrollbar { height: 8px; } .cat-strip::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.05); border-radius: 4px; } .cat-strip::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.2); border-radius: 4px; } .cat-strip::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.4); } .cat-card { flex: 0 0 auto; width: 170px; padding: 26px 18px; border-radius: var(--radius); cursor: pointer; display: flex; flex-direction: column; justify-content: flex-end; height: 190px; position: relative; overflow: hidden; transition: transform .25s ease; text-decoration: none; } .cat-card:hover { transform: translateY(-5px); } .cat-card h3 { color: var(--ivory); font-size: 1.3rem; position: relative; z-index: 2; margin-bottom: 0; } .cat-card span { color: rgba(250,243,231,0.85); font-size: 0.75rem; position: relative; z-index: 2; }

.promo-banner-card {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
}
.promo-banner-card:not(.promo-banner-has-img):not(:has(> img)) {
  aspect-ratio: 4 / 1;
}
.promo-banner-card > img {
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  display: block !important;
  object-fit: contain !important;
  border-radius: var(--radius);
}
.promo-banner-card > video {
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 4 / 1;
  object-fit: cover !important;
  display: block !important;
  border-radius: var(--radius);
}
@media (max-width: 900px) {
  .promo-banner-card:not(.promo-banner-has-img):not(:has(> img)) { aspect-ratio: 4 / 1; }
  .promo-banner-card div[style*="padding:40px"] { padding: 24px !important; }
  .promo-banner-card h3 { font-size: 1.8rem !important; margin-bottom: 8px !important; }
  .promo-banner-card p { font-size: 0.95rem !important; margin-bottom: 12px !important; max-width: 220px !important; }
}
@media (max-width: 600px) {
  .trust-strip { padding: 16px 0; margin: 0; border-radius: 0; border: none; border-bottom: 1px solid rgba(43,24,16,0.06); }
  .trust-grid { gap: 2px; padding: 0 4px; }
  .trust-icon { width: 34px; height: 34px; margin-bottom: 4px; }
  .trust-icon svg { width: 16px; height: 16px; }
  .trust-item h4 { font-size: 0.65rem; margin-bottom: 0; }
  .trust-item p { font-size: 0.5rem; line-height: 1.1; }

  

  .promo-banner-card:not(.promo-banner-has-img):not(:has(> img)) { aspect-ratio: 4 / 1; }
  .promo-banner-card div[style*="padding:40px"] { padding: 20px !important; justify-content: flex-end !important; }
}

.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 34px; align-items: center; }

.category-pills-container {
  display: flex; gap: 10px; align-items: center; padding-bottom: 4px;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  /* Make search box drop down cleanly on mobile */
  .filter-bar { justify-content: space-between; }
  .filter-search { width: 100%; justify-content: center; margin-top: 10px; margin-left: 0; }
  .filter-search input { width: 100%; text-align: center; }
}

.filter-pill { padding: 8px 18px; border: 1px solid rgba(43,24,16,0.2); border-radius: 20px; font-size: 0.82rem; transition: all .2s ease; cursor: pointer; background: var(--theme-surface, #fff);
     }
.filter-pill.active, .filter-pill:hover { background: var(--maroon); color: var(--ivory); border-color: var(--maroon); }
.filter-search { margin-left: auto; display: flex; align-items: center; gap: 8px; background: var(--theme-surface, #fff);
     border: 1px solid rgba(43,24,16,0.15); border-radius: 20px; padding: 8px 16px; }
.filter-search input { border: none; outline: none; font-family: inherit; font-size: 0.85rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; align-items: start; }
.masonry-grid { display: flex; gap: 18px; align-items: flex-start; width: 100%; }
.masonry-col { flex: 1; display: flex; flex-direction: column; gap: 18px; width: 100%; min-width: 0; }
.masonry-col .card { margin-bottom: 0; }
.card { background: #ffffff; border: 1px solid rgba(43,24,16,0.05); border-radius: 14px; overflow: hidden; box-shadow: 0 2px 14px rgba(43,24,16,0.06); transition: transform 0.3s ease, box-shadow 0.35s ease; cursor: pointer; display: flex; flex-direction: column; width: 100%; break-inside: avoid; }
.card .swatch { overflow: hidden; position: relative; }
@media (hover: hover) { 
  .card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,0.12); } 
  .card:hover .product-img { transform: scale(1.08); }
}
.swatch { position: relative; overflow: hidden; width: 100%; aspect-ratio: 1/1; flex-shrink: 0; background-color: #ffffff; display: flex; align-items: center; justify-content: center; }
.swatch.placeholder { aspect-ratio: 1/1; background: color-mix(in srgb, var(--ink) 5%, var(--ivory)); display: flex; align-items: center; justify-content: center; }
.product-img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1); }
.swatch.placeholder::after { content: 'NO IMAGE'; position: absolute; color: var(--ink); opacity: 0.2; font-size: 0.8rem; font-weight: 600; letter-spacing: 2px; }
.stock-flag { position: absolute; top: 10px; left: 10px; background: rgba(43,24,16,0.75); color: #fff; font-size: 0.68rem; padding: 4px 10px; border-radius: 12px; letter-spacing: 0.03em; z-index: 2; }
.stock-flag.low { background: #8b2020; font-weight: 600; }
.wishlist-heart { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.9); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--maroon); line-height: 1; transition: transform .15s ease; z-index: 2; border: none; cursor: pointer; }
.wishlist-heart:hover { transform: scale(1.1); }
#modalWishlistBtn.wishlist-heart, #pdpWishlistBtn.wishlist-heart { position: static; width: 52px; height: auto; background: none; border: 1px solid var(--ink); border-radius: var(--radius); }
.card-body { padding: 14px 16px 16px; }
.card-body .eyebrow { margin-bottom: 4px; display: block; }
.card-body h3 { font-size: 1.05rem; font-family: "Jost", sans-serif; font-weight: 500; margin-bottom: 3px; line-height: 1.35; letter-spacing: 0.02em; }
.card-body .fabric { font-size: 0.8rem; color: var(--muted); margin-bottom: 10px; }
.price-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.price { font-family: 'Cormorant Garamond'; font-size: 1.25rem; font-weight: 600; color: var(--maroon); }
.add-btn { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid var(--ink); padding: 7px 14px; border-radius: 20px; transition: all .2s ease; cursor: pointer; white-space: nowrap; }
.add-btn:hover { background: var(--maroon); color: #fff; border-color: var(--maroon); }
.add-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.state-msg { text-align: center; color: var(--muted); padding: 40px 0; column-span: all; }

/* ---- Story / about band --------------------------------------------------- */
.story { background: var(--peacock); color: var(--ivory); border-radius: 8px; padding: 60px 50px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.story .eyebrow { color: var(--marigold); }
.story h2 { color: var(--ivory); font-size: 2.3rem; margin: 10px 0 18px; }
.story p { line-height: 1.7; opacity: 0.92; max-width: 460px; }
.story-figs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fig { background: rgba(250,243,231,0.08); border: 1px solid rgba(250,243,231,0.25); border-radius: var(--radius); padding: 22px; text-align: center; }
.fig .num { font-family: 'Cormorant Garamond'; font-size: 2.1rem; color: var(--marigold); }
.fig .lbl { font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.85; margin-top: 4px; }
@media (max-width: 900px) { .story { grid-template-columns: 1fr; padding: 36px 24px; } }



/* ---- Footer --------------------------------------------------------------- */
footer { 
  background: #1e1008; 
  color: var(--ivory-2); 
  padding: 56px 28px 26px; 
  position: relative; 
  z-index: 10; 
  overflow: hidden;
}
footer::before {
  content: "";
  position: absolute;
  top: -15px; left: -15px; right: -15px; bottom: -15px;
  background: url('/images/contact-bg.jpg') center/cover;
  filter: blur(8px);
  z-index: -1;
  opacity: 0.25;
}
.foot-wrap { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; }
footer h4 { font-family: 'Cormorant Garamond'; font-size: 1rem; margin-bottom: 14px; color: var(--marigold); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
footer p, footer li, footer a { font-size: 0.85rem; color: var(--ivory-2); opacity: 0.85; line-height: 2.2; text-decoration: none; }
footer a:hover { color: var(--ivory); opacity: 1; }
footer .logo { color: var(--ivory-2); margin-bottom: 12px; display: block; }
.foot-bottom { max-width: 1240px; margin: 40px auto 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 0.78rem; color: var(--ivory-2); opacity: 0.6; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
@media (max-width: 900px) { .foot-wrap { grid-template-columns: 1fr 1fr; gap: 24px; } }
@media (max-width: 520px) { .foot-wrap { grid-template-columns: 1fr; } }

/* ---- Modal / overlay (used for product quick-view & admin panels) --------- */
body.modal-open, html.modal-open { overflow: hidden !important; height: 100vh; }
.overlay {
  position: fixed; inset: 0;
  background: rgba(43,24,16,0.55);
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.overlay.show { display: flex; }

.modal {
  background: var(--ivory);
    
  max-width: 820px;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-height: 90vh;

  animation: pop .25s ease;
  position: relative;
  box-sizing: border-box;
  margin: 0 auto;
}
@keyframes pop { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
.modal-visual { min-height: 320px; position: relative; background-size: contain; background-repeat: no-repeat; background-position: center center; background-color: var(--ivory-2); background-blend-mode: multiply; }
.modal-visual.placeholder::after { content: ''; position: absolute; inset: 0; opacity: 0.35; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='110' height='110' viewBox='0 0 110 110'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='0.8'%3E%3Cpath d='M55 95c-16 0-27-12-27-30s11-30 27-30c11 0 17 6.5 17 15 0 6.5-4 10-10 10-5 0-8-3-8-7'/%3E%3C/g%3E%3C/svg%3E"); background-size: 110px 110px; }
.modal-body { padding: 32px 30px; overflow-y: auto; box-sizing: border-box; min-height: 0; max-height: 90vh; }
.modal-body h2 { font-size: 1.35rem; margin: 8px 0 8px; font-family: "Jost", sans-serif; font-weight: 500; line-height: 1.35; color: var(--ink); opacity: 0.9; }
.modal-body .fabric { color: var(--muted); font-size: 0.88rem; margin-bottom: 14px; display: block; }
.modal-body .price { font-size: 1.6rem; display: block; margin-bottom: 6px; }
.stock-note { font-size: 0.8rem; color: var(--peacock); margin-bottom: 16px; display: block; }
.stock-note.low { color: var(--maroon); }
.modal-body .desc { font-size: 0.9rem; color: var(--ink); opacity: 0.8; line-height: 1.7; margin-bottom: 20px; white-space: pre-wrap; }
.desc { white-space: pre-wrap; }

/* Smart Description Layout */
.description-box {
  margin-top: 20px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--ink);
  white-space: normal;
  background: rgba(43,24,16,0.03);
  border: 1px solid rgba(43,24,16,0.07);
  border-radius: 8px;
  padding: 20px;
  box-shadow: none;
}
.description-box h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--maroon);
  margin-top: 0;
  margin-bottom: 12px;
  font-weight: 600;
  border-bottom: 1px solid rgba(43,24,16,0.05);
  padding-bottom: 8px;
}
.description-box p { margin: 0; opacity: 0.9; }
.smart-disclaimer summary::marker { color: var(--marigold); }
.smart-disclaimer summary::-webkit-details-marker { color: var(--marigold); }

.opt-label { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; margin-bottom: 8px; display: block; }
.opt-row { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.opt-pill { color: inherit; padding: 8px 16px; border: 1px solid rgba(43,24,16,0.3); border-radius: 20px; font-size: 0.82rem; cursor: pointer; background: none; }
.opt-pill.active { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.opt-pill.out-of-stock { text-decoration: line-through; opacity: 0.5; cursor: not-allowed; position: relative; }
.close-btn { position: absolute; top: 14px; right: 32px; font-size: 1.4rem; color: #fff; z-index: 200; width: 34px; height: 34px; border-radius: 50%; background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; transition: background 0.2s; border: none; cursor: pointer; flex-shrink: 0; }
.close-btn:hover { background: var(--maroon); }
  /* Narrow single-column modal variant (e.g. Add Product form) */
  .modal--form { max-width: 520px; display: block; overflow: hidden; }

/* Tablet - single column */
@media (max-width: 860px) {
  .modal { 
    display: block; 
    max-width: 520px; 
    max-height: 92vh; 
    overflow-y: auto; 
  }
  .modal-visual { 
    height: auto; 
    aspect-ratio: 4/5; 
    min-height: 0; 
    max-height: none; 
  }
  .modal-body { 
    padding: 24px 22px; 
    overflow-y: visible;
    max-height: none;
  }
  .modal-body h2 { font-size: 1.2rem; }
}

/* Mobile - comfortable full-height sheet */
@media (max-width: 600px) {
  .overlay { padding: 0; align-items: flex-end; }
  .modal {
    display: block;
    max-width: 100%;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    animation: slideUp .28s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .modal--form { max-width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  @keyframes slideUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
  .modal-visual { height: auto; aspect-ratio: 4/5; min-height: 0; max-height: none; }
  .modal-body { padding: 18px 16px 24px; overflow-y: visible; max-height: none; }
  .modal-body h2 { font-size: 1.1rem; }
  .modal-body .price { font-size: 1.35rem; }
  .modal-body .desc { font-size: 0.85rem; margin-bottom: 14px; }
  .opt-pill { padding: 7px 13px; font-size: 0.78rem; }
  .close-btn { top: 10px; right: 28px; width: 30px; height: 30px; font-size: 1.2rem; }
}

/* ---- Forms (login, signup, contact, checkout) ----------------------------- */
.form-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 64px 24px;
  position: relative;
}
.form-page::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 540px;
  height: 480px;
  background: radial-gradient(circle, rgba(139,30,63,0.08) 0%, rgba(224,165,39,0.05) 50%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}
.form-card {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  border-top: 4px solid var(--marigold);
  border-left: 1px solid rgba(224, 165, 39, 0.25);
  border-right: 1px solid rgba(224, 165, 39, 0.25);
  border-bottom: 1px solid rgba(43, 24, 16, 0.08);
  box-shadow: 0 20px 50px rgba(43, 24, 16, 0.09), 0 4px 14px rgba(43, 24, 16, 0.04);
  padding: 44px 38px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.form-card:hover {
  box-shadow: 0 24px 60px rgba(43, 24, 16, 0.12), 0 6px 20px rgba(43, 24, 16, 0.05);
}
.form-card h1 {
  font-size: 2.1rem;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.form-card .sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
  line-height: 1.5;
}
.field {
  margin-bottom: 20px;
  position: relative;
}
.field label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink);
  opacity: 0.9;
}
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: 14px;
  color: var(--muted);
  font-size: 1.05rem;
  pointer-events: none;
  opacity: 0.7;
  transition: color 0.2s ease;
}
.input-wrap input {
  padding-left: 42px !important;
}
.toggle-password-btn {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  opacity: 0.65;
  transition: opacity 0.2s ease;
}
.toggle-password-btn:hover {
  opacity: 1;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid rgba(43,24,16,0.14);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.94rem;
  background: var(--theme-bg, #faf8f5);
  color: var(--ink);
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  background: var(--theme-surface, #ffffff);
  border-color: var(--marigold);
  box-shadow: 0 0 0 4px rgba(224,165,39,0.14), 0 4px 12px rgba(224,165,39,0.06);
}
.input-wrap:focus-within .input-icon {
  color: var(--marigold);
  opacity: 1;
}
.field textarea { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-msg {
  font-size: 0.85rem;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: none;
  font-weight: 500;
  line-height: 1.4;
}
.form-msg.show { display: block; }
.form-msg.error { background: #fdf2f2; color: #9b1c1c; border: 1px solid #f8b4b4; }
.form-msg.success { background: #f3faf7; color: #0e6245; border: 1px solid #a3e0c7; }
.form-foot { text-align: center; margin-top: 20px; font-size: 0.88rem; color: var(--muted); line-height: 1.6; }
.form-foot a { color: var(--maroon); font-weight: 600; transition: color 0.2s ease, text-decoration 0.2s ease; }
.form-foot a:hover { color: var(--maroon-dark); text-decoration: underline; }
.form-divider {
  display: flex;
  align-items: center;
  margin: 22px 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
}
.form-divider::before, .form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(43,24,16,0.12);
}
.form-divider span {
  padding: 0 12px;
}

/* ---- Cart page & Bag design ------------------------------------------------ */
.cart-layout { max-width: 1100px; margin: 0 auto; padding: 48px 28px 80px; display: grid; grid-template-columns: 1.7fr 1fr; gap: 40px; align-items: start; }
.cart-item { display: grid; grid-template-columns: 100px 1fr auto; gap: 20px; align-items: center; background: var(--theme-surface, #fff);
     border-radius: 8px; padding: 18px 20px; margin-bottom: 16px; box-shadow: 0 4px 16px rgba(43,24,16,0.06); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.cart-item:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(43,24,16,0.1); }
.cart-item .thumb { width: 100px; height: 100px; border-radius: 6px; background-size: cover; background-position: top center; border: 1px solid rgba(43,24,16,0.06); }
.cart-item h4 { font-size: 1.1rem; margin-bottom: 4px; font-weight: 500; }
.cart-item .meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 10px; }
.qty-row { display: flex; align-items: center; gap: 10px; background: var(--ivory); padding: 3px 8px; border-radius: 20px; border: 1px solid rgba(43,24,16,0.15); width: fit-content; }
.qty-row button { border: none; background: none; width: 24px; height: 24px; font-size: 1rem; font-weight: 600; color: var(--maroon); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.qty-row span { font-size: 0.88rem; font-weight: 600; min-width: 16px; text-align: center; }
.cart-item .remove { font-size: 0.78rem; color: var(--maroon); text-decoration: underline; margin-top: 8px; font-weight: 500; cursor: pointer; border: none; background: none; }
.summary-row { display: flex; justify-content: space-between; font-size: 0.92rem; margin-bottom: 12px; color: var(--muted); }
.summary-row.total { color: var(--ink); font-weight: 600; font-size: 1.2rem; border-top: 1px dashed rgba(43,24,16,0.15); padding-top: 14px; margin-top: 10px; }
@media (max-width: 850px) { .cart-layout { grid-template-columns: 1fr; } }

/* ---- Admin panel ------------------------------------------------------------- */
.admin-shell { 
  display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: calc(100vh - var(--header-height, 76px));
  background: var(--ivory);
  color: var(--ink);
}
/* Force Light Mode variables for Admin Dashboard only when a custom theme is active,
   so it doesn't inherit inverted colors. Default theme stays beautifully untouched. */
body[class*="theme-"] .admin-shell {
  --ink: #1e1e24;
  --ivory: #f0f4f8;
    --theme-surface: rgba(255, 255, 255, 0.6);
  --ivory-2: #e2e8f0;
  --maroon: #8B1E3F;
  --marigold: #c49320;
  --muted: #64748b;
}
.admin-sidebar { background: #111; color: #eaeaea; padding: 26px 18px; position: sticky; top: var(--header-height, 76px); height: calc(100vh - var(--header-height, 76px)); overflow-y: auto; z-index: 10; }
.admin-sidebar .logo { color: #fff !important; margin-bottom: 24px; display: block; white-space: nowrap; overflow: hidden; font-size: 1.5rem; letter-spacing: -0.02em; }
.admin-sidebar .logo span { display: inline; margin-bottom: 0; white-space: nowrap; }
.admin-sidebar button { display: block; width: 100%; text-align: left; padding: 11px 12px; border-radius: 4px; font-size: 0.88rem; margin-bottom: 4px; color: #aaa; border: none; background: none; cursor: pointer; transition: background 0.2s, color 0.2s; }
.admin-sidebar button.active, .admin-sidebar button:hover { background: rgba(255,255,255,0.1); color: #fff; }
.admin-main { padding: 32px 36px; max-width: 1200px; min-width: 0; }
.admin-view { display: none; }
.admin-view.active { display: block; }
.stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; margin-bottom: 32px; }
.stat-card {
  background: var(--theme-surface, #fff);
     border-radius: 12px; padding: 22px;
  box-shadow: 0 2px 12px rgba(43,24,16,0.05);
  border: 1px solid #f0e8df;
  transition: box-shadow 0.2s, transform 0.18s;
}
.stat-card:hover { box-shadow: 0 6px 22px rgba(43,24,16,0.09); transform: translateY(-2px); }
.stat-card .num { font-family: 'Cormorant Garamond'; font-size: 2rem; color: var(--ink); }
.stat-card .lbl { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--theme-surface, #fff); border-radius: var(--radius); overflow: hidden; box-shadow: 0 3px 10px rgba(43,24,16,0.06); }
.admin-table th, .admin-table td { text-align: left; padding: 12px 14px; font-size: 0.85rem; border-bottom: 1px solid rgba(43,24,16,0.06); white-space: normal; word-break: break-word; min-width: 75px; }
.admin-table th { background: var(--ivory-2); text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.04em; color: var(--muted); white-space: nowrap; }
.admin-table td:last-child { white-space: nowrap; }
.admin-table .thumb-cell { width: 54px; height: 54px; border-radius: 4px; background-size: cover; background-position: top center; background-color: var(--ivory-2); }
.admin-table button { font-size: 0.78rem; color: var(--maroon); text-decoration: underline; margin-right: 10px; border: none; background: none; cursor: pointer; }
.badge { padding: 3px 10px; border-radius: 12px; font-size: 0.72rem; text-transform: capitalize; }
.badge.pending { background: #fdf1d6; color: #8a6300; }
.badge.confirmed { background: #dbe9f5; color: #2a5b8a; }
.badge.packed { background: #f0e4d6; color: #7a4a1e; }
.badge.shipped { background: #e2e0f5; color: #4a3b8a; }
.badge.out_for_delivery { background: #fbe8d6; color: #a2500e; }
.badge.delivered { background: #e2f0e6; color: #1c6b34; }
.badge.cancelled { background: #fbe4e4; color: #8a2020; }
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.image-upload-box { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.image-preview { width: 80px; height: 80px; border-radius: 4px; background: var(--ivory-2); background-size: cover; background-position: top center; border: 1px dashed rgba(43,24,16,0.25); flex-shrink: 0; }
@media (max-width: 900px) {
  html { scroll-padding-top: 140px; }
  .admin-shell { display: block; min-height: auto; }
  .admin-sidebar {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    gap: 8px;
    height: auto;
    position: sticky;
    top: var(--header-height, 76px);
    z-index: 20;
    padding: 10px 14px;
    background: var(--ink);
    box-shadow: 0 4px 14px rgba(43,24,16,0.18);
    width: 100%;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .admin-sidebar::-webkit-scrollbar { display: none; }
  .admin-sidebar .logo { display: block; }
  .admin-sidebar button {
    flex: 0 0 auto;
    width: auto;
    text-align: center;
    white-space: nowrap;
    margin-bottom: 0;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    scroll-snap-align: start;
    transition: all 0.2s ease;
  }
  .admin-sidebar button.active {
    background: rgba(255,255,255,0.22);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .admin-main { padding: 20px 14px; max-width: 100%; }
  .admin-toolbar { gap: 10px; flex-wrap: wrap; }
  .admin-toolbar button { padding: 8px 14px !important; font-size: 0.75rem !important; flex-shrink: 0; }
  .admin-toolbar h2 { font-size: 1.25rem; }
}

@media (max-width: 500px) {
  .stat-grid { grid-template-columns: 1fr; }
}

/* ---- Utility --------------------------------------------------------------- */
.hide { display: none !important; }
.center-msg { text-align: center; padding: 60px 20px; color: var(--muted); }

/* ---- Nav avatar (profile photo in header) --------------------------------- */
.nav-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background-size: cover; background-position: center;
  background-color: var(--ivory-2);
  border: 2px solid var(--marigold);
  flex-shrink: 0;
}
.nav-avatar-initials {
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: var(--maroon);
  background: var(--ivory-2);
}

/* ---- Hero slideshow ------------------------------------------------------- */
.hero-slider {
  position: absolute; inset: 0; border-radius: inherit;
  overflow: hidden;
}
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 0.8s ease;
  background-size: cover !important;
  background-position: center top !important;
  background-repeat: no-repeat !important;
}
.hero-slide.active { opacity: 1; }
.hero-slide > div[style*="background-image"] {
  background-size: cover !important;
  background-position: center top !important;
}
.hero-slide img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center top !important;
  position: absolute;
  inset: 0;
}
.slider-dots {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 5;
}
.slider-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.55); border: none;
  cursor: pointer; transition: all 0.2s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.slider-dot.active { background: var(--theme-surface, #fff);
     width: 22px; border-radius: 4px; }

/* ---- Coupon remove button ------------------------------------------------- */
.coupon-remove-btn {
  font-size: 0.78rem; color: var(--maroon); text-decoration: underline;
  background: none; border: none; cursor: pointer; margin-left: 8px;
}

/* ---- User menu popover styling --------------------------------------------- */
.user-menu-popover a:hover,
.user-menu-popover button:hover {
  background: var(--ivory-2) !important;
}
.sidebar-link-btn:hover {
  background: var(--ivory-2) !important;
}

/* ---- Premium light card (shared utility) ---------------------------------- */
.premium-card {
  background: var(--theme-surface, #fff);
    
  border-radius: 14px;
  border: 1px solid #f0e8df;
  box-shadow: 0 2px 16px rgba(43,24,16,0.05), 0 1px 4px rgba(43,24,16,0.04);
  transition: box-shadow 0.22s, transform 0.2s;
}
.premium-card:hover {
  box-shadow: 0 6px 28px rgba(43,24,16,0.09);
  transform: translateY(-1px);
}

/* ---- Contact Page -------------------------------------------------------- */
.contact-layout { max-width: 1100px; margin: 0 auto; padding: 64px 28px 80px; display: grid; grid-template-columns: 1fr 1.1fr; gap: 70px; align-items: start; }
@media (max-width: 900px) { .contact-layout { grid-template-columns: 1fr; gap: 48px; } }
@media (max-width: 600px) { .contact-layout { padding: 40px 18px 60px; gap: 40px; } }

/* =========================================================================
   RESPONSIVE DESIGN BREAKPOINTS (Mobile <=600px, Small Mobile <=380px)
   ========================================================================= */
@media (max-width: 600px) {
  .nav-wrap { padding: 12px 16px; gap: 10px; }
  .logo { font-size: 1.6rem; }
  .nav-icons { gap: 10px; }
  
  /* Search box on small mobile */
  .search-box.open, .search-box:focus-within {
    width: 170px;
  }

  /* Responsive 2-column e-commerce product grid */
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .card-body { padding: 12px 10px 14px; }
  .card-body h3 { font-size: 0.95rem; line-height: 1.3; }
  .card-body .fabric { font-size: 0.75rem; margin-bottom: 6px; }

  .price { font-size: 1.1rem; }
  .add-btn { font-size: 0.65rem; padding: 5px 9px; }
  
  .section { padding: 32px 16px; }
  .section-head h2 { font-size: 1.6rem; }
  .hero-fullwidth { height: 45vh; min-height: 250px; max-height: 350px; padding: 16px; justify-content: flex-start; align-items: flex-end; }
  .hero-fullwidth p { display: none; }
  .hero-fullwidth .eyebrow { display: block; font-size: 0.6rem; letter-spacing: 0.1em; margin-bottom: 4px; opacity: 0.9; }
  .hero-fullwidth h1 { font-size: 1.45rem; margin: 0 0 12px; line-height: 1.15; text-shadow: 0 2px 4px rgba(0,0,0,0.8); text-align: left; max-width: 90%; }
  .hero-fullwidth .hero-content { padding-bottom: 24px; text-align: left; margin: 0; }
  .hero-fullwidth .hero-content > div { justify-content: flex-start; gap: 0 !important; }
  .hero-fullwidth .hero-content > div a:nth-child(2) { display: none; } /* Hide OUR STORY on mobile to reduce clutter */
  .hero-fullwidth .hero-content a { font-size: 0.75rem; padding: 6px 16px; white-space: nowrap; border-radius: 4px; }
  .hero-fullwidth .hero-overlay { background: linear-gradient(to top, rgba(15,10,5,0.95) 0%, rgba(15,10,5,0.5) 55%, transparent 100%); }
  .hero-fullwidth .slider-dots { bottom: 12px; transform: scale(0.85); transform-origin: left bottom; left: 16px; width: auto; }
  
  .page-banner { padding: 32px 16px; }
  .page-banner h1 { font-size: 1.8rem; }

  /* Touch horizontal scrolling strips */
  .cat-strip {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
    display: flex;
    flex-wrap: nowrap;
    /* Break out of the .section padding so strip goes edge-to-edge */
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
    /* Hide scrollbar on mobile */
    scrollbar-width: none;
    width: auto;
  }
  .cat-strip::-webkit-scrollbar { display: none; }
  .cat-card {
    flex: 0 0 150px;
    width: 150px;
    min-width: 150px;
    height: 170px;
  }

  /* Filter bar search on mobile */
  .filter-search { width: 100%; margin-left: 0; margin-top: 6px; }
  .filter-search input { width: 100%; }

  /* Cart Layout & Step Bar */
  .cart-layout { padding: 24px 16px 60px; }
  .checkout-shell { padding: 0 16px 60px; }
  .step-bar { padding: 20px 0 16px; }
  .step-circle { width: 32px; height: 32px; font-size: 0.78rem; }
  .step-label { font-size: 0.62rem; }
  .step-line { margin: 0 4px; margin-bottom: 18px; }

  .cart-item {
    grid-template-columns: 70px 1fr;
    gap: 12px; padding: 14px;
  }
  .cart-item .thumb { width: 70px; height: 70px; }

  /* Account Navigation mobile horizontal scroll */
  .account-shell { padding: 24px 16px 60px; }
  .account-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    gap: 8px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    position: static;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .account-nav::-webkit-scrollbar { display: none; }
  .account-nav button, .account-nav .sidebar-link-btn {
    flex: 0 0 auto;
    width: auto !important;
    padding: 9px 18px;
    font-size: 0.83rem;
    border-radius: 20px !important;
    scroll-snap-align: start;
    white-space: nowrap;
  }
  .account-nav button:not(.active):hover { padding-left: 18px; }

  /* Admin mobile optimization */
  .admin-main { padding: 16px 12px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card .num { font-size: 1.5rem; }

  .form-page { padding: 24px 14px; }
  .form-card { padding: 28px 18px; }
  .form-row { grid-template-columns: 1fr; gap: 12px; }
  .ck-row { grid-template-columns: 1fr; }
  
  .co-three-col { grid-template-columns: 1fr !important; }
}

@media (max-width: 600px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .masonry-grid { gap: 10px; }
  .masonry-col { gap: 10px; }
  .masonry-col .card { margin-bottom: 0; }


  .card-body { padding: 8px; }
  .card-body h3 { font-size: 0.85rem; }
  .price { font-size: 0.98rem; }
  .add-btn { font-size: 0.6rem; padding: 4px 7px; }
}

/* ---- Notifications ------------------------------------------- */
.notif-dropdown {
  position: absolute;
  top: 100%;
  right: -5px;
  width: 320px;
  background: var(--theme-surface, #fff);
    
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(43,24,16,0.12);
  border: 1px solid rgba(43,24,16,0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s cubic-bezier(0.16,1,0.3,1);
  z-index: 1000;
  display: flex;
  flex-direction: column;
}
.notif-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(43,24,16,0.06);
}
.notif-header h4 { margin: 0; font-size: 0.95rem; }
.notif-list {
  max-height: 380px;
  overflow-y: auto;
}
.notif-item {
  display: flex;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(43,24,16,0.04);
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}
.notif-item:hover { background: #fdfaf7; }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: transparent; }
.notif-item.unread:hover { background: #fdfaf7; }
.notif-content { flex: 1; }
.notif-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 4px;
}
.notif-msg {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
  margin-bottom: 6px;
}
.notif-time {
  font-size: 0.75rem;
  color: rgba(43,24,16,0.5);
}
.notif-dot {
  width: 8px;
  height: 8px;
  background: var(--marigold);
  border-radius: 50%;
  margin-left: 12px;
  flex-shrink: 0;
  margin-top: 6px;
}
.notif-empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
@media (max-width: 600px) {
  .notif-dropdown {
    position: fixed;
    top: 60px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}

@media (max-width: 650px) {
  .nav-wrap {
    padding: 10px 14px;
    gap: 10px;
  }
  .logo {
    font-size: 1.45rem;
  }
  .nav-icons {
    gap: 8px;
  }
  .icon-btn {
    font-size: 1.05rem;
  }
  .search-box {
    width: 32px;
    padding: 4px 6px;
  }
  .search-box.open, .search-box:focus-within {
    width: 150px;
  }
  .user-name-lbl {
    display: none;
  }
  .nav-user-btn {
    padding: 4px !important;
    border-radius: 50% !important;
  }
}

/* ---- Admin table mobile ---- */
@media (max-width: 600px) {
  .admin-table th, .admin-table td {
    padding: 9px 8px;
    font-size: 0.78rem;
  }
  .admin-table .thumb-cell { width: 38px; height: 38px; }
  /* Let the table-responsive wrapper scroll horizontally — don't break badges */
  .table-responsive {
    -webkit-overflow-scrolling: touch;
    border-radius: 0;
  }
  /* Account orders admin-toolbar: wrap My Orders + subtab buttons */
  #view-orders .admin-toolbar,
  .account-view .admin-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  #view-orders .admin-toolbar > div,
  .account-view .admin-toolbar > div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }
}

/* =========================================================================
   BOTTOM NAVIGATION BAR — Mobile & Tablet (≤ 900px)
   Amazon / Flipkart style fixed bottom nav.
   ========================================================================= */

.bottom-nav {
  display: none;
}

@media (max-width: 900px) {
  /* Push page content above the bottom nav */
  body:not([data-page="admin"]) {
    padding-bottom: 62px;
  }

  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--theme-surface, #fff);
    
    border-top: 1px solid rgba(43,24,16,0.10);
    box-shadow: 0 -2px 12px rgba(43,24,16,0.07);
    height: 60px;
    align-items: stretch;
    justify-content: space-around;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    font-family: 'Jost', sans-serif;
  }

  .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: #9c8b7e;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    position: relative;
    cursor: pointer;
    border: none;
    background: none;
    padding: 6px 4px;
    transition: color 0.18s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .bottom-nav-item:hover,
  .bottom-nav-item.active {
    color: var(--maroon);
  }

  .bottom-nav-item svg {
    flex-shrink: 0;
    transition: transform 0.18s ease;
  }

  .bottom-nav-item.active svg {
    transform: translateY(-1px);
  }

  .bottom-nav-item .bn-label {
    font-size: 0.58rem;
    line-height: 1;
  }

  /* Active top indicator bar */
  .bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 2px;
    border-radius: 0 0 3px 3px;
    background: var(--maroon);
  }

  /* Badge on cart/wishlist icons in bottom nav */
  .bn-badge-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .bn-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--maroon);
    color: #fff;
    font-size: 0.54rem;
    font-weight: 700;
    min-width: 15px;
    height: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 1.5px solid #fff;
    line-height: 1;
  }

  /* Hide on admin page */
  body[data-page="admin"] .bottom-nav {
    display: none !important;
  }

  /* Nudge push banner above the bottom nav */
  #push-banner {
    bottom: 72px !important;
  }
}

/* Tag Input Container */
.tag-input-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid rgba(43,24,16,0.18);
  border-radius: 6px;
  background: var(--theme-surface, #fff);
    
  min-height: 40px;
  align-items: center;
}
.tag-input-container:focus-within {
  border-color: var(--maroon);
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: var(--ivory-2);
  border: 1px solid rgba(43,24,16,0.1);
  border-radius: 12px;
  font-size: 0.8rem;
  color: var(--ink);
}
.tag-pill .remove-tag {
  cursor: pointer;
  color: var(--maroon);
  font-weight: bold;
  font-size: 14px;
  line-height: 1;
}
.tag-input {
  border: none !important;
  outline: none !important;
  padding: 4px !important;
  margin: 0 !important;
  flex: 1;
  min-width: 120px;
  font-size: 0.88rem !important;
  background: transparent !important;
}

/* --- Luxury Glassmorphism Contact Page --- */
.luxury-contact-main { 
  padding-top: 40px; padding-bottom: 80px; min-height: 100vh; position: relative; color: #fff; z-index: 1;
  overflow: hidden;
}
.luxury-bg-layer { position: absolute; top: -5%; left: -5%; width: 110%; height: 110%; background: url('/images/contact-bg.jpg') center/cover no-repeat; z-index: -1; pointer-events: none; filter: blur(10px) brightness(0.8); }
.luxury-contact-wrapper { max-width: 1100px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 2; }
.luxury-contact-header { text-align: left; margin-bottom: 50px; text-shadow: 0 2px 6px rgba(0,0,0,0.6); }
.luxury-contact-header h1 { font-family: 'Cormorant Garamond', serif; font-size: 3.5rem; margin-bottom: 12px; color: #fff; }
.luxury-contact-header .eyebrow { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 3px; color: #f3da97; display: block; margin-bottom: 8px; }
.luxury-contact-header p { font-size: 1.1rem; opacity: 0.9; }
.luxury-contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.luxury-contact-left { display: flex; flex-direction: column; }
.glass-pill-card { background: rgba(255, 255, 255, 0.55);  border: 1px solid rgba(255, 255, 255, 0.85); border-radius: 40px; padding: 24px 32px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06); color: var(--ink); text-shadow: none; }
.glass-pill-card.top-pill { margin-bottom: 24px; }
.glass-pill-card.top-pill h2 { font-family: 'Cormorant Garamond', serif; font-size: 2.2rem; margin-bottom: 8px; color: var(--ink); }
.glass-pill-card.top-pill p { line-height: 1.6; color: var(--ink); opacity: 0.85; }
.glass-pill-card.info-pill { display: flex; align-items: center; gap: 20px; margin-bottom: 16px; padding: 18px 32px; transition: transform 0.3s ease; }
.glass-pill-card.info-pill:hover { transform: translateX(5px); background: rgba(255, 255, 255, 0.75); }
.glass-pill-card.info-pill h4 { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; margin-bottom: 2px; color: var(--maroon); }
.glass-pill-card.info-pill p { margin: 0; color: var(--ink); opacity: 0.85; }
.glass-pill-card.whatsapp-pill { display: flex; align-items: center; justify-content: center; gap: 12px; background: linear-gradient(135deg, rgba(37,211,102,0.85), rgba(18,140,126,0.85)); color: #fff; text-decoration: none; font-weight: 600; letter-spacing: 1px; margin-bottom: 24px; border: 1px solid rgba(255,255,255,0.4); transition: all 0.3s ease; }
.glass-pill-card.whatsapp-pill:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(37,211,102,0.4); background: linear-gradient(135deg, rgba(37,211,102,0.9), rgba(18,140,126,0.9)); }
.glass-pill-card.map-pill { padding: 0; height: 220px; overflow: hidden; border-radius: 30px; position: relative; }
.golden-frame { background: none; padding: 0; border-radius: 0; border: none; box-shadow: none; }
.pearl-form-container { 
  background: rgba(255, 255, 255, 0.60);
  backdrop-filter: blur(40px) saturate(160%);
  -webkit-backdrop-filter: blur(40px) saturate(160%);
  border-radius: 24px; padding: 40px; 
  color: var(--ink); text-shadow: none; 
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 20px 60px rgba(0,0,0,0.07), inset 0 2px 4px rgba(255,255,255,0.9);
}
.pearl-form-container h2 { font-family: 'Cormorant Garamond', serif; font-size: 2.6rem; margin-bottom: 4px; text-align: center; color: var(--ink); }
.pearl-form-container .sub { text-align: center; color: var(--muted); margin-bottom: 32px; }
.pearl-form-container label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; color: var(--ink); margin-bottom: 6px; display: block; }
.glass-input-wrapper { position: relative; margin-bottom: 20px; }
.glass-input { width: 100%; background: rgba(255,255,255,0.5); border: 1px solid rgba(255,255,255,0.8); border-radius: 30px; padding: 14px 20px 14px 44px; font-size: 1rem; color: var(--ink); box-shadow: inset 0 3px 6px rgba(0,0,0,0.06); transition: all 0.3s ease; backdrop-filter: blur(5px); }
.glass-input:focus { background: rgba(255,255,255,0.8); border-color: #d4af37; outline: none; box-shadow: inset 0 2px 5px rgba(0,0,0,0.05), 0 0 0 3px rgba(212,175,55,0.2); }
textarea.glass-input { border-radius: 20px; padding: 16px 20px; }
.input-icon { position: absolute; left: 16px; top: 15px; color: var(--muted); }
.glass-btn-submit { width: 100%; background: linear-gradient(to bottom, #8B1E3F, #5e1128); color: #fff; border: 1px solid rgba(255,255,255,0.2); border-radius: 30px; padding: 16px; font-size: 1.05rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; cursor: pointer; box-shadow: 0 8px 20px rgba(139,30,63,0.5), inset 0 2px 5px rgba(255,255,255,0.3); transition: all 0.3s ease; margin-top: 10px; }
.glass-btn-submit:hover { background: linear-gradient(to bottom, #a0234a, #751532); transform: translateY(-2px); box-shadow: 0 10px 25px rgba(139,30,63,0.6), inset 0 2px 5px rgba(255,255,255,0.4); }
@media (max-width: 900px) { .luxury-contact-layout { grid-template-columns: 1fr; gap: 40px; } .luxury-contact-main { padding-top: 50px; padding-bottom: 40px; } }


/* =========================================================================
   DYNAMIC THEME ENGINE
   ========================================================================= */
/* Base overrides using safe fallbacks so default theme is untouched */
body[class*="theme-"] {
  background: var(--theme-bg, var(--ivory));
  color: var(--theme-paragraph, var(--ink));
}
body[class*="theme-"] h1, 
body[class*="theme-"] h2, 
body[class*="theme-"] h3, 
body[class*="theme-"] .display {
  color: var(--theme-heading, var(--ink));
}
body[class*="theme-"] .logo {
  color: var(--theme-logo, var(--maroon));
}
body[class*="theme-"] .logo span {
  color: var(--theme-secondary, var(--marigold));
}

body[class*="theme-"] nav.links a,
body[class*="theme-"] .head-icons svg,
body[class*="theme-"] .head-icons .admin-pill {
  color: var(--theme-nav-text, var(--ink));
  stroke: var(--theme-nav-text, var(--ink));
}
body[class*="theme-"] .btn-primary {
  background: var(--theme-button, var(--maroon));
}
body[class*="theme-"] .btn-primary:hover {
  background: var(--theme-button-hover, var(--maroon-dark));
  opacity: 1;
}
body[class*="theme-"] .btn-primary:active {
  opacity: 1;
  transform: translateY(1px) scale(0.97);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
body[class*="theme-"] .product-card,
body[class*="theme-"] .fig {
  background: var(--theme-surface, #fff);
    
  border: 1px solid var(--theme-border, transparent);
  color: var(--ink);
}
body[class*="theme-"] footer {
  background: var(--theme-footer, var(--ink));
}
body[class*="theme-"] footer p,
body[class*="theme-"] footer li,
body[class*="theme-"] footer a,
body[class*="theme-"] footer .logo {
  color: var(--theme-footer-text, var(--ivory-2));
}

body[class*="theme-"] .story {
  background: var(--theme-primary, var(--maroon));
  color: var(--theme-surface, var(--ivory));
}
body[class*="theme-"] .story h2,
body[class*="theme-"] .story p {
  color: var(--theme-surface, var(--ivory));
}
body[class*="theme-"] .story .eyebrow {
  color: var(--theme-secondary, var(--marigold));
}

/* THEME DEFINITIONS */
body.theme-lavender-mist {
  --theme-bg: #FAF9FC; --theme-surface: #FCFCFA; --theme-primary: #8D82B8; --theme-secondary: #B8AED8;
  --theme-navbar: #FFFFFF; --theme-nav-text: #4D4D5A; --theme-logo: #7266A8;
  --theme-heading: #2E2E38; --theme-paragraph: #70707A; --theme-button: #8D82B8; --theme-button-hover: #7364A5;
  --theme-border: #ECE8F3; --theme-footer: #ECE8F3; --theme-footer-text: #4D4D5A;
}
body.theme-herbal-green {
  --theme-bg: #F7FAF6; --theme-surface: #FCFCFA; --theme-primary: #708D6F; --theme-secondary: #A6BA9B;
  --theme-navbar: #FFFFFF; --theme-nav-text: #455144; --theme-logo: #5D7558;
  --theme-heading: #2E352F; --theme-paragraph: #69726A; --theme-button: #708D6F; --theme-button-hover: #5d7558;
  --theme-border: #E6EEE5; --theme-footer: #EEF5EC; --theme-footer-text: #455144;
}
body.theme-morning-glory {
  --theme-bg: #F8FBFD; --theme-surface: #FCFCFA; --theme-primary: #7B9EC5; --theme-secondary: #BFD5EA;
  --theme-navbar: #FFFFFF; --theme-nav-text: #27384A; --theme-logo: #5E83AC;
  --theme-heading: #27384A; --theme-paragraph: #68778A; --theme-button: #7B9EC5; --theme-button-hover: #5e83ac;
  --theme-border: #E7EFF6; --theme-footer: #EDF4FA; --theme-footer-text: #27384A;
}
body.theme-pigeon-gray {
  --theme-bg: #FAFAFA; --theme-surface: #FCFCFA; --theme-primary: #8D959C; --theme-secondary: #C6CCD2;
  --theme-navbar: #FFFFFF; --theme-nav-text: #2D3135; --theme-logo: #71767C;
  --theme-heading: #2D3135; --theme-paragraph: #71757A; --theme-button: #8D959C; --theme-button-hover: #71767c;
  --theme-border: #ECECEC; --theme-footer: #F2F3F4; --theme-footer-text: #2D3135;
}
body.theme-ice-gray {
  --theme-bg: #FCFCFC; --theme-surface: #FCFCFA; --theme-primary: #B5BDC8; --theme-secondary: #DDE2E8;
  --theme-navbar: #FFFFFF; --theme-nav-text: #333333; --theme-logo: #818B99;
  --theme-heading: #333333; --theme-paragraph: #747474; --theme-button: #B5BDC8; --theme-button-hover: #818b99;
  --theme-border: #EEF1F4; --theme-footer: #F4F6F8; --theme-footer-text: #333333;
}
body.theme-dusky-sand {
  --theme-bg: #FCFAF7; --theme-surface: #FCFCFA; --theme-primary: #B59B82; --theme-secondary: #DDD0C0;
  --theme-navbar: #FFFFFF; --theme-nav-text: #43382F; --theme-logo: #977B62;
  --theme-heading: #43382F; --theme-paragraph: #756A61; --theme-button: #B59B82; --theme-button-hover: #977b62;
  --theme-border: #EFE7DF; --theme-footer: #F4EEE7; --theme-footer-text: #43382F;
}
body.theme-sandstone-cloud {
  --theme-bg: #FBF8F5; --theme-surface: #FCFCFA; --theme-primary: #AA907E; --theme-secondary: #D9C9BC;
  --theme-navbar: #FFFFFF; --theme-nav-text: #433A34; --theme-logo: #8C715F;
  --theme-heading: #433A34; --theme-paragraph: #766D67; --theme-button: #AA907E; --theme-button-hover: #8c715f;
  --theme-border: #EEE4DC; --theme-footer: #F3ECE6; --theme-footer-text: #433A34;
}
body.theme-blush-petal {
  --theme-bg: #FFF9FA; --theme-surface: #FCFCFA; --theme-primary: #C99BA6; --theme-secondary: #EBCFD6;
  --theme-navbar: #FFFFFF; --theme-nav-text: #443438; --theme-logo: #B47A88;
  --theme-heading: #443438; --theme-paragraph: #765a61; --theme-button: #C99BA6; --theme-button-hover: #b47a88;
  --theme-border: #F3E6E9; --theme-footer: #FAEFF2; --theme-footer-text: #443438;
}
body.theme-oatmeal-cream {
  --theme-bg: #FCFBF8; --theme-surface: #FCFCFA; --theme-primary: #C3B292; --theme-secondary: #E6DCC8;
  --theme-navbar: #FFFFFF; --theme-nav-text: #443E35; --theme-logo: #9C8A68;
  --theme-heading: #443E35; --theme-paragraph: #766D5E; --theme-button: #C3B292; --theme-button-hover: #9c8a68;
  --theme-border: #F1ECE2; --theme-footer: #F8F4ED; --theme-footer-text: #443E35;
}
body.theme-sage-meadow {
  --theme-bg: #F8FAF7; --theme-surface: #FCFCFA; --theme-primary: #90A689; --theme-secondary: #CBD8C7;
  --theme-navbar: #FFFFFF; --theme-nav-text: #334032; --theme-logo: #72896B;
  --theme-heading: #334032; --theme-paragraph: #556653; --theme-button: #90A689; --theme-button-hover: #72896b;
  --theme-border: #E8EFE7; --theme-footer: #F2F6F1; --theme-footer-text: #334032;
}
body.theme-misty-aqua {
  --theme-bg: #F7FBFB; --theme-surface: #FCFCFA; --theme-primary: #7FAEB3; --theme-secondary: #C9E3E5;
  --theme-navbar: #FFFFFF; --theme-nav-text: #2E4548; --theme-logo: #5B9095;
  --theme-heading: #2E4548; --theme-paragraph: #4F6F73; --theme-button: #7FAEB3; --theme-button-hover: #5b9095;
  --theme-border: #E6F1F2; --theme-footer: #EDF7F7; --theme-footer-text: #2E4548;
}
body.theme-english-linen {
  --theme-bg: #FAFAF5; --theme-surface: #FCFCFA; --theme-primary: #8A9271; --theme-secondary: #C9CFB7;
  --theme-navbar: #FFFFFF; --theme-nav-text: #3A3C34; --theme-logo: #6F755B;
  --theme-heading: #3A3C34; --theme-paragraph: #636757; --theme-button: #8A9271; --theme-button-hover: #6f755b;
  --theme-border: #ECEEDC; --theme-footer: #F4F6EE; --theme-footer-text: #3A3C34;
}

/* Global Page Loader */
.global-loader-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: var(--bg);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}
.global-loader-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}
.global-loader-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(128, 128, 128, 0.2);
  border-top-color: #888888;
  border-radius: 50%;
  animation: spinLoader 1s linear infinite;
}
@keyframes spinLoader {
  to { transform: rotate(360deg); }
}

.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spinLoader 1s linear infinite;
}
/* duplicate contact styles removed */


/* =========================================================================
   DYNAMIC THEME ENGINE
   ========================================================================= */
/* Base overrides using safe fallbacks so default theme is untouched */
body[class*="theme-"] {
  background: var(--theme-bg, var(--ivory));
  color: var(--theme-paragraph, var(--ink));
}
body[class*="theme-"] h1, 
body[class*="theme-"] h2, 
body[class*="theme-"] h3, 
body[class*="theme-"] .display {
  color: var(--theme-heading, var(--ink));
}
body[class*="theme-"] .logo {
  color: var(--theme-logo, var(--maroon));
}
body[class*="theme-"] .logo span {
  color: var(--theme-secondary, var(--marigold));
}

body[class*="theme-"] nav.links a,
body[class*="theme-"] .head-icons svg,
body[class*="theme-"] .head-icons .admin-pill {
  color: var(--theme-nav-text, var(--ink));
  stroke: var(--theme-nav-text, var(--ink));
}
body[class*="theme-"] .btn-primary {
  background: var(--theme-button, var(--maroon));
}
body[class*="theme-"] .btn-primary:hover {
  background: var(--theme-button-hover, var(--maroon-dark));
  opacity: 1;
}
body[class*="theme-"] .btn-primary:active {
  opacity: 1;
  transform: translateY(1px) scale(0.97);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
body[class*="theme-"] .product-card,
body[class*="theme-"] .fig {
  background: var(--theme-surface, #fff);
    
  border: 1px solid var(--theme-border, transparent);
  color: var(--ink);
}
body[class*="theme-"] footer {
  background: var(--theme-footer, var(--ink));
}
body[class*="theme-"] footer p,
body[class*="theme-"] footer li,
body[class*="theme-"] footer a,
body[class*="theme-"] footer .logo {
  color: var(--theme-footer-text, var(--ivory-2));
}

body[class*="theme-"] .story {
  background: var(--theme-primary, var(--maroon));
  color: var(--theme-surface, var(--ivory));
}
body[class*="theme-"] .story h2,
body[class*="theme-"] .story p {
  color: var(--theme-surface, var(--ivory));
}
body[class*="theme-"] .story .eyebrow {
  color: var(--theme-secondary, var(--marigold));
}

/* THEME DEFINITIONS */
body.theme-lavender-mist {
  --theme-bg: #FAF9FC; --theme-surface: #FCFCFA; --theme-primary: #8D82B8; --theme-secondary: #B8AED8;
  --theme-navbar: #FFFFFF; --theme-nav-text: #4D4D5A; --theme-logo: #7266A8;
  --theme-heading: #2E2E38; --theme-paragraph: #70707A; --theme-button: #8D82B8; --theme-button-hover: #7364A5;
  --theme-border: #ECE8F3; --theme-footer: #ECE8F3; --theme-footer-text: #4D4D5A;
}
body.theme-herbal-green {
  --theme-bg: #F7FAF6; --theme-surface: #FCFCFA; --theme-primary: #708D6F; --theme-secondary: #A6BA9B;
  --theme-navbar: #FFFFFF; --theme-nav-text: #455144; --theme-logo: #5D7558;
  --theme-heading: #2E352F; --theme-paragraph: #69726A; --theme-button: #708D6F; --theme-button-hover: #5d7558;
  --theme-border: #E6EEE5; --theme-footer: #EEF5EC; --theme-footer-text: #455144;
}
body.theme-morning-glory {
  --theme-bg: #F8FBFD; --theme-surface: #FCFCFA; --theme-primary: #7B9EC5; --theme-secondary: #BFD5EA;
  --theme-navbar: #FFFFFF; --theme-nav-text: #27384A; --theme-logo: #5E83AC;
  --theme-heading: #27384A; --theme-paragraph: #68778A; --theme-button: #7B9EC5; --theme-button-hover: #5e83ac;
  --theme-border: #E7EFF6; --theme-footer: #EDF4FA; --theme-footer-text: #27384A;
}
body.theme-pigeon-gray {
  --theme-bg: #FAFAFA; --theme-surface: #FCFCFA; --theme-primary: #8D959C; --theme-secondary: #C6CCD2;
  --theme-navbar: #FFFFFF; --theme-nav-text: #2D3135; --theme-logo: #71767C;
  --theme-heading: #2D3135; --theme-paragraph: #71757A; --theme-button: #8D959C; --theme-button-hover: #71767c;
  --theme-border: #ECECEC; --theme-footer: #F2F3F4; --theme-footer-text: #2D3135;
}
body.theme-ice-gray {
  --theme-bg: #FCFCFC; --theme-surface: #FCFCFA; --theme-primary: #B5BDC8; --theme-secondary: #DDE2E8;
  --theme-navbar: #FFFFFF; --theme-nav-text: #333333; --theme-logo: #818B99;
  --theme-heading: #333333; --theme-paragraph: #747474; --theme-button: #B5BDC8; --theme-button-hover: #818b99;
  --theme-border: #EEF1F4; --theme-footer: #F4F6F8; --theme-footer-text: #333333;
}
body.theme-dusky-sand {
  --theme-bg: #FCFAF7; --theme-surface: #FCFCFA; --theme-primary: #B59B82; --theme-secondary: #DDD0C0;
  --theme-navbar: #FFFFFF; --theme-nav-text: #43382F; --theme-logo: #977B62;
  --theme-heading: #43382F; --theme-paragraph: #756A61; --theme-button: #B59B82; --theme-button-hover: #977b62;
  --theme-border: #EFE7DF; --theme-footer: #F4EEE7; --theme-footer-text: #43382F;
}
body.theme-sandstone-cloud {
  --theme-bg: #FBF8F5; --theme-surface: #FCFCFA; --theme-primary: #AA907E; --theme-secondary: #D9C9BC;
  --theme-navbar: #FFFFFF; --theme-nav-text: #433A34; --theme-logo: #8C715F;
  --theme-heading: #433A34; --theme-paragraph: #766D67; --theme-button: #AA907E; --theme-button-hover: #8c715f;
  --theme-border: #EEE4DC; --theme-footer: #F3ECE6; --theme-footer-text: #433A34;
}
body.theme-blush-petal {
  --theme-bg: #FFF9FA; --theme-surface: #FCFCFA; --theme-primary: #C99BA6; --theme-secondary: #EBCFD6;
  --theme-navbar: #FFFFFF; --theme-nav-text: #443438; --theme-logo: #B47A88;
  --theme-heading: #443438; --theme-paragraph: #765a61; --theme-button: #C99BA6; --theme-button-hover: #b47a88;
  --theme-border: #F3E6E9; --theme-footer: #FAEFF2; --theme-footer-text: #443438;
}
body.theme-oatmeal-cream {
  --theme-bg: #FCFBF8; --theme-surface: #FCFCFA; --theme-primary: #C3B292; --theme-secondary: #E6DCC8;
  --theme-navbar: #FFFFFF; --theme-nav-text: #443E35; --theme-logo: #9C8A68;
  --theme-heading: #443E35; --theme-paragraph: #766D5E; --theme-button: #C3B292; --theme-button-hover: #9c8a68;
  --theme-border: #F1ECE2; --theme-footer: #F8F4ED; --theme-footer-text: #443E35;
}
body.theme-sage-meadow {
  --theme-bg: #F8FAF7; --theme-surface: #FCFCFA; --theme-primary: #90A689; --theme-secondary: #CBD8C7;
  --theme-navbar: #FFFFFF; --theme-nav-text: #334032; --theme-logo: #72896B;
  --theme-heading: #334032; --theme-paragraph: #556653; --theme-button: #90A689; --theme-button-hover: #72896b;
  --theme-border: #E8EFE7; --theme-footer: #F2F6F1; --theme-footer-text: #334032;
}
body.theme-misty-aqua {
  --theme-bg: #F7FBFB; --theme-surface: #FCFCFA; --theme-primary: #7FAEB3; --theme-secondary: #C9E3E5;
  --theme-navbar: #FFFFFF; --theme-nav-text: #2E4548; --theme-logo: #5B9095;
  --theme-heading: #2E4548; --theme-paragraph: #4F6F73; --theme-button: #7FAEB3; --theme-button-hover: #5b9095;
  --theme-border: #E6F1F2; --theme-footer: #EDF7F7; --theme-footer-text: #2E4548;
}
body.theme-english-linen {
  --theme-bg: #FAFAF5; --theme-surface: #FCFCFA; --theme-primary: #8A9271; --theme-secondary: #C9CFB7;
  --theme-navbar: #FFFFFF; --theme-nav-text: #3A3C34; --theme-logo: #6F755B;
  --theme-heading: #3A3C34; --theme-paragraph: #636757; --theme-button: #8A9271; --theme-button-hover: #6f755b;
  --theme-border: #ECEEDC; --theme-footer: #F4F6EE; --theme-footer-text: #3A3C34;
}

/* Global Page Loader */
.global-loader-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: var(--bg);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}
.global-loader-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}
.global-loader-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(128, 128, 128, 0.2);
  border-top-color: #888888;
  border-radius: 50%;
  animation: spinLoader 1s linear infinite;
}
@keyframes spinLoader {
  to { transform: rotate(360deg); }
}

.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spinLoader 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

/* ---- Smooth Page Transitions ----------------------------------------------- */
body {
  opacity: 0;
  animation: pageFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pageFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

body.page-transition-exit {
  animation: pageFadeOut 0.3s cubic-bezier(0.5, 0, 0.2, 1) forwards !important;
}

@keyframes pageFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Hide shopping features for admins */
body.admin-user .product-card .pcc-actions,
body.admin-user .product-card .pcc-add-btn,
body.admin-user .product-card .pcc-buy-btn,
body.admin-user #addBtn,
body.admin-user #buyNowBtn,
body.admin-user #modalAddBtn,
body.admin-user .wishlist-heart,
body.admin-user .pcc-wish-btn,
body.admin-user #pdpWishlistBtn,
body.admin-user #modalWishlistBtn,
body.admin-user a[href="/wishlist.html"],
body.admin-user [href="/account.html?view=wishlist"],
body.admin-user .nav-actions [data-count="wishlist"],
body.admin-user [data-bn-page="wishlist"],
body.admin-user .pdp-actions,
body.admin-user .sticky-add-bar,
body.admin-user a[href="/cart.html"] {
  display: none !important;
}


/* Global crystal clear image saturation */
.card img, .cat-card img, .hero-slide img, .product-img {
  filter: contrast(1.08) saturate(1.15);
  -webkit-filter: contrast(1.08) saturate(1.15);
  transform: translateZ(0);
}


.nav-pill-highlight {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 38px;
  background: var(--theme-surface, rgba(0,0,0,0.05));
  
  border-radius: 20px;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border: 1px solid var(--theme-border, transparent);
}
.links {
  position: relative;
  z-index: 1;
}
.links a.nav-link {
  position: relative;
  z-index: 2;
  padding: 8px 16px;
  border-radius: 20px;
}
body[class*="theme-"] .links a.nav-link:hover::after,
body[class*="theme-"] .links a.nav-link.active::after {
  display: none !important; /* hide the old default underline */
}

body[class*="theme-"] .glass-input::placeholder { color: var(--theme-paragraph, rgba(0,0,0,0.4)); }

/* ---- Our Story Redesign ---- */
.hero-story {
  position: relative;
  width: 100%;
  height: 25vh;
  min-height: 200px;
  background-image: url("/img/hero-story.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 40px;
}
@media (min-width: 800px) {
  .hero-story {
    height: 60vh;
    min-height: 400px;
  }
}
.hero-story-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45); /* Slightly darker overlay for text readability */
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.hero-story-content {
  position: relative;
  z-index: 2;
  padding: 0 24px;
}
.hero-story-content h1 {
  font-size: 3.5rem;
  margin: 12px 0 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.story-split {
  display: flex;
  flex-direction: column;
  gap: 48px;
  align-items: center;
  margin: 0 auto;
}
@media (min-width: 800px) {
  .story-split {
    flex-direction: row;
    align-items: flex-start;
  }
  .story-split-img {
    flex: 0.7;
    max-width: 420px;
  }
  .story-split-text {
    flex: 1.3;
  }
}
.story-split-img img {
  width: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow);
  object-fit: cover;
  aspect-ratio: 4/5;
}
.story-split-text {
  font-size: 1.1rem;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}
body.theme-misty-aqua {
  --theme-bg: #F7FBFB; --theme-surface: #FCFCFA; --theme-primary: #7FAEB3; --theme-secondary: #C9E3E5;
  --theme-navbar: #FFFFFF; --theme-nav-text: #2E4548; --theme-logo: #5B9095;
  --theme-heading: #2E4548; --theme-paragraph: #4F6F73; --theme-button: #7FAEB3; --theme-button-hover: #5b9095;
  --theme-border: #E6F1F2; --theme-footer: #EDF7F7; --theme-footer-text: #2E4548;
}
body.theme-english-linen {
  --theme-bg: #FAFAF5; --theme-surface: #FCFCFA; --theme-primary: #8A9271; --theme-secondary: #C9CFB7;
  --theme-navbar: #FFFFFF; --theme-nav-text: #3A3C34; --theme-logo: #6F755B;
  --theme-heading: #3A3C34; --theme-paragraph: #636757; --theme-button: #8A9271; --theme-button-hover: #6f755b;
  --theme-border: #ECEEDC; --theme-footer: #F4F6EE; --theme-footer-text: #3A3C34;
}

/* Global Page Loader */
.global-loader-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: var(--bg);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}
.global-loader-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}
.global-loader-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(128, 128, 128, 0.2);
  border-top-color: #888888;
  border-radius: 50%;
  animation: spinLoader 1s linear infinite;
}
@keyframes spinLoader {
  to { transform: rotate(360deg); }
}

.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spinLoader 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

/* ---- Smooth Page Transitions ----------------------------------------------- */
body {
  opacity: 0;
  animation: pageFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pageFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

body.page-transition-exit {
  animation: pageFadeOut 0.3s cubic-bezier(0.5, 0, 0.2, 1) forwards !important;
}

@keyframes pageFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Hide shopping features for admins */
body.admin-user .product-card .pcc-actions,
body.admin-user .product-card .pcc-add-btn,
body.admin-user .product-card .pcc-buy-btn,
body.admin-user #addBtn,
body.admin-user #buyNowBtn,
body.admin-user #modalAddBtn,
body.admin-user .wishlist-heart,
body.admin-user .pcc-wish-btn,
body.admin-user #pdpWishlistBtn,
body.admin-user #modalWishlistBtn,
body.admin-user a[href="/wishlist.html"],
body.admin-user [href="/account.html?view=wishlist"],
body.admin-user .nav-actions [data-count="wishlist"],
body.admin-user [data-bn-page="wishlist"],
body.admin-user .pdp-actions,
body.admin-user .sticky-add-bar,
body.admin-user a[href="/cart.html"] {
  display: none !important;
}


/* Global crystal clear image saturation */
.card img, .cat-card img, .hero-slide img, .product-img {
  filter: contrast(1.08) saturate(1.15);
  -webkit-filter: contrast(1.08) saturate(1.15);
  transform: translateZ(0);
}


.nav-pill-highlight {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 38px;
  background: var(--theme-surface, rgba(0,0,0,0.05));
  
  border-radius: 20px;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border: 1px solid var(--theme-border, transparent);
}
.links {
  position: relative;
  z-index: 1;
}
.links a.nav-link {
  position: relative;
  z-index: 2;
  padding: 8px 16px;
  border-radius: 20px;
}
body[class*="theme-"] .links a.nav-link:hover::after,
body[class*="theme-"] .links a.nav-link.active::after {
  display: none !important; /* hide the old default underline */
}

body[class*="theme-"] .glass-input::placeholder { color: var(--theme-paragraph, rgba(0,0,0,0.4)); }

/* ---- Our Story Redesign ---- */
.hero-story {
  position: relative;
  width: 100%;
  height: 25vh;
  min-height: 200px;
  background-image: url("/img/hero-story.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 40px;
}
@media (min-width: 800px) {
  .hero-story {
    height: 60vh;
    min-height: 400px;
  }
}
.hero-story-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45); /* Slightly darker overlay for text readability */
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.hero-story-content {
  position: relative;
  z-index: 2;
  padding: 0 24px;
}
.hero-story-content h1 {
  font-size: 3.5rem;
  margin: 12px 0 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.story-split {
  display: flex;
  flex-direction: column;
  gap: 48px;
  align-items: center;
  margin: 0 auto;
}
@media (min-width: 800px) {
  .story-split {
    flex-direction: row;
    align-items: flex-start;
  }
  .story-split-img {
    flex: 0.7;
    max-width: 420px;
  }
  .story-split-text {
    flex: 1.3;
  }
}
.story-split-img img {
  width: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow);
  object-fit: cover;
  aspect-ratio: 4/5;
}
.story-split-text {
  font-size: 1.1rem;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}
/* Advanced Responsive Admin Tables -> Cards on Mobile */
@media (max-width: 768px) {
  /* Make admin tables scroll horizontally on mobile */
  .table-responsive {
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin-left: -20px;
    margin-right: -20px;
    width: calc(100% + 40px);
    padding: 0 20px;
  }
  .admin-table .thumb-cell { width: 40px; height: 40px; border-radius: 6px; }
}




/* AI Chatbot */
#aiChatWidget { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; align-items: flex-end; }
#aiChatBtn { width: 56px; height: 56px; border-radius: 50%; background: var(--maroon); color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.2); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.2s; border: none; }
#aiChatBtn:hover { transform: scale(1.05); }
#aiChatBtn svg { width: 28px; height: 28px; fill: currentColor; }
#aiChatWindow { position: absolute; bottom: calc(100% + 16px); right: 0; width: min(340px, 100vw - 32px); height: min(480px, 100vh - 120px); background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); display: flex; flex-direction: column; overflow: hidden; transform-origin: bottom right; transform: scale(0); opacity: 0; transition: transform 0.3s ease, opacity 0.3s ease; pointer-events: none; }
#aiChatWindow.active { transform: scale(1); opacity: 1; pointer-events: auto; }
.chat-header { background: var(--maroon); color: #fff; padding: 16px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.chat-close { background: none; border: none; color: #fff; cursor: pointer; font-size: 1.2rem; }
.chat-body { flex: 1; padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; background: #fdfdfd; }
.chat-msg { max-width: 85%; padding: 10px 14px; border-radius: 12px; font-size: 0.9rem; line-height: 1.4; }
.chat-msg.bot { background: #f0f0f0; color: #333; align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.user { background: var(--maroon); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-footer { padding: 12px; border-top: 1px solid #eee; display: flex; gap: 8px; background: #fff; }
.chat-footer input { flex: 1; padding: 10px 14px; border: 1px solid #ddd; border-radius: 20px; outline: none; font-size: 0.9rem; }
.chat-footer button { background: var(--maroon); color: #fff; border: none; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.chat-footer button:hover { background: var(--marigold); }
.chat-typing { font-size: 0.8rem; color: #888; align-self: flex-start; margin-left: 4px; font-style: italic; display: none; }



/* Mobile Chatbot Adjustments */
@media (max-width: 900px) {
  #aiChatWidget {
    bottom: 86px; /* clears the 62px bottom-nav + 24px spacing */
  }
}

/* Mobile Chatbot Fullscreen */
@media (max-width: 600px) {
  #aiChatWindow.active {
    position: fixed !important;
    top: 0;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100%;
    border-radius: 0 !important;
    margin: 0 !important;
    transform: none !important;
    z-index: 10000 !important;
  }
}
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 240px;
  gap: 20px;
  width: 100%;
}
.bento-card {
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
  text-decoration: none;
  padding: 30px;
}
.bento-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}
.bento-card h3 {
  color: #fff;
  font-size: 1.6rem;
  position: relative;
  z-index: 2;
  margin-bottom: 4px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}
.bento-card span {
  color: rgba(255,255,255,0.9);
  font-size: 0.95rem;
  position: relative;
  z-index: 2;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

/* Bento Box Sizing Rules */
.bento-card:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.bento-card:nth-child(2) { grid-column: span 1; grid-row: span 1; }
.bento-card:nth-child(3) { grid-column: span 1; grid-row: span 1; }
.bento-card:nth-child(4) { grid-column: span 2; grid-row: span 1; }
.bento-card:nth-child(5) { grid-column: span 2; grid-row: span 1; }
.bento-card:nth-child(6) { grid-column: span 1; grid-row: span 2; }
.bento-card:nth-child(7) { grid-column: span 1; grid-row: span 1; }
.bento-card:nth-child(n+8) { grid-column: span 1; grid-row: span 1; }

@media (max-width: 900px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
    gap: 12px;
  }
  .bento-card:nth-child(1) { grid-column: span 2; grid-row: span 2; }
  .bento-card:nth-child(2) { grid-column: span 1; grid-row: span 1; }
  .bento-card:nth-child(3) { grid-column: span 1; grid-row: span 1; }
  .bento-card:nth-child(4) { grid-column: span 2; grid-row: span 1; }
  .bento-card:nth-child(5) { grid-column: span 1; grid-row: span 1; }
  .bento-card:nth-child(6) { grid-column: span 1; grid-row: span 1; }
  .bento-card:nth-child(n+7) { grid-column: span 1; grid-row: span 1; }
}
@media (max-width: 480px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
    gap: 12px;
  }
  .bento-card:nth-child(1) { grid-column: span 2; grid-row: span 2; }
  .bento-card:nth-child(2) { grid-column: span 1; grid-row: span 1; }
  .bento-card:nth-child(3) { grid-column: span 1; grid-row: span 1; }
  .bento-card:nth-child(4) { grid-column: span 2; grid-row: span 1; }
  .bento-card:nth-child(n+5) { grid-column: span 1; grid-row: span 1; }
  
  .bento-card {
    padding: 16px;
  }
  .bento-card h3 {
    font-size: 1.2rem;
  }
  .bento-card span {
    font-size: 0.8rem;
  }
}

.banner-image-active {
  background-size: cover !important;
  background-position: center 20% !important;
  color: #fff !important;
  padding: 20px 40px !important;
  height: 240px;
  min-height: 200px;
  max-width: 1200px;
  margin: 20px auto;
  border-radius: 16px;
}
@media (max-width: 600px) {
  .banner-image-active {
    height: 140px;
    min-height: 140px;
    padding: 16px 20px !important;
    margin: 10px auto;
  }
}




. c a r d - r a t i n g   {   f o n t - s i z e :   0 . 7 5 r e m ;   c o l o r :   # f 5 b 3 0 1 ;   m a r g i n - b o t t o m :   6 p x ;   }  
 
/* Override Bento */
.bento-card:nth-child(n) { grid-column: span 1 !important; grid-row: span 1 !important; }
/* --- Circular Categories --- */
.category-circle-strip {
  display: flex;
  gap: 32px;
  overflow-x: auto;
  padding: 10px 0 20px;
  align-items: flex-start;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.category-circle-strip { scrollbar-width: thin; }
.category-circle-strip::-webkit-scrollbar { height: 6px; display: block; }
.category-circle-strip::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.03); border-radius: 4px; }
.category-circle-strip::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.15); border-radius: 4px; cursor: pointer; }
.category-circle-strip::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.3); }

.category-circle-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  width: 140px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.cat-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(145deg, #ffffff, #fdfaf5);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 8px 10px 24px rgba(43,24,16,0.06), -6px -6px 16px rgba(255,255,255,0.7), inset 2px 2px 6px rgba(255,255,255,0.9);
  transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}
.cat-circle img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; transform: scale(1.2); transition: transform 0.4s ease; }
.cat-circle .cat-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-family: var(--font-heading);
  color: #fff;
  background: linear-gradient(135deg, var(--maroon), var(--maroon-dark));
}
.category-circle-item:hover .cat-circle {
  border-color: var(--maroon);
  box-shadow: 10px 14px 30px rgba(43,24,16,0.1), -4px -4px 12px rgba(255,255,255,0.8), inset 2px 2px 6px rgba(255,255,255,0.9);
  transform: translateY(-4px);
}
.category-circle-item:hover .cat-circle img { transform: scale(1.35); }
.category-circle-item .cat-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  line-height: 1.2;
}

@media (max-width: 600px) {
  .category-circle-strip { gap: 12px; padding: 8px 16px 16px; }
  .category-circle-item { width: 70px; }
  .cat-circle { width: 70px; height: 70px; }
  .category-circle-item .cat-name { font-size: 0.65rem; }
}

/* --- Promo Trio --- */
.promo-trio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
}
.promo-trio-card {
  border-radius: 16px;
  padding: 32px 24px;
  text-decoration: none;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
  min-height: 220px;
}
.promo-trio-card:hover { transform: translateY(-4px); }
.promo-trio-badge {
  display: inline-block;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  margin-bottom: 16px;
  align-self: flex-start;
  letter-spacing: 0.5px;
}
.promo-trio-card h3 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin: 0 0 10px;
  line-height: 1.1;
}
.promo-trio-card p {
  font-size: 0.95rem;
  opacity: 0.9;
  margin: 0 0 24px;
}
.promo-trio-link {
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
/* Always 3 columns — compact strip on all devices */
.promo-trio-grid {
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 10px !important;
}
.promo-trio-card {
  padding: 16px 12px !important;
  border-radius: 12px !important;
  min-height: unset !important;
}
.promo-trio-card h3 {
  font-size: 1rem !important;
  margin: 6px 0 4px !important;
}
.promo-trio-card p {
  font-size: 0.72rem !important;
  margin: 0 0 10px !important;
  opacity: 0.85;
}
.promo-trio-badge {
  padding: 3px 8px !important;
  font-size: 0.6rem !important;
}
.promo-trio-link {
  font-size: 0.75rem !important;
}

/* --- Trust Badges Strip --- */
.trust-strip {
  background: transparent;
  padding: 24px 0;
  border-top: 1px solid rgba(43,24,16,0.08);
  border-bottom: 1px solid rgba(43,24,16,0.08);
  margin: 0;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}
.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.trust-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(145deg, #f5ede0, #eddcc8);
  color: var(--maroon);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  border: 1.5px solid rgba(122, 32, 53, 0.15);
  box-shadow: 0 4px 14px rgba(43,24,16,0.12), 0 1px 3px rgba(43,24,16,0.08);
  transition: all 0.3s ease;
}
.trust-icon svg {
  width: 20px;
  height: 20px;
}
.trust-item h4 {
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  margin: 0 0 4px;
  font-weight: 600;
}
.trust-item p {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.2;
}



/* --- Recently Viewed Cards --- */
.rv-card {
  flex: 0 0 160px;
  cursor: pointer;
}
.rv-card-img {
  width: 160px;
  height: 160px;
  background-size: cover;
  background-position: center;
  border-radius: 16px;
  background-color: var(--ivory-2);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
@media (max-width: 768px) {
  .rv-card {
    flex: 0 0 120px;
  }
  .rv-card-img {
    width: 120px;
    height: 120px;
    border-radius: 12px;
  }
}

/* --- Mobile Card Text Cleanups --- */
.card-body h3 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-body .eyebrow {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}
.card-body .fabric {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 480px) {
  .card-body {
    padding: 10px 12px 12px;
  }
  .card-body h3 {
    font-size: 0.9rem;
    line-height: 1.25;
  }
  .card-body .eyebrow {
    font-size: 0.6rem;
    margin-bottom: 3px;
  }
  .card-body .fabric {
    font-size: 0.7rem;
    margin-bottom: 8px;
  }
  .price-row {
    margin-top: 6px;
  }
}


/* Hide footer on Shop page due to heavy scrolling / many products */
body[data-page="shop"] footer {
  display: none !important;
}
body[data-page="shop"] {
  padding-bottom: 60px;
}
