:root {
  --purple: #5B3A8C;
  --purple-dark: #3D2260;
  --ink: #16181D;
  --paper: #FAFAF8;
  --white: #FFFFFF;
  --accent: #E8453C;
  --gray-line: rgba(22,24,29,0.12);
  --gray-text: rgba(22,24,29,0.6);
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); background: var(--paper); color: var(--ink); line-height: 1.5; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
a { color: inherit; text-decoration: none; }

.top-bar { background: var(--ink); color: var(--white); text-align: center; padding: 8px 16px; font-size: 13px; font-weight: 500; letter-spacing: 0.3px; }

.logo-header { display: flex; align-items: center; justify-content: center; position: relative; padding: 12px 24px; background: var(--white); border-bottom: none; }
.logo-center { display: flex; justify-content: center; }
.logo-img { height: 120px; width: auto; }
.cart-toggle { position: absolute; right: 24px; background: var(--purple); color: var(--white); border: none; border-radius: 8px; padding: 10px 18px; font-weight: 600; font-size: 14px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.cart-toggle:hover { background: var(--purple-dark); }
.cart-count { background: rgba(255,255,255,0.25); border-radius: 999px; padding: 1px 8px; font-size: 12px; }

.main-nav { background: var(--purple); display: flex; justify-content: center; gap: 0; margin-bottom: -8px; flex-wrap: wrap; }
.main-nav a { color: var(--white); font-weight: 600; font-size: 14px; padding: 14px 28px; letter-spacing: 0.5px; text-transform: uppercase; transition: background 0.15s; }
.main-nav a:hover { background: var(--purple-dark); }

.hero-banner { width: 100%; line-height: 0; margin-top: -8px; position: relative; }
.hero-banner img { width: 100%;    height: clamp(200px, 45vw, 600px); object-fit: cover; object-position: center 20%; display: block; }
.hero-banner::after { content: ''; display: block; height: 12px; background: var(--purple); }

.category-showcase { padding: 32px 0; background: #f9f9f9; }
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.category-card { position: relative; overflow: hidden; border-radius: 10px; cursor: pointer; box-shadow: 0 2px 12px rgba(0,0,0,0.12); aspect-ratio: 3/4; }
.category-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.category-card:hover img { transform: scale(1.05); }
.category-label { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.6); color: white; text-align: center; padding: 12px; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1rem; letter-spacing: 0.05em; }
.category-title { font-family: 'Space Grotesk', sans-serif; font-size: 26px; font-weight: 700; margin: 0 0 20px; }

.catalog-head { display: flex; justify-content: space-between; align-items: baseline; margin: 50px 0 8px; }
.catalog-head h2 { font-family: var(--font-display); font-size: 30px; font-weight: 700; margin: 0; }
.result-count { font-size: 13px; color: var(--gray-text); }

.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0 32px; }
.filter-chip { font-size: 13px; font-weight: 500; padding: 7px 16px; border: 1px solid var(--gray-line); border-radius: 999px; background: var(--white); cursor: pointer; color: var(--gray-text); }
.filter-chip.active { background: var(--purple); color: var(--white); border-color: var(--purple); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; padding-bottom: 80px; }
.loading { color: var(--gray-text); }

.card { background: var(--white); border: 1px solid var(--gray-line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; transition: transform 0.15s ease, box-shadow 0.15s ease; cursor: pointer; }
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(22,24,29,0.08); }
.card-img { width: 100%;  aspect-ratio: 3/4; object-fit: cover; background: var(--gray-line); }
.card-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-cat { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; color: var(--purple); }
.card-name { font-weight: 600; font-size: 15.5px; margin: 0; }
.card-desc { font-size: 13px; color: var(--gray-text); flex: 1; margin: 0; }
.card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.card-price { font-weight: 700; font-size: 15px; }
.card-add { background: var(--paper); border: 1px solid var(--gray-line); border-radius: 6px; padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer; }
.card-add:hover { background: var(--purple); color: var(--white); border-color: var(--purple); }

.info-section { padding: 60px 0; background: var(--white); border-top: 1px solid var(--gray-line); }
.info-section.alt { background: var(--paper); }
.info-section h2 { font-family: var(--font-display); font-size: 28px; font-weight: 700; margin: 0 0 12px; }
.info-section p { color: var(--gray-text); max-width: 560px; }

.site-footer { background: var(--ink); color: var(--white); border-top: 1px solid var(--gray-line); }
.footer-inner { display: flex; justify-content: space-between; padding: 20px 24px; font-size: 13px; opacity: 0.7; }

.cart-overlay { position: fixed; inset: 0; background: rgba(22,24,29,0.45); opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 90; }
.cart-overlay.open { opacity: 1; pointer-events: auto; }
.cart-drawer { position: fixed; top: 0; right: 0; height: 100%; width: 380px; max-width: 92vw; background: var(--white); z-index: 100; transform: translateX(100%); transition: transform 0.25s ease; display: flex; flex-direction: column; box-shadow: -8px 0 24px rgba(0,0,0,0.12); }
.cart-drawer.open { transform: translateX(0); }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px; border-bottom: 1px solid var(--gray-line); }
.cart-head h3 { font-family: var(--font-display); font-size: 20px; margin: 0; }
.cart-head button { background: none; border: none; font-size: 18px; cursor: pointer; }
.cart-items { flex: 1; overflow-y: auto; padding: 12px 22px; }
.cart-empty { color: var(--gray-text); font-size: 14px; margin-top: 30px; text-align: center; }
.cart-line { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--gray-line); align-items: center; }
.cart-line img { width: 54px; height: 54px; object-fit: cover; border-radius: 6px; }
.cart-line-info { flex: 1; }
.cart-line-name { font-size: 14px; font-weight: 600; }
.cart-line-price { font-size: 12.5px; color: var(--gray-text); }
.qty-controls { display: flex; align-items: center; gap: 8px; }
.qty-controls button { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--gray-line); background: transparent; cursor: pointer; line-height: 1; }
.cart-footer { padding: 18px 22px 24px; border-top: 1px solid var(--gray-line); }
.cart-total-row { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 14px; font-size: 16px; }
.btn { display: inline-block; padding: 13px 26px; border-radius: 8px; font-weight: 600; font-size: 15px; cursor: pointer; border: none; }
.btn-primary { background: var(--purple); color: var(--white); }
.btn-primary:hover { background: var(--purple-dark); }
.btn-checkout { width: 100%; }
.cart-note { font-size: 12px; color: var(--gray-text); margin: 10px 0 0; text-align: center; }

.modal-overlay { position: fixed; inset: 0; background: rgba(22,24,29,0.6); opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 200; }
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.product-modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.96); background: var(--white); border-radius: 12px; width: 90vw; max-width: 860px; max-height: 90vh; overflow-y: auto; z-index: 210; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; }
.product-modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.modal-close { position: absolute; top: 14px; right: 16px; background: var(--paper); border: none; border-radius: 50%; width: 32px; height: 32px; font-size: 16px; cursor: pointer; z-index: 1; }
.modal-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.modal-gallery { background: var(--paper); border-radius: 12px 0 0 12px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.modal-main-img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 8px; }
.modal-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.modal-thumb { width: 56px; height: 72px; object-fit: cover; border-radius: 4px; cursor: pointer; border: 2px solid transparent; opacity: 0.7; }
.modal-thumb.active, .modal-thumb:hover { border-color: var(--purple); opacity: 1; }
.modal-info { padding: 32px 28px; display: flex; flex-direction: column; gap: 10px; }
.modal-info h2 { font-family: var(--font-display); font-size: 22px; margin: 0; }
.modal-info p { color: var(--gray-text); font-size: 14px; flex: 1; }
.modal-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.modal-price { font-size: 22px; font-weight: 700; }
.modal-add { padding: 12px 22px; }
.modal-no-refund { font-size: 11px; color: var(--accent); font-weight: 600; text-align: center; margin-top: 8px; padding: 6px 10px; background: rgba(232,69,60,0.08); border-radius: 6px; border: 1px solid rgba(232,69,60,0.2); }

.search-bar-wrap { margin: 0 0 24px; }
.search-bar { width: 100%; padding: 12px 18px; font-size: 15px; border: 1px solid var(--gray-line); border-radius: 8px; font-family: var(--font-body); outline: none; }
.search-bar:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(91,58,140,0.15); }

.new-issues-section { padding: 32px 0; background: var(--white); border-top: 1px solid var(--gray-line); }
.new-issues-head { margin-bottom: 20px; }
.new-issues-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }

.whatnot-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.whatnot-image img { width: 100%; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
.whatnot-text h2 { font-family: var(--font-display); font-size: 28px; font-weight: 700; margin: 0 0 12px; }
.whatnot-text p { color: var(--gray-text); max-width: 440px; }
.btn-whatnot { background: #f5c518; color: #000; font-weight: 700; }
.btn-whatnot:hover { background: #e0b300; }

.terms-body h2 { font-family: var(--font-display); font-size: 20px; font-weight: 700; margin: 32px 0 8px; color: var(--ink); }
.terms-body p, .terms-body li { color: var(--gray-text); line-height: 1.8; margin-bottom: 12px; }
.terms-body ul { padding-left: 24px; }
.terms-body a { color: var(--purple); }

@media (max-width: 640px) {
  .logo-img { height: 80px; }
  .main-nav a { padding: 12px 16px; font-size: 12px; }
  .modal-inner { grid-template-columns: 1fr; }
  .modal-gallery { border-radius: 12px 12px 0 0; }
  .cart-toggle { padding: 8px 12px; font-size: 13px; }
  .category-grid { grid-template-columns: 1fr; }
  .whatnot-wrap { grid-template-columns: 1fr; }
}