/* =========================================================
   Grace by Naseem — CORE STYLESHEET
   Premium mobile-first fashion e-commerce styling
========================================================= */
:root {
  --maroon: #3a0d10;
  --maroon-dark: #2a0709;
  --gold: #b08d57;
  --text-dark: #1a1a1a;
  --text-muted: #6b6b6b;
  --border-light: #e8e6e2;
  --bg-cream: #f7f5f1;
  --white: #ffffff;
  --radius-sm: 3px;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------------- Announcement bar ---------------- */
.announcement-bar {
  background: var(--maroon);
  color: var(--white);
  font-size: 12px;
  letter-spacing: .04em;
  padding: 8px 0;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}
.announcement-track {
  display: inline-flex;
  animation: announcement-scroll 18s linear infinite;
}
.announcement-track span {
  padding: 0 40px;
  display: inline-block;
}
@keyframes announcement-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .announcement-track { animation: none; }
}

/* ---------------- Header ---------------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-header .header-left,
.site-header .header-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
}
.site-header .header-right { justify-content: flex-end; }
.site-header .logo {
  font-family: var(--font-serif);
  font-size: 26px;
  letter-spacing: .12em;
  text-align: center;
  flex: 0 0 auto;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: inherit;
  text-decoration: none;
}
.site-header .logo-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-header .logo-flower {
  width: 26px;
  height: 26px;
  color: var(--gold);
  flex: 0 0 auto;
}
.site-header .logo-text {
  line-height: 1;
}
.site-header .logo-tagline {
  font-family: var(--font-sans);
  font-style: italic;
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--text-muted);
  white-space: nowrap;
}
.site-header .logo-image {
  max-height: 72px;
  max-width: 260px;
  width: auto;
  object-fit: contain;
}
.icon-btn {
  background: none;
  border: none;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: var(--text-dark);
}
.icon-btn svg { width: 22px; height: 22px; }
.cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--maroon);
  color: #fff;
  font-size: 10px;
  min-width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* ---------------- Side drawer menu ---------------- */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 90; display: none;
}
.drawer-overlay.open { display: block; }
.drawer {
  position: fixed; top: 0; left: -320px; width: 300px; max-width: 85vw; height: 100%;
  background: #faf7f2; color: var(--maroon-dark); z-index: 100;
  transition: left .25s ease; overflow-y: auto;
}
.drawer.open { left: 0; }
.drawer-head {
  padding: 22px 22px 14px;
}
.drawer-head-row { display: flex; align-items: center; justify-content: space-between; }
.drawer-head-row span {
  font-family: var(--font-serif); font-size: 28px; color: var(--maroon-dark) !important;
}
.drawer-head button {
  background: none; border: none; color: var(--maroon-dark); font-size: 24px; line-height: 1;
}
.drawer-head-divider {
  display: flex; align-items: center; gap: 8px; margin-top: 12px;
  color: var(--gold);
}
.drawer-head-divider::before,
.drawer-head-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--gold); opacity: .5;
}
.drawer-head-divider svg { width: 16px; height: 16px; flex: 0 0 auto; }

.drawer nav { padding: 10px 14px 30px; }
.drawer nav li { list-style: none; margin-bottom: 10px; }
.drawer nav li a {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 18px; border-radius: 10px;
  font-size: 14px; font-weight: 600; letter-spacing: .04em;
  color: var(--maroon-dark) !important;
  border-bottom: none;
}
.drawer nav li a .drawer-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: #f3e2e2; color: var(--maroon-dark);
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.drawer nav li a .drawer-icon svg { width: 18px; height: 18px; }
.drawer nav li a .drawer-label { flex: 1; }
.drawer nav li a .drawer-chevron { width: 16px; height: 16px; opacity: .6; flex: 0 0 auto; }
.drawer nav li a:active { background: rgba(58,13,16,.06); }

.drawer nav li a.drawer-home {
  background: linear-gradient(135deg, var(--maroon) 0%, #b5636c 100%);
  color: #fff !important;
}
.drawer nav li a.drawer-home .drawer-icon { background: rgba(255,255,255,.18); color: #fff; }
.drawer nav li a.drawer-home .drawer-chevron { opacity: .9; color: #fff; }

/* ---------------- Hero slider ---------------- */
.hero-slider { position: relative; overflow: hidden; touch-action: pan-y; user-select: none; min-height: 220px; }
.hero-slider .slide {
  position: absolute; top: 0; left: 0; width: 100%;
  transition: transform .6s ease;
  cursor: grab;
  transform: translateX(100%);
}
.hero-slider .slide.active { transform: translateX(0%); }
.hero-slider img { width: 100%; height: auto; display: block; object-fit: cover; pointer-events: none; }
.hero-slider .slide-caption {
  position: absolute; right: 24px; top: 50%; transform: translateY(-50%);
  text-align: right; color: var(--maroon-dark);
}
.hero-slider .slide-caption h2 {
  font-family: var(--font-serif); font-size: 22px; margin: 0 0 4px;
  letter-spacing: .08em;
  color: #8a6769 !important;
}
.hero-slider .slide-caption p { margin: 0; font-size: 11px; letter-spacing: .1em; color: #a27f81 !important; }
.slider-dots {
  display: flex; justify-content: center; gap: 6px; padding: 10px 0;
}
.slider-dots span {
  width: 6px; height: 6px; border-radius: 50%; background: #d8d3cc;
}
.slider-dots span.active { background: var(--maroon); }

/* ---------------- Section titles ---------------- */
.section-title {
  text-align: center; font-family: var(--font-serif);
  font-size: 16px; letter-spacing: .18em; text-transform: uppercase;
  margin: 30px 0 18px;
}

/* ---------------- Collection tiles ---------------- */
.collection-tile { position: relative; }
.collection-tile img { width: 100%; }
.collection-tile .cta {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%);
  color: #fff; font-size: 13px; letter-spacing: .18em; text-transform: uppercase;
  border-bottom: 1px solid #fff; padding-bottom: 2px;
}
main > a.collection-tile:nth-of-type(1) > span.cta { color: #000000 !important; }
main > a.collection-tile:nth-of-type(2) > span.cta { color: #3f3f3f !important; }
main > a.collection-tile:nth-of-type(3) > span.cta { color: #636363 !important; }
main > a.collection-tile:nth-of-type(4) > span.cta { color: #636363 !important; }

/* ---------------- Product grid ---------------- */
.product-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--border-light);
}
@media (min-width: 900px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; background: none; }
}
/* ---------------- Desktop: keep the layout centered instead of stretching edge-to-edge ---------------- */
@media (min-width: 1240px) {
  .site-header, main { max-width: 1200px; margin-left: auto; margin-right: auto; }
}
.product-card { background: var(--white); position: relative; }
.product-card .thumb { position: relative; overflow: hidden; aspect-ratio: 3/4; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .wish-btn {
  position: absolute; right: 10px; bottom: 10px; background: #fff;
  border-radius: 50%; width: 34px; height: 34px; display: flex;
  align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0,0,0,.15);
  border: none;
}
.product-card .info { padding: 10px 12px 16px; text-align: center; }
.product-card .name {
  font-size: 12px; text-transform: uppercase; letter-spacing: .03em;
  line-height: 1.4; min-height: 34px; margin: 0 0 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-card .price { font-size: 13px; font-weight: 600; }
.product-card .price .old { color: var(--text-muted); text-decoration: line-through; font-weight: 400; margin-right: 6px; }

/* ---------------- Carousel ---------------- */
.carousel-track { display: flex; overflow-x: auto; gap: 12px; padding: 0 12px 12px; scroll-snap-type: x mandatory; }
.carousel-track .product-card { flex: 0 0 46%; scroll-snap-align: start; }
@media (min-width: 900px) { .carousel-track .product-card { flex: 0 0 22%; } }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--bg-cream); margin-top: 30px; }
.footer-accordion { border-bottom: 1px solid var(--border-light); }
.footer-accordion summary {
  padding: 16px; font-weight: 600; font-size: 14px;
  display: flex; justify-content: space-between; align-items: center; cursor: pointer;
  list-style: none;
}
.footer-accordion summary::-webkit-details-marker { display: none; }
.footer-accordion summary::after { content: '+'; font-size: 18px; }
.footer-accordion[open] summary::after { content: '\2212'; }
.footer-accordion .panel { padding: 0 16px 16px; font-size: 13px; color: var(--text-muted); }
.footer-accordion .panel a { display: block; padding: 6px 0; color: var(--text-muted); }
.footer-social { display: flex; gap: 14px; padding: 18px 16px 26px; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 50%; background: var(--text-dark);
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.footer-social svg { width: 16px; height: 16px; }

/* ---------------- WhatsApp float ---------------- */
.whatsapp-float {
  position: fixed; right: 16px; bottom: 20px; width: 52px; height: 52px;
  border-radius: 50%; background: #25d366; display: flex; align-items: center;
  justify-content: center; box-shadow: 0 3px 10px rgba(0,0,0,.25); z-index: 50;
}
.whatsapp-float svg { width: 28px; height: 28px; fill: #fff; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-block; padding: 13px 24px; font-size: 13px; letter-spacing: .1em;
  text-transform: uppercase; text-align: center; border-radius: var(--radius-sm);
  border: 1px solid var(--maroon); cursor: pointer;
}
.btn-primary { background: var(--maroon); color: #fff; }
.btn-outline { background: transparent; color: var(--maroon); }
.btn-block { display: block; width: 100%; }

/* ---------------- Forms ---------------- */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; margin-bottom: 6px; color: var(--text-muted); }
.form-control {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border-light);
  border-radius: var(--radius-sm); font-size: 16px; background: #fff;
}
.form-control:focus { outline: none; border-color: var(--maroon); }

/* ---------------- Product detail page ---------------- */
.pdp-gallery { position: relative; }
.pdp-gallery-main img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.pdp-thumbs { display: flex; gap: 8px; padding: 8px 12px; overflow-x: auto; }
.pdp-thumbs img { width: 56px; height: 70px; object-fit: cover; border: 1px solid var(--border-light); }
.pdp-info { padding: 18px 16px; }
.pdp-info h1 { font-size: 17px; font-weight: 500; letter-spacing: .02em; margin: 0 0 8px; }
.pdp-price { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.pdp-price .old { color: var(--text-muted); text-decoration: line-through; font-weight: 400; margin-right: 8px; font-size: 15px; }
.badge-sale { display: inline-block; background: var(--maroon); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 2px; margin-left: 8px; }
.size-options { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 18px; }
.size-options label {
  border: 1px solid var(--border-light); padding: 8px 14px; font-size: 13px; border-radius: 2px; cursor: pointer;
}
.size-options input { display: none; }
.size-options input:checked + span { color: var(--maroon); font-weight: 600; }
.size-options label:has(input:checked) { border-color: var(--maroon); }
.qty-selector { display: inline-flex; align-items: center; border: 1px solid var(--border-light); border-radius: 2px; }
.qty-selector button { border: none; background: none; width: 36px; height: 40px; font-size: 16px; }
.qty-selector input { width: 40px; text-align: center; border: none; font-size: 16px; }
.pdp-actions { display: flex; gap: 10px; margin: 18px 0; }
.pdp-actions .btn { flex: 1; }

/* ---------------- Cart page ---------------- */
.cart-line { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border-light); }
.cart-line img { width: 74px; height: 92px; object-fit: cover; }
.cart-line .meta { flex: 1; }
.cart-line .name { font-size: 13px; margin: 0 0 4px; }
.cart-line .variant { font-size: 12px; color: var(--text-muted); }
.cart-summary { padding: 16px; background: var(--bg-cream); }
.cart-summary .row { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 0; }
.cart-summary .row.total { font-weight: 700; font-size: 16px; border-top: 1px solid var(--border-light); margin-top: 6px; padding-top: 12px; }

/* ---------------- Misc ---------------- */
.breadcrumb { font-size: 12px; color: var(--text-muted); padding: 12px 16px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.badge-new { background: var(--gold); color: #fff; font-size: 10px; padding: 2px 8px; position: absolute; top: 10px; left: 10px; letter-spacing: .05em; }
.filter-bar { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border-light); font-size: 13px; }
.filter-bar select { flex: 1; padding: 8px; border: 1px solid var(--border-light); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text-dark); color: #fff; padding: 10px 18px; border-radius: 4px; font-size: 13px; z-index: 200; display: none; }
