/* ═══════════════════════════════════════════════════════════════
   NILA — Storefront theme

   Drop at:  assets/front_end/modern/css/colors/nila.css
   Activate: Admin → Web Settings → Modern Theme Color → "nila"
             (or: UPDATE settings SET value='nila'
                  WHERE variable='modern_theme_color')

   WHY THIS FILE EXISTS
   The storefront was running #6133bd — PURPLE. The app is gold
   (#C5A059). A customer who browses on the web and then opens the app
   sees two different companies. That is not a nitpick; brand
   recognition is most of what a jewellery buyer is paying for.

   Every value below is the SAME HEX as lib/core/theme/nila_theme.dart.
   If you change one, change both.
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600&family=Jost:wght@300;400;500;600&display=swap');

:root {
  /* ── Palette (identical to the app) ──────────────────────── */
  --nila-porcelain: #FBFAF8;
  --nila-shell:     #F3F0EB;
  --nila-ink:       #14110F;
  --nila-patina:    #8A7B63;
  --nila-gold:      #C5A059;
  --nila-gold-deep: #9A7B3E;
  --nila-rule:      #E2DCD2;
  --nila-signal:    #B4472F;
  --nila-verdigris: #4A6B5D;

  /* ── Theme hooks the storefront already reads ────────────── */
  --border-focus:            solid 1px #C5A059;
  --primary-color:           #C5A059;
  --primary-color-onhover:   #9A7B3E;
  --primary-soft:            #F3F0EB;
  --primary-soft-onhover:    #E2DCD2;

  /* ── Bootstrap 5 overrides ───────────────────────────────── */
  --bs-primary:       #C5A059;
  --bs-primary-rgb:   197, 160, 89;
  --bs-body-bg:       #FBFAF8;
  --bs-body-color:    #14110F;
  --bs-border-color:  #E2DCD2;
  --bs-link-color:    #9A7B3E;
  --bs-link-hover-color: #14110F;

  --bs-font-sans-serif: 'Jost', system-ui, -apple-system, sans-serif;
  --bs-body-font-family: 'Jost', system-ui, sans-serif;
  --bs-body-font-size: 0.9375rem;
  --bs-body-line-height: 1.6;

  /* Radius: near-zero. Rounded product cards read as marketplace;
     square corners read as gallery. Radius is reserved for things
     you click, so roundness means "interactive". */
  --bs-border-radius:    2px;
  --bs-border-radius-sm: 2px;
  --bs-border-radius-lg: 2px;
}

/* ═══ TYPOGRAPHY ═══════════════════════════════════════════════
   Cormorant Garamond for display, Jost for everything functional.
   Cormorant over Playfair: Playfair's stroke contrast turns muddy
   at the ~15px a product grid needs. Cormorant holds its shape. */

body {
  background: var(--nila-porcelain);
  color: var(--nila-ink);
  font-family: 'Jost', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, .display-title,
.section-title, .product-title, .card-title {
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--nila-ink);
}

h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.12; }
h2 { font-size: clamp(1.5rem, 3vw, 2.125rem); line-height: 1.18; }
h3 { font-size: 1.375rem; }

/* THE SIGNATURE — wide-tracked uppercase spec text.
   Used for plating ("3 MICRON · 925 SILVER"), eyebrows and labels.
   This is the one thing NILA can say that a gold-plated
   fast-fashion brand cannot, so it gets its own type style. */
.nila-spec,
.product-plating,
.section-eyebrow {
  font-family: 'Jost', sans-serif;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--nila-patina);
  line-height: 1.4;
}

/* Prices use tabular figures so a column of prices lines up. */
.price, .product-price, .amount, .cart-total {
  font-family: 'Jost', sans-serif;
  font-weight: 500;
  font-feature-settings: 'tnum' 1;
  letter-spacing: 0.02em;
  color: var(--nila-ink);
}
.price-strike, .old-price, del {
  color: var(--nila-patina);
  font-weight: 400;
  text-decoration: line-through;
}

/* ═══ BUTTONS ═════════════════════════════════════════════════
   Primary is INK, not gold. Gold-on-gold at button size fails
   contrast and cheapens the metal — gold works as an accent, a
   hairline, a hover. Ink buttons let the product photography be
   the only colour on the page. */

.btn {
  font-family: 'Jost', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  border-radius: 2px;
  padding: 0.85rem 1.75rem;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

.btn-primary {
  background-color: var(--nila-ink);
  border-color: var(--nila-ink);
  color: #fff;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background-color: #2A2320 !important;
  border-color: #2A2320 !important;
  color: #fff !important;
}

.btn-outline-primary {
  --bs-btn-color: var(--nila-ink);
  --bs-btn-border-color: var(--nila-ink);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--nila-ink);
  --bs-btn-hover-border-color: var(--nila-ink);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--nila-ink);
  --bs-btn-active-border-color: var(--nila-ink);
  --bs-btn-disabled-color: var(--nila-patina);
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: var(--nila-rule);
  --bs-gradient: none;
}

/* Gold reserved for the one gesture that should feel like metal. */
.btn-gold {
  background: var(--nila-gold);
  border-color: var(--nila-gold);
  color: #fff;
}
.btn-gold:hover { background: var(--nila-gold-deep); border-color: var(--nila-gold-deep); }

/* Text link with a gold rule under it, instead of a filled pill.
   Restraint reads premium; a bright button over a photograph
   does not. */
.btn-quiet {
  background: none; border: 0; padding: 0 0 4px;
  color: var(--nila-ink);
  border-bottom: 1px solid var(--nila-gold);
  border-radius: 0;
}

/* ═══ PRODUCT CARD ════════════════════════════════════════════ */

.product-card, .product-item, .card.product {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none !important;
}
.product-card img, .product-item img, .product-thumb img {
  border-radius: 0;
  aspect-ratio: 3 / 4;      /* portrait — jewellery is a vertical object */
  object-fit: cover;
  background: var(--nila-shell);
  transition: transform .5s cubic-bezier(.22,.61,.36,1);
}
.product-card:hover img, .product-item:hover img { transform: scale(1.035); }

.product-card .product-name, .product-item .product-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--nila-ink);
  margin: 0.65rem 0 0.2rem;
}

/* Offer tag — printed label, no rounding, no gradient. */
.product-badge, .badge-offer, .discount-badge {
  background: var(--nila-ink);
  color: #fff;
  border-radius: 0;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 0.3rem 0.55rem;
}
.badge-low-stock { background: var(--nila-signal); }

/* ═══ SURFACES ════════════════════════════════════════════════ */

.card, .panel, .box {
  background: #fff;
  border: 1px solid var(--nila-rule);
  border-radius: 2px;
  box-shadow: none;
}
.bg-light, .bg-soft { background: var(--nila-shell) !important; }
hr, .divider { border-color: var(--nila-rule); opacity: 1; }

/* The one recurring ornament: a hairline with a gold centre.
   Echoes the metal without printing gold across the page. */
.nila-rule {
  display: flex; align-items: center; gap: .5rem;
  margin: 2.5rem 0 1.5rem;
}
.nila-rule::before, .nila-rule::after {
  content: ''; flex: 1; height: 1px; background: var(--nila-rule);
}
.nila-rule span { width: 44px; height: 1px; background: var(--nila-gold); }

/* ═══ FORMS ═══════════════════════════════════════════════════ */

.form-control, .form-select, .input-group-text {
  background: var(--nila-shell);
  border: 1px solid var(--nila-rule);
  border-radius: 2px;
  color: var(--nila-ink);
  font-family: 'Jost', sans-serif;
  padding: 0.75rem 1rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--nila-gold);
  box-shadow: 0 0 0 1px rgba(197,160,89,.25);
  background: #fff;
}
.form-control::placeholder { color: var(--nila-patina); }
.form-label {
  font-size: 0.6875rem; font-weight: 500;
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--nila-patina);
}

/* ═══ NAV ═════════════════════════════════════════════════════ */

.navbar, .header, .site-header {
  background: var(--nila-porcelain) !important;
  border-bottom: 1px solid var(--nila-rule);
  box-shadow: none !important;
}
.navbar-brand {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  letter-spacing: 0.32em;   /* wide tracking is what reads as jewellery */
  text-transform: uppercase;
  color: var(--nila-ink) !important;
}
.nav-link, .menu-item a {
  font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.11em; text-transform: uppercase;
  color: var(--nila-ink) !important;
}
.nav-link:hover, .nav-link.active { color: var(--nila-gold-deep) !important; }

.footer, footer {
  background: var(--nila-ink);
  color: rgba(255,255,255,.75);
  border-top: 3px solid var(--nila-gold);
}
.footer a, footer a { color: rgba(255,255,255,.75); }
.footer a:hover, footer a:hover { color: var(--nila-gold); }

/* ═══ HERO ════════════════════════════════════════════════════
   Scrim across the lower third only. A full-image overlay
   flattens the photograph, which is the thing you paid for. */

.hero-slide, .banner-slide { position: relative; border-radius: 0; }
.hero-slide::after, .banner-slide::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,.6));
  pointer-events: none;
}
.hero-content, .banner-content { position: relative; z-index: 2; }
.hero-content h1, .banner-content h1 {
  color: #fff;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
}

/* ═══ TRUST STRIP ═════════════════════════════════════════════
   Sits directly under the hero, not in a footer nobody scrolls
   to — the hesitation happens above the fold. */
.nila-trust {
  background: var(--nila-shell);
  padding: 1.75rem 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem; text-align: center;
}
.nila-trust i { font-size: 1.25rem; color: var(--nila-gold-deep); }
.nila-trust span {
  display: block; margin-top: .5rem;
  font-size: 0.625rem; font-weight: 500;
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--nila-patina);
}

/* ═══ FEEDBACK ════════════════════════════════════════════════ */
.alert-success { background: #EDF2EF; border-color: var(--nila-verdigris); color: #2F4A3E; }
.alert-danger  { background: #FAEEEB; border-color: var(--nila-signal); color: #8A3320; }
.text-primary  { color: var(--nila-gold-deep) !important; }
.badge.bg-primary { background: var(--nila-ink) !important; }

/* ═══ ACCESSIBILITY FLOOR ═════════════════════════════════════
   Not optional. Gold on porcelain is a 2.4:1 contrast ratio, so
   gold is never used for body copy — only gold-deep, and only
   above 14px. Focus must stay visible for keyboard checkout. */
:focus-visible {
  outline: 2px solid var(--nila-gold-deep);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ═══ OUT OF STOCK ════════════════════════════════════════════
   A sold-out product should read as sold out before the customer
   reaches the button. Desaturating rather than hiding keeps the
   piece browsable — people still want to see it, and it is where
   a "notify me" capture belongs. */

.nila-soldout-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  background: var(--nila-ink, #14110F);
  color: #fff;
  font-size: .625rem;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
  padding: .28rem .55rem;
  border-radius: 0;
}

.product-card:has(.nila-soldout-badge) img,
.grid-card-container:has(.nila-soldout-badge) img {
  filter: grayscale(.55);
  opacity: .72;
}

.btn.disabled,
.btn:disabled {
  opacity: 1;
  pointer-events: none;
}

/* ═══ WORDMARK ═══════════════════════════════════════════════
   Drawn as SVG rather than shipped as an image. currentColor means
   it inherits the header's text colour, so it works on cream, on
   ink, and on anything else without a second file. */
.nila-wordmark {
  display: inline-block;
  color: var(--nila-ink, #14110F);
  line-height: 0;
}
.nila-wordmark svg { display: block; height: auto; }
.nila-wordmark:hover { color: var(--nila-gold-dp, #9A7B3E); }

/* Any raster logo that IS uploaded should never show a white card
   on a tinted header. */
.company-logo img.brand-logo-link {
  max-height: 46px; width: auto; mix-blend-mode: multiply;
}

@media (max-width: 767px) {
  .nila-wordmark svg { width: 104px; }
}

/* ═══ MOBILE-FIRST FIXES ═════════════════════════════════════
   Everything below was found on a real phone viewport, not guessed. */

/* PROMO BAR — the text had no horizontal padding, so on a phone the
   first and last characters sat outside the viewport and were clipped. */
.promo-nav { padding: .6rem 1rem; }
.promo-nav-text {
  margin: 0;
  padding: 0 .25rem;
  font-size: .8125rem;
  line-height: 1.5;
  text-align: center;
  overflow-wrap: break-word;
}
@media (max-width: 767px) {
  .promo-nav-text { font-size: .75rem; }
}

/* FOOTER CONTACT — "Find Us / Call Us / Mail Us" were laid out as a
   desktop row, so on a phone they collided and left a large void.
   Stacked, left-aligned, with a hairline between each. */
@media (max-width: 767px) {
  .footer-contact-row,
  footer .row:first-of-type > [class*="col-"] {
    margin-bottom: 1.25rem;
  }
  footer .find-us, footer .call-us, footer .mail-us { text-align: left; }
}

/* FOOTER LOGO — was rendering at a fraction of its box. */
.footer-logo .nila-wordmark svg,
.footer-logo img { max-width: 168px; height: auto; }
@media (max-width: 767px) {
  .footer-logo .nila-wordmark svg,
  .footer-logo img { max-width: 148px; }
}

/* FOOTER LINK COLUMNS — "Grievance Redressal" was wrapping onto two
   lines and reading as two separate links. */
footer a { overflow-wrap: break-word; }
footer .footer-links a,
footer ul li a { display: inline-block; line-height: 1.5; }

/* Nothing on a phone should be able to scroll sideways. A single
   overflowing element makes the whole page feel broken. */
html, body { overflow-x: hidden; max-width: 100%; }
img, picture, video, table { max-width: 100%; }

/* Tap targets. 44px is the accessibility floor; several footer and
   menu links were well under it. */
@media (max-width: 767px) {
  footer a, .menu-list a, .navbar-nav .nav-link { padding-top: .35rem; padding-bottom: .35rem; }
}

/* ═══ BULK CART REMOVAL ══════════════════════════════════════ */
.nila-bulk-cell { width: 34px; text-align: center; vertical-align: middle; }
.nila-bulk-check, #nila-bulk-all {
  width: 17px; height: 17px; cursor: pointer;
  accent-color: #C5A059;
}
.nila-bulk-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .7rem 1rem; margin-bottom: .75rem;
  background: #14110F; color: #fff; border-radius: 4px;
  font-size: .8125rem; letter-spacing: .04em;
}
.nila-bulk-btn {
  background: transparent; color: #C5A059;
  border: 1px solid #C5A059; border-radius: 3px;
  padding: .35rem .9rem; font-size: .6875rem;
  letter-spacing: .14em; text-transform: uppercase;
  cursor: pointer; transition: background .2s, color .2s;
}
.nila-bulk-btn:hover:not(:disabled) { background: #C5A059; color: #14110F; }
.nila-bulk-btn:disabled { opacity: .55; cursor: not-allowed; }
@media (max-width: 767px) {
  .nila-bulk-bar { font-size: .75rem; padding: .6rem .75rem; }
  .nila-bulk-cell { width: 30px; }
}

/* ═══ WALLET ══════════════════════════════════════════════════
   The vendor card is a hardcoded purple-to-blue gradient
   (rgb(61,0,85) -> rgb(68,0,255)) in custom.css, which nothing in the
   theme touched. On a cream and gold storefront it looks like a
   different website.

   Overridden here rather than edited in custom.css, so a vendor update
   cannot quietly bring the purple back. */
.wallet-card {
  background: #14110F !important;
  border: 1px solid rgba(197, 160, 89, .3);
  border-radius: 4px !important;
  position: relative;
  overflow: hidden;
}
/* A single hairline of gold, rather than a gradient wash. */
.wallet-card::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: #C5A059;
}
.wallet-text { color: rgba(255, 255, 255, .6) !important;
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.wallet-amount {
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-weight: 300 !important; color: #fff !important;
  font-variant-numeric: tabular-nums lining-nums;
}
.wallet-currency { color: #C5A059 !important; letter-spacing: .12em; font-size: .8rem; }
.wallet-user-name {
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  color: #fff !important; letter-spacing: .04em;
}

/* "Add Money" was Bootstrap's default blue. */
.wallet-card + a.btn, .wallet-card ~ .btn-primary,
a[data-bs-target="#add_money"], #add_money_btn {
  background: #14110F !important; border-color: #14110F !important;
  color: #fff !important; border-radius: 3px !important;
  font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase;
}
