﻿@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:wght@400;500;600&display=swap');

:root {
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-surface-alt: #f5f3ee;
  --color-border: #e5e7eb;
  --color-text: #1a1a1a;
  --color-text-secondary: #4b5563;
  --color-text-muted: #6b7280;
  --color-primary: #2d5f3b;
  --color-primary-hover: #1f4a2b;
  --color-accent: #8b7355;
  --color-success: #16a34a;
  --color-warning: #f59e0b;
  --color-error: #dc2626;

  --font-heading: 'Playfair Display', serif;
  --font-body: 'DM Sans', sans-serif;
  --radius: 8px;
  --touch-min: 44px;
  --shadow: 0 10px 30px rgba(0,0,0,0.08);
  --transition: 0.2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-family: var(--font-body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
body { background: var(--color-bg); color: var(--color-text); min-height: 100vh; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

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

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--color-border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; max-width: 1200px; margin: 0 auto; }
.logo { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-heading); font-weight: 700; font-size: 1.25rem; letter-spacing: 0.02em; }
.logo-mark { width: 36px; height: 36px; background: var(--color-primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-family: var(--font-heading); }
.logo-img { width: 36px; height: 36px; object-fit: contain; display: block; flex-shrink: 0; }
.nav-links { display: none; gap: 2rem; }
.nav-links a { font-weight: 500; position: relative; }
.nav-links a:hover::after { content: ''; position: absolute; bottom: -4px; left: 0; right: 0; height: 2px; background: var(--color-primary); }
.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.icon-btn { width: var(--touch-min); height: var(--touch-min); display: flex; align-items: center; justify-content: center; border-radius: 50%; position: relative; }
.cart-badge { position: absolute; top: 6px; right: 6px; background: var(--color-primary); color: white; border-radius: 50%; width: 18px; height: 18px; font-size: 0.7rem; display: flex; align-items: center; justify-content: center; }

/* Mobile nav */
.mobile-nav { position: fixed; bottom: 0; left: 0; right: 0; background: white; border-top: 1px solid var(--color-border); display: flex; justify-content: space-around; padding: 0.5rem 0; z-index: 100; }
.mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; font-size: 0.75rem; color: var(--color-text-muted); min-width: var(--touch-min); padding: 0.25rem; }
.mobile-nav a.active { color: var(--color-primary); }

/* Hero */
.hero { background: linear-gradient(135deg, #f5f3ee 0%, #ffffff 100%); padding: 3rem 1rem 4rem; }
.hero-inner { max-width: 1200px; margin: 0 auto; display: grid; gap: 2rem; align-items: center; }
.hero-label { display: inline-block; color: var(--color-primary); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.875rem; margin-bottom: 1rem; }
.hero h1 { font-family: var(--font-heading); font-size: 2.5rem; line-height: 1.2; margin-bottom: 1rem; }
.hero p { color: var(--color-text-secondary); font-size: 1.125rem; margin-bottom: 2rem; }
.hero-image { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.hero-image img { width: 100%; height: 400px; object-fit: cover; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.75rem 1.5rem; border-radius: var(--radius); font-weight: 600; min-height: var(--touch-min); transition: var(--transition); }
.btn-primary { background: var(--color-primary); color: white; }
.btn-primary:hover { background: var(--color-primary-hover); }
.btn-outline { border: 2px solid var(--color-primary); color: var(--color-primary); background: transparent; }
.btn-outline:hover { background: var(--color-primary); color: white; }

/* Section */
.section { padding: 3rem 1rem; }
.section-header { text-align: center; margin-bottom: 2.5rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.section-header h2 { font-family: var(--font-heading); font-size: 2rem; margin-bottom: 0.75rem; }
.section-header p { color: var(--color-text-secondary); }

/* Product grid */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; max-width: 1200px; margin: 0 auto; }
.product-card { background: white; border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.04); border: 1px solid var(--color-border); transition: var(--transition); cursor: pointer; }
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.product-image { width: 100%; height: 200px; object-fit: cover; background: var(--color-surface-alt); }
.product-info { padding: 1rem; }
.product-name { font-weight: 600; margin-bottom: 0.25rem; font-size: 0.95rem; }
.product-price { color: var(--color-primary); font-weight: 600; }

/* Footer */
.site-footer { background: var(--color-primary); color: white; margin-top: 4rem; padding: 2rem 1rem 5rem; }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-brand { margin-bottom: 1.5rem; }
.footer-brand .logo { color: white; }
.footer-text { opacity: 0.9; max-width: 300px; }

/* Mobile-only footer links (About / Contact) — hidden on desktop */
.footer-links-mobile { display: none; }

/* App main */
.app-main { min-height: calc(100vh - 200px); }

/* Responsive */
@media (min-width: 640px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
  .hero h1 { font-size: 3rem; }
}
@media (min-width: 768px) {
  .nav-links { display: flex; }
  .mobile-nav { display: none; }
  .hero-inner { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 3.5rem; }
  .product-grid { grid-template-columns: repeat(4, 1fr); }
  .site-footer { padding: 3rem 1rem 2rem; }
}

/* Mobile: surface About / Contact / Terms in the footer since the bottom nav omits them */
@media (max-width: 767px) {
  .footer-links-mobile {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.01em;
  }
  .footer-links-mobile a {
    color: #ffffff;
    opacity: 0.75;
  }
  .footer-links-mobile a:hover,
  .footer-links-mobile a:focus-visible {
    opacity: 1;
    text-decoration: underline;
  }
}

/* ===== Product Image Gallery ===== */
.product-gallery {
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface-alt);
  aspect-ratio: 4/3;
}

.gallery-main {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.gallery-main-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  transition: opacity 0.3s ease;
}

.gallery-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
}

.gallery-nav-btn {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.85);
  border: none;
  border-radius: 50%;
  color: var(--color-text);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: var(--transition);
}

.gallery-nav-btn:hover {
  background: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.gallery-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--transition);
}

.gallery-dot.active {
  background: var(--color-primary);
  width: 24px;
  border-radius: 4px;
}

.gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.75rem;
  background: var(--color-surface-alt);
  scrollbar-width: none;
}

.gallery-thumbs::-webkit-scrollbar {
  display: none;
}

.gallery-thumb {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.6;
  transition: var(--transition);
  flex-shrink: 0;
}

.gallery-thumb:hover,
.gallery-thumb.active {
  opacity: 1;
  border-color: var(--color-primary);
}

@media (min-width: 768px) {
  .product-gallery {
    aspect-ratio: 3/2;
  }
  .gallery-main-img {
    height: 100%;
  }
}

/* About page contact icons */
.contact-icons {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.contact-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-alt);
  color: var(--color-primary);
  border: 1px solid var(--color-border);
  transition: var(--transition);
}

.contact-icon:hover,
.contact-icon:focus-visible {
  background: var(--color-primary);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.contact-icon svg {
  width: 24px;
  height: 24px;
}

/* ===== Product reviews ===== */
.review-summary {
  margin-bottom: 1.25rem;
}

.review-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.review-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.review-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.review-author {
  font-weight: 600;
  font-size: 0.95rem;
}

.review-stars {
  color: #f59e0b;
  letter-spacing: 1px;
}

.review-date {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.review-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.review-body {
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.review-photo {
  margin-top: 0.75rem;
  max-height: 220px;
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.review-cta {
  background: var(--color-surface-alt);
  border-radius: var(--radius);
  padding: 1rem;
}

.review-form {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
}

.rating-input {
  display: flex;
  gap: 0.25rem;
}

.rating-star {
  font-size: 1.75rem;
  line-height: 1;
  color: #d1d5db;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
}

.rating-star:hover {
  transform: scale(1.08);
}

.rating-star.active {
  color: #f59e0b;
}
