/* ─── SizeHaus Store Styles ─── */
/* Extends landing page design tokens */

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

:root {
  --ink: #1a1a1a;
  --cream: #faf8f5;
  --warm: #e8ddd3;
  --accent: #c45d3e;
  --accent-light: #f0d4cb;
  --accent-hover: #b04e32;
  --muted: #7a7168;
  --deep: #2c2420;
  --white: #ffffff;
  --success: #4a7a5a;
  --border: rgba(0,0,0,0.06);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
  --radius: 3px;
  --transition: 0.25s ease;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ─── NAV ─── */
.store-nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 1.2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.store-nav .logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
  color: var(--deep);
  text-decoration: none;
}

.store-nav .logo span { color: var(--accent); }

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

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: color var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--deep);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.cart-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--deep);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: all var(--transition);
  position: relative;
}

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

.cart-btn svg {
  width: 20px;
  height: 20px;
}

.cart-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--accent);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 600;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(4px, -4px);
}

.cart-badge:empty { display: none; }

/* ─── MAIN CONTENT ─── */
.store-main {
  padding-top: 5rem;
  min-height: 100vh;
}

/* ─── CATALOG HERO ─── */
.catalog-hero {
  padding: 3rem 3rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.catalog-hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--deep);
  margin-bottom: 0.5rem;
}

.catalog-hero p {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 500px;
  line-height: 1.6;
}

/* ─── CATEGORY TABS ─── */
.category-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0 3rem;
  max-width: 1200px;
  margin: 0 auto 2rem;
  border-bottom: 1px solid var(--warm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.category-tab {
  padding: 0.8rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color var(--transition);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.category-tab:hover {
  color: var(--deep);
}

.category-tab.active {
  color: var(--deep);
  border-bottom-color: var(--accent);
}

/* ─── PRODUCT GRID ─── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 0 3rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.product-card-image {
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.product-card-image .product-icon {
  font-size: 3rem;
  opacity: 0.3;
  color: var(--white);
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  letter-spacing: -1px;
  text-transform: uppercase;
}

.product-card-image .featured-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--accent);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.3rem 0.75rem;
  border-radius: 2px;
}

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

.product-card-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.product-card-name {
  font-family: 'Syne', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--deep);
  margin-bottom: 0.3rem;
  letter-spacing: -0.3px;
}

.product-card-price {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}

.product-card-sizes {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* ─── PRODUCT DETAIL ─── */
.product-detail {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 3rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.product-image-main {
  height: 560px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 7rem;
}

.product-image-main .product-icon {
  font-size: 5rem;
  opacity: 0.25;
  color: var(--white);
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  text-transform: uppercase;
}

.product-info {
  padding-top: 1rem;
}

.product-breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.product-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color var(--transition);
}

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

.product-breadcrumb .separator {
  font-size: 0.7rem;
}

.product-info h1 {
  font-family: 'Syne', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--deep);
  letter-spacing: -1px;
  margin-bottom: 0.75rem;
  line-height: 1.15;
}

.product-price {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.product-description {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 2rem;
  max-width: 500px;
}

/* Color Selector */
.selector-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--deep);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}

.color-options {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.color-chip {
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1.5px solid var(--warm);
  background: var(--white);
  color: var(--deep);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}

.color-chip:hover {
  border-color: var(--muted);
}

.color-chip.selected {
  border-color: var(--deep);
  background: var(--deep);
  color: var(--white);
}

/* Size Selector */
.size-options {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.size-chip {
  min-width: 50px;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1.5px solid var(--warm);
  background: var(--white);
  color: var(--deep);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.size-chip:hover {
  border-color: var(--muted);
}

.size-chip.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--white);
}

/* Add to Cart Button */
.add-to-cart-btn {
  width: 100%;
  padding: 1.1rem 2rem;
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: var(--deep);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 1rem;
}

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

.add-to-cart-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

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

.product-details-list {
  margin-top: 2rem;
  border-top: 1px solid var(--warm);
  padding-top: 1.5rem;
}

.product-details-list h3 {
  font-family: 'Syne', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--deep);
  margin-bottom: 1rem;
}

.product-details-list ul {
  list-style: none;
}

.product-details-list li {
  font-size: 0.9rem;
  color: var(--muted);
  padding: 0.4rem 0;
  line-height: 1.5;
}

.product-details-list li::before {
  content: '—';
  color: var(--accent);
  margin-right: 0.75rem;
  font-weight: 600;
}

/* Related Products */
.related-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 3rem 4rem;
  border-top: 1px solid var(--warm);
}

.related-section h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--deep);
  margin-bottom: 2rem;
  letter-spacing: -0.5px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* ─── CART PAGE ─── */
.cart-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 3rem 4rem;
}

.cart-page h1 {
  font-family: 'Syne', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--deep);
  letter-spacing: -1px;
  margin-bottom: 0.5rem;
}

.cart-count-label {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

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

.cart-empty h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--deep);
  margin-bottom: 0.75rem;
}

.cart-empty p {
  color: var(--muted);
  margin-bottom: 2rem;
}

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

.cart-item-image {
  width: 100px;
  height: 100px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-image .product-icon {
  font-size: 1.2rem;
  opacity: 0.3;
  color: var(--white);
  font-family: 'Syne', sans-serif;
  font-weight: 800;
}

.cart-item-details h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--deep);
  margin-bottom: 0.25rem;
}

.cart-item-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.qty-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--warm);
  background: var(--white);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
  color: var(--deep);
  transition: all var(--transition);
}

.qty-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cart-item-qty {
  font-size: 0.95rem;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

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

.cart-item-price {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--deep);
  margin-bottom: 0.5rem;
}

.remove-btn {
  font-size: 0.8rem;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  transition: color var(--transition);
}

.remove-btn:hover {
  color: var(--accent);
}

/* Cart Summary */
.cart-summary {
  margin-top: 2rem;
  padding: 2rem;
  background: var(--white);
  border-radius: var(--radius);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.cart-summary-row.total {
  border-top: 1px solid var(--warm);
  margin-top: 0.75rem;
  padding-top: 1rem;
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--deep);
}

.checkout-btn {
  display: block;
  width: 100%;
  padding: 1.1rem 2rem;
  margin-top: 1.5rem;
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  text-decoration: none;
}

.checkout-btn:hover {
  background: var(--accent-hover);
}

.continue-shopping {
  display: block;
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--transition);
}

.continue-shopping:hover {
  color: var(--accent);
}

/* ─── CHECKOUT PAGE ─── */
.checkout-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 3rem 4rem;
}

.checkout-page h1 {
  font-family: 'Syne', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--deep);
  letter-spacing: -1px;
  margin-bottom: 2rem;
}

.checkout-section {
  margin-bottom: 2.5rem;
}

.checkout-section h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--deep);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--warm);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-row.full {
  grid-template-columns: 1fr;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--deep);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  border: 1.5px solid var(--warm);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  transition: border-color var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent);
}

.form-group input::placeholder {
  color: #bbb;
}

.checkout-order-summary {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.checkout-item .item-name {
  color: var(--deep);
  font-weight: 500;
}

.checkout-total {
  display: flex;
  justify-content: space-between;
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  border-top: 1px solid var(--warm);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--deep);
}

.place-order-btn {
  width: 100%;
  padding: 1.1rem 2rem;
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}

.place-order-btn:hover {
  background: var(--accent-hover);
}

.checkout-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 1rem;
}

/* ─── ORDER SUCCESS ─── */
.order-success {
  text-align: center;
  padding: 6rem 2rem;
  max-width: 600px;
  margin: 0 auto;
}

.order-success .checkmark {
  width: 64px;
  height: 64px;
  background: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
}

.order-success .checkmark svg {
  width: 32px;
  height: 32px;
  color: var(--white);
}

.order-success h1 {
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--deep);
  margin-bottom: 0.75rem;
}

.order-success p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* ─── STORE FOOTER ─── */
.store-footer {
  padding: 3rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--warm);
  margin-top: 2rem;
}

.store-footer .logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--deep);
  margin-bottom: 0.5rem;
}

.store-footer .logo span {
  color: var(--accent);
}

.store-footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
}

.store-footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color var(--transition);
}

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

/* ─── BUTTON UTILITY ─── */
.btn-outline {
  display: inline-block;
  padding: 0.8rem 2rem;
  font-family: 'Syne', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--deep);
  border: 2px solid var(--deep);
  background: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
}

.btn-outline:hover {
  background: var(--deep);
  color: var(--white);
}

/* ─── LOADING ─── */
.loading-spinner {
  display: flex;
  justify-content: center;
  padding: 4rem;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--warm);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ─── TOAST NOTIFICATION ─── */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--deep);
  color: var(--white);
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 1000;
  transform: translateY(120%);
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
}

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

.toast.success {
  background: var(--success);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .store-nav {
    padding: 1rem 1.5rem;
  }

  .nav-center {
    display: none;
  }

  .catalog-hero {
    padding: 2rem 1.5rem 1.5rem;
  }

  .category-tabs {
    padding: 0 1.5rem;
  }

  .product-grid {
    padding: 0 1.5rem 3rem;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
  }

  .product-detail {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1rem 1.5rem 3rem;
  }

  .product-image-main {
    height: 400px;
    position: static;
  }

  .related-section {
    padding: 2rem 1.5rem 3rem;
  }

  .related-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .cart-page {
    padding: 1.5rem 1.5rem 3rem;
  }

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

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

  .checkout-page {
    padding: 1.5rem 1.5rem 3rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .store-footer {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .product-card-image {
    height: 220px;
  }

  .product-card-info {
    padding: 1rem;
  }

  .product-card-name {
    font-size: 0.95rem;
  }
}
