/* ─── THE GYPSY WAY — SHOP STYLES ─── */
/* Extends landing page design tokens */

:root {
  --cream: #F5F0E8;
  --sand: #E8DFD0;
  --terracotta: #C4704B;
  --deep-brown: #3D2B1F;
  --sage: #8B9A6B;
  --dusty-rose: #C9A9A6;
  --warm-white: #FDFBF7;
  --gold: #B8860B;
  --light-brown: #6B5B4F;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--warm-white);
  color: var(--deep-brown);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── NAVIGATION ─── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 251, 247, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(61, 43, 31, 0.06);
  padding: 0 24px;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--deep-brown);
  text-decoration: none;
  letter-spacing: 0.5px;
}

.nav-logo em {
  font-style: italic;
  color: var(--terracotta);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--light-brown);
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--terracotta);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--terracotta);
  border-radius: 1px;
}

.cart-link {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -14px;
  background: var(--terracotta);
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  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.175, 0.885, 0.32, 1.275);
}

.cart-count.visible {
  opacity: 1;
  transform: scale(1);
}

/* Mobile menu */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--deep-brown);
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* ─── PAGE HEADER ─── */
.page-header {
  padding: 60px 24px 40px;
  text-align: center;
  background: linear-gradient(170deg, var(--cream) 0%, var(--warm-white) 60%);
  position: relative;
}

.page-header::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 112, 75, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.page-header .eyebrow {
  font-size: 0.75rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 500;
  margin-bottom: 16px;
}

.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  color: var(--deep-brown);
  margin-bottom: 12px;
}

.page-header h1 em {
  font-style: italic;
  color: var(--terracotta);
}

.page-header .subtitle {
  font-size: 1.05rem;
  color: var(--light-brown);
  font-weight: 300;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ─── BREADCRUMB ─── */
.breadcrumb {
  padding: 16px 24px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.breadcrumb a {
  font-size: 0.8rem;
  color: var(--light-brown);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--terracotta);
}

.breadcrumb span {
  font-size: 0.8rem;
  color: var(--terracotta);
  font-weight: 500;
}

.breadcrumb .sep {
  margin: 0 8px;
  color: var(--sand);
}

/* ─── CATEGORY GRID (Shop Page) ─── */
.categories-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px 80px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.category-card {
  padding: 48px 32px;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: var(--deep-brown);
  display: block;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(61, 43, 31, 0.12);
}

.category-card.dark-card {
  color: white;
}

.category-card.dark-card h3,
.category-card.dark-card p {
  color: white;
}

.category-card .cat-icon {
  font-size: 2rem;
  margin-bottom: 20px;
  display: block;
}

.category-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.category-card p {
  font-size: 0.92rem;
  line-height: 1.6;
  opacity: 0.85;
  font-weight: 300;
}

.category-card .product-count {
  margin-top: 16px;
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 500;
  opacity: 0.7;
}

.category-card:nth-child(5) {
  grid-column: 1 / -1;
  text-align: center;
}

/* ─── PRODUCTS GRID ─── */
.products-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px 80px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

.product-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: var(--deep-brown);
  display: block;
  border: 1px solid rgba(61, 43, 31, 0.06);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(61, 43, 31, 0.1);
}

.product-card-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--cream);
  position: relative;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

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

.product-badge.sale {
  background: var(--sage);
}

.product-card-info {
  padding: 20px;
}

.product-card-info h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.3;
}

.product-card-info .product-desc {
  font-size: 0.85rem;
  color: var(--light-brown);
  font-weight: 300;
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-info .price-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.price {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--deep-brown);
}

.compare-price {
  font-size: 0.9rem;
  color: var(--dusty-rose);
  text-decoration: line-through;
  font-weight: 300;
}

/* ─── PRODUCT DETAIL ─── */
.product-detail {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.product-image-main {
  border-radius: 20px;
  overflow: hidden;
  background: var(--cream);
  aspect-ratio: 3 / 4;
  position: sticky;
  top: 88px;
}

.product-image-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  padding: 20px 0;
}

.product-info .category-label {
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 500;
  margin-bottom: 12px;
}

.product-info h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 400;
  margin-bottom: 16px;
  line-height: 1.2;
}

.product-info .price-block {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 24px;
}

.product-info .price-block .price {
  font-size: 1.6rem;
  font-weight: 600;
}

.product-info .price-block .compare-price {
  font-size: 1.1rem;
}

.product-info .price-block .save-badge {
  background: var(--sage);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.product-info .description {
  font-size: 1rem;
  color: var(--light-brown);
  line-height: 1.8;
  font-weight: 300;
  margin-bottom: 32px;
}

.product-info .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.product-info .tag {
  font-size: 0.72rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--cream);
  color: var(--light-brown);
  font-weight: 500;
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 24px;
}

.quantity-selector label {
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 500;
  margin-right: 16px;
  color: var(--light-brown);
}

.quantity-selector button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--sand);
  background: white;
  color: var(--deep-brown);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-selector button:first-of-type {
  border-radius: 8px 0 0 8px;
}

.quantity-selector button:last-of-type {
  border-radius: 0 8px 8px 0;
}

.quantity-selector button:hover {
  background: var(--cream);
}

.quantity-selector .qty-value {
  width: 50px;
  height: 40px;
  border-top: 1px solid var(--sand);
  border-bottom: 1px solid var(--sand);
  border-left: none;
  border-right: none;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  color: var(--deep-brown);
  background: white;
}

.add-to-cart-btn {
  width: 100%;
  padding: 16px 32px;
  background: var(--terracotta);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.add-to-cart-btn:hover {
  background: #B5623F;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(196, 112, 75, 0.3);
}

.add-to-cart-btn:active {
  transform: translateY(0);
}

.add-to-cart-btn.added {
  background: var(--sage);
}

/* ─── CART PAGE ─── */
.cart-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 24px 80px;
}

.cart-empty {
  text-align: center;
  padding: 80px 24px;
}

.cart-empty .empty-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

.cart-empty h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 12px;
}

.cart-empty p {
  color: var(--light-brown);
  font-weight: 300;
  margin-bottom: 28px;
}

.cart-empty a {
  display: inline-block;
  padding: 14px 28px;
  background: var(--terracotta);
  color: white;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.cart-empty a:hover {
  background: #B5623F;
  transform: translateY(-2px);
}

.cart-items {
  margin-bottom: 40px;
}

.cart-item {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid rgba(61, 43, 31, 0.08);
  align-items: center;
}

.cart-item-image {
  width: 100px;
  height: 120px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--cream);
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.cart-item-info .item-price {
  font-size: 0.95rem;
  color: var(--terracotta);
  font-weight: 500;
  margin-bottom: 12px;
}

.cart-item-info .item-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-item-info .item-controls button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--sand);
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--deep-brown);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-info .item-controls button:hover {
  background: var(--cream);
}

.cart-item-info .item-controls .item-qty {
  font-weight: 500;
  font-size: 0.95rem;
  min-width: 20px;
  text-align: center;
}

.cart-item-total {
  text-align: right;
}

.cart-item-total .line-total {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.cart-item-total .remove-btn {
  background: none;
  border: none;
  color: var(--dusty-rose);
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
  font-family: 'DM Sans', sans-serif;
  transition: color 0.2s;
}

.cart-item-total .remove-btn:hover {
  color: var(--terracotta);
}

.cart-summary {
  background: var(--cream);
  border-radius: 16px;
  padding: 32px;
}

.cart-summary .summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 0.95rem;
}

.cart-summary .summary-row.total {
  border-top: 1px solid rgba(61, 43, 31, 0.1);
  margin-top: 8px;
  padding-top: 16px;
  font-weight: 600;
  font-size: 1.15rem;
}

.cart-summary .summary-note {
  text-align: center;
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--light-brown);
  font-weight: 300;
  font-style: italic;
}

/* ─── FEATURED PRODUCTS ON SHOP PAGE ─── */
.featured-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(61, 43, 31, 0.08);
}

.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 400;
}

.section-header a {
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--terracotta);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}

.section-header a:hover {
  opacity: 0.7;
}

/* ─── FOOTER ─── */
.footer {
  margin-top: auto;
  padding: 40px 24px;
  text-align: center;
  background: var(--deep-brown);
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
  letter-spacing: 1px;
}

.footer span {
  color: rgba(255,255,255,0.7);
  font-family: 'Playfair Display', serif;
  font-style: italic;
}

.footer-links {
  margin-bottom: 16px;
}

.footer-links a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  margin: 0 12px;
  font-size: 0.8rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--terracotta);
}

/* ─── LOADING STATE ─── */
.loading {
  text-align: center;
  padding: 60px 24px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 2px solid var(--sand);
  border-top-color: var(--terracotta);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

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

.loading p {
  color: var(--light-brown);
  font-weight: 300;
  font-size: 0.9rem;
}

/* ─── TOAST NOTIFICATION ─── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--deep-brown);
  color: white;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast .toast-icon {
  font-size: 1.1rem;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(253, 251, 247, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid rgba(61, 43, 31, 0.08);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .categories-grid {
    grid-template-columns: 1fr;
    padding: 16px 16px 60px;
  }

  .category-card:nth-child(5) {
    grid-column: 1;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .product-detail {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 16px 16px 60px;
  }

  .product-image-main {
    position: static;
    aspect-ratio: 1 / 1;
  }

  .cart-item {
    grid-template-columns: 80px 1fr;
    gap: 16px;
  }

  .cart-item-total {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }

  .page-header {
    padding: 40px 20px 30px;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .product-card-info h3 {
    font-size: 1rem;
  }
}
