/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #FAF9F7;
  --text: #1a1a1a;
  --text-light: #6b6b6b;
  --accent: #8B7355;
  --accent-dark: #6d5a43;
  --accent-light: #C4AD8F;
  --white: #ffffff;
  --border: #e8e4df;
  --card-bg: #ffffff;
  --success: #2d6a4f;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select { font-family: inherit; }

/* ===== HEADER ===== */
.header-top {
  background: var(--text);
  color: var(--white);
  text-align: center;
  padding: 8px 20px;
  font-size: 12px;
  letter-spacing: 0.5px;
  font-weight: 300;
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text);
}

.nav { display: flex; gap: 32px; }
.nav a {
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--text-light);
  transition: color 0.3s;
}
.nav a:hover { color: var(--text); }

.cart-btn {
  background: none;
  border: none;
  position: relative;
  color: var(--text);
  padding: 4px;
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -8px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
  color: var(--white);
  padding: 100px 40px;
  text-align: center;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content { max-width: 640px; }

.hero-sub {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 20px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-desc {
  font-size: 16px;
  color: #b0b0b0;
  margin-bottom: 36px;
  font-weight: 300;
  line-height: 1.7;
}

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  padding: 14px 40px;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: none;
  transition: background 0.3s;
  font-weight: 500;
}
.btn-primary:hover { background: var(--accent-dark); }

/* ===== FEATURES BAR ===== */
.features-bar {
  display: flex;
  justify-content: center;
  gap: 48px;
  padding: 28px 40px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-light);
  letter-spacing: 0.3px;
}

.feature svg { color: var(--accent); flex-shrink: 0; }

/* ===== COLLECTION ===== */
.collection {
  padding: 80px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-sub {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 400;
  margin-bottom: 12px;
}

.section-desc {
  color: var(--text-light);
  font-size: 15px;
  font-weight: 300;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

.product-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: #f0ede8;
  cursor: pointer;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}

.product-card:hover .product-img img {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--text);
  color: var(--white);
  font-size: 10px;
  padding: 4px 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 500;
}

.product-quickview {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.7);
  color: white;
  text-align: center;
  padding: 12px;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transform: translateY(100%);
  transition: transform 0.3s;
  cursor: pointer;
  border: none;
  width: 100%;
}

.product-card:hover .product-quickview {
  transform: translateY(0);
}

.product-info {
  padding: 20px;
}

.product-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 4px;
}

.product-color {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-price {
  font-size: 18px;
  font-weight: 500;
  color: var(--accent-dark);
}

.product-price .old-price {
  font-size: 14px;
  color: var(--text-light);
  text-decoration: line-through;
  margin-right: 6px;
  font-weight: 400;
}

.btn-add {
  background: var(--text);
  color: var(--white);
  border: none;
  padding: 10px 20px;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: background 0.3s;
  font-weight: 500;
}
.btn-add:hover { background: var(--accent); }

/* ===== ABOUT ===== */
.about {
  background: var(--white);
  padding: 80px 40px;
  text-align: center;
}

.about-content {
  max-width: 680px;
  margin: 0 auto;
}

.about-content h2 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  margin-bottom: 24px;
}

.about-content .section-sub { margin-bottom: 12px; }

.about-content p {
  color: var(--text-light);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 16px;
  font-weight: 300;
}

/* ===== CONTACT ===== */
.contact {
  padding: 60px 40px;
  text-align: center;
}

.contact h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  margin-bottom: 8px;
}

.contact p { color: var(--text-light); font-size: 15px; margin-bottom: 12px; }
.contact-email { font-size: 18px !important; color: var(--accent) !important; font-weight: 500; }
.contact-phone { color: var(--text-light); font-size: 14px; }

/* ===== FOOTER ===== */
.footer {
  background: var(--text);
  color: #ccc;
  padding: 60px 40px 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--white);
  margin-bottom: 12px;
  font-weight: 400;
}

.footer-grid p { font-size: 14px; line-height: 1.7; font-weight: 300; }
.footer-grid h4 {
  color: var(--white);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  font-weight: 500;
}

.footer-grid a {
  display: block;
  font-size: 14px;
  margin-bottom: 10px;
  color: #999;
  transition: color 0.3s;
  font-weight: 300;
}
.footer-grid a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid #333;
  margin-top: 40px;
  padding-top: 20px;
  text-align: center;
  font-size: 13px;
  color: #666;
}

/* ===== CART SIDEBAR ===== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  max-width: 90vw;
  height: 100vh;
  background: var(--white);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -4px 0 20px rgba(0,0,0,0.1);
}

.cart-sidebar.open { transform: translateX(0); }

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.cart-header h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
}

.cart-close {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-light);
  line-height: 1;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.cart-empty {
  text-align: center;
  color: var(--text-light);
  margin-top: 60px;
  font-size: 15px;
}

.cart-item {
  display: flex;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.cart-item-img {
  width: 80px;
  height: 100px;
  object-fit: cover;
  flex-shrink: 0;
}

.cart-item-info { flex: 1; }
.cart-item-name { font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.cart-item-color { font-size: 12px; color: var(--text-light); margin-bottom: 4px; }
.cart-item-size { font-size: 12px; color: var(--text-light); margin-bottom: 8px; }
.cart-item-price { font-size: 14px; font-weight: 500; color: var(--accent-dark); }

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.qty-btn {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  background: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.qty-val { font-size: 13px; min-width: 20px; text-align: center; }

.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 11px;
  text-decoration: underline;
  margin-top: 4px;
}

.cart-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 4px;
}

.cart-shipping-note {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 16px;
}

.btn-full { width: 100%; text-align: center; }

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  display: none;
  justify-content: center;
  align-items: flex-start;
  overflow-y: auto;
  padding: 40px 20px;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--white);
  width: 100%;
  max-width: 580px;
  padding: 40px;
  position: relative;
  margin: auto;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-light);
}

.modal h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  margin-bottom: 4px;
}

.checkout-subtitle {
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 24px;
}

.checkout-summary {
  background: var(--bg);
  padding: 16px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.checkout-summary-item {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 6px 0;
}

.checkout-summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 600;
  padding-top: 10px;
  margin-top: 8px;
  border-top: 1px solid var(--border);
}

h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 16px;
}

.form-row { display: flex; gap: 16px; }
.form-group { flex: 1; margin-bottom: 16px; }

.form-group label {
  display: block;
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  font-size: 14px;
  background: var(--white);
  transition: border-color 0.3s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent);
}

.cod-badge {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #f5f0e8;
  padding: 16px;
  margin: 20px 0;
  border: 1px solid var(--accent-light);
}

.cod-badge svg { color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.cod-badge strong { display: block; font-size: 14px; margin-bottom: 2px; }
.cod-badge span { font-size: 13px; color: var(--text-light); }

.btn-place { margin-top: 8px; font-size: 14px; padding: 16px; }

/* ===== CONFIRMATION ===== */
.confirmation { text-align: center; }

.confirmation-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--success);
  color: white;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.confirmation h2 { margin-bottom: 8px; }
.conf-order-id { font-size: 18px; color: var(--accent); margin-bottom: 16px; font-weight: 500; }

.conf-details {
  background: var(--bg);
  padding: 16px;
  margin: 20px 0;
  text-align: left;
  border: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.8;
}

.conf-email-preview {
  background: #f9f7f3;
  border: 1px solid var(--border);
  padding: 20px;
  margin: 20px 0;
  text-align: left;
  font-size: 13px;
  line-height: 1.7;
}

.conf-email-preview h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 8px;
}

.conf-email-preview pre {
  white-space: pre-wrap;
  font-family: var(--font-body);
  color: var(--text-light);
}

.confirmation .btn-primary { margin-top: 16px; }

/* ===== QUICK VIEW ===== */
.modal-quickview { max-width: 720px; }

.quickview-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.qv-image {
  aspect-ratio: 3/4;
  object-fit: cover;
  width: 100%;
}

.qv-info h2 { font-size: 26px; margin-bottom: 4px; }
.qv-color { font-size: 13px; color: var(--text-light); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.qv-price { font-size: 22px; color: var(--accent-dark); font-weight: 500; margin-bottom: 16px; }
.qv-desc { font-size: 14px; color: var(--text-light); line-height: 1.7; margin-bottom: 20px; font-weight: 300; }

.qv-sizes { margin-bottom: 20px; }
.qv-sizes label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  display: block;
  margin-bottom: 8px;
}

.size-options { display: flex; gap: 8px; }

.size-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  background: none;
  font-size: 13px;
  transition: all 0.2s;
}
.size-btn:hover, .size-btn.active {
  border-color: var(--text);
  background: var(--text);
  color: var(--white);
}

.qv-features {
  list-style: none;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 20px;
}
.qv-features li { padding: 3px 0; }
.qv-features li::before { content: '— '; color: var(--accent); }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text);
  color: var(--white);
  padding: 14px 28px;
  font-size: 14px;
  z-index: 999;
  transition: transform 0.4s ease;
  white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .hero h1 { font-size: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .quickview-content { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .header-main { padding: 14px 20px; }
  .nav { display: none; }
  .hero { padding: 60px 20px; min-height: 400px; }
  .hero h1 { font-size: 32px; }
  .collection { padding: 50px 20px; }
  .products-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .features-bar { gap: 20px; padding: 20px; }
  .feature { font-size: 12px; }
  .footer-grid { grid-template-columns: 1fr; }
  .modal { padding: 24px; }
  .form-row { flex-direction: column; gap: 0; }
}

/* ===== LOADING SPINNER ===== */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
