:root {
    --bg: #0b0b0d;
    --surface: #141418;
    --surface-hover: #1c1c22;
    --border: #27272f;
    --text: #f4f4f5;
    --text-muted: #a1a1aa;
    --accent: #e11d48;
    --accent-hover: #be123c;
    --radius: 4px;
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Header & Navigation */
.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(11, 11, 13, 0.94);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0.85rem 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.brand {
    color: var(--text);
    text-decoration: none;
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 0.06em;
}

.category-nav {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.4rem 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
    font-weight: 700;
}

.cart-toggle {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 0.5rem 0.9rem;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.cart-toggle:hover {
    background: var(--accent-hover);
}

.search-bar-wrap {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 1rem 0.75rem;
}

#search-input {
    width: 100%;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.55rem 0.85rem;
    font-size: 0.9rem;
}

#search-input:focus {
    outline: 1px solid var(--text);
}

/* Main Layout & Sections */
.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 1.5rem 1rem 4rem;
}

.merch-section {
    margin-bottom: 3rem;
}

.merch-section[hidden] {
    display: none;
}

.section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.45rem;
    margin-bottom: 1.25rem;
}

.section-heading h2 {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 1.35rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-count {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

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

.product-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: border-color 0.15s ease;
}

.product-card:hover {
    border-color: #52525b;
}

.product-card[hidden] {
    display: none;
}

.card-media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #18181b;
    overflow: hidden;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.badge-sold-out {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    background: #09090b;
    color: var(--accent);
    border: 1px solid var(--accent);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.45rem;
}

.card-body {
    padding: 0.85rem;
    flex: 1;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.card-title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
}

.card-price {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.95rem;
    color: #e4e4e7;
    white-space: nowrap;
}

.card-specs {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Bottom Controls: Size + Quantity + Add to Cart */
.card-actions {
    padding: 0.75rem 0.85rem 0.85rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: stretch;
}

.size-select {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.45rem 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.qty-group {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    overflow: hidden;
}

.qty-step {
    background: transparent;
    color: var(--text);
    border: none;
    width: 28px;
    font-family: var(--font-mono);
    font-size: 1rem;
    cursor: pointer;
}

.qty-step:hover {
    background: var(--surface-hover);
}

.qty-input {
    width: 38px;
    background: transparent;
    color: var(--text);
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    -moz-appearance: textfield;
    appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn-add {
    flex: 1;
    min-width: 105px;
    background: var(--text);
    color: var(--bg);
    border: none;
    border-radius: var(--radius);
    padding: 0.55rem 0.65rem;
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-add:hover:not(:disabled) {
    background: var(--accent);
    color: #fff;
}

.btn-add.added {
    background: #16a34a;
    color: #fff;
}

.btn-add:disabled {
    background: #27272a;
    color: #71717a;
    cursor: not-allowed;
}

.empty-search {
    text-align: center;
    color: var(--text-muted);
    font-family: var(--font-mono);
    padding: 3rem 1rem;
}

/* Cart Drawer */
.cart-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.cart-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(400px, 100vw);
    background: var(--surface);
    border-left: 1px solid var(--border);
    z-index: 50;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.22s ease;
}

.cart-drawer.open {
    transform: translateX(0);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.cart-header h2 {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 1.05rem;
}

.icon-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 1.25rem;
    line-height: 1;
    width: 32px;
    height: 32px;
    cursor: pointer;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.cart-empty-msg {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-align: center;
    margin-top: 2rem;
}

.cart-item {
    display: flex;
    gap: 0.75rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border);
}

.cart-item img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: var(--radius);
    background: #18181b;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    font-size: 0.88rem;
    font-weight: 700;
    margin: 0 0 0.2rem;
}

.cart-item-meta {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.45rem;
}

.cart-qty-btn {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    width: 24px;
    height: 24px;
    font-family: var(--font-mono);
    cursor: pointer;
}

.cart-remove-btn {
    margin-left: auto;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-decoration: underline;
    cursor: pointer;
}

.cart-footer {
    padding: 1rem;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

.cart-subtotal-row {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.cart-note {
    margin: 0 0 0.85rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.btn-checkout {
    width: 100%;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 0.75rem;
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
}

.btn-checkout:disabled {
    background: #27272a;
    color: #71717a;
    cursor: not-allowed;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .category-nav {
        order: 3;
        width: 100%;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .card-body {
        padding: 0.65rem;
    }

    .card-top {
        flex-direction: column;
        gap: 0.15rem;
    }

    .card-actions {
        padding: 0.6rem;
    }

    .btn-add {
        width: 100%;
        flex-basis: 100%;
    }

}

/* Make anchor filter links match button styling */
.category-nav a.filter-btn {
  text-decoration: none;
  display: inline-block;
}

/* Static Policy & Contact Pages */
.page-content {
  max-width: 740px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
}

.page-content h1 {
  margin-top: 0;
  font-family: var(--font-mono);
  font-size: 1.45rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
}

.page-content h2 {
  margin-top: 1.75rem;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--text);
  text-transform: uppercase;
}

.page-content ul {
  padding-left: 1.2rem;
  color: #d4d4d8;
}

.page-content li {
  margin-bottom: 0.6rem;
}

.inline-link {
  color: var(--accent);
  text-decoration: underline;
}

.muted {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Contact Form */
.contact-form {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 0.8rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: 1px solid var(--text);
}

.form-status {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #4ade80;
  margin: 0;
}

/* Site Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: 3rem;
}

.footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 2rem 1rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-brand {
  margin: 0 0 0.35rem;
  font-family: var(--font-mono);
  font-weight: 800;
  letter-spacing: 0.05em;
}

.footer-text {
  margin: 0.2rem 0;
  font-size: 0.85rem;
  color: #d4d4d8;
}

.footer-text a {
  color: var(--text);
  text-decoration: underline;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-content: flex-start;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.footer-links a:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer-bottom {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.85rem 1rem 1.25rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}