/* =============================================================================
   Bombay Stores — theme compatibility layer
   -----------------------------------------------------------------------------
   Replaces the old Fabric Giant global stylesheet (styles.css, deleted).
   bombay-theme.css is the real theme; this file only bridges the handful of
   Fabric-Giant-era class names and CSS custom properties that individual view
   `@section head` blocks and inline styles still reference, mapped onto the
   Bombay palette. Loaded BEFORE bombay-theme.css so the theme always wins.
   ========================================================================== */

:root {
  /* Fabric-Giant token names kept alive for un-migrated inline `var(--…)` refs.
     Values are the Bombay theme palette (see bombay-theme.css :root). */
  --bg:           #FCFAF5;
  --bg-subtle:    #F6F2E7;
  --bg-warm:      #EFE9DA;
  --dark:         #14120E;
  --dark-mid:     #4E4A3E;
  --mid:          #8C8779;
  --light:        #C9C2AF;
  --gold-light:   #C3B075;
  --gold-dark:    #6E6028;
  --accent:       #A3322B;
  --accent-light: #C24B40;
  --accent-dark:  #7E241E;
  --green:        #3F6D3A;
  --white:        #FFFFFF;
  --red-light:    #F1E1DC;

  --shadow-sm: 0 1px 4px rgba(20, 18, 14, 0.08);
  --shadow-md: 0 4px 16px rgba(20, 18, 14, 0.12);
  --shadow-lg: 0 12px 40px rgba(20, 18, 14, 0.16);

  /* Theme is square — flatten the old radii so un-migrated components follow suit. */
  --radius-sm: 0;
  --radius-md: 0;
  --radius-lg: 0;

  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans:  'DM Sans', system-ui, -apple-system, sans-serif;
  --transition: 0.22s ease;
  --max-w:      1320px;
  --gutter:     24px;

  /* Overlay stacking order (drawers, modals, search overlay reference these). */
  --z-quick-bar:       990;
  --z-mega-menu:       999;
  --z-header:         1000;
  --z-filter-drawer:  1050;
  --z-drawer:         1100;
  --z-menu:           1200;
  --z-assistant:      1250;
  --z-tabbar:         1300;
  --z-modal:          1360;
  --z-search-overlay: 2000;
}
@media (max-width: 768px) { :root { --gutter: 12px; } }

/* ── Page container ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }

/* ── Section headings (error pages, PDP related sections) ── */
.section       { padding: 64px 0; }
.section-sm    { padding: 44px 0; }
.section-title {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 500;
  color: var(--ink, #14120E);
}
.section-subtitle { font-size: 0.92rem; color: var(--mid); margin-top: 6px; }
.section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 32px;
}
@media (max-width: 768px) {
  .section-header { flex-direction: column; align-items: flex-start; gap: 8px; }
}

.view-all {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; white-space: nowrap;
  padding: 11px 20px; border: 1px solid var(--ink, #14120E);
  background: transparent; color: var(--ink, #14120E);
  transition: background var(--transition), color var(--transition);
}
.view-all:hover { background: var(--ink, #14120E); color: #fff; }
.view-all--bottom { display: none; }
@media (max-width: 768px) {
  .view-all--bottom { display: flex !important; margin: 24px auto 0; width: fit-content; }
}

/* ── Buttons — Fabric Giant modifiers mapped onto the theme's ink/gold look.
   bombay-theme.css owns `.btn` itself plus `.btn-gold/.btn-ink/.btn-line/…`. ── */
.btn-primary {
  background: var(--ink, #14120E); color: #fff; border-color: var(--ink, #14120E);
}
.btn-primary:hover { background: var(--gold, #8B7A35); border-color: var(--gold, #8B7A35); color: #fff; }
.btn-outline {
  background: transparent; color: var(--ink, #14120E); border-color: var(--line2, #D7CEB9);
}
.btn-outline:hover { border-color: var(--ink, #14120E); color: var(--ink, #14120E); }
.btn-outline-white { background: transparent; color: #fff; border-color: rgba(255,255,255,0.6); }
.btn-outline-white:hover { background: #fff; color: var(--ink, #14120E); }
.btn-lg { padding: 16px 40px; font-size: 12px; }
.btn:disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ── Badges (bombay-theme.css defines the base `.badge`) ── */
.badge-sale     { background: var(--red, #A3322B); color: #fff; }
.badge-new      { background: var(--green); color: #fff; }
.badge-hot      { background: var(--red, #A3322B); color: #fff; }
.badge-discount { background: var(--ink, #14120E); color: #fff; }

/* ── Placeholder image ── */
.img-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 16px; text-align: center;
  color: var(--gold, #8B7A35); font: 400 0.72rem/1.5 ui-monospace, SFMono-Regular, monospace;
  letter-spacing: 0.04em;
  background: repeating-linear-gradient(0deg, rgba(139,122,53,0.09) 0 1px, transparent 1px 17px), var(--pale, #F6F2E7);
}
.img-placeholder svg { opacity: 0.35; }

/* ── Breadcrumb (Collection / PDP / Wishlist still use `.breadcrumb`) ── */
.breadcrumb { display: flex; gap: 6px; font-size: 0.78rem; letter-spacing: 0.02em; color: var(--mid); }
.breadcrumb a { color: var(--gold, #8B7A35); }
.breadcrumb a:hover { text-decoration: underline; }
@media (max-width: 768px) {
  .breadcrumb {
    flex-wrap: nowrap; white-space: nowrap; overflow-x: auto;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .breadcrumb::-webkit-scrollbar { display: none; }
  .breadcrumb > * { flex: 0 0 auto; }
  .breadcrumb > :nth-last-child(-n + 2) { display: none; }
}

/* ── Forms (search bar component, misc) ── */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; margin-bottom: 6px; color: var(--ink, #14120E); }
.form-control, .form-select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line, #E6DFCF);
  border-radius: 0; font-size: 0.9rem; font-family: var(--sans);
  background: #fff; color: var(--ink, #14120E); outline: none;
  transition: border-color var(--transition);
}
.form-control:focus, .form-select:focus { border-color: var(--gold, #8B7A35); }
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
.text-muted { color: var(--mid); }

/* ── jQuery-validation classes (auth pages define their own; this is the fallback) ── */
.field-validation-error { color: var(--red, #A3322B); font-size: 0.78rem; margin-top: 2px; display: block; }
.input-validation-error { border-color: var(--red, #A3322B) !important; }
.validation-summary-errors { color: var(--red, #A3322B); font-size: 0.85rem; margin-bottom: 12px; }
.validation-summary-errors ul { list-style: disc; padding-left: 18px; }

/* ── Product cards (PDP "related" / QuickView / Wishlist still use `.product-card`).
   bombay-theme.css has `.pcard`; this keeps the older BEM markup on-theme. ── */
.products-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px;
}
@media (max-width: 1100px) { .products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }

.product-card {
  background: #fff; border: 1px solid var(--line, #E6DFCF); position: relative;
  transition: border-color var(--transition);
}
.product-card:hover { border-color: var(--gold, #8B7A35); }
.product-card__image {
  position: relative; overflow: hidden; aspect-ratio: 1 / 1; background: #fff;
}
.product-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.product-card:hover .product-card__image img { transform: scale(1.04); }
.products-grid--contain .product-card__image img { object-fit: contain; }
.product-card__actions { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 8px; }
.product-card__action-btn {
  width: 36px; height: 36px; border-radius: 0; background: #fff;
  border: 1px solid var(--line, #E6DFCF); display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ink2, #4E4A3E); font-size: 0.95rem; transition: all var(--transition);
}
.product-card__action-btn:hover, .product-card__action-btn.active { color: var(--red, #A3322B); border-color: var(--red, #A3322B); }
.product-card__badges { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 4px; }
.product-card__quick-add {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--ink, #14120E); color: #fff; border: none; padding: 12px;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  cursor: pointer; transform: translateY(100%); transition: transform var(--transition);
  font-family: var(--sans);
}
.product-card:hover .product-card__quick-add { transform: translateY(0); }
.product-card__info { padding: 16px; }
.product-card__category {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold, #8B7A35); margin-bottom: 4px;
}
.product-card__title {
  font-family: var(--serif); font-size: 1.05rem; font-weight: 500; color: var(--ink, #14120E);
  margin-bottom: 2px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-card__code { font-size: 0.72rem; color: var(--mid); letter-spacing: 0.02em; margin-bottom: 8px; }
.product-card__price { display: flex; align-items: baseline; gap: 8px; line-height: 1; }
.product-card__price-current { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; color: var(--ink, #14120E); }
.product-card__price-original { font-family: var(--serif); font-size: 0.9rem; color: var(--mid); text-decoration: line-through; }
.product-card__price-unit { font-size: 0.66rem; font-weight: 700; color: var(--gold, #8B7A35);
  text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }
.product-card__price-save { font-size: 0.72rem; font-weight: 700; color: var(--green); white-space: nowrap; }
.product-card__low-stock { font-size: 0.72rem; font-weight: 600; color: var(--red, #A3322B); margin-top: 4px; }
.product-card__sold-recently { font-size: 0.72rem; font-weight: 600; color: var(--gold, #8B7A35); margin-top: 4px; }
.product-card__rating { display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.product-card__stars { color: var(--gold, #8B7A35); font-size: 0.78rem; letter-spacing: 1px; }
.product-card__review-count { font-size: 0.75rem; color: var(--mid); }
@media (max-width: 640px) {
  .product-card__info { padding: 10px 10px 12px; }
  .product-card__title { font-size: 0.9rem; }
  .product-card__price { flex-wrap: wrap; gap: 3px 6px; }
  .product-card__price-current { font-size: 1rem; }
}

/* ── Quick-bar (QuickBar view component) — round photo tiles + label ── */
.quick-bar { background: #fff; border-bottom: 1px solid var(--line, #E6DFCF); }
.quick-bar-inner { display: flex; align-items: center; gap: 6px; max-width: var(--max-w); margin: 0 auto;
  padding: 0 calc(var(--gutter) / 2); position: relative; }
.qb-track-outer { overflow: hidden; flex: 1; position: relative; }
/* soft edge fades — toggled by bombay-site.js (.can-left / .can-right) */
.qb-track-outer::before, .qb-track-outer::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40px; z-index: 2;
  pointer-events: none; opacity: 0; transition: opacity 0.2s;
}
.qb-track-outer::before { left: 0; background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0)); }
.qb-track-outer::after  { right: 0; background: linear-gradient(to left, #fff, rgba(255, 255, 255, 0)); }
.qb-track-outer.can-left::before  { opacity: 1; }
.qb-track-outer.can-right::after  { opacity: 1; }

.qb-track { display: flex; gap: 24px; padding: 13px calc(var(--gutter) / 2) 11px;
  overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; }
.qb-track::-webkit-scrollbar { display: none; }

.qtile { flex: 0 0 auto; width: 78px; display: flex; flex-direction: column;
  align-items: center; gap: 8px; text-decoration: none; }
.qtile-img {
  width: 68px; height: 68px; border-radius: 18px; overflow: hidden; position: relative;
  display: block; background: var(--pale2, #EFE9DA); border: 1px solid var(--line, #E6DFCF);
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}
.qtile-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qtile-img.is-mono {
  background: linear-gradient(140deg, var(--pale, #F6F2E7) 0%, var(--pale2, #EFE9DA) 55%, var(--gold3, #C3B075) 165%);
}
.qtile-img.is-mono::after {
  content: attr(data-mono); position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center;
  font-family: var(--serif, 'Cormorant Garamond', Georgia, serif);
  font-size: 25px; font-weight: 600; color: var(--gold-dark, #6E6028);
}
.qtile:hover .qtile-img { border-color: var(--gold, #8B7A35); transform: translateY(-2px); box-shadow: 0 4px 14px rgba(20, 18, 14, 0.1); }
.qtile-label {
  font-size: 11.5px; font-weight: 500; color: var(--ink2, #4E4A3E); text-align: center;
  line-height: 1.3; max-width: 84px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.qtile:hover .qtile-label { color: var(--gold, #8B7A35); }

.qb-scroll-btn {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line, #E6DFCF);
  background: #fff; color: var(--ink2, #4E4A3E); font-size: 15px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.18s;
}
.qb-scroll-btn:hover { background: var(--ink, #14120E); color: #fff; border-color: var(--ink, #14120E); }
.qb-more { display: none; }

@media (max-width: 768px) {
  .quick-bar-inner { gap: 0; padding: 0; }
  .qb-track { gap: 16px; padding: 11px 10px 10px; }
  .qtile { width: 66px; gap: 6px; }
  .qtile-img { width: 56px; height: 56px; border-radius: 15px; }
  .qtile-img.is-mono::after { font-size: 21px; }
  .qtile-label { font-size: 10.5px; max-width: 72px; }
}
@media (max-width: 480px) { .qb-scroll-btn { display: none; } }

/* ── Account pages (Register / Forgot / Reset + confirmations) ──────────────
   Modern card layout: soft canvas, one rounded white card, hairline section
   dividers with a small gold label, inputs with a gold focus ring, one clear
   rounded primary button. Register adds a wider .auth-wrap in its own block. */
body:has(.auth-wrap) { background: var(--pale2, #EFE9DA); }
.auth-wrap { max-width: 620px; margin: 0 auto; padding: 40px 16px 72px; }
.auth-card {
  background: #fff; border: 1px solid var(--line, #E6DFCF); border-radius: 16px;
  box-shadow: 0 1px 3px rgba(20, 18, 14, 0.05), 0 10px 30px rgba(20, 18, 14, 0.04);
  padding: 38px 42px; overflow-x: hidden;
}
@media (max-width: 480px) {
  .auth-wrap { padding: 18px 10px 52px; }
  .auth-card { padding: 24px 18px; border-radius: 14px; }
}
.auth-eyebrow { text-align: center; font-family: var(--sans, sans-serif); font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold, #8B7A35); margin-bottom: 10px; }
.auth-title { font-family: var(--serif, Georgia, serif); font-size: 2rem; font-weight: 500; letter-spacing: -0.01em;
  color: var(--ink, #14120E); margin-bottom: 6px; text-align: center; }
@media (max-width: 480px) { .auth-title { font-size: 1.55rem; } }
.auth-subtitle { text-align: center; color: var(--ink3, #8C8779); font-size: 0.9rem; margin-bottom: 28px; line-height: 1.6; }
.auth-body { text-align: center; color: var(--ink2, #4E4A3E); font-size: 0.92rem; line-height: 1.7; margin-bottom: 22px; }

.auth-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.auth-field label { font-family: var(--sans, sans-serif); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink2, #4E4A3E); }
.auth-field .required { color: var(--red, #A3322B); font-weight: 400; }
.auth-field input, .auth-field select {
  width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid var(--line2, #D7CEB9);
  border-radius: 10px; font-family: var(--sans, sans-serif); font-size: 0.9rem; background: #fff; color: var(--ink, #14120E);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-field input:focus, .auth-field select:focus {
  outline: none; border-color: var(--gold, #8B7A35); box-shadow: 0 0 0 3px rgba(139, 122, 53, 0.16);
}
.auth-field-row { display: flex; gap: 16px; }
.auth-field-row .auth-field { flex: 1; min-width: 0; }
@media (max-width: 520px) { .auth-field-row { flex-direction: column; gap: 0; } }

.auth-fieldset { border: 0; border-top: 1px solid var(--line, #E6DFCF); padding: 22px 0 2px; margin: 8px 0 6px; }
.auth-legend { font-family: var(--sans, sans-serif); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold, #8B7A35); padding: 0; margin-bottom: 14px; }

.auth-check { display: flex; align-items: flex-start; gap: 11px; font-size: 0.84rem; color: var(--ink2, #4E4A3E);
  margin: 4px 0 20px; line-height: 1.55; }
.auth-check input { margin-top: 3px; accent-color: var(--gold, #8B7A35); width: 16px; height: 16px; flex: none; }
.auth-check a { color: var(--gold, #8B7A35); font-weight: 600; }
.auth-hint { font-size: 0.75rem; color: var(--ink3, #8C8779); margin-top: 2px; }
.auth-error { background: #FBEAE7; border: 1px solid var(--red, #A3322B); color: var(--red, #A3322B);
  padding: 11px 14px; border-radius: 10px; font-size: 0.85rem; margin-bottom: 18px; }
.auth-footer { text-align: center; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line, #E6DFCF);
  font-size: 0.86rem; color: var(--ink3, #8C8779); }
.auth-footer a { color: var(--gold, #8B7A35); font-weight: 600; }
.auth-card .field-validation-error { color: var(--red, #A3322B); font-size: 0.78rem; margin-top: 2px; display: block; }
.auth-card .input-validation-error { border-color: var(--red, #A3322B) !important; }

.auth-card .btn-primary {
  width: 100%; justify-content: center; background: var(--gold, #8B7A35); color: #fff;
  border: 1px solid var(--gold, #8B7A35); border-radius: 11px; font-family: var(--sans, sans-serif);
  font-size: 0.9rem; font-weight: 600; letter-spacing: normal; text-transform: none;
  padding: 14px 22px; margin-top: 8px; transition: background 0.15s ease, border-color 0.15s ease;
}
.auth-card .btn-primary:hover { background: var(--gold-dark, #6E6028); border-color: var(--gold-dark, #6E6028); }
.auth-card .btn-outline { background: #fff; color: var(--ink2, #4E4A3E); border: 1px solid var(--line2, #D7CEB9); border-radius: 10px; }
.auth-card .btn-outline:hover { border-color: var(--gold, #8B7A35); color: var(--gold, #8B7A35); }
.auth-card .g-recaptcha { margin-top: 4px; }
