/* ═══════════════════════════════════════════════
   Blakeley and Winthrop — Storefront Styles
   ═══════════════════════════════════════════════ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #111110;
  --bg-elevated: #1C1B19;
  --bg-card: #1A1918;
  --amber: #C4913E;
  --amber-light: #D4A654;
  --amber-dim: rgba(196,145,62,0.15);
  --cream: #F5F0EB;
  --cream-dim: #B8AFA6;
  --warm-gray: #6B6560;
  --border: #2A2824;
  --border-light: #3A3630;
  --success: #4A7C59;
  --error: #8B3A3A;
}

body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ─── Navigation ─── */
nav#main-nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 20px 48px;
  display: flex;
  align-items: center;
  gap: 40px;
  background: rgba(17,17,16,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

nav .logo {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cream);
  white-space: nowrap;
  flex-shrink: 0;
}
nav .logo span { color: var(--amber); }

.nav-links {
  display: flex;
  gap: 32px;
  flex: 1;
}
.nav-links a {
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--warm-gray);
  font-weight: 400;
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active { color: var(--cream); }

.cart-btn {
  position: relative;
  background: none;
  border: none;
  color: var(--cream);
  padding: 8px;
  transition: color 0.2s;
}
.cart-btn:hover { color: var(--amber); }
.cart-count {
  position: absolute;
  top: 0;
  right: -2px;
  background: var(--amber);
  color: var(--bg);
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cart-count.visible {
  opacity: 1;
  transform: scale(1);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--cream);
  padding: 8px;
}

/* ─── Cart Sidebar ─── */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  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: 420px;
  max-width: 90vw;
  height: 100vh;
  background: var(--bg-elevated);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 1px solid var(--border);
}
.cart-sidebar.open {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
}
.cart-header h3 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 400;
}
.cart-close {
  background: none;
  border: none;
  color: var(--warm-gray);
  font-size: 28px;
  line-height: 1;
  transition: color 0.2s;
}
.cart-close:hover { color: var(--cream); }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 28px;
}
.cart-items::-webkit-scrollbar { width: 4px; }
.cart-items::-webkit-scrollbar-track { background: transparent; }
.cart-items::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--warm-gray);
}
.cart-empty p {
  font-size: 15px;
  margin-bottom: 24px;
}

.cart-item {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item-image {
  width: 72px;
  height: 72px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg);
}
.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cart-item-details {
  flex: 1;
  min-width: 0;
}
.cart-item-name {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-price {
  font-size: 14px;
  color: var(--amber);
  font-weight: 500;
}
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.cart-item-qty button {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--cream);
  width: 28px;
  height: 28px;
  border-radius: 4px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.cart-item-qty button:hover {
  border-color: var(--amber);
  color: var(--amber);
}
.cart-item-qty span {
  font-size: 13px;
  min-width: 20px;
  text-align: center;
}
.cart-item-remove {
  background: none !important;
  border: none !important;
  color: var(--warm-gray) !important;
  font-size: 11px !important;
  width: auto !important;
  height: auto !important;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-left: auto;
}
.cart-item-remove:hover {
  color: var(--error) !important;
}

.cart-footer {
  padding: 24px 28px;
  border-top: 1px solid var(--border);
}
.cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 16px;
}
.cart-total span:last-child {
  font-weight: 600;
  color: var(--amber);
}
.cart-note {
  font-size: 12px;
  color: var(--warm-gray);
  margin-bottom: 20px;
}

/* ─── Mobile Menu ─── */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.mobile-menu-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: var(--bg-elevated);
  z-index: 201;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-right: 1px solid var(--border);
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu .cart-close {
  align-self: flex-end;
  margin-bottom: 20px;
}
.mobile-menu a {
  display: block;
  padding: 14px 0;
  font-size: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--cream-dim);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--amber); }

/* ─── Buttons ─── */
.btn-primary {
  display: inline-block;
  background: var(--amber);
  color: var(--bg);
  padding: 16px 40px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: none;
  border-radius: 0;
  transition: all 0.3s;
  text-align: center;
}
.btn-primary:hover {
  background: var(--amber-light);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-full { width: 100%; }

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--amber);
  padding: 14px 36px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: 1px solid var(--amber);
  transition: all 0.3s;
}
.btn-secondary:hover {
  background: var(--amber);
  color: var(--bg);
}

/* ─── Page Hero ─── */
.page-hero {
  padding: 160px 48px 80px;
  position: relative;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40%;
  height: 100%;
  background: radial-gradient(ellipse at 80% 40%, rgba(196,145,62,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero-label {
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 24px;
  font-weight: 500;
}
.page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700;
  line-height: 1.1;
  max-width: 800px;
  margin-bottom: 24px;
}
.page-hero h1 em {
  font-style: italic;
  color: var(--amber);
}
.page-hero-sub {
  font-size: 17px;
  max-width: 520px;
  color: var(--cream-dim);
  font-weight: 300;
  line-height: 1.7;
}

/* ─── Shop Collection Sections ─── */
.shop-collection {
  padding: 80px 48px;
  border-top: 1px solid var(--border);
}
.collection-intro {
  margin-bottom: 48px;
}
.collection-label {
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 500;
  display: block;
  margin-bottom: 16px;
}
.collection-intro h2 {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 16px;
}
.collection-intro h2 a {
  transition: color 0.2s;
}
.collection-intro h2 a:hover { color: var(--amber); }
.collection-intro p {
  font-size: 16px;
  color: var(--cream-dim);
  font-weight: 300;
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: 20px;
}
.link-arrow {
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 500;
  transition: all 0.2s;
}
.link-arrow:hover {
  color: var(--amber-light);
  letter-spacing: 2px;
}

/* ─── Product Grid ─── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.product-grid-large {
  gap: 24px;
}

.product-card {
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.product-card:hover {
  background: var(--bg-elevated);
  transform: translateY(-2px);
}
.product-card-image {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg);
}
.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.product-card:hover .product-card-image img {
  transform: scale(1.03);
}
.product-card-info {
  padding: 24px 20px;
}
.product-card-collection {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 500;
  display: block;
  margin-bottom: 8px;
}
.product-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 400;
  margin-bottom: 8px;
  line-height: 1.3;
}
.product-card-desc {
  font-size: 13px;
  color: var(--cream-dim);
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 12px;
}
.product-card-price {
  font-size: 16px;
  font-weight: 500;
  color: var(--amber);
}

/* ─── Collection Products ─── */
.collection-products {
  padding: 0 48px 100px;
}

/* ─── Product Detail ─── */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding-top: 80px;
  min-height: 80vh;
}
.product-detail-image {
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  position: sticky;
  top: 80px;
  height: fit-content;
}
.product-detail-image img {
  max-height: 600px;
  width: 100%;
  object-fit: cover;
  border-radius: 4px;
}
.product-detail-info {
  padding: 80px 48px 80px 60px;
}
.product-detail-collection {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 500;
  display: block;
  margin-bottom: 20px;
  transition: color 0.2s;
}
.product-detail-collection:hover { color: var(--amber-light); }
.product-detail-info h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}
.product-detail-price {
  font-size: 28px;
  font-weight: 500;
  color: var(--amber);
  margin-bottom: 24px;
}
.product-detail-desc {
  font-size: 16px;
  color: var(--cream-dim);
  font-weight: 300;
  line-height: 1.8;
  margin-bottom: 36px;
}

.product-actions {
  margin-bottom: 40px;
}

.product-features {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}
.product-features h4,
.product-meta-section h4 {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 500;
  margin-bottom: 16px;
}
.product-features ul {
  list-style: none;
}
.product-features li {
  font-size: 14px;
  color: var(--cream-dim);
  font-weight: 300;
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}
.product-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 6px;
  height: 1px;
  background: var(--amber);
}

.product-meta-section {
  padding: 24px 0;
  border-top: 1px solid var(--border);
}
.product-meta-section p {
  font-size: 14px;
  color: var(--cream-dim);
  font-weight: 300;
  line-height: 1.7;
}

/* ─── Product Story ─── */
.product-story {
  padding: 100px 48px;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}
.story-content {
  max-width: 700px;
  margin: 0 auto;
}
.story-label {
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 500;
  margin-bottom: 20px;
}
.product-story h2 {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 28px;
}
.product-story p {
  font-size: 16px;
  color: var(--cream-dim);
  font-weight: 300;
  line-height: 1.9;
}

/* ─── Related Products ─── */
.related-products {
  padding: 80px 48px;
  border-top: 1px solid var(--border);
}
.related-products h2 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 40px;
}
.related-products .product-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}

/* ─── Footer ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 80px 48px 48px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}
.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 12px;
}
.footer-logo span { color: var(--amber); }
.footer-tagline {
  font-size: 14px;
  color: var(--warm-gray);
  font-weight: 300;
}
footer h4 {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 500;
  margin-bottom: 20px;
}
footer div a {
  display: block;
  font-size: 14px;
  color: var(--cream-dim);
  font-weight: 300;
  padding: 4px 0;
  transition: color 0.2s;
}
footer div a:hover { color: var(--cream); }
.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-bottom span {
  font-size: 12px;
  color: var(--warm-gray);
  font-weight: 300;
}

/* ─── Newsletter / Email Capture ─── */
.footer-newsletter {
  margin-top: 24px;
}
.footer-newsletter h4 {
  margin-bottom: 8px !important;
}
.newsletter-desc {
  font-size: 13px;
  color: var(--cream-dim);
  font-weight: 300;
  margin-bottom: 12px;
}
.newsletter-form {
  display: flex;
  gap: 0;
}
.newsletter-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-right: none;
  color: var(--cream);
  padding: 12px 16px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  width: 220px;
  max-width: 60vw;
  transition: border-color 0.2s;
}
.newsletter-input::placeholder { color: var(--warm-gray); }
.newsletter-input:focus { border-color: var(--amber); }
.newsletter-btn {
  background: var(--amber);
  color: var(--bg);
  border: 1px solid var(--amber);
  padding: 12px 24px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.newsletter-btn:hover { background: var(--amber-light); }
.newsletter-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.newsletter-msg {
  font-size: 13px;
  margin-top: 8px;
  min-height: 20px;
  font-weight: 400;
}
.newsletter-msg.success { color: var(--success); }
.newsletter-msg.error { color: var(--amber); }

/* ─── Toast notifications ─── */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: var(--bg-elevated);
  border: 1px solid var(--amber);
  padding: 16px 24px;
  z-index: 300;
  font-size: 14px;
  font-weight: 500;
  color: var(--cream);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.toast.visible {
  transform: translateY(0);
  opacity: 1;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .product-detail {
    grid-template-columns: 1fr;
  }
  .product-detail-image {
    position: static;
    padding: 100px 40px 40px;
  }
  .product-detail-info {
    padding: 40px 48px 80px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  nav#main-nav {
    padding: 16px 24px;
  }
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }

  .page-hero {
    padding: 120px 24px 60px;
  }
  .shop-collection {
    padding: 60px 24px;
  }
  .collection-products {
    padding: 0 24px 60px;
  }
  .product-grid {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .product-grid-large {
    gap: 16px;
  }
  .product-detail-image {
    padding: 80px 24px 24px;
  }
  .product-detail-info {
    padding: 32px 24px 60px;
  }
  .product-story {
    padding: 60px 24px;
  }
  .related-products {
    padding: 60px 24px;
  }
  .related-products .product-grid {
    grid-template-columns: 1fr;
  }
  footer {
    padding: 60px 24px 32px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 480px) {
  .page-hero h1 {
    font-size: 32px;
  }
  .btn-primary {
    padding: 14px 28px;
    font-size: 12px;
  }
}

/* ─── Animations ─── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-hero,
.shop-collection,
.product-detail,
.product-story {
  animation: fadeInUp 0.6s ease-out;
}
