/* ===== SHOP NAV ===== */
.shop-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #1a1a1a;
}

.nav-brand {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: 0.05em;
}

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

.nav-link {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-link:hover { color: var(--fg); }

.nav-cart {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  transition: color 0.2s;
}

.nav-cart:hover { color: var(--accent-dim); }

.cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #0a0a0a;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

/* ===== SHOP MAIN ===== */
.shop-main {
  min-height: 80vh;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 2rem 6rem;
}

/* ===== SHOP HERO ===== */
.shop-hero {
  text-align: center;
  padding: 4rem 0 3rem;
}

.shop-worm { margin-bottom: 1.5rem; opacity: 0.8; }

.shop-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(2.5rem, 7vw, 5rem);
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.shop-sub {
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

/* ===== SHOP SECTIONS ===== */
.shop-section {
  margin-bottom: 5rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #1a1a1a;
}

.section-tag {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
}

.books-section .section-tag,
.books-tag-color { color: var(--books-accent); }

.section-more {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.section-more:hover { color: var(--fg); }
.books-more:hover { color: var(--books-accent); }

/* ===== PRODUCT GRID ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* ===== PRODUCT CARD ===== */
.product-card {
  border-radius: var(--radius);
  border: 1px solid #1e1e1e;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: rgba(139,255,58,0.25);
}

.card-dark { background: var(--card-dark); }

.card-books {
  background: var(--books-bg);
  color: var(--books-fg);
  border-color: rgba(212,69,26,0.15);
}

.card-books:hover { border-color: rgba(212,69,26,0.4); }

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card-image {
  height: 200px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  overflow: hidden;
}

.card-books .card-image { background: #ede8e0; }

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

.card-placeholder {
  color: var(--accent);
  opacity: 0.4;
}

.card-books .card-placeholder { color: var(--books-accent); }

.card-body { padding: 1.5rem; }

.card-category {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.card-books .card-category { color: var(--books-accent); }

.card-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0.4rem 0 0.5rem;
  color: var(--fg);
}

.card-books .card-name { color: var(--books-fg); }

.card-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.card-books .card-desc { color: #6b6055; }

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

.card-price {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--fg);
}

.card-books .card-price { color: var(--books-fg); }

.card-cta {
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.card-books .card-cta { color: var(--books-accent); }

/* ===== CATEGORY PAGE ===== */
.category-header {
  padding: 2.5rem 0 2rem;
}

.back-link {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 1rem;
  transition: color 0.2s;
}

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

.category-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.5rem);
  text-transform: uppercase;
}

/* ===== PRODUCT DETAIL ===== */
.product-detail {
  padding: 2rem 0 4rem;
}

.detail-back { margin-bottom: 2rem; }

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.detail-image {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-dark);
  border: 1px solid #1e1e1e;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-books .detail-image { background: var(--books-bg); }

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

.detail-placeholder {
  text-align: center;
  color: var(--accent);
  opacity: 0.4;
}

.detail-books .detail-placeholder { color: var(--books-accent); }

.detail-placeholder p {
  font-size: 0.75rem;
  margin-top: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.detail-category {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 0.75rem;
}

.detail-books .detail-category { color: var(--books-accent); }

.detail-name {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

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

.detail-books .detail-price { color: var(--books-accent); }

.detail-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 2rem;
}

/* Size selector */
.size-selector { margin-bottom: 1.5rem; }

.size-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.size-options {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.size-opt input { display: none; }

.size-opt span {
  display: inline-block;
  padding: 0.4em 0.9em;
  border: 1px solid #333;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.size-opt input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0a0a;
  font-weight: 700;
}

.size-opt span:hover { border-color: var(--accent); }

/* Qty control */
.qty-row { margin-bottom: 1.5rem; }

.qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  width: fit-content;
  border: 1px solid #333;
  border-radius: 8px;
  overflow: hidden;
}

.qty-btn {
  background: var(--card-dark);
  border: none;
  color: var(--fg);
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.15s;
}

.qty-btn:hover { background: #222; }

.qty-input {
  background: transparent;
  border: none;
  border-left: 1px solid #333;
  border-right: 1px solid #333;
  color: var(--fg);
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  text-align: center;
  width: 48px;
  height: 40px;
}

/* Add to cart button */
.btn-add-cart {
  display: block;
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: var(--radius);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-apparel {
  background: var(--accent);
  color: #0a0a0a;
}

.btn-books {
  background: var(--books-accent);
  color: #fff;
}

.btn-add-cart:hover { opacity: 0.85; }

/* Toast notification */
.add-toast {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
}

.toast-ok { background: rgba(139,255,58,0.15); color: var(--accent); border: 1px solid rgba(139,255,58,0.3); }
.toast-err { background: rgba(255,80,80,0.1); color: #ff8080; border: 1px solid rgba(255,80,80,0.3); }

/* ===== CART PAGE ===== */
.cart-page {
  padding: 2.5rem 0 4rem;
}

.cart-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 2rem;
}

.cart-empty {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--muted);
}

.empty-worm { margin-bottom: 1.5rem; }

.cart-empty p { margin-bottom: 2rem; font-size: 0.9rem; }

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  align-items: start;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto auto auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.25rem;
  background: var(--card-dark);
  border-radius: var(--radius);
  border: 1px solid #1e1e1e;
}

.ci-image {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.ci-placeholder { color: var(--accent); opacity: 0.4; }

.ci-details {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.ci-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--fg);
  text-decoration: none;
}

.ci-name:hover { color: var(--accent); }

.ci-size {
  font-size: 0.75rem;
  color: var(--muted);
}

.ci-unit-price {
  font-size: 0.75rem;
  color: var(--muted);
}

.ci-qty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ci-qty .qty-btn {
  width: 28px;
  height: 28px;
  font-size: 0.9rem;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 4px;
}

.qty-val {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 20px;
  text-align: center;
}

.ci-subtotal {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent);
  min-width: 60px;
  text-align: right;
}

.ci-remove {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.25rem;
  transition: color 0.15s;
}

.ci-remove:hover { color: #ff8080; }

/* Cart summary */
.cart-summary {
  background: var(--card-dark);
  border: 1px solid #1e1e1e;
  border-radius: var(--radius);
  padding: 1.5rem;
  position: sticky;
  top: 80px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.summary-note {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.btn-checkout {
  display: block;
  width: 100%;
  padding: 1rem;
  background: var(--accent);
  color: #0a0a0a;
  border: none;
  border-radius: var(--radius);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-bottom: 0.75rem;
}

.btn-checkout:hover { opacity: 0.85; }

.btn-continue {
  display: block;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ===== SHOP NOW BUTTON (shared) ===== */
.btn-shop-now {
  display: inline-block;
  padding: 0.9rem 2rem;
  background: var(--accent);
  color: #0a0a0a;
  text-decoration: none;
  border-radius: var(--radius);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  transition: opacity 0.2s;
}

.btn-shop-now:hover { opacity: 0.85; }

/* ===== CONFIRMATION PAGE ===== */
.confirm-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 4rem 0 6rem;
  text-align: center;
}

.confirm-worm { margin-bottom: 2rem; }

.confirm-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 0.75rem;
}

.confirm-sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
}

.confirm-items {
  text-align: left;
  background: var(--card-dark);
  border: 1px solid #1e1e1e;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}

.confirm-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.75rem 0;
  border-bottom: 1px solid #1a1a1a;
}

.confirm-item:last-child { border-bottom: none; }

.confirm-item .ci-details {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.confirm-item .ci-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--fg);
  text-decoration: none;
}

.confirm-item .ci-size {
  font-size: 0.75rem;
  color: var(--muted);
}

.ci-qty-price {
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
}

.confirm-total {
  display: flex;
  justify-content: space-between;
  padding-top: 1rem;
  margin-top: 0.5rem;
  border-top: 1px solid #333;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent);
}

.confirm-actions { margin-top: 1rem; }

/* ===== ERROR PAGE ===== */
.error-page {
  max-width: 500px;
  margin: 6rem auto;
  text-align: center;
}

.error-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 1rem;
}

.error-msg {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links { gap: 1rem; }
  .nav-link { display: none; }

  .detail-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .cart-layout {
    grid-template-columns: 1fr;
  }

  .cart-item {
    grid-template-columns: 60px 1fr;
    grid-template-rows: auto auto;
  }

  .ci-qty, .ci-subtotal, .ci-remove {
    grid-column: 2;
  }

  .cart-summary { position: static; }
}

@media (max-width: 480px) {
  .shop-nav { padding: 1rem; }
  .shop-main { padding: 1rem 1rem 4rem; }
}

/* ===== SALE PRICING ===== */

/* Card sale badge */
.sale-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 2;
  background: #ff3a3a;
  color: #fff;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.25em 0.6em;
  border-radius: 4px;
}

/* Card price states */
.card-price-orig {
  font-family: 'Syne', sans-serif;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: line-through;
  margin-right: 0.4rem;
}

.card-price-sale {
  color: #ff3a3a;
}

/* Detail page sale price states */
.detail-price-orig {
  font-family: 'Syne', sans-serif;
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--muted);
  text-decoration: line-through;
  margin-right: 0.5rem;
}

.detail-price-sale {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: #ff3a3a;
  margin-right: 0.5rem;
}

.detail-price-current {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--accent);
}

.detail-sale-badge {
  display: inline-block;
  background: #ff3a3a;
  color: #fff;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.25em 0.65em;
  border-radius: 4px;
  vertical-align: middle;
  position: relative;
  top: -2px;
}
