/* ===== HmongRise Storefront Styles ===== */
/* Extends the landing page design system */

:root {
  --red: #C4342D;
  --red-deep: #8B1A1A;
  --gold: #D4A017;
  --gold-light: #F2D06B;
  --green: #2E6B3E;
  --green-deep: #1A4528;
  --cream: #FFF8F0;
  --dark: #1A1108;
  --dark-warm: #2A1F10;
  --dark-card: #221A0E;
  --border: rgba(255,248,240,0.08);
  --text-muted: rgba(255,248,240,0.55);
  --text-secondary: rgba(255,248,240,0.75);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.25s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--dark);
  color: var(--cream);
  overflow-x: hidden;
  line-height: 1.7;
  min-height: 100vh;
}

h1, h2, h3, h4 { font-family: 'Syne', sans-serif; line-height: 1.15; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== PATTERN STRIP ===== */
.pattern-strip {
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--red) 0%, var(--red) 33%, var(--gold) 33%, var(--gold) 66%, var(--green) 66%, var(--green) 100%);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
}

/* ===== NAVIGATION ===== */
.store-nav {
  position: sticky;
  top: 4px;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: rgba(26, 17, 8, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.nav-logo .rise {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
}

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

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

.cart-link {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--gold);
  color: var(--dark);
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 10px;
}

/* ===== PAGE HEADER ===== */
.page-header {
  padding: 60px 32px 40px;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ===== CATEGORY FILTERS ===== */
.category-filters {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 32px 48px;
  flex-wrap: wrap;
}

.category-tab {
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: 40px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  background: transparent;
  font-family: 'DM Sans', sans-serif;
}

.category-tab:hover {
  border-color: rgba(255,248,240,0.2);
  color: var(--cream);
}

.category-tab.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(212, 160, 23, 0.08);
}

/* ===== PRODUCT GRID ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding: 0 32px 80px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== PRODUCT CARD ===== */
.product-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--dark-card);
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
  opacity: 1;
}

.product-card:hover {
  border-color: rgba(255,248,240,0.15);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.product-card a {
  display: block;
}

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

.product-image.accent-red {
  background: linear-gradient(135deg, rgba(196, 52, 45, 0.15) 0%, rgba(139, 26, 26, 0.25) 100%);
}
.product-image.accent-gold {
  background: linear-gradient(135deg, rgba(212, 160, 23, 0.15) 0%, rgba(212, 160, 23, 0.08) 100%);
}
.product-image.accent-green {
  background: linear-gradient(135deg, rgba(46, 107, 62, 0.15) 0%, rgba(26, 69, 40, 0.25) 100%);
}

.product-silhouette {
  width: 55%;
  height: 55%;
  opacity: 0.85;
  transition: transform var(--transition), opacity var(--transition);
  filter: drop-shadow(0 4px 20px rgba(0,0,0,0.2));
}

.product-card:hover .product-silhouette {
  transform: scale(1.05);
  opacity: 1;
}

.product-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.04;
  pointer-events: none;
}

.product-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.product-badge.badge-tee { background: rgba(196, 52, 45, 0.2); color: var(--red); }
.product-badge.badge-hoodie { background: rgba(46, 107, 62, 0.2); color: var(--green); }
.product-badge.badge-hat { background: rgba(212, 160, 23, 0.2); color: var(--gold); }
.product-badge.badge-longsleeve { background: rgba(196, 52, 45, 0.15); color: #E07A5F; }
.product-badge.badge-sweatpants { background: rgba(46, 107, 62, 0.15); color: #81B29A; }
.product-badge.badge-mug { background: rgba(212, 160, 23, 0.15); color: var(--gold-light); }

.product-info {
  padding: 20px;
}

.product-name {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.product-tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
}

/* ===== PRODUCT DETAIL ===== */
.product-detail {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 32px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.product-detail-image {
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.product-detail-image .product-silhouette {
  width: 50%;
  height: 50%;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  transition: color var(--transition);
}

.back-link:hover { color: var(--cream); }

.detail-category {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.detail-name {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.detail-price {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 24px;
}

.detail-description {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.8;
}

.detail-section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* Size selector */
.size-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.size-btn {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--cream);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.size-btn:hover {
  border-color: rgba(255,248,240,0.3);
}

.size-btn.active {
  border-color: var(--gold);
  background: rgba(212, 160, 23, 0.1);
  color: var(--gold);
}

/* Color selector */
.color-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 32px;
}

.color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.color-swatch:hover {
  transform: scale(1.1);
}

.color-swatch.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.3);
}

.color-swatch-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(255,248,240,0.1);
}

/* Quantity */
.qty-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.qty-controls {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.qty-minus, .qty-plus {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--cream);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background var(--transition);
}

.qty-minus:hover, .qty-plus:hover {
  background: rgba(255,248,240,0.05);
}

.qty-input {
  width: 48px;
  text-align: center;
  background: transparent;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  color: var(--cream);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  height: 40px;
}

.qty-input:focus { outline: none; }

/* Add to cart button */
.add-to-cart-btn {
  width: 100%;
  padding: 16px 32px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--gold);
  color: var(--dark);
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all var(--transition);
}

.add-to-cart-btn:hover:not(:disabled) {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(212, 160, 23, 0.3);
}

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

/* ===== CART PAGE ===== */
.cart-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}

.cart-empty {
  text-align: center;
  padding: 80px 0;
  display: none;
}

.cart-empty h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.cart-empty p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 2px;
  transition: color var(--transition);
}

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

.cart-item-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.cart-item-price {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cart-qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.cart-qty-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--cream);
  cursor: pointer;
  font-size: 0.9rem;
  transition: background var(--transition);
}

.cart-qty-btn:hover { background: rgba(255,248,240,0.05); }

.cart-qty-val {
  width: 36px;
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.cart-item-total {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  min-width: 70px;
  text-align: right;
}

.cart-remove-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  transition: all var(--transition);
}

.cart-remove-btn:hover {
  color: var(--red);
  border-color: rgba(196, 52, 45, 0.3);
  background: rgba(196, 52, 45, 0.1);
}

/* Cart summary */
.cart-summary {
  margin-top: 32px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--dark-card);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.summary-total-row {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--cream);
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: 12px;
  margin-bottom: 0;
}

.checkout-btn, .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 32px;
  margin-top: 20px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--gold);
  color: var(--dark);
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.checkout-btn:hover, .btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(212, 160, 23, 0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--cream);
  font-family: 'Syne', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-secondary:hover {
  border-color: rgba(255,248,240,0.3);
  background: rgba(255,248,240,0.03);
}

/* ===== CHECKOUT PAGE ===== */
.checkout-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 32px 80px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: start;
}

.checkout-form-section h2 {
  font-size: 1.3rem;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255,248,240,0.03);
  color: var(--cream);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  transition: border-color var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(212, 160, 23, 0.03);
}

.form-input::placeholder {
  color: rgba(255,248,240,0.25);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
}

.place-order-btn {
  margin-top: 24px;
}

.checkout-sidebar {
  position: sticky;
  top: 80px;
}

.checkout-sidebar h3 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.checkout-items {
  margin-bottom: 20px;
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.checkout-item-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.checkout-item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.checkout-item-price {
  font-weight: 600;
  font-size: 0.9rem;
}

.checkout-summary-totals {
  padding-top: 8px;
}

/* ===== ORDER CONFIRMATION ===== */
.confirmation-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 60px 32px 80px;
  text-align: center;
}

.confirmation-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(46, 107, 62, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 2rem;
  color: var(--green);
}

.confirmation-page h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.confirmation-page .order-number {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 16px;
}

.confirmation-page .confirmation-msg {
  color: var(--text-secondary);
  margin-bottom: 40px;
  font-size: 1rem;
}

.order-details {
  text-align: left;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--dark-card);
  margin-bottom: 32px;
}

.order-details h3 {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.order-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.order-detail-row:last-child {
  border-bottom: none;
  font-weight: 700;
  font-family: 'Syne', sans-serif;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
}

/* ===== NOTIFICATION ===== */
.notification {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 14px 24px;
  background: var(--green-deep);
  color: var(--cream);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 2000;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

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

.notification-error {
  background: var(--red-deep);
}

/* ===== FOOTER ===== */
.store-footer {
  padding: 48px 32px;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

.store-footer .logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: rgba(255,248,240,0.4);
}

.store-footer .logo .rise {
  color: var(--gold);
  opacity: 0.6;
}

.store-footer p {
  font-size: 0.8rem;
  color: rgba(255,248,240,0.2);
  margin-top: 8px;
}

/* ===== 404 PAGE ===== */
.not-found {
  text-align: center;
  padding: 120px 32px;
}

.not-found h1 {
  font-size: 4rem;
  color: var(--gold);
  margin-bottom: 8px;
}

.not-found p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .product-detail {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .checkout-page {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .checkout-sidebar {
    position: static;
    order: -1;
  }
}

@media (max-width: 768px) {
  .store-nav {
    padding: 12px 20px;
  }

  .nav-links {
    gap: 20px;
  }

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

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

  .category-filters {
    padding: 0 20px 32px;
  }

  .product-detail,
  .cart-page,
  .checkout-page,
  .confirmation-page {
    padding-left: 20px;
    padding-right: 20px;
  }

  .cart-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .cart-item-actions {
    width: 100%;
    justify-content: space-between;
  }

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

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 16px 40px;
  }

  .product-info {
    padding: 14px;
  }

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

  .product-price {
    font-size: 0.95rem;
  }

  .product-tagline {
    display: none;
  }
}
