/* Core Ecom Storefront Styling */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

body {
  font-family: 'Lato', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  margin: 0;
  line-height: 1.3;
  color: var(--heading);
}

/* Layout */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}
.section { padding-top: 6rem;
  padding-bottom: 6rem; }

/* Navbar */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.brand {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--heading);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav-links a {
  color: var(--text);
  text-decoration: none;
  margin: 0 1rem;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--accent); }

.nav-actions { display: flex; gap: 1.5rem; align-items: center; }
.cart-icon {
  position: relative;
  cursor: pointer;
  font-size: 1.25rem;
}
.cart-badge {
  position: absolute;
  top: -8px;
  right: -12px;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* Hero Section */
.hero {
  height: 85vh;
  display: flex;
  align-items: center;
  background: var(--surface);
  position: relative;
  overflow: hidden;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}
.hero-title {
  font-size: clamp(3rem, 5vw, 5rem);
  margin-bottom: 1.5rem;
}
.hero-subtitle {
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: 2.5rem;
  color: var(--muted);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
}
.btn:hover {
  background: transparent;
  color: var(--accent);
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}
@media (max-width: 1024px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .product-grid { grid-template-columns: 1fr; } }

.product-card {
  group;
  cursor: pointer;
}
.product-img-wrapper {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 1rem;
}
.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.product-card:hover .product-img {
  transform: scale(1.05);
}
.product-title {
  font-family: 'Lato', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.product-price {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Cart Drawer */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.cart-drawer {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: var(--bg);
  z-index: 100;
  box-shadow: -5px 0 30px rgba(0,0,0,0.1);
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}
body.cart-open { overflow: hidden; }
body.cart-open .cart-overlay { opacity: 1; visibility: visible; }
body.cart-open .cart-drawer { right: 0; }

.cart-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cart-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
}
.cart-body {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}
.cart-footer {
  padding: 2rem;
  border-top: 1px solid var(--border);
}
.cart-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.cart-item img {
  width: 80px;
  height: 100px;
  object-fit: cover;
}
.cart-item-info { flex: 1; }
.cart-item-title { font-weight: bold; margin-bottom: 0.25rem; font-family: 'Lato', sans-serif;}
.cart-item-price { color: var(--muted); }

/* Scheme Switcher */
.theme-switcher { position: fixed; bottom: 2rem; left: 2rem; z-index: 9999; }
.theme-toggle { width: 3.5rem; height: 3.5rem; border-radius: 50%; background: var(--text); color: var(--bg); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 5px 15px rgba(0,0,0,0.1); font-size: 1.5rem; transition: all 0.3s ease; }
.theme-toggle:hover { transform: scale(1.1); }
.theme-menu { position: absolute; bottom: calc(100% + 1rem); left: 0; width: 280px; padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); background: var(--bg); border: 1px solid var(--border); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.theme-switcher.open .theme-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.theme-option { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1rem; cursor: pointer; transition: background 0.2s; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; }
.theme-option:hover { background: var(--surface); }
.theme-option.active { border-left: 2px solid var(--accent); background: var(--surface); }
.theme-color-preview { width: 20px; height: 20px; border-radius: 50%; }

/* --- Upgrades --- */
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
[data-reveal] {
  opacity: 0;
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  animation: reveal-up 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Categories Section */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}
@media (max-width: 768px) { .categories-grid { grid-template-columns: 1fr; } }
.category-card {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.category-card:hover img {
  transform: scale(1.05);
}
.category-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.category-title {
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  z-index: 2;
}

/* Features Block */
.features-banner {
  background: var(--surface);
  padding: 4rem 2rem;
  margin: 4rem 0;
  display: flex;
  justify-content: space-around;
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
@media (max-width: 768px) { .features-banner { flex-direction: column; gap: 3rem; } }
.feature-item h3 {
  font-family: 'Lato', sans-serif;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.feature-item p {
  color: var(--muted);
  font-size: 0.875rem;
}

/* Testimonials */
.testimonials-section {
  background: var(--surface);
  padding: 6rem 2rem;
  text-align: center;
}
.testimonial-text {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-family: 'Playfair Display', serif;
  font-style: italic;
  max-width: 800px;
  margin: 0 auto 2rem;
  line-height: 1.4;
}
.testimonial-author {
  font-family: 'Lato', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.875rem;
}

/* Instagram / Gallery Grid */
.ig-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
}
@media (max-width: 768px) { .ig-grid { grid-template-columns: repeat(3, 1fr); } }
.ig-item {
  aspect-ratio: 1;
  overflow: hidden;
}
.ig-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.ig-item:hover img {
  transform: scale(1.1);
}

/* Footer */
footer {
  padding: 6rem 2rem 2rem;
  background: var(--bg);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 4rem;
  max-width: 1400px;
  margin: 0 auto;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h4 {
  margin-bottom: 1.5rem;
  font-family: 'Lato', sans-serif;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.footer-col p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.footer-col a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 0.75rem;
  transition: color 0.2s;
  font-size: 0.9rem;
}
.footer-col a:hover { color: var(--accent); }
.newsletter-form {
  display: flex;
  margin-top: 1rem;
}
.newsletter-input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: 'Lato', sans-serif;
}
.newsletter-btn {
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: #fff;
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  cursor: pointer;
}
.footer-bottom {
  text-align: center;
  padding-top: 4rem;
  color: var(--muted);
  font-size: 0.875rem;
}

/* --- UNIVERSAL MOBILE PATCH --- */
@media (max-width: 768px) {
  .nav-links { display: none !important; }
  .hero-btns { flex-direction: column !important; width: 100% !important; align-items: stretch !important; gap: 0.5rem !important; margin-bottom: 2rem !important; }
  .hero-btns .btn { width: 100% !important; justify-content: center !important; margin: 0 !important; }
  .bento-card, .feature-card, .pricing-card, .pricing-tier { grid-column: 1 / -1 !important; }
  .bento, .features-grid, .pricing-grid, .stats-grid, .footer-grid { grid-template-columns: 1fr !important; }
  .hero-title { font-size: 2.5rem !important; }
  .stat-value { font-size: 3.5rem !important; }
  .hero { flex-direction: column !important; padding-top: 6rem !important; gap: 3rem !important; height: auto !important; min-height: unset !important; }
  .hero > div { padding-right: 0 !important; padding-left: 0 !important; width: 100% !important; text-align: center !important; }
  .pricing-header h2 { font-size: 2.5rem !important; }
}
