/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #fcfcfc;
    --color-text: #020912;
    --color-text-light: #5a5a5a;
    --color-border: #020912;
    --color-accent: #020912;
    --color-white: #ffffff;
    --color-light-gray: #f5f5f5;
    --color-sold-out: #b00020;
    --font-body: 'Anonymous Pro', monospace;
    --font-heading: 'Figtree', sans-serif;
    --border: 2px solid var(--color-border);
    --max-width: 1200px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

a {
    color: var(--color-text);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.875rem;
    padding: 12px 28px;
    border: var(--border);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    text-align: center;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-white);
    border-color: var(--color-accent);
}

.btn-primary:hover {
    background: transparent;
    color: var(--color-accent);
    text-decoration: none;
}

.btn-primary:disabled {
    background: var(--color-text-light);
    border-color: var(--color-text-light);
    cursor: not-allowed;
}

.btn-full {
    width: 100%;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text);
    padding: 4px;
    display: flex;
    align-items: center;
    position: relative;
}

/* ===== Header ===== */
.site-header {
    border-bottom: var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    background: var(--color-bg);
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.logo:hover {
    text-decoration: none;
}

.main-nav {
    display: flex;
    gap: 28px;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.main-nav a {
    transition: opacity 0.2s;
}

.main-nav a:hover {
    opacity: 0.6;
    text-decoration: none;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.cart-btn {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -6px;
    background: var(--color-accent);
    color: var(--color-white);
    font-size: 0.625rem;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text);
}

/* ===== Hero ===== */
.hero {
    border-bottom: var(--border);
}

.hero-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 500px;
}

.hero-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 48px;
    gap: 16px;
}

.hero-badge {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-text-light);
}

.hero-text h1 {
    font-size: 3rem;
}

.hero-text p {
    color: var(--color-text-light);
    max-width: 400px;
}

.hero-image {
    position: relative;
    overflow: hidden;
    background: var(--color-light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* ===== Products Section ===== */
.products-section {
    padding: 80px 0;
}

.products-section h2 {
    font-size: 2rem;
    margin-bottom: 40px;
    text-align: center;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
}

.product-card {
    border: var(--border);
    display: block;
    transition: transform 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
    text-decoration: none;
}

.product-card-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--color-light-gray);
}

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

.badge-sold-out {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--color-white);
    color: var(--color-text);
    font-size: 0.75rem;
    padding: 4px 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid var(--color-border);
}

.product-card-info {
    padding: 16px;
    border-top: var(--border);
}

.product-card-info h3 {
    font-size: 0.95rem;
    font-weight: 400;
    margin-bottom: 8px;
    font-family: var(--font-body);
}

.product-price {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

/* ===== Product Detail ===== */
.product-detail {
    padding: 40px 24px 80px;
}

.breadcrumb {
    font-size: 0.8rem;
    margin-bottom: 32px;
    color: var(--color-text-light);
}

.breadcrumb a {
    color: var(--color-text-light);
}

.breadcrumb a:hover {
    color: var(--color-text);
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.product-gallery {
    position: sticky;
    top: 100px;
}

.product-main-image {
    width: 100%;
    border: var(--border);
    background: var(--color-light-gray);
    aspect-ratio: 1;
    object-fit: cover;
}

.product-vendor {
    font-size: 0.8rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.product-info h1 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.product-price-large {
    font-size: 1.25rem;
    margin-bottom: 24px;
}

.product-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid #e0e0e0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.form-group select {
    font-family: var(--font-body);
    font-size: 0.875rem;
    padding: 10px 12px;
    border: var(--border);
    background: var(--color-white);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23020912' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 36px;
}

.quantity-selector {
    display: flex;
    border: var(--border);
    width: fit-content;
}

.quantity-selector button {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--color-white);
    cursor: pointer;
    font-size: 1.125rem;
    font-family: var(--font-body);
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-selector button:hover {
    background: var(--color-light-gray);
}

.quantity-selector input {
    width: 60px;
    height: 40px;
    border: none;
    border-left: var(--border);
    border-right: var(--border);
    text-align: center;
    font-family: var(--font-body);
    font-size: 0.875rem;
    -moz-appearance: textfield;
}

.quantity-selector input::-webkit-inner-spin-button,
.quantity-selector input::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

.product-description {
    color: var(--color-text-light);
    line-height: 1.8;
}

/* ===== Catalog ===== */
.catalog-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 40px;
    padding-bottom: 80px;
}

.catalog-filters {
    padding-top: 8px;
}

.catalog-filters h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
    margin-top: 24px;
}

.catalog-filters h3:first-child {
    margin-top: 0;
}

.catalog-filters label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: var(--color-text-light);
    cursor: pointer;
}

.catalog-filters label input {
    margin-right: 6px;
}

.filter-range {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

/* ===== Contact ===== */
.contact-page {
    padding: 40px 24px 80px;
}

.contact-page h1 {
    font-size: 2rem;
    margin-bottom: 24px;
}

.demo-notice {
    background: var(--color-light-gray);
    border: var(--border);
    padding: 20px 24px;
    margin-bottom: 32px;
    font-size: 0.9rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
}

.contact-item h3 {
    font-size: 1.25rem;
}

/* ===== Footer ===== */
.site-footer {
    border-top: var(--border);
    padding: 48px 0 24px;
    margin-top: auto;
}

.footer-newsletter {
    text-align: center;
    margin-bottom: 32px;
}

.footer-newsletter h3 {
    font-size: 1rem;
    margin-bottom: 16px;
}

.newsletter-form {
    display: flex;
    justify-content: center;
    gap: 0;
    max-width: 440px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    font-family: var(--font-body);
    font-size: 0.875rem;
    padding: 12px 16px;
    border: var(--border);
    border-right: none;
    background: var(--color-white);
}

.newsletter-form input:focus {
    outline: none;
    box-shadow: inset 0 0 0 1px var(--color-accent);
}

.newsletter-form .btn {
    border-left: none;
    border: var(--border);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
}

.footer-social a {
    opacity: 0.6;
    transition: opacity 0.2s;
}

.footer-social a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    font-size: 0.75rem;
    color: var(--color-text-light);
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-bg);
        border-bottom: var(--border);
        flex-direction: column;
        padding: 20px 24px;
        gap: 16px;
    }

    .main-nav.open {
        display: flex;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .header-actions {
        display: none;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero-text {
        padding: 40px 24px;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-image {
        height: 300px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .product-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .product-gallery {
        position: static;
    }

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

    .catalog-filters {
        display: flex;
        flex-wrap: wrap;
        gap: 16px;
        padding-bottom: 20px;
        border-bottom: 1px solid #e0e0e0;
    }

    .catalog-filters h3 {
        margin-top: 0;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}
