/* ========================================
   THE FOUND-RY — ONLINE STORE STYLES
   ======================================== */

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

:root {
  --stone: #2c2620;
  --warm-cream: #f5f0e8;
  --gold: #b8944f;
  --gold-light: #d4b978;
  --moss: #5a6b4a;
  --moss-light: #7a8b6a;
  --river: #4a6670;
  --blush: #c9a89a;
  --charcoal: #3a3530;
  --white: #ffffff;
  --border: rgba(184,148,79,0.2);
  --border-hover: rgba(184,148,79,0.5);
  --shadow-sm: 0 1px 3px rgba(44,38,32,0.06);
  --shadow-md: 0 4px 12px rgba(44,38,32,0.08);
  --shadow-lg: 0 8px 30px rgba(44,38,32,0.12);
  --radius: 2px;
  --transition: 0.3s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  color: var(--stone);
  background: var(--warm-cream);
  overflow-x: hidden;
  font-weight: 300;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ========================================
   NAVIGATION
   ======================================== */

.store-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--warm-cream);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}

.store-nav.nav-transparent {
  background: transparent;
  border-color: transparent;
}

.store-nav.nav-scrolled {
  background: var(--warm-cream);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

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

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--stone);
  letter-spacing: -0.02em;
}

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

.nav-links {
  display: flex;
  gap: 1.8rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--charcoal);
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform var(--transition);
}

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

.nav-links a.active::after,
.nav-links a:hover::after {
  transform: scaleX(1);
}

.cart-link {
  position: relative;
  color: var(--stone);
  display: flex;
  align-items: center;
  transition: color var(--transition);
}

.cart-link:hover { color: var(--gold); }

.cart-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  background: var(--gold);
  color: var(--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;
  transition: opacity var(--transition);
}

.cart-badge.visible { opacity: 1; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 22px;
  height: 1.5px;
  background: var(--stone);
  transition: all var(--transition);
}

/* ========================================
   SHOP HERO
   ======================================== */

.shop-hero {
  padding: 8rem 2rem 4rem;
  text-align: center;
  background: linear-gradient(165deg, var(--warm-cream) 0%, #ede6db 50%, #e8dfd3 100%);
}

.shop-hero-inner {
  max-width: 600px;
  margin: 0 auto;
}

.shop-hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 600;
  color: var(--stone);
  line-height: 1.1;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.shop-hero p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  color: var(--charcoal);
  font-style: italic;
  line-height: 1.5;
}

/* ========================================
   FILTERS
   ======================================== */

.shop-filters {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 64px;
  z-index: 99;
  background: var(--warm-cream);
}

.filters-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.filters-inner::-webkit-scrollbar { display: none; }

.filter-btn {
  white-space: nowrap;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--border);
  background: transparent;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--charcoal);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.filter-btn.active {
  background: var(--stone);
  color: var(--warm-cream);
  border-color: var(--stone);
}

/* ========================================
   COLLECTION DESCRIPTION
   ======================================== */

.collection-description {
  padding: 2rem 2rem 0;
}

.collection-desc-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.collection-desc-inner p {
  font-size: 1rem;
  color: #5a534a;
  line-height: 1.8;
}

/* ========================================
   PRODUCT GRID
   ======================================== */

.product-grid-section {
  padding: 3rem 2rem 6rem;
}

.product-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
}

.product-grid.compact {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.product-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  transition: all var(--transition);
  overflow: hidden;
}

.product-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.product-image {
  aspect-ratio: 4/5;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-image-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(44,38,32,0.08);
  transition: background var(--transition);
}

.product-card:hover .product-image-overlay {
  background: rgba(44,38,32,0.15);
}

.product-image-icon {
  font-size: 3rem;
  opacity: 0.4;
  transition: all var(--transition);
  filter: grayscale(0.3);
}

.product-card:hover .product-image-icon {
  opacity: 0.6;
  transform: scale(1.1);
}

.product-info {
  padding: 1.25rem 1.25rem 1.5rem;
}

.product-collection {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--moss);
  font-weight: 500;
}

.product-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--stone);
  margin: 0.3rem 0 0.4rem;
  line-height: 1.25;
}

.product-short-desc {
  font-size: 0.85rem;
  color: #7a7268;
  line-height: 1.5;
  margin-bottom: 0.6rem;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.product-material-tag {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--moss);
  font-weight: 400;
  white-space: nowrap;
}

.product-price {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: var(--stone);
}

.no-products {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: #7a7268;
  font-size: 1.1rem;
}

/* ========================================
   PRODUCT DETAIL
   ======================================== */

.product-detail {
  padding-top: 64px;
}

.product-detail-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 64px);
}

.product-detail-image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 500px;
}

.product-detail-image-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(44,38,32,0.1);
}

.product-detail-icon {
  font-size: 6rem;
  opacity: 0.3;
  filter: grayscale(0.3);
}

.product-detail-info {
  padding: 4rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 560px;
}

.product-detail-collection {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--moss);
  font-weight: 500;
  margin-bottom: 1rem;
  transition: color var(--transition);
}

.product-detail-collection:hover { color: var(--gold); }

.product-detail-info h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  color: var(--stone);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.product-detail-price {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--stone);
  margin-bottom: 0.5rem;
}

.product-detail-material {
  font-size: 0.85rem;
  color: var(--moss);
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

.product-detail-desc {
  margin-bottom: 2rem;
}

.product-detail-desc p {
  font-size: 1rem;
  line-height: 1.8;
  color: #5a534a;
}

.product-detail-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.btn-add-cart,
.btn-buy-now {
  padding: 0.9rem 2rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  border: none;
}

.btn-add-cart {
  background: var(--stone);
  color: var(--warm-cream);
  flex: 1;
}

.btn-add-cart:hover {
  background: var(--charcoal);
}

.btn-buy-now {
  background: var(--gold);
  color: var(--white);
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-buy-now:hover {
  background: var(--gold-light);
  color: var(--stone);
}

.product-detail-specs,
.product-detail-care {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.product-detail-specs h3,
.product-detail-care h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--charcoal);
  margin-bottom: 0.75rem;
}

.product-detail-specs p,
.product-detail-care p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: #5a534a;
}

/* ========================================
   RELATED PRODUCTS
   ======================================== */

.related-products {
  padding: 4rem 2rem 6rem;
  background: var(--stone);
}

.related-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.related-inner h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--warm-cream);
  text-align: center;
  margin-bottom: 2.5rem;
}

.related-products .product-card {
  background: rgba(245,240,232,0.05);
  border-color: rgba(184,148,79,0.15);
}

.related-products .product-card:hover {
  border-color: var(--gold);
  background: rgba(245,240,232,0.1);
}

.related-products .product-info {
  background: transparent;
}

.related-products .product-collection { color: var(--blush); }
.related-products .product-name { color: var(--warm-cream); }
.related-products .product-short-desc { color: #b8b0a5; }
.related-products .product-price { color: var(--gold-light); }

/* ========================================
   CART PAGE
   ======================================== */

.cart-page {
  padding: 8rem 2rem 6rem;
  min-height: 80vh;
}

.cart-inner {
  max-width: 800px;
  margin: 0 auto;
}

.cart-inner h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  color: var(--stone);
  margin-bottom: 2rem;
}

.cart-empty {
  text-align: center;
  padding: 4rem 2rem;
}

.cart-empty-icon { font-size: 3rem; display: block; margin-bottom: 1rem; opacity: 0.5; }

.cart-empty p {
  font-size: 1.1rem;
  color: #7a7268;
  margin-bottom: 2rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 1.25rem;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-image {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-image span { font-size: 1.8rem; opacity: 0.5; }

.cart-item-details h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--stone);
  margin-bottom: 0.2rem;
}

.cart-item-details .cart-item-material {
  font-size: 0.8rem;
  color: var(--moss);
  margin-bottom: 0.4rem;
}

.cart-item-details .cart-item-price {
  font-weight: 500;
  color: var(--stone);
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.cart-qty {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--border);
}

.cart-qty button {
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--stone);
  transition: color var(--transition);
}

.cart-qty button:hover { color: var(--gold); }

.cart-qty span {
  font-size: 0.9rem;
  font-weight: 500;
  min-width: 20px;
  text-align: center;
}

.cart-remove {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  color: #999;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color var(--transition);
}

.cart-remove:hover { color: #c44; }

.cart-summary {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid var(--stone);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: #5a534a;
}

.cart-summary-row.cart-total {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--stone);
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.btn-checkout {
  width: 100%;
  padding: 1rem;
  background: var(--gold);
  color: var(--white);
  border: none;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 1rem;
}

.btn-checkout:hover { background: var(--gold-light); color: var(--stone); }

.btn-continue,
.btn-shop {
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: 0.9rem;
  border: 1px solid var(--stone);
  color: var(--stone);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all var(--transition);
}

.btn-continue:hover,
.btn-shop:hover {
  background: var(--stone);
  color: var(--warm-cream);
}

/* ========================================
   SUCCESS PAGE
   ======================================== */

.success-page {
  padding: 10rem 2rem 6rem;
  text-align: center;
  min-height: 80vh;
}

.success-inner {
  max-width: 500px;
  margin: 0 auto;
}

.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--moss);
  color: var(--white);
  font-size: 2rem;
  margin-bottom: 2rem;
}

.success-inner h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--stone);
  margin-bottom: 1rem;
}

.success-inner p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #5a534a;
  margin-bottom: 1rem;
}

.success-detail {
  font-size: 0.9rem !important;
  color: #7a7268 !important;
  margin-bottom: 2rem !important;
}

.success-inner .btn-shop {
  max-width: 300px;
  margin: 0 auto;
}

/* ========================================
   FOOTER
   ======================================== */

.store-footer {
  background: var(--charcoal);
  color: #8a8279;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem 3rem;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
}

.footer-brand .footer-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  color: var(--gold-light);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.footer-brand .footer-name em {
  font-style: italic;
  color: var(--gold);
  font-weight: 400;
}

.footer-brand p {
  font-size: 0.9rem;
  color: #8a8279;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-col h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blush);
  margin-bottom: 1rem;
}

.footer-col a,
.footer-col span {
  display: block;
  font-size: 0.85rem;
  color: #8a8279;
  margin-bottom: 0.5rem;
  transition: color var(--transition);
}

.footer-col a:hover { color: var(--warm-cream); }

.footer-bottom {
  border-top: 1px solid rgba(184,148,79,0.15);
  padding: 1.5rem 2rem;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.75rem;
  color: #666;
}

/* ========================================
   TOAST NOTIFICATION
   ======================================== */

.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--stone);
  color: var(--warm-cream);
  padding: 1rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 400;
  z-index: 10000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s ease;
  max-width: 320px;
}

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

.toast .toast-check {
  color: var(--gold);
  margin-right: 0.5rem;
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */

@media (max-width: 900px) {
  .product-detail-inner {
    grid-template-columns: 1fr;
  }

  .product-detail-image {
    min-height: 350px;
  }

  .product-detail-info {
    padding: 2.5rem 2rem;
    max-width: 100%;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--warm-cream);
    flex-direction: column;
    padding: 2rem;
    gap: 0;
    z-index: 999;
    border-top: 1px solid var(--border);
  }

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

  .nav-links a {
    padding: 1rem 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-toggle { display: flex; }

  .shop-hero { padding: 7rem 1.5rem 3rem; }

  .shop-filters { padding: 1rem 1rem; }

  .filter-btn { padding: 0.4rem 0.9rem; font-size: 0.75rem; }

  .product-grid-section { padding: 2rem 1rem 4rem; }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .product-info { padding: 0.9rem; }

  .product-name { font-size: 1.1rem; }

  .product-short-desc { display: none; }

  .product-detail-actions {
    flex-direction: column;
  }

  .cart-item {
    grid-template-columns: 60px 1fr;
    gap: 1rem;
  }

  .cart-item-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .footer-links {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .related-inner h2 { font-size: 1.5rem; }

  .toast { left: 1rem; right: 1rem; bottom: 1rem; max-width: none; }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
  }

  .product-image { aspect-ratio: 3/4; }

  .nav-inner { padding: 0 1rem; }
}
