/* ===== ChuteSide Store Styles ===== */
/* Matches landing page design tokens */

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

:root {
  --sand: #E8DDD3;
  --dust: #C4A882;
  --leather: #8B5E3C;
  --iron: #2C2C2C;
  --arena: #1A1611;
  --chalk: #F5F0EB;
  --rust: #B44D2D;
  --gold: #D4A841;
  --arena-light: #241E17;
}

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  backdrop-filter: blur(20px);
  background: rgba(26, 22, 17, 0.92);
  border-bottom: 1px solid rgba(196, 168, 130, 0.1);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 40px;
}

.logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.5px;
  color: var(--chalk);
}

.logo span { color: var(--rust); }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(245, 240, 235, 0.55);
  transition: color 0.2s ease;
  letter-spacing: 0.3px;
}

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

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cart-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(245, 240, 235, 0.65);
  transition: color 0.2s ease;
  position: relative;
}

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

.cart-count {
  background: var(--rust);
  color: var(--chalk);
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

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

/* ===== PAGE HEADER ===== */
.page-header {
  padding: 140px 40px 60px;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(180, 77, 45, 0.1) 0%, transparent 50%),
    linear-gradient(170deg, var(--arena) 0%, var(--arena-light) 100%);
}

.page-header h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -1.5px;
}

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

.page-header .subtitle {
  font-size: 17px;
  color: rgba(245, 240, 235, 0.55);
  margin-top: 16px;
  font-weight: 300;
  max-width: 520px;
  line-height: 1.6;
}

.breadcrumb {
  font-size: 13px;
  color: rgba(245, 240, 235, 0.35);
  margin-bottom: 20px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.breadcrumb a {
  color: rgba(245, 240, 235, 0.5);
  transition: color 0.2s;
}

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

.breadcrumb .sep { opacity: 0.3; }

/* ===== DISCIPLINE TABS ===== */
.discipline-tabs {
  display: flex;
  gap: 4px;
  padding: 0 40px;
  margin-top: -28px;
  position: relative;
  z-index: 10;
}

.tab {
  padding: 14px 28px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: rgba(245, 240, 235, 0.5);
  background: rgba(196, 168, 130, 0.04);
  border: 1px solid rgba(196, 168, 130, 0.08);
  border-bottom: none;
  cursor: pointer;
  transition: all 0.25s ease;
  text-transform: uppercase;
}

.tab:hover {
  color: var(--chalk);
  background: rgba(196, 168, 130, 0.08);
}

.tab.active {
  color: var(--chalk);
  background: var(--arena-light);
  border-color: rgba(196, 168, 130, 0.15);
}

/* ===== PRODUCT GRID ===== */
.products-section {
  padding: 48px 40px 120px;
  background: var(--arena-light);
  min-height: 400px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1200px;
}

.product-card {
  background: rgba(196, 168, 130, 0.03);
  border: 1px solid rgba(196, 168, 130, 0.08);
  transition: all 0.35s ease;
  cursor: pointer;
  overflow: hidden;
}

.product-card:hover {
  border-color: rgba(196, 168, 130, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

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

.product-card-image.saddle-bronc {
  background: linear-gradient(135deg, #2a1f15 0%, #1a1611 50%, #2a2015 100%);
}

.product-card-image.bull-riding {
  background: linear-gradient(135deg, #1f1510 0%, #1a1611 50%, #251510 100%);
}

.product-card-image.barrel-racing {
  background: linear-gradient(135deg, #1a1a20 0%, #1a1611 50%, #201a1a 100%);
}

.product-card-image .category-icon {
  font-size: 56px;
  opacity: 0.15;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.product-card-image .product-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: var(--rust);
  color: var(--chalk);
  padding: 5px 12px;
  border-radius: 2px;
}

.product-card-image .brand-label {
  position: absolute;
  bottom: 16px;
  left: 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--dust);
  opacity: 0.7;
}

.product-card-body {
  padding: 24px;
}

.product-card-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
  line-height: 1.3;
}

.product-card-desc {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(245, 240, 235, 0.45);
  font-weight: 300;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

.product-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.product-card-action {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--rust);
  transition: color 0.2s;
}

.product-card:hover .product-card-action { color: var(--gold); }

/* ===== PRODUCT DETAIL ===== */
.product-detail {
  padding: 120px 40px 80px;
  max-width: 1100px;
  margin: 0 auto;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.product-image-main {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(196, 168, 130, 0.1);
  position: relative;
  overflow: hidden;
}

.product-image-main .category-icon {
  font-size: 120px;
  opacity: 0.12;
}

.product-image-main .brand-watermark {
  position: absolute;
  bottom: 24px;
  left: 24px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--dust);
  opacity: 0.5;
}

.product-info { padding-top: 8px; }

.product-discipline-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 12px;
}

.product-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 36px;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 8px;
}

.product-brand {
  font-size: 14px;
  color: var(--dust);
  font-weight: 500;
  margin-bottom: 24px;
}

.product-price {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 32px;
  color: var(--gold);
  margin-bottom: 28px;
}

.product-description {
  font-size: 16px;
  line-height: 1.7;
  color: rgba(245, 240, 235, 0.65);
  font-weight: 300;
  margin-bottom: 32px;
}

.product-details-block {
  padding: 24px 0;
  border-top: 1px solid rgba(196, 168, 130, 0.1);
}

.product-details-title {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--dust);
  margin-bottom: 12px;
}

.product-details-text {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(245, 240, 235, 0.5);
  font-weight: 300;
}

.product-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  text-transform: uppercase;
}

.btn-primary {
  background: var(--rust);
  color: var(--chalk);
}

.btn-primary:hover {
  background: #c45533;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(180, 77, 45, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--chalk);
  border: 1px solid rgba(196, 168, 130, 0.25);
}

.btn-secondary:hover {
  border-color: var(--dust);
  background: rgba(196, 168, 130, 0.05);
}

.btn-gold {
  background: var(--gold);
  color: var(--arena);
}

.btn-gold:hover {
  background: #e0b44a;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(212, 168, 65, 0.3);
}

.btn-full { width: 100%; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ===== CART ===== */
.cart-section {
  padding: 140px 40px 80px;
  max-width: 900px;
  margin: 0 auto;
}

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

.cart-empty-icon {
  font-size: 64px;
  opacity: 0.15;
  margin-bottom: 24px;
}

.cart-empty h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 24px;
  margin-bottom: 12px;
}

.cart-empty p {
  color: rgba(245, 240, 235, 0.45);
  font-weight: 300;
  margin-bottom: 32px;
}

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

.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto auto;
  gap: 24px;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid rgba(196, 168, 130, 0.08);
}

.cart-item-image {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(196, 168, 130, 0.1);
  font-size: 32px;
  opacity: 0.3;
}

.cart-item-name {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
}

.cart-item-meta {
  font-size: 13px;
  color: rgba(245, 240, 235, 0.4);
}

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

.qty-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(196, 168, 130, 0.06);
  border: 1px solid rgba(196, 168, 130, 0.15);
  color: var(--chalk);
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
}

.qty-btn:hover {
  background: rgba(196, 168, 130, 0.12);
  border-color: var(--dust);
}

.qty-value {
  font-weight: 600;
  font-size: 15px;
  min-width: 24px;
  text-align: center;
}

.cart-item-price {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--gold);
  min-width: 100px;
  text-align: right;
}

.cart-remove {
  font-size: 12px;
  color: rgba(245, 240, 235, 0.3);
  cursor: pointer;
  transition: color 0.2s;
  background: none;
  border: none;
  margin-top: 4px;
}

.cart-remove:hover { color: var(--rust); }

.cart-summary {
  padding: 32px;
  background: rgba(196, 168, 130, 0.03);
  border: 1px solid rgba(196, 168, 130, 0.08);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 15px;
  color: rgba(245, 240, 235, 0.6);
}

.cart-summary-row.total {
  border-top: 1px solid rgba(196, 168, 130, 0.15);
  margin-top: 12px;
  padding-top: 16px;
  font-size: 18px;
  color: var(--chalk);
}

.cart-summary-row.total .cart-total-amount {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: var(--gold);
}

.cart-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
}

/* ===== CHECKOUT ===== */
.checkout-section {
  padding: 140px 40px 80px;
  max-width: 700px;
  margin: 0 auto;
}

.checkout-section h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 32px;
  margin-bottom: 8px;
}

.checkout-subtitle {
  color: rgba(245, 240, 235, 0.5);
  font-weight: 300;
  margin-bottom: 40px;
}

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

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--dust);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 16px 20px;
  background: rgba(196, 168, 130, 0.04);
  border: 1px solid rgba(196, 168, 130, 0.15);
  color: var(--chalk);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  transition: border-color 0.2s;
  outline: none;
}

.form-input:focus {
  border-color: var(--dust);
  background: rgba(196, 168, 130, 0.08);
}

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

.checkout-order-summary {
  padding: 24px;
  background: rgba(196, 168, 130, 0.03);
  border: 1px solid rgba(196, 168, 130, 0.08);
  margin-bottom: 32px;
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  color: rgba(245, 240, 235, 0.6);
}

.checkout-item .item-price {
  color: var(--gold);
  font-weight: 600;
}

.checkout-total {
  display: flex;
  justify-content: space-between;
  padding-top: 16px;
  margin-top: 12px;
  border-top: 1px solid rgba(196, 168, 130, 0.1);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 20px;
}

.checkout-total .total-amount { color: var(--gold); }

/* ===== SUCCESS ===== */
.success-section {
  padding: 140px 40px 80px;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.success-icon {
  font-size: 72px;
  margin-bottom: 24px;
}

.success-section h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 36px;
  margin-bottom: 16px;
}

.success-section p {
  color: rgba(245, 240, 235, 0.55);
  font-weight: 300;
  line-height: 1.7;
  margin-bottom: 32px;
}

/* ===== LOADING ===== */
.loading {
  text-align: center;
  padding: 80px 0;
  color: rgba(245, 240, 235, 0.3);
  font-size: 14px;
  letter-spacing: 1px;
}

.loading::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(196, 168, 130, 0.15);
  border-top-color: var(--rust);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 12px;
  vertical-align: middle;
}

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

/* ===== FOOTER ===== */
.store-footer {
  padding: 40px;
  border-top: 1px solid rgba(196, 168, 130, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--arena);
}

.store-footer .footer-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: rgba(245, 240, 235, 0.3);
}

.store-footer .footer-text {
  font-size: 13px;
  color: rgba(245, 240, 235, 0.2);
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  padding: 16px 28px;
  background: var(--arena-light);
  border: 1px solid rgba(196, 168, 130, 0.2);
  color: var(--chalk);
  font-size: 14px;
  font-weight: 500;
  z-index: 1000;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

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

.toast .toast-icon { margin-right: 8px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav { padding: 16px 20px; }
  .nav-left { gap: 20px; }
  .nav-links { display: none; }
  .logo { font-size: 18px; }

  .page-header { padding: 120px 20px 40px; }
  .discipline-tabs { padding: 0 20px; flex-wrap: wrap; margin-top: -20px; }
  .tab { padding: 10px 16px; font-size: 11px; }

  .products-section { padding: 32px 20px 80px; }
  .product-grid { grid-template-columns: 1fr; gap: 16px; }

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

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

  .cart-section { padding: 100px 20px 60px; }
  .cart-item { grid-template-columns: 60px 1fr; gap: 12px; }
  .cart-item-qty { grid-column: 2; }
  .cart-item-price { grid-column: 2; }
  .cart-actions { flex-direction: column; }

  .checkout-section { padding: 100px 20px 60px; }
  .success-section { padding: 100px 20px 60px; }

  .store-footer {
    padding: 24px 20px;
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}
