/* ==========================================================================
   Anaya — Saree Atelier
   Design language: minimal luxury / editorial
   Palette: ivory, charcoal ink, muted antique gold
   Type: Playfair Display (display serif) + Inter (body sans)
   ========================================================================== */

:root {
  --ivory:        #faf7f2;
  --ivory-deep:   #f2ede3;
  --paper:        #fffdfa;
  --ink:          #241f1a;
  --ink-soft:     #55504a;
  --line:         #e4ddd0;
  --gold:         #a9834f;
  --gold-deep:    #8a6a3d;
  --gold-pale:    #f0e2c8;
  --error:        #b23b3b;
  --success:      #3f6b4a;

  --radius-sm: 2px;
  --radius-md: 4px;
  --shadow-soft: 0 12px 32px rgba(36, 31, 26, 0.06);
  --shadow-lift: 0 20px 48px rgba(36, 31, 26, 0.12);

  --maxw: 1240px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-display {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin: 0 0 0.5em;
}

h1 { font-size: 2.75rem; line-height: 1.15; }
h2 { font-size: 2rem; line-height: 1.2; }
h3 { font-size: 1.4rem; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 600;
  margin-bottom: 0.9em;
}

.muted { color: var(--ink-soft); }

/* ---------------------------------------------------------------------- */
/* Top announcement bar                                                    */
/* ---------------------------------------------------------------------- */
.announce {
  background: var(--ink);
  color: var(--ivory);
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  padding: 9px 12px;
}

/* ---------------------------------------------------------------------- */
/* Header                                                                   */
/* ---------------------------------------------------------------------- */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  gap: 24px;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  font-weight: 600;
  white-space: nowrap;
}
.logo span { color: var(--gold-deep); }

.main-nav {
  display: flex;
  gap: 32px;
  flex: 1;
  justify-content: center;
}
.main-nav a {
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease;
}
.main-nav a:hover, .main-nav a.active { color: var(--ink); }
.main-nav a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--gold);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.icon-link {
  position: relative;
  font-size: 0.9rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}
.cart-badge {
  background: var(--gold-deep);
  color: #fff;
  border-radius: 50%;
  font-size: 0.65rem;
  min-width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

.mobile-nav-toggle { display: none; }

/* ---------------------------------------------------------------------- */
/* Buttons                                                                   */
/* ---------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 30px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.btn-primary {
  background: var(--ink);
  color: var(--ivory);
  border-color: var(--ink);
}
.btn-primary:hover { background: #000; }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--ivory); }
.btn-gold {
  background: var(--gold-deep);
  color: #fff;
  border-color: var(--gold-deep);
}
.btn-gold:hover { background: var(--gold); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 18px; font-size: 0.72rem; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-link {
  background: none; border: none; padding: 0;
  text-decoration: underline; text-underline-offset: 3px;
  color: var(--ink-soft); cursor: pointer; font-family: inherit; font-size: 0.85rem;
}

/* ---------------------------------------------------------------------- */
/* Hero                                                                      */
/* ---------------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 60px;
  padding: 72px 0 96px;
}
.hero-copy h1 { margin-bottom: 22px; }
.hero-copy p { font-size: 1.05rem; color: var(--ink-soft); max-width: 46ch; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 16px; }
.hero-visual {
  aspect-ratio: 4 / 5;
  background: linear-gradient(160deg, var(--gold-pale), var(--ivory-deep));
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------------------- */
/* Section scaffolding                                                       */
/* ---------------------------------------------------------------------- */
.section { padding: 80px 0; }
.section-tight { padding: 48px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 24px;
}
.section-head h2 { margin-bottom: 6px; }

/* ---------------------------------------------------------------------- */
/* Category chips                                                            */
/* ---------------------------------------------------------------------- */
.category-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.category-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px 18px;
  text-align: center;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.category-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.category-card .cat-name { font-family: 'Playfair Display', serif; font-size: 1.05rem; }
.category-card .cat-count { font-size: 0.75rem; color: var(--ink-soft); margin-top: 4px; }

/* ---------------------------------------------------------------------- */
/* Product grid + cards                                                      */
/* ---------------------------------------------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 28px;
}
.product-card { position: relative; }
.product-media {
  aspect-ratio: 3 / 4;
  background: var(--ivory-deep);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  margin-bottom: 16px;
}
.product-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .product-media img { transform: scale(1.045); }
.product-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--ink); color: var(--ivory);
  font-size: 0.65rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 2px;
}
.wishlist-btn {
  position: absolute; top: 10px; right: 10px;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 0.95rem;
}
.quick-add {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  opacity: 0; transform: translateY(6px);
  transition: all 0.2s ease;
}
.product-card:hover .quick-add { opacity: 1; transform: translateY(0); }

.product-title { font-size: 0.98rem; margin-bottom: 4px; font-weight: 500; }
.product-meta { font-size: 0.78rem; color: var(--ink-soft); margin-bottom: 6px; }
.product-price { font-size: 0.95rem; }
.price-strike { text-decoration: line-through; color: var(--ink-soft); margin-right: 8px; font-size: 0.85rem; }

/* ---------------------------------------------------------------------- */
/* Meet Our Weavers                                                           */
/* ---------------------------------------------------------------------- */
.weaver-section { background: var(--paper); }
.weaver-intro {
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: 1rem;
  margin: -18px 0 44px;
}
.weaver-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}
.weaver-card { text-align: center; }
.weaver-photo {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: var(--shadow-soft);
}
.weaver-photo img { width: 100%; height: 100%; object-fit: cover; }
.weaver-card h3 { margin-bottom: 4px; }
.weaver-craft {
  display: block;
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  color: var(--gold-deep);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.weaver-card p {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ---------------------------------------------------------------------- */
/* Editorial / feature band                                                   */
/* ---------------------------------------------------------------------- */
.feature-band {
  background: var(--ivory-deep);
  padding: 90px 0;
}
.feature-band .container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  text-align: center;
}
.feature-item .glyph {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem;
  color: var(--gold-deep);
  margin-bottom: 14px;
}
.feature-item h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feature-item p { color: var(--ink-soft); font-size: 0.9rem; }

/* ---------------------------------------------------------------------- */
/* Footer                                                                     */
/* ---------------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: var(--ivory-deep);
  padding: 64px 0 28px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-grid h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-pale);
  margin-bottom: 18px;
}
.footer-grid a, .footer-grid p {
  display: block;
  color: #d9d2c4;
  font-size: 0.88rem;
  margin-bottom: 10px;
}
.footer-grid a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #a89e8c;
}
.payment-badges { display: flex; gap: 10px; align-items: center; }
.payment-badges span {
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 3px;
  padding: 3px 8px;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

/* ---------------------------------------------------------------------- */
/* Forms                                                                     */
/* ---------------------------------------------------------------------- */
.form-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 44px;
  max-width: 460px;
  margin: 0 auto;
  box-shadow: var(--shadow-soft);
}
.form-row { margin-bottom: 20px; }
.form-row label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--ink);
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 22px;
}
.alert-error { background: #fbeaea; color: var(--error); border: 1px solid #eecccc; }
.alert-success { background: #e9f2ec; color: var(--success); border: 1px solid #cde3d5; }

/* ---------------------------------------------------------------------- */
/* Breadcrumb + page header                                                   */
/* ---------------------------------------------------------------------- */
.breadcrumb {
  font-size: 0.78rem;
  color: var(--ink-soft);
  padding: 22px 0;
}
.breadcrumb a:hover { color: var(--gold-deep); }
.page-title-band {
  text-align: center;
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 56px;
}

/* ---------------------------------------------------------------------- */
/* Shop layout                                                                */
/* ---------------------------------------------------------------------- */
.shop-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: flex-start;
}
.filter-block { margin-bottom: 32px; }
.filter-block h4 {
  font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 14px;
}
.filter-block a, .filter-block label {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.88rem; margin-bottom: 10px; color: var(--ink);
}
.filter-block a.active { color: var(--gold-deep); font-weight: 600; }
.shop-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 28px; font-size: 0.85rem; color: var(--ink-soft);
}
.shop-toolbar select { padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }

/* ---------------------------------------------------------------------- */
/* Product detail                                                             */
/* ---------------------------------------------------------------------- */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
.pd-gallery-main {
  aspect-ratio: 3/4;
  background: var(--ivory-deep);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.pd-price-row { display: flex; align-items: baseline; gap: 12px; margin: 18px 0 22px; font-size: 1.3rem; }
.pd-meta-list { list-style: none; padding: 0; margin: 22px 0; border-top: 1px solid var(--line); }
.pd-meta-list li {
  display: flex; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}
.pd-meta-list li span:first-child { color: var(--ink-soft); }
.qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.qty-stepper button {
  width: 38px; height: 44px; background: none; border: none; cursor: pointer; font-size: 1rem;
}
.qty-stepper input {
  width: 44px; text-align: center; border: none; border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  height: 44px; font-family: inherit; font-size: 0.95rem;
}
.pd-actions { display: flex; gap: 14px; margin-top: 26px; }

/* ---------------------------------------------------------------------- */
/* Cart & Checkout                                                            */
/* ---------------------------------------------------------------------- */
.cart-layout { display: grid; grid-template-columns: 1fr 380px; gap: 48px; align-items: flex-start; }
.cart-line {
  display: grid; grid-template-columns: 90px 1fr auto auto; gap: 20px; align-items: center;
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.cart-line img { width: 90px; height: 110px; object-fit: cover; border-radius: var(--radius-sm); }
.summary-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 30px; position: sticky; top: 100px;
}
.summary-row { display: flex; justify-content: space-between; margin-bottom: 14px; font-size: 0.92rem; }
.summary-total { font-size: 1.15rem; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 6px; }
.empty-state { text-align: center; padding: 90px 0; }
.empty-state .glyph { font-size: 2.6rem; color: var(--gold-pale); margin-bottom: 18px; font-family: 'Playfair Display', serif; }

/* ---------------------------------------------------------------------- */
/* Account / order tables                                                     */
/* ---------------------------------------------------------------------- */
.account-layout { display: grid; grid-template-columns: 220px 1fr; gap: 48px; }
.account-nav a {
  display: block; padding: 12px 0; font-size: 0.9rem; border-bottom: 1px solid var(--line); color: var(--ink-soft);
}
.account-nav a.active, .account-nav a:hover { color: var(--gold-deep); }
table.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.data-table th {
  text-align: left; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-soft); padding: 12px 14px; border-bottom: 1px solid var(--line);
}
table.data-table td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.status-pill {
  display: inline-block; padding: 4px 11px; border-radius: 20px; font-size: 0.72rem; text-transform: capitalize;
}
.status-paid, .status-delivered { background: #e9f2ec; color: var(--success); }
.status-pending, .status-placed, .status-processing { background: #f5eedd; color: var(--gold-deep); }
.status-failed, .status-cancelled { background: #fbeaea; color: var(--error); }
.status-shipped { background: #e6eef5; color: #345d82; }

/* ---------------------------------------------------------------------- */
/* Admin                                                                      */
/* ---------------------------------------------------------------------- */
.admin-body { background: #f4f2ee; }
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--ink); color: var(--ivory-deep); padding: 28px 22px; }
.admin-sidebar .logo { color: var(--ivory); margin-bottom: 40px; display: block; }
.admin-sidebar nav a {
  display: block; padding: 11px 12px; border-radius: 4px; font-size: 0.88rem; color: #cfc6b5; margin-bottom: 4px;
}
.admin-sidebar nav a.active, .admin-sidebar nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.admin-main { padding: 36px 44px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 40px; }
.stat-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 24px;
}
.stat-card .label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }
.stat-card .value { font-family: 'Playfair Display', serif; font-size: 1.9rem; margin-top: 8px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 28px; margin-bottom: 28px; }

/* ---------------------------------------------------------------------- */
/* Responsive                                                                 */
/* ---------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .category-strip { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .main-nav, .admin-sidebar nav .nav-label { display: none; }
  .hero { grid-template-columns: 1fr; }
  .product-detail, .cart-layout, .shop-layout, .account-layout, .admin-shell { grid-template-columns: 1fr; }
  .feature-band .container { grid-template-columns: 1fr; gap: 36px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .weaver-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 560px) {
  .container { padding: 0 18px; }
  h1 { font-size: 2rem; }
  .product-grid, .category-strip { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .form-grid-2 { grid-template-columns: 1fr; }
}
