/* ===== Storefront theme — the values below are the default "Heritage" theme (maroon & gold). Another theme chosen under
   Admin > Settings > Theme overrides these variables from a <style> block in _Layout, so keep colours as variables. ===== */

:root {
  --maroon: #7b1e3a;
  --maroon-dark: #5c1329;
  --maroon-darker: #3f0c1c;
  --gold: #c9a227;
  --gold-light: #e8c766;
  --gold-dark: #a3801d;
  --ivory: #fdf8f0;
  --ivory-deep: #f7ecd9;
  --maroon-rgb: 123, 30, 58;
  --gold-rgb: 201, 162, 39;
  --maroon-tint: #fbf1f4;
  --maroon-tint-2: #f6e9ee;
  --maroon-line: #ecd0da;

  --radius: 0.9rem;
  --radius-sm: 0.6rem;
  --radius-lg: 1.25rem;

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Mulish', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-brand: 'Alex Brush', cursive;
}

html {
  font-size: 15px;
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0;
  font-family: var(--font-body);
  background-color: var(--ivory);
  color: #3a2a2a;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#pageContentArea {
  flex: 1 0 auto;
}

body > footer {
  flex-shrink: 0;
}

h1, h2, h3, h4, h5, h6,
.font-display {
  font-family: var(--font-display);
}

.font-brand {
  font-family: var(--font-brand);
  font-size: 2rem;
  line-height: 1;
}

a {
  color: var(--maroon);
}

a:hover {
  color: var(--maroon-dark);
}

/* ===== Brand surfaces ===== */

.bg-maroon {
  background-color: var(--maroon) !important;
}

.hero-banner {
  background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.1) 60%, rgba(0, 0, 0, 0) 100%), var(--hero-image, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-tagline {
  font-family: 'Montserrat', var(--font-body), sans-serif;
  font-weight: 300;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background-image: linear-gradient(100deg, var(--gold-dark) 15%, var(--gold-light) 35%, #fff6df 50%, var(--gold-light) 65%, var(--gold-dark) 85%);
  background-size: 220% auto;
  background-position: 0 center;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--gold-light) !important;
  text-shadow: 0 1px 16px rgba(232, 199, 102, 0.55);
  animation: heroTaglineShine 6s ease-in-out infinite;
}

.hero-tagline-sep {
  color: var(--gold-light);
  opacity: 0.8;
  margin: 0 0.15em;
  -webkit-text-fill-color: var(--gold-light);
}

@keyframes heroTaglineShine {
  0% { background-position: 0 center; }
  50% { background-position: -160% center; }
  100% { background-position: 0 center; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-tagline {
    animation: none;
  }
}

.category-nav-bar {
  background-color: var(--ivory-deep) !important;
}

header.sticky-top {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.category-nav .nav-link {
  color: var(--maroon-dark) !important;
  font-weight: 600;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.2s ease;
}

.category-nav .nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--gold-dark);
  transition: width 0.25s ease;
}

.category-nav .nav-link:hover {
  color: var(--gold-dark) !important;
}

.category-nav .nav-link:hover::after {
  width: 100%;
}

.category-nav .nav-link-festive {
  color: var(--gold-dark) !important;
}

.category-nav .nav-link-festive:hover {
  color: var(--maroon-dark) !important;
}

.category-nav .nav-link-festive::after {
  background-color: var(--maroon-dark);
}

.category-tile {
  transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  border: 1px solid rgba(var(--maroon-rgb), 0.1);
}

.category-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.5rem 1rem rgba(var(--maroon-rgb), 0.15) !important;
}

/* ===== Buttons ===== */

.btn {
  border-radius: var(--radius-sm);
}

.btn-primary {
  background-color: var(--maroon);
  border-color: var(--maroon);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--maroon-dark) !important;
  border-color: var(--maroon-dark) !important;
}

.btn-outline-primary {
  color: var(--maroon);
  border-color: var(--maroon);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background-color: var(--maroon) !important;
  border-color: var(--maroon) !important;
}

.btn-gold {
  background-color: var(--gold);
  border-color: var(--gold);
  color: #3a2408;
  font-weight: 700;
}

.btn-gold:hover,
.btn-gold:focus {
  background-color: var(--gold-dark);
  border-color: var(--gold-dark);
  color: #241503;
}

.btn-link {
  color: var(--maroon);
}

.text-primary {
  color: var(--maroon) !important;
}

.bg-primary {
  background-color: var(--maroon) !important;
}

.border-primary {
  border-color: var(--maroon) !important;
}

/* ===== Rounded corners, everywhere ===== */

.card,
.alert,
.modal-content,
.dropdown-menu,
.list-group,
.toast,
.accordion-item,
.input-group,
.table-responsive,
.hero-banner,
.admin-sidebar,
.kpi-card {
  border-radius: var(--radius) !important;
}

.card-img-top {
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}

.form-control,
.form-select,
.form-check-input,
select,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="password"],
input[type="date"],
textarea {
  border-radius: var(--radius-sm) !important;
}

.form-check-input {
  border-radius: 0.3em !important;
}

.btn-close,
.page-link,
.badge:not(.rounded-pill),
img:not(.card-img-top),
.thumb-image {
  border-radius: var(--radius-sm);
}

.list-group-item:first-child {
  border-top-left-radius: var(--radius) !important;
  border-top-right-radius: var(--radius) !important;
}

.list-group-item:last-child {
  border-bottom-left-radius: var(--radius) !important;
  border-bottom-right-radius: var(--radius) !important;
}

.table-responsive table {
  margin-bottom: 0;
}

/* ===== Links, focus states, pagination, badges ===== */

.form-control:focus,
.form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 0.2rem rgba(var(--gold-rgb), 0.25);
}

.page-item.active .page-link {
  background-color: var(--maroon);
  border-color: var(--maroon);
}

.page-link {
  color: var(--maroon);
}

.dropdown-item.active,
.dropdown-item:active {
  background-color: var(--maroon);
}

.nav-pills .nav-link.active {
  background-color: var(--maroon);
}

.list-group-item.active {
  background-color: var(--maroon);
  border-color: var(--maroon);
}

.nav-tabs .nav-link.active {
  color: var(--maroon);
  border-color: #dee2e6 #dee2e6 #fff;
  font-weight: 600;
}

/* ===== Product cards ===== */

.product-card {
  transition: box-shadow 0.15s ease-in-out, transform 0.15s ease-in-out;
  height: 100%;
}

.product-card:hover {
  box-shadow: 0 0.5rem 1rem rgba(var(--maroon-rgb), 0.15);
  transform: translateY(-2px);
}

.product-card .card-img-top {
  height: 200px;
  object-fit: contain;
  background: var(--ivory-deep);
  padding: 1rem;
}

.price-strike {
  text-decoration: line-through;
  color: #6c757d;
  font-size: 0.9em;
}

.price-effective {
  font-weight: 700;
  font-size: 1.15em;
  color: var(--maroon);
}

.added-to-cart-panel {
  position: fixed;
  top: calc(var(--header-height, 90px) + 0.5rem);
  right: 1rem;
  width: 340px;
  max-width: calc(100vw - 2rem);
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius);
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.2);
  padding: 1rem;
  z-index: 1090;
  transform: translateX(120%);
  transition: transform 0.25s ease-out;
}

.added-to-cart-panel.show {
  transform: translateX(0);
}

.added-to-cart-body {
  display: flex;
  gap: 0.75rem;
}

.added-to-cart-body img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: var(--ivory-deep);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

header.sticky-top {
  z-index: 1035;
}

.cart-sidebar {
  position: fixed;
  top: calc(var(--header-height, 90px) + 0.5rem);
  right: 1rem;
  width: 280px;
  z-index: 1030;
}

.cart-sidebar-box {
  max-height: calc(100vh - var(--header-height, 90px) - 1.5rem);
  overflow-y: auto;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius);
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.12);
  padding: 1rem;
}

.cart-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.cart-sidebar-items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.cart-sidebar-item {
  display: flex;
  gap: 0.6rem;
}

.cart-sidebar-item img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: var(--ivory-deep);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.cart-sidebar-summary {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 0.5rem 0;
  margin-bottom: 0.75rem;
}

@media (min-width: 992px) {
  .page-content-area.container,
  .page-content-area.container-fluid {
    max-width: calc(100% - 310px);
    margin-right: 310px;
    margin-left: auto;
  }
}

@media (max-width: 991.98px) {
  .cart-sidebar {
    display: none !important;
  }
}

.mobile-cart-fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--maroon);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.3);
  z-index: 1045;
  text-decoration: none;
}

.mobile-cart-fab:hover,
.mobile-cart-fab:focus {
  color: #fff;
  background: var(--maroon-dark);
}

.mobile-cart-fab-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  font-size: 0.7rem;
}

.badge-discount {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background-color: var(--gold) !important;
  color: #3a2408;
}

.star-rating {
  color: var(--gold-dark);
}

.variant-swatch-dot {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 0 0 1px #fff inset;
}

.variant-swatch-row {
  min-height: 20px;
}

/* ===== Admin ===== */

.admin-sidebar {
  min-height: calc(100vh - 56px);
  background: var(--maroon-darker);
}

.js-category-row.dragging {
  opacity: 0.4;
}

.js-category-row {
  transition: background-color 0.1s ease-in-out;
}

.admin-sidebar .nav-link {
  color: #e8cfd6;
}

.admin-sidebar .nav-link.active,
.admin-sidebar .nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
}

.kpi-card {
  border-left: 4px solid var(--gold);
}

.order-status-badge {
  font-size: 0.85em;
}

.filter-sidebar .form-check-label {
  cursor: pointer;
}

.filter-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  color: inherit;
  font-weight: 600;
  text-decoration: none;
}

.filter-toggle:hover {
  color: var(--maroon);
}

.filter-toggle .bi-chevron-down {
  transition: transform 0.2s ease-in-out;
}

.filter-toggle:not(.collapsed) .bi-chevron-down {
  transform: rotate(180deg);
}

footer a {
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* ===== Product listing: grid / carousel view toggle ===== */

.view-toggle.active {
  background-color: var(--maroon);
  border-color: var(--maroon);
  color: #fff;
}

.product-view .carousel-item {
  padding-bottom: 0.25rem;
}

.carousel-control-prev,
.carousel-control-next {
  width: 3rem;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  height: 3rem;
  opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-color: var(--maroon);
  border-radius: 50%;
  padding: 1.4rem;
  background-size: 1.1rem;
}

.carousel-control-prev-icon:hover,
.carousel-control-next-icon:hover {
  background-color: var(--maroon-dark);
}

/* Single, larger item per carousel slide */
.carousel-single .card-img-top {
  height: 420px;
}

.carousel-single .card-body {
  padding: 1.5rem;
}

.carousel-single .card-title,
.carousel-single h6 {
  font-size: 1.3rem;
}

/* Reserve a fixed 2-line height for the title so slide/card height never jumps
   when one product's name wraps to a second line and another's doesn't. */
.carousel-single .card-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.7rem;
  height: 3.4rem;
  margin-bottom: 0.25rem;
}

.carousel-single .card {
  height: 100%;
}

.carousel-single .carousel-item {
  min-height: 620px;
}

.carousel-single .price-effective {
  font-size: 1.6em;
}

.carousel-single .price-strike {
  font-size: 1.1em;
}

.carousel-indicators-light [data-bs-target] {
  background-color: var(--maroon);
  opacity: 0.35;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  border: none;
}

.zoom-container {
  position: relative;
}

.zoom-container #mainImage {
  cursor: crosshair;
}

.img-zoom-lens {
  position: absolute;
  pointer-events: none;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(0, 0, 0, 0.3);
  background-color: rgba(255, 255, 255, 0.35);
  display: none;
}

.img-zoom-result {
  position: absolute;
  top: 0;
  left: 100%;
  margin-left: 20px;
  width: 420px;
  height: 420px;
  background-color: #fff;
  background-repeat: no-repeat;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  z-index: 1040;
  display: none;
}

@media (max-width: 991.98px) {
  .img-zoom-lens,
  .img-zoom-result {
    display: none !important;
  }

  .zoom-container #mainImage {
    cursor: default;
  }
}

.carousel-indicators-light [data-bs-target].active {
  opacity: 1;
  background-color: var(--gold);
}


/* ---------- Busy buttons (see setBusy in site.js) ---------- */
.btn-busy {
    pointer-events: none;
    opacity: .75;
    cursor: progress;
}
.btn-busy .btn-busy-spinner {
    margin-right: .4rem;
}
/* The spinner takes the icon's place, which also keeps narrow icon-only buttons (e.g. search) on one line. */
.btn-busy > i.bi {
    display: none;
}


/* WhatsApp floating chat button (left side — the cart button lives on the right) */
.whatsapp-fab {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.3);
  z-index: 1045;
  text-decoration: none;
}
.whatsapp-fab:hover,
.whatsapp-fab:focus {
  color: #fff;
  background: #1ebe5b;
}

/* Customer order progress */
.order-stepper {
  display: flex;
  align-items: flex-start;
}
.order-step {
  flex: 1 1 0;
  text-align: center;
  position: relative;
  color: #8a7f83;
}
.order-step::before {
  content: "";
  position: absolute;
  top: 13px;
  left: -50%;
  width: 100%;
  height: 3px;
  background: #d9d0d3;
  z-index: 0;
}
.order-step:first-child::before { display: none; }
.order-step.done::before,
.order-step.current::before { background: #2e7d4f; }
.order-step-dot {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  margin: 0 auto 4px;
  background: #d9d0d3;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}
.order-step.done .order-step-dot,
.order-step.current .order-step-dot { background: #2e7d4f; }
.order-step.current .order-step-label { font-weight: 700; color: #2e7d4f; }
.order-step-label { font-size: 0.78rem; }

/* Count badge on the storefront category list */
.bg-maroon { background-color: var(--maroon, #7b1e3a) !important; }

/* Call floating button: sits just above the WhatsApp button (left side) */
.call-fab {
  position: fixed;
  left: 1rem;
  bottom: 4.6rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--maroon);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.3);
  z-index: 1045;
  text-decoration: none;
}
.call-fab:hover,
.call-fab:focus {
  color: #fff;
  background: var(--maroon-dark);
}

/* ===== Phone & small-screen polish ===== */

.min-w-0 { min-width: 0; }

/* Tables that turn into stacked cards on phones (cart lines, order list) */
@media (max-width: 767.98px) {
  .table-stack,
  .table-stack tbody { display: block; width: 100%; }
  .table-stack thead { display: none; }
  .table-stack > :not(caption) > * > * { box-shadow: none; background: none; border: 0; padding: 0; width: auto !important; }
  .table-stack tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem 0.75rem;
    align-items: center;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
  }

  /* cart: product + remove on top, quantity + line total underneath */
  .cart-table tr {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "product remove" "qty total";
  }
  .cart-table .cl-product { grid-area: product; }
  .cart-table .cl-remove { grid-area: remove; align-self: start; }
  .cart-table .cl-qty { grid-area: qty; }
  .cart-table .cl-total { grid-area: total; text-align: right; font-size: 1.05rem; }

  /* order list: small labelled facts in two columns, buttons along the bottom */
  .table-stack-labels tr { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
  .table-stack-labels td:first-child { grid-column: 1 / -1; font-size: 1.05rem; }
  .table-stack-labels td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #8a7f83;
  }
  .table-stack-labels .ts-actions { grid-column: 1 / -1; display: flex; gap: 0.5rem; flex-wrap: wrap; }
  .table-stack-labels .ts-actions form { flex: 1 1 auto; }
  .table-stack-labels .ts-actions .btn { width: 100%; }
  .table-stack-labels .ts-actions > a.btn { flex: 1 1 auto; width: auto; }
}

@media (max-width: 767.98px) {
  /* home hero: the desktop padding left too little room for the words */
  .hero-banner { padding: 1.5rem 1.25rem !important; }
  /* the saree's bright zari runs behind the words on a narrow screen, so darken the whole picture a little */
  .hero-banner { background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.3) 100%), var(--hero-image, none); }
  .hero-banner .container-fluid { padding: 0; }
  .hero-banner h1 { font-size: 1.75rem; }
  .hero-banner .hero-tagline { font-size: 0.85rem; letter-spacing: 0.06em; }
  .hero-banner .btn-lg { padding: 0.6rem 1.25rem; font-size: 1rem; }

  /* floating buttons: smaller, tucked into the corners, and the footer leaves room beneath them */
  .whatsapp-fab, .call-fab, .mobile-cart-fab { width: 46px; height: 46px; font-size: 1.25rem; }
  .whatsapp-fab { left: 0.75rem; bottom: 0.75rem; }
  .call-fab { left: 0.75rem; bottom: 3.6rem; }
  .mobile-cart-fab { right: 0.75rem; bottom: 0.75rem; }
  body > footer { padding-bottom: 6.5rem !important; }

  .product-card .card-img-top { height: 170px; padding: 0.75rem; }
  .carousel-single .card-img-top { height: 320px; }
  .carousel-single .carousel-item { min-height: 0; }

  /* order progress: six steps have to fit in a phone width */
  .order-step-label { font-size: 0.66rem; line-height: 1.15; }
  .order-step-dot { width: 24px; height: 24px; font-size: 0.75rem; }
  .order-step::before { top: 11px; }
}

/* Header menu on phones/tablets: Wholesale on its own line, then Cart + account links side by side */
@media (max-width: 991.98px) {
  .nav-actions { gap: 0.25rem 0; padding-bottom: 0.5rem; }
  .nav-actions > .nav-link { flex: 1 0 100%; padding: 0.5rem 0; }
  .nav-actions .navbar-nav .nav-link { padding: 0.5rem 0.5rem; }
  #mainNav .btn-outline-light { white-space: nowrap; }
}

/* Uploaded store logo in the header (replaces the text brand) */
.brand-logo {
  display: block;
  max-height: 42px;
  max-width: 220px;
  width: auto;
  height: auto;
}
