/* ═══════════════════════════════════════
   JENUINE THREDZ — STORE STYLES
   ═══════════════════════════════════════ */

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

:root {
  --red: #C41E2A;
  --red-bright: #E63946;
  --red-dark: #8B0000;
  --black: #0A0A0A;
  --black-soft: #1A1A1A;
  --black-card: #141414;
  --white: #FAFAFA;
  --white-dim: #E0E0E0;
  --gray: #888;
  --gray-dark: #444;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.15);
}

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--black);
  color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ─── NAV ─── */
.store-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 64px;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  white-space: nowrap;
}

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

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

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray);
  transition: color 0.2s;
  letter-spacing: 0.5px;
}

.nav-links a:hover { color: var(--white); }

.cart-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--white) !important;
  font-weight: 600 !important;
}

.cart-count {
  background: var(--red);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  transition: 0.2s;
}

/* ─── SHOP PAGE ─── */
.shop-page {
  padding: 100px 40px 60px;
  max-width: 1400px;
  margin: 0 auto;
}

.shop-header {
  margin-bottom: 50px;
}

.shop-header h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 16px;
}

.shop-header h1 .accent { color: var(--red); }

.shop-header p {
  color: var(--gray);
  font-size: 1.1rem;
  max-width: 500px;
}

/* Collection Filter Tabs */
.collection-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.filter-btn {
  font-family: 'Syne', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gray);
  background: none;
  border: 1px solid var(--border);
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.2s;
}

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

.filter-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--black-card);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.product-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.product-card-img {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  position: relative;
}

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

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

.product-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: 'Syne', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(196, 30, 42, 0.9);
  padding: 4px 10px;
}

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

.product-card-collection {
  font-family: 'Syne', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--red-bright);
  margin-bottom: 8px;
}

.product-card-name {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
}

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

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

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

/* Collection Header (when filtering) */
.collection-header {
  margin-bottom: 40px;
  padding: 30px 0;
  border-bottom: 1px solid var(--border);
  display: none;
}

.collection-header.visible { display: block; }

.collection-header h2 {
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.collection-header p {
  color: var(--gray);
  font-size: 1rem;
}

/* Product count */
.product-count {
  font-size: 0.9rem;
  color: var(--gray);
  margin-bottom: 24px;
}

/* ─── PRODUCT DETAIL PAGE ─── */
.product-page {
  padding: 90px 40px 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.product-breadcrumb {
  font-size: 0.85rem;
  color: var(--gray);
  margin-bottom: 40px;
}

.product-breadcrumb a {
  color: var(--gray);
  transition: color 0.2s;
}

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

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

.product-image {
  position: sticky;
  top: 90px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.product-image img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

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

.product-collection-badge {
  display: inline-block;
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--red-bright);
  border: 1px solid rgba(196, 30, 42, 0.3);
  padding: 6px 14px;
  margin-bottom: 16px;
}

.product-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
}

.product-price {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 20px;
}

.product-desc {
  color: var(--white-dim);
  line-height: 1.7;
  font-size: 1rem;
  margin-bottom: 32px;
}

.product-sizes label {
  display: block;
  font-family: 'Syne', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 12px;
}

.size-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.size-btn {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray);
  background: transparent;
  border: 1px solid var(--border);
  padding: 10px 18px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 50px;
  text-align: center;
}

.size-btn:hover {
  border-color: var(--white);
  color: var(--white);
}

.size-btn.active {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}

.product-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
}

.btn-add-cart {
  flex: 1;
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--white);
  background: var(--red);
  border: none;
  padding: 16px 32px;
  cursor: pointer;
  transition: all 0.2s;
}

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

.btn-buy-now {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--white);
  background: transparent;
  border: 1px solid var(--white);
  padding: 16px 32px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-buy-now:hover {
  background: var(--white);
  color: var(--black);
}

.product-details-list {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

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

.detail-item span:first-child {
  color: var(--gray);
}

/* Related Products */
.related-section {
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.related-section h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 30px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.related-card {
  background: var(--black-card);
  border: 1px solid var(--border);
  padding: 0;
  overflow: hidden;
  transition: all 0.3s;
}

.related-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.related-img {
  aspect-ratio: 1;
  overflow: hidden;
}

.related-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-card h4 {
  font-family: 'Syne', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 12px 14px 4px;
}

.related-price {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0 14px 14px;
  color: var(--gray);
}

/* ─── CART PAGE ─── */
.cart-page {
  padding: 100px 40px 60px;
  max-width: 900px;
  margin: 0 auto;
}

.cart-page h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 8px;
}

.cart-subtitle {
  color: var(--gray);
  margin-bottom: 40px;
}

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

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

.cart-empty p {
  color: var(--gray);
  margin-bottom: 30px;
}

.cart-empty a {
  display: inline-block;
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--white);
  background: var(--red);
  padding: 14px 32px;
  transition: background 0.2s;
}

.cart-empty a:hover { background: var(--red-bright); }

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

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

.cart-item-img {
  width: 100px;
  height: 100px;
  overflow: hidden;
  border: 1px solid var(--border);
}

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

.cart-item-info h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.cart-item-info .item-meta {
  font-size: 0.85rem;
  color: var(--gray);
}

.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: var(--black-soft);
  border: 1px solid var(--border);
  color: var(--white);
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.2s;
}

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

.cart-item-qty span {
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.cart-item-price {
  font-weight: 600;
  font-size: 1.05rem;
  min-width: 80px;
  text-align: right;
}

.cart-item-remove {
  font-size: 0.8rem;
  color: var(--gray);
  cursor: pointer;
  transition: color 0.2s;
  background: none;
  border: none;
  margin-top: 6px;
}

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

/* Cart Summary */
.cart-summary {
  background: var(--black-card);
  border: 1px solid var(--border);
  padding: 30px;
}

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

.cart-summary-row.total {
  border-top: 1px solid var(--border);
  margin-top: 12px;
  padding-top: 16px;
  color: var(--white);
  font-size: 1.2rem;
  font-weight: 700;
}

.btn-checkout {
  display: block;
  width: 100%;
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--white);
  background: var(--red);
  border: none;
  padding: 18px;
  margin-top: 20px;
  cursor: pointer;
  transition: background 0.2s;
  text-align: center;
}

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

.btn-continue-shopping {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 0.9rem;
  color: var(--gray);
  margin-top: 16px;
  transition: color 0.2s;
}

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

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

.footer-logo {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

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

.footer-loc {
  font-size: 0.8rem;
  color: var(--gray);
}

/* ─── TOAST ─── */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--black-card);
  border: 1px solid var(--red);
  color: var(--white);
  padding: 14px 24px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 2000;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  pointer-events: none;
}

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

/* ─── LOADING SKELETON ─── */
.skeleton {
  background: linear-gradient(90deg, var(--black-card) 25%, var(--black-soft) 50%, var(--black-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 2px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  border: 1px solid var(--border);
  overflow: hidden;
}

.skeleton-img {
  width: 100%;
  aspect-ratio: 1;
}

.skeleton-text {
  height: 16px;
  margin: 12px 20px;
}

.skeleton-text.short { width: 60%; }

/* ─── MOBILE ─── */
@media (max-width: 768px) {
  .store-nav {
    padding: 0 20px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10,10,10,0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 20px;
    gap: 0;
    border-bottom: 1px solid var(--border);
  }

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

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

  .mobile-toggle { display: flex; }

  .shop-page { padding: 80px 20px 40px; }
  .product-page { padding: 80px 20px 40px; }
  .cart-page { padding: 80px 20px 40px; }

  .product-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .product-image { position: static; }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }

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

  .cart-item-img { width: 80px; height: 80px; }

  .cart-item-qty {
    grid-column: 2;
  }

  .cart-item-price {
    grid-column: 2;
    text-align: left;
  }

  .collection-filters {
    gap: 6px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 16px;
    -webkit-overflow-scrolling: touch;
  }

  .filter-btn {
    font-size: 11px;
    padding: 8px 14px;
    white-space: nowrap;
  }

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

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

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

  .product-card-body { padding: 14px; }
  .product-card-name { font-size: 0.9rem; }
  .product-card-price { font-size: 0.95rem; }
}
