:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #6b6b6b;
  --border: #e7e7e5;
  --surface: #f7f7f5;
  --accent: #111111;
  --accent-contrast: #ffffff;
  --danger: #c0392b;
  --success: #1e7e34;
  --radius: 2px;
  --header-h: 64px;
  --transition: 220ms cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: var(--radius);
  transition: transform var(--transition), opacity var(--transition), background var(--transition);
}
.btn:hover { opacity: .82; }
.btn:active { transform: scale(.97); }
.btn-outline { background: transparent; color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: var(--accent-contrast); opacity: 1; }
.btn-small { padding: 8px 14px; font-size: 11px; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: transform 280ms ease;
}
.site-header.header-hidden {
  transform: translateY(-100%);
}
.header-inner {
  max-width: 1280px; margin: 0 auto;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
}
.logo { display: flex; align-items: center; height: 100%; }
.logo-mark { height: 52px; width: auto; display: block; }
.main-nav { display: flex; gap: 28px; }
.main-nav a { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; opacity: .8; transition: opacity var(--transition); }
.main-nav a:hover { opacity: 1; }
.header-actions { display: flex; align-items: center; gap: 4px; }
.account-toggle {
  background: none; border: none; cursor: pointer; text-decoration: none;
  color: var(--fg); padding: 8px; display: flex;
}
.cart-toggle {
  position: relative; background: none; border: none; cursor: pointer;
  color: var(--fg); padding: 8px; display: flex;
}
.cart-count {
  position: absolute; top: 0; right: 0;
  background: var(--accent); color: var(--accent-contrast);
  font-size: 10px; min-width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transform: translate(30%, -30%);
}
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 1.5px; background: var(--fg); }
.mobile-nav { display: none; flex-direction: column; border-top: 1px solid var(--border); }
.mobile-nav a { padding: 14px 20px; border-bottom: 1px solid var(--border); font-size: 14px; }
.mobile-nav.open { display: flex; }

/* ---------- Hero + marquee ---------- */
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: #000;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-buttons {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 16px;
  padding-bottom: 56px;
  flex-wrap: wrap;
  justify-content: center;
}
.btn-hero {
  background: transparent;
  border: 1.5px solid #ffffff;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .5);
  box-shadow: 0 1px 12px rgba(0, 0, 0, .15);
}
.btn-hero:hover {
  background: #111111;
  border-color: #111111;
  color: #ffffff;
  text-shadow: none;
  opacity: 1;
}

.marquee-section { position: relative; padding: 24px 0 56px; }
.marquee-viewport { overflow: hidden; cursor: grab; }
.marquee-viewport.dragging { cursor: grabbing; }
.marquee-track {
  display: flex; gap: 20px; width: max-content;
  padding: 4px 20px;
  will-change: transform;
}
.marquee-controls {
  display: flex; justify-content: center; gap: 12px; margin-top: 20px;
}
.marquee-controls button {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg);
  cursor: pointer; font-size: 16px;
  transition: background var(--transition);
}
.marquee-controls button:hover { background: var(--surface); }

/* ---------- Product cards ---------- */
.product-card {
  width: 260px; flex: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  transition: box-shadow var(--transition), transform var(--transition);
}
.product-card:hover { box-shadow: 0 12px 28px rgba(0,0,0,.08); transform: translateY(-3px); }
.product-media { display: block; aspect-ratio: 3/4; background: var(--surface); overflow: hidden; position: relative; }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease; }
.product-card:hover .product-media img { transform: scale(1.05); }
.product-media-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg,#f0f0ee,#e2e2df); }
.product-media-placeholder.large { aspect-ratio: 3/4; }
.product-info { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.product-name { font-size: 14px; }
.product-price { font-weight: 600; }
.product-price.large { font-size: 22px; margin-bottom: 16px; }
.size-select { padding: 8px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; }

/* ---------- Catalog ---------- */
.page-title { max-width: 1280px; margin: 32px auto 8px; padding: 0 20px; font-size: 32px; letter-spacing: .04em; }
.page-subtitle { max-width: 1280px; margin: 0 auto 20px; padding: 0 20px; color: var(--muted); }
.filters {
  max-width: 1280px; margin: 0 auto 24px; padding: 0 20px;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.filters select, .filters input {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 13px; background: var(--bg);
}
.filters input[type="number"] { width: 110px; }
.product-grid {
  max-width: 1280px; margin: 0 auto; padding: 0 20px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px;
}
.load-more-wrap { display: flex; justify-content: center; padding: 40px 0; }
.empty-note { text-align: center; color: var(--muted); padding: 60px 20px; }

/* ---------- Product page ---------- */
.product-page {
  max-width: 1280px; margin: 32px auto; padding: 0 20px;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px;
}
.gallery-main { aspect-ratio: 3/4; background: var(--surface); overflow: hidden; border-radius: var(--radius); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 10px; }
.gallery-thumb { width: 64px; height: 84px; padding: 0; border: 1px solid var(--border); background: none; cursor: pointer; overflow: hidden; border-radius: var(--radius); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-details h1 { font-size: 30px; margin: 0 0 6px; }
.label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 8px; }
.size-picker, .color-picker { margin-bottom: 20px; }
.size-options, .color-options { display: flex; flex-wrap: wrap; gap: 8px; }
.size-option, .color-option {
  padding: 9px 14px; border: 1px solid var(--border); background: var(--bg);
  cursor: pointer; border-radius: var(--radius); font-size: 13px;
  transition: all var(--transition);
}
.size-option.selected, .color-option.selected { border-color: var(--accent); background: var(--accent); color: var(--accent-contrast); }
.size-option.disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.product-section { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 16px; }
.product-section h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 8px; }
.size-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.size-table th, .size-table td { padding: 8px; border-bottom: 1px solid var(--border); text-align: left; }
.related-section { max-width: 1280px; margin: 56px auto; padding: 0 20px; }
.related-section h2 { font-size: 22px; margin-bottom: 20px; }

/* ---------- Upcoming ---------- */
.upcoming-grid {
  max-width: 1280px; margin: 0 auto; padding: 0 20px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px;
}
.upcoming-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.upcoming-badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--accent); color: var(--accent-contrast);
  font-size: 10px; text-transform: uppercase; letter-spacing: .06em;
  padding: 5px 10px; border-radius: var(--radius);
}
.upcoming-info { padding: 16px; }
.upcoming-info h3 { margin: 0 0 6px; }
.teaser { color: var(--muted); font-size: 13px; margin: 0 0 6px; }
.release-date { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 14px; }
.subscribe-form { display: flex; gap: 8px; }
.subscribe-form input { flex: 1; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); }

/* ---------- Cart drawer ---------- */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  opacity: 0; pointer-events: none; transition: opacity var(--transition);
  z-index: 60;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 100vw);
  background: var(--bg); z-index: 61;
  transform: translateX(100%); transition: transform var(--transition);
  display: flex; flex-direction: column;
  box-shadow: -10px 0 30px rgba(0,0,0,.1);
}
.cart-drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid var(--border); }
.drawer-close { background: none; border: none; font-size: 26px; cursor: pointer; line-height: 1; }
.cart-items { flex: 1; overflow-y: auto; padding: 12px 20px; }
.cart-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.cart-item-media { width: 64px; height: 84px; background: var(--surface); border-radius: var(--radius); overflow: hidden; flex: none; }
.cart-item-media img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-body { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.cart-item-name { font-size: 14px; }
.cart-item-meta { font-size: 12px; color: var(--muted); }
.cart-item-qty { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.cart-item-qty button { width: 24px; height: 24px; border: 1px solid var(--border); background: none; cursor: pointer; border-radius: var(--radius); }
.cart-item-remove { font-size: 11px; text-decoration: underline; color: var(--muted); background: none; border: none; cursor: pointer; align-self: flex-start; }
.cart-empty { text-align: center; color: var(--muted); padding: 40px 20px; display: none; }
.cart-footer { border-top: 1px solid var(--border); padding: 20px; }
.cart-total-row { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 14px; }

/* ---------- Checkout ---------- */
.checkout-page { max-width: 1100px; margin: 0 auto; padding: 0 20px 60px; }
.checkout-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; margin-top: 24px; }
.checkout-form { display: flex; flex-direction: column; gap: 16px; }
.checkout-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.checkout-form input, .checkout-form select, .checkout-form textarea {
  padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; color: var(--fg);
  font-family: inherit;
}
.checkout-summary { background: var(--surface); padding: 20px; border-radius: var(--radius); height: fit-content; }
.order-summary-row { display: flex; justify-content: space-between; font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--border); }

/* ---------- Home links / success / flash ---------- */
.home-links { max-width: 1280px; margin: 40px auto 80px; padding: 0 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.home-link-card { border: 1px solid var(--border); padding: 32px; border-radius: var(--radius); transition: background var(--transition); }
.home-link-card:hover { background: var(--surface); }
.home-link-card h3 { margin: 0 0 6px; font-size: 20px; }
.home-link-card p { margin: 0; color: var(--muted); }
.success-page { max-width: 700px; margin: 80px auto; padding: 0 20px; text-align: center; }
.order-summary { text-align: left; margin: 24px 0; }
.flash { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 13px; }
.flash-success { background: #e9f7ec; color: var(--success); }
.flash-error { background: #fbeceb; color: var(--danger); }

/* ---------- Account ---------- */
.account-page { max-width: 560px; margin: 0 auto; padding: 0 20px 60px; }
.account-form { display: flex; flex-direction: column; gap: 16px; margin-top: 12px; }
.account-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.account-form input {
  padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; color: var(--fg);
  font-family: inherit;
}
.checkbox-line { flex-direction: row !important; align-items: flex-start; gap: 10px !important; font-size: 13px !important; }
.checkbox-line input { margin-top: 3px; flex: none; }
.checkbox-line a { text-decoration: underline; color: var(--fg); }
.account-switch { margin-top: 20px; font-size: 13px; color: var(--muted); text-align: center; }
.account-header-row { display: flex; justify-content: space-between; align-items: center; }
.account-logout-link { font-size: 13px; text-decoration: underline; color: var(--muted); }
.account-profile { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin: 16px 0 24px; background: var(--surface); }
.account-profile p { margin: 2px 0; font-size: 14px; }
.account-actions { margin-bottom: 28px; }
.admin-subtitle { font-size: 18px; margin: 32px 0 12px; }

/* Shared table / badge styles (used on account + admin pages) */
.admin-table { width: 100%; border-collapse: collapse; background: var(--bg); border: 1px solid var(--border); }
.admin-table th, .admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 13px; text-align: left; }
.admin-table tbody tr { cursor: pointer; transition: background var(--transition); }
.admin-table tbody tr:hover { background: var(--surface); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; text-transform: capitalize; background: #eee; }
.status-new { background: #e8f0fe; color: #1a56db; }
.status-processing { background: #fff4e5; color: #b45309; }
.status-shipped { background: #eafaf1; color: #1e7e34; }
.status-delivered { background: #eafaf1; color: #1e7e34; }
.status-cancelled { background: #fbeceb; color: #c0392b; }
.pay-pending { background: #fff4e5; color: #b45309; }
.pay-paid { background: #eafaf1; color: #1e7e34; }
.pay-failed { background: #fbeceb; color: #c0392b; }
.pay-refunded { background: #eee; color: #555; }

/* ---------- Legal pages ---------- */
.legal-page { max-width: 780px; margin: 0 auto; padding: 40px 20px 80px; }
.legal-page h1 { font-size: 28px; margin-bottom: 4px; overflow-wrap: break-word; }
.legal-page .legal-updated { color: var(--muted); font-size: 13px; margin-bottom: 32px; }
.legal-page h2 { font-size: 17px; margin: 32px 0 10px; }
.legal-page p, .legal-page li { font-size: 14px; line-height: 1.7; color: #333; }
.legal-page ul, .legal-page ol { padding-left: 20px; }

/* ---------- Support page ---------- */
.support-page { max-width: 640px; margin: 0 auto; padding: 0 20px 80px; text-align: center; }
.support-links { display: flex; justify-content: center; gap: 20px; margin: 40px 0 24px; flex-wrap: wrap; }
.support-link {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  width: 140px; padding: 28px 16px; border: 1px solid var(--border); border-radius: var(--radius);
  transition: background var(--transition), transform var(--transition);
}
.support-link:hover { background: var(--surface); transform: translateY(-2px); }
.support-icon { display: flex; align-items: center; justify-content: center; color: var(--fg); }
.support-label { font-size: 13px; letter-spacing: .03em; }
.support-note { color: var(--muted); font-size: 13px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 60px; padding: 40px 20px; }
.footer-inner { max-width: 1280px; margin: 0 auto; text-align: center; color: var(--muted); }
.footer-logo { font-size: 18px; letter-spacing: .15em; color: var(--fg); margin-bottom: 6px; }
.footer-tag { margin: 0 0 6px; font-size: 13px; }
.footer-legal { margin: 0 0 10px; font-size: 12px; }
.footer-legal a { text-decoration: underline; color: var(--muted); }
.footer-copy { margin: 0; font-size: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .product-page { grid-template-columns: 1fr; }
  .checkout-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .home-links { grid-template-columns: 1fr; }
}
