:root{
  /* Traditional palette */
  --brand:#7A1F2B;        /* maroon */
  --brand-2:#C8A14A;      /* antique gold */
  --brand-3:#1F3B2C;      /* deep green */

  --bg:#FFF8EF;           /* ivory */
  --surface:#FFFFFF;
  --ink:#1b1b1f;
  --muted:#6b7280;
  --ring: rgba(200,161,74,.35);

  --radius-lg:22px;
  --radius-md:14px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  background-color: var(--bg);
  background-image: url('../img/pattern.svg');
  background-repeat: repeat;
  background-size: 520px auto;
  color: var(--ink);
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

h1,h2,h3,.display-5,.navbar-brand{
  font-family: "Playfair Display", ui-serif, Georgia, "Times New Roman", serif;
  letter-spacing: .2px;
}

a{ color: inherit; }

/* Navbar */
.navbar{
  background: rgba(255,255,255,0.92) !important;
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid rgba(27,27,31,0.08);
}
.navbar .nav-link{ color: rgba(27,27,31,0.82); font-weight: 500; }
.navbar .nav-link:hover{ color: var(--brand); }

.brand-badge{
  display:inline-flex;
  align-items:center;
  gap:10px;
}
.brand-badge img{ width:34px; height:34px; }

/* Buttons */
.btn{ border-radius: 999px; padding: .55rem 1rem; }
.btn-primary{
  background: linear-gradient(135deg, var(--brand), #5E1420);
  border-color: transparent;
  box-shadow: 0 10px 26px rgba(122,31,43,0.22);
}
.btn-primary:hover{ filter: brightness(0.96); }
.btn-outline-dark{ border-color: rgba(27,27,31,0.25); }

/* Sections */
.hero{
  position: relative;
  background:
    radial-gradient(900px 420px at 12% 20%, rgba(200,161,74,0.18), transparent 60%),
    radial-gradient(1000px 460px at 88% 10%, rgba(122,31,43,0.18), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.58));
  border-bottom: 1px solid rgba(27,27,31,0.08);
}
.hero::after{
  content:"";
  position:absolute;
  inset:0;
  background-image:url('../img/hero-motif.svg');
  background-repeat:no-repeat;
  background-position: 96% 120px;
  background-size: 380px auto;
  opacity:.9;
  pointer-events:none;
}

.badge-soft{
  background: rgba(200,161,74,0.16);
  color: #6D4E12;
  border: 1px solid rgba(200,161,74,0.22);
}

.card-soft{
  border: 1px solid rgba(27,27,31,0.08);
  box-shadow: 0 16px 46px rgba(17,24,39,0.08);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.92);
}

.section-title{
  display:flex;
  align-items:center;
  gap:12px;
}
.section-title::before{
  content:"";
  width: 46px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-2), rgba(200,161,74,0));
}

.small-muted{ color: var(--muted); font-size: .92rem; }

/* Product cards */
.product-img{
  width:100%;
  height:260px;
  object-fit:cover;
  border-radius: var(--radius-md);
  background:#f3f4f6;
}
.product-card{ transition: transform .18s ease, box-shadow .18s ease; }
.product-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 22px 60px rgba(17,24,39,0.12);
}

.badge.text-bg-light{
  background: rgba(31,59,44,0.08) !important;
  color: var(--brand-3) !important;
  border: 1px solid rgba(31,59,44,0.18);
}

/* Forms */
.form-control, .form-select{
  border-radius: 14px;
  border-color: rgba(27,27,31,0.18);
}
.form-control:focus, .form-select:focus{
  border-color: rgba(200,161,74,0.55);
  box-shadow: 0 0 0 .25rem var(--ring);
}

/* Footer */
.footer{
  background: rgba(255,255,255,0.92);
}
.footer .footer-brand{
  display:flex;
  align-items:center;
  gap:10px;
}
.footer .footer-brand img{ width:32px; height:32px; }

/* Admin tweaks (still Bootstrap-based) */
body.bg-light{ background-color: var(--bg) !important; background-image: url('../img/pattern.svg'); }
.navbar.navbar-dark{ background: linear-gradient(135deg, var(--brand), #5E1420) !important; }

/* Product page thumbs */
.thumb-nav{
  background: rgba(122,31,43,0.72) !important;
}
.thumb-nav:hover{ background: rgba(122,31,43,0.88) !important; }
.thumb:hover{ border-color: var(--brand-2) !important; }


/* --- Cart / selections UI --- */
.cart-pill{
  display:inline-flex; align-items:center; gap:.5rem;
  padding:.45rem .75rem; border-radius:999px;
  border:1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.85);
}
.cart-badge{
  min-width:22px; height:22px; border-radius:999px;
  display:inline-flex; align-items:center; justify-content:center;
  font-size:.75rem; font-weight:700;
  background: var(--accent, #7a1f2b);
  color:#fff;
}
.cart-thumb{width:48px; height:38px; object-fit:cover; border-radius:10px; background:#f3f4f6; flex:0 0 auto;}
.cart-preview{
  position: sticky; top: 76px; z-index: 10;
  border:1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.92);
  border-radius: 16px;
  padding: 10px 12px;
  backdrop-filter: blur(6px);
}
.cart-preview-thumb{width:36px;height:28px;border-radius:10px;object-fit:cover;background:#f3f4f6;margin-right:6px;}
.cart-add-btn{
  z-index: 999;
  position:absolute; right:12px; top:12px;
  width:46px; height:46px; border-radius:999px;
  border:none;
  background: linear-gradient(135deg, var(--brand), #5E1420);
  box-shadow: 0 14px 30px rgba(0,0,0,.18);
  display:flex; align-items:center; justify-content:center;
  font-size:22px; font-weight:800;
  color: #fff;
  transition: transform .14s ease, filter .14s ease, box-shadow .14s ease;
}
.cart-add-btn:hover{ filter: brightness(1.03); transform: translateY(-1px); }
.cart-add-btn:focus-visible{ outline: 3px solid rgba(200,161,74,.55); outline-offset: 2px; }
.cart-add-btn.added{ transform: scale(0.92); filter: brightness(0.98); }

/* Small helper label on hover (desktop) */
.cart-add-btn::after{
  content: "Add";
  position: absolute;
  right: 52px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(27,27,31,.92);
  color: #fff;
  font-size: .78rem;
  padding: 6px 10px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
  white-space: nowrap;
}
@media (hover:hover){
  .cart-add-btn:hover::after{ opacity: 1; }
}

/* Floating cart button (keeps cart accessible on mobile where navbar collapses) */
.cart-fab{
  position: fixed;
  right: 16px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,.94);
  box-shadow: 0 18px 45px rgba(0,0,0,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1035; /* above most content, below Bootstrap modals */
}
.cart-fab:focus-visible{ outline: 3px solid rgba(200,161,74,.55); outline-offset: 3px; }
.cart-fab-icon{ font-size: 22px; }
.cart-fab-badge{
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: .74rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255,255,255,.95);
}
@media (min-width: 992px){
  .cart-fab{ display: none; }
}

/* Toast position */
.cart-toast-host{
  position: fixed;
  right: 16px;
  bottom: 86px; /* above floating cart button */
  z-index: 1040;
}
.product-card{ position: relative; }

/* ============================
   Category tiles (Home page)
   ============================ */
.cat-tile{
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  min-height: 170px;
  background-image: var(--cat-bg);
  background-size: cover;
  background-position: center;
}
.cat-tile::before{
  content: "";
  position: absolute;
  inset: 0;
  /* Traditional dark overlay for readability */
  background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.55) 100%);
}
.cat-tile-overlay{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 18px;
}
.cat-tile-title{
  color: #fff;
  font-weight: 700;
  letter-spacing: .2px;
  font-size: 1.15rem;
  text-shadow: 0 6px 18px rgba(0,0,0,.35);
}
@media (min-width: 992px){
  .cat-tile{ min-height: 200px; }
  .cat-tile-title{ font-size: 1.25rem; }
}

.footer .btn {
  border-radius: 10px;
}

.footer a {
  word-break: break-word;
}

@media (max-width: 767.98px) {
  .footer {
    text-align: left;
  }

  .footer-brand {
    align-items: center;
  }

  .footer .btn {
    width: 100%;
  }
}

.hero-title {
  line-height: 1.2;
  max-width: 650px;
}

.hero-text {
  max-width: 600px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.section-subtitle {
  max-width: 720px;
}

.section-link {
  white-space: nowrap;
  font-weight: 600;
}

.product-card .fw-bold {
  line-height: 1.35;
}

@media (max-width: 767.98px) {
  .hero {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-text {
    font-size: 1rem;
  }

  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-link {
    margin-top: 4px;
  }
}

.mane-navbar {
  background: rgba(255, 250, 246, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(128, 0, 0, 0.08);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  display: block;
  /* border-radius: 50%; */
  background: #fff;
  /* padding: 3px; */
  /* box-shadow: 0 4px 14px rgba(128, 0, 0, 0.12); */
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
}

.brand-title {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: #7a0019;
  letter-spacing: 0.2px;
}

.brand-subtitle {
  font-family: "Poppins", sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(27, 27, 31, 0.62);
  margin-top: 3px;
}

.nav-gap {
  gap: 0.35rem;
}

.mane-navbar .nav-link {
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  color: #3a2a2a;
  padding-left: 0.9rem !important;
  padding-right: 0.9rem !important;
  white-space: nowrap;
}

.mane-navbar .nav-link:hover,
.mane-navbar .nav-link:focus {
  color: #800000;
}

.nav-link-nowrap {
  white-space: nowrap;
}

.header-cta-btn {
  background: #800000;
  color: #fff;
  border: 1px solid #800000;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}

.header-cta-btn:hover,
.header-cta-btn:focus {
  background: #670000;
  border-color: #670000;
  color: #fff;
}

.cart-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(128, 0, 0, 0.14);
  color: #4a2b2b;
  white-space: nowrap;
}

.cart-badge {
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #800000;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

.navbar-toggler:focus {
  box-shadow: none;
}

@media (max-width: 991.98px) {
  .mane-navbar {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }

  .brand-logo {
    width: 46px;
    height: 46px;
  }

  .brand-title {
    font-size: 1.15rem;
  }

  .navbar-collapse {
    margin-top: 1rem;
    background: #fff;
    border-radius: 18px;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  }

  .mane-navbar .nav-link {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
  }

  .cart-pill,
  .header-cta-btn {
    width: 100%;
    justify-content: center;
  }

  .nav-gap {
    gap: 0.75rem;
  }
}

@media (max-width: 575.98px) {
  .brand-wrap {
    gap: 10px;
    max-width: calc(100vw - 90px);
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .brand-title {
    font-size: 1rem;
  }
}


@media (max-width: 991px) {
  .mobile-center-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    position: relative;
    min-height: 70px;
  }

  .mobile-center-header .navbar-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
  }

  .mobile-center-header .brand-logo {
    height: 34px;
  }

  .mobile-center-header .brand-title {
    font-size: 16px;
    font-weight: 600;
    margin-top: 2px;
  }
}