:root {
    --bg: #fffdf9;
    --text: #332b28;
    --muted: #666;
    --line: #e9ded7;
    --font-heading: "Instrument Serif", serif;
    --font-body: "Instrument Sans", sans-serif;
    --container: 1200px;
    --pad: 24px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); font-size: 14px; color: var(--text); background: var(--bg); line-height: 1.5; }
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
.container-wide { width: min(var(--container), 100% - var(--pad) * 2); margin: 0 auto; }

/* Announcement */
.announcement { background: #161312; color: #fff; text-align: center; font-size: 12px; letter-spacing: 0.06em; padding: 10px 16px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--bg); border-bottom: 1px solid var(--line); }
.header-bar { display: grid; grid-template-columns: 140px 1fr auto; align-items: center; min-height: 72px; gap: 16px; }
.logo-link { justify-self: start; }
.logo-text { font-family: var(--font-heading); font-size: 22px; font-weight: 400; letter-spacing: 0.04em; }
.main-nav { display: flex; justify-content: center; gap: 32px; flex-wrap: wrap; }
.main-nav a { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; padding: 8px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a.active { border-bottom-color: var(--text); }
.header-icons { display: flex; align-items: center; gap: 18px; justify-self: end; }
.icon-btn { padding: 6px; display: inline-flex; align-items: center; }
.menu-toggle { display: none; }
.cart-btn { position: relative; }
.cart-count { position: absolute; top: -2px; right: -6px; min-width: 16px; height: 16px; background: #161312; color: #fff; border-radius: 50%; font-size: 10px; display: flex; align-items: center; justify-content: center; }
.header-cart-link { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }

/* Search */
.search-panel { display: none; border-top: 1px solid var(--line); padding: 24px 0 32px; background: #fff; }
.search-panel.open { display: block; }
.search-form { display: flex; border-bottom: 1px solid var(--text); margin-bottom: 24px; }
.search-form input { flex: 1; border: none; font-size: 16px; padding: 12px 0; outline: none; }
.search-form button { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; padding: 0 8px; }

/* Hero */
.hero-slideshow { position: relative; background: #161312; overflow: hidden; }
.hero-track { display: flex; transition: transform 0.7s ease; }
.hero-slide { min-width: 100%; position: relative; min-height: min(72vh, 640px); }
.hero-slide img { width: 100%; height: min(72vh, 640px); object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; padding: 48px 8%; background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 100%); color: #fff; }
.hero-overlay h2 { font-family: var(--font-heading); font-size: clamp(28px, 4.5vw, 48px); font-weight: 400; line-height: 1.1; margin: 0 0 16px; max-width: 520px; }
.hero-overlay p { max-width: 480px; margin: 0 0 24px; font-size: 15px; opacity: 0.92; line-height: 1.6; }
.btn-shop { display: inline-block; background: #fff; color: #161312; padding: 14px 36px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; min-width: 200px; text-align: center; }
.btn-shop:hover { opacity: 0.9; }
.hero-nav { position: absolute; bottom: 24px; right: 8%; display: flex; gap: 8px; }
.hero-nav button { width: 10px; height: 10px; border-radius: 50%; border: 1px solid #fff; background: transparent; padding: 0; }
.hero-nav button.active { background: #fff; }

/* Marquee */
.marquee-wrap { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; padding: 14px 0; }
.marquee-track { display: flex; width: max-content; animation: marquee 30s linear infinite; }
.marquee-item { display: flex; align-items: center; gap: 12px; padding: 0 40px; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; white-space: nowrap; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Promo */
.promo-strip { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.promo-tile { position: relative; aspect-ratio: 16/9; overflow: hidden; border-right: 1px solid var(--line); }
.promo-tile:last-child { border-right: none; }
.promo-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.promo-tile:hover img { transform: scale(1.04); }
.promo-tile span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: clamp(16px, 2vw, 22px); letter-spacing: 0.14em; text-transform: uppercase; color: #fff; text-shadow: 0 2px 16px rgba(0,0,0,0.5); }

/* Sections */
.section-block { padding: 56px 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 28px; }
.section-head h2 { font-family: var(--font-heading); font-size: 20px; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; margin: 0; }

/* Category grid */
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.category-card { position: relative; aspect-ratio: 3/4; overflow: hidden; background: #eee; }
.category-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.55s ease; }
.category-card:hover img { transform: scale(1.06); }
.category-card .label { position: absolute; left: 20px; bottom: 20px; color: #fff; font-size: 17px; letter-spacing: 0.04em; text-shadow: 0 2px 12px rgba(0,0,0,0.45); }

/* Product grid */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 20px; }
.product-card { position: relative; }
.product-thumb { position: relative; aspect-ratio: 1; background: #f6f6f6; overflow: hidden; margin-bottom: 12px; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.35s; }
.product-thumb .hover-img { position: absolute; inset: 0; opacity: 0; }
.product-card:hover .hover-img { opacity: 1; }
.product-card:hover .main-img { opacity: 0; }
.product-title { font-size: 14px; font-weight: 400; margin: 0 0 6px; line-height: 1.45; }
.product-price { font-size: 14px; }
.color-swatches { display: flex; gap: 5px; margin-top: 8px; flex-wrap: wrap; }
.swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.15); }

/* Collection page */
.page-title-bar { padding: 40px 0 24px; border-bottom: 1px solid var(--line); }
.page-title-bar h1 { font-family: var(--font-heading); font-size: 28px; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; margin: 8px 0 0; }
.breadcrumb { font-size: 12px; color: var(--muted); }
.collection-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; font-size: 13px; color: var(--muted); }

/* Product detail */
.product-page { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 40px 0 80px; }
.product-gallery-main { background: #f5f5f5; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.product-gallery-main img { width: 100%; height: 100%; object-fit: contain; max-height: min(78vh, 820px); }
.product-gallery-thumbs { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.product-gallery-thumbs button { width: 72px; height: 72px; border: 1px solid var(--line); padding: 0; overflow: hidden; cursor: pointer; background: #fff; }
.product-gallery-thumbs button.active { border-color: #000; box-shadow: 0 0 0 1px #000; }
.product-gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product-detail h1 { font-family: var(--font-heading); font-size: clamp(24px, 3vw, 32px); font-weight: 400; margin: 0 0 12px; line-height: 1.2; }
.product-detail .price-lg { font-size: 18px; margin-bottom: 20px; }
.product-detail .desc { color: var(--muted); line-height: 1.7; margin-bottom: 24px; max-height: 200px; overflow-y: auto; }
.product-meta-list { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.product-meta-list dt { font-weight: 500; color: var(--text); margin-top: 8px; }
.product-meta-list dd { margin: 4px 0 0; }
.product-add-row { display: flex; gap: 12px; margin-top: 20px; align-items: stretch; flex-wrap: wrap; }
.add-to-cart { display: inline-flex; align-items: center; justify-content: center; background: #161312; color: #fff; padding: 14px 24px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; border: none; cursor: pointer; flex: 1; min-width: 200px; }
.add-to-cart:hover { opacity: 0.88; }
.product-shipping-note { margin: 20px 0 0; padding: 12px 14px; background: #f5f5f5; font-size: 13px; }

/* Variant pickers */
.product_variants, .selector-wrapper, .select,
label[for^="product-select-option-"],
#product-select-option-,
#product-select-option- + .custom-style-select-box { display: block !important; }
#AddToCartForm select[name="id"] {
    display: block !important; width: 100%; padding: 12px 14px;
    border: 1px solid var(--line); font-size: 14px; font-family: var(--font-body);
    border-radius: 6px; box-sizing: border-box; margin-bottom: 16px; cursor: pointer;
}
.tks-option-block { margin: 20px 0; }
.tks-option-label { font-size: 13px; margin-bottom: 10px; font-weight: 500; }
.tks-size-options { display: flex; flex-wrap: wrap; gap: 8px; }
.tks-size-btn { border: 1px solid var(--line); background: #fff; padding: 10px 14px; font-size: 12px; min-height: 44px; cursor: pointer; transition: 0.15s; }
.tks-size-btn.is-selected { border-color: #000; background: #000; color: #fff; }
.tks-color-options { display: flex; flex-wrap: wrap; gap: 10px; }
.tks-color-swatch { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.12); padding: 0; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.tks-swatch-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--swatch, #ccc); border: 1px solid rgba(0,0,0,0.08); }
.tks-color-swatch.is-selected { box-shadow: 0 0 0 2px #fff, 0 0 0 3px #000; }
.tks-qty-wrap { display: inline-flex; align-items: stretch; border: 1px solid var(--line); }
.tks-qty-btn { width: 40px; font-size: 18px; background: #fff; cursor: pointer; }
.tks-qty-input { width: 56px; border: none; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; padding: 12px 4px; font-family: var(--font-body); }

/* Cart drawer */
.cart-drawer { position: fixed; inset: 0; z-index: 300; pointer-events: none; }
.cart-drawer.open { pointer-events: auto; }
.cart-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.45); opacity: 0; transition: 0.3s; }
.cart-drawer.open .cart-backdrop { opacity: 1; }
.cart-panel { position: absolute; top: 0; right: 0; width: min(400px, 100vw); height: 100%; background: #fff; transform: translateX(100%); transition: 0.35s; padding: 24px; display: flex; flex-direction: column; }
.cart-drawer.open .cart-panel { transform: translateX(0); }
.cart-close { align-self: flex-end; font-size: 28px; line-height: 1; }
.cart-panel h3 { font-family: var(--font-heading); font-size: 16px; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 8px; }
.cart-note { font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.cart-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: var(--muted); }
.btn-outline { border: 1px solid var(--text); padding: 12px 24px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; text-align: center; display: inline-block; }

/* Cart page */
.cart-page { padding-bottom: 64px; }
.cart-page-layout { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }
.cart-line { display: grid; grid-template-columns: 80px 1fr auto; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.cart-line-img img { width: 80px; height: 80px; object-fit: cover; background: #f5f5f5; }
.cart-line-title { font-size: 15px; display: block; margin-bottom: 4px; }
.cart-line-variant { font-size: 12px; color: var(--muted); }
.cart-line-price { font-size: 13px; color: var(--muted); margin-top: 4px; }
.cart-line-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.cart-qty-input { width: 64px; border: 1px solid var(--line); padding: 8px; text-align: center; }
.cart-remove { font-size: 12px; text-decoration: underline; color: var(--muted); }
.cart-line-total { font-size: 15px; font-weight: 500; white-space: nowrap; }
.cart-summary { border: 1px solid var(--line); padding: 24px; position: sticky; top: 96px; }
.cart-summary h2 { font-size: 16px; margin: 0 0 16px; font-weight: 500; }
.cart-summary-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 14px; }
.cart-drawer-actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 16px; }
.checkout-btn { display: block; width: 100%; margin: 16px 0 12px; text-decoration: none; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 20px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-bottom: 40px; }
.footer-col h4 { font-family: var(--font-heading); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 14px; }
.footer-col a { display: block; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.footer-col a:hover { color: var(--text); }
.footer-text { font-size: 14px; color: var(--muted); }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); }
.payment-icons { display: flex; flex-wrap: wrap; gap: 8px; }
.payment-icons span { border: 1px solid var(--line); padding: 4px 8px; font-size: 10px; border-radius: 3px; }

/* Shell header (when theme shell is used) */
.header-wrapper #logo { text-align: center; }
.header-wrapper #logo img { display: inline-block; max-width: 310px; }

/* Policy pages */
.policy-page { padding: 32px 0 64px; }
.policy-content { max-width: 720px; margin: 0 auto; line-height: 1.75; }
.policy-content h1 { font-family: var(--font-heading); font-weight: 400; font-size: 32px; margin: 16px 0 24px; }
.policy-content p, .policy-content li { color: var(--muted); margin: 0 0 14px; }

/* Mobile nav */
.mobile-nav { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.4); opacity: 0; visibility: hidden; transition: 0.25s; }
.mobile-nav.open { opacity: 1; visibility: visible; }
.mobile-nav-panel { width: min(300px, 85vw); height: 100%; background: #fff; padding: 24px; overflow-y: auto; transform: translateX(-100%); transition: 0.25s; }
.mobile-nav.open .mobile-nav-panel { transform: translateX(0); }
.mobile-nav-panel a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
.mobile-close { margin-bottom: 16px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Responsive */
@media (max-width: 1024px) {
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .promo-strip { grid-template-columns: 1fr; }
    .promo-tile { border-right: none; border-bottom: 1px solid var(--line); }
    .cart-page-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .header-bar { grid-template-columns: auto 1fr auto; }
    .main-nav { display: none; }
    .menu-toggle { display: inline-flex; }
    .logo-text { font-size: 16px; }
    .header-cart-link { display: none; }
    .category-grid, .product-grid, .footer-grid { grid-template-columns: 1fr; }
    .product-page { grid-template-columns: 1fr; }
}
