:root {
    --bg-color: #F2F2F2;
    --text-color: #000000;
    --font-main: 'IBM Plex Mono', monospace;
    --spacing-unit: 10px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 500;
    overflow-x: hidden;
}

/* Header */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background-color: transparent;
    /* Or var(--bg-color) if needed for scroll */
}

.icon-btn {
    background: none;
    border: none;
    font-family: var(--font-main);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.center-nav {
    position: absolute;
    left: 50%;
    top: 60%;
    transform: translate(-50%, -50%);
}

.nav-link {
    font-weight: 800;
}

/* Header Hover Animations */
.nav-link,
.nav-link-right,
.icon-btn {
    display: inline-block;
    transition: transform 0.3s ease;
}

.nav-link:hover,
.nav-link-right:hover,
.icon-btn:hover {
    transform: scale(1.2);
}

.center-nav a,
.right-nav a {
    color: var(--text-color);
    text-decoration: none;
    text-transform: uppercase;
}

.right-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Main Grid */
#product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* row-gap: 50px; */
    /* Can adjust based on "dense" look */
    padding-top: 80px;
    /* Space for fixed header */
    padding-bottom: 100px;
    min-height: 100vh;
    /* Space for fixed header */
    padding-bottom: 100px;
    min-height: 100vh;
    gap: 10px;
    /* Default gap */
    padding-left: 0;
    padding-right: 0;
    transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

#product-grid.zoom-medium {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding-left: 5%;
    padding-right: 5%;
}

#product-grid.zoom-large {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    padding-left: 10%;
    padding-right: 10%;
    padding-top: 80px;
    /* Space for transparent header */
    align-content: start;
}

#product-grid.zoom-large .img-container {
    height: 65vh;
    width: 100%;
    aspect-ratio: auto;
}

#product-grid.zoom-large .product-info {
    font-size: 18px;
}

.product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* cursor: pointer; removed to fix hit area issue */
    padding: 0;
    transition: opacity 0.2s;
    width: fit-content;
    margin: 0 auto;
}

.product-card:hover {
    opacity: 0.7;
}

.img-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    /* Standard portrait ratio */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    /* Added to enforce ratio */
}

.img-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
    cursor: pointer;
    /* added */
    /* Helps blend white bg images into gray bg */
}

.product-info {
    margin-top: 10px;
    font-size: 12px;
    text-transform: uppercase;
    transition: font-size 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    cursor: pointer;
    /* added */
}

/* Footer */
footer {
    position: fixed;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    pointer-events: none;
    /* Text doesn't block clicks */
    z-index: 10;
}

.footer-text {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 1px;
}

/* Overlays */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(242, 242, 242, 0.98);
    backdrop-filter: blur(5px);
    z-index: 200;
    display: flex;
    flex-direction: column;
    padding: 20px;
    transition: opacity 0.3s ease;
}

.hidden {
    display: none;
}

.close-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 24px;
}

.overlay-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* Product Detail Specifics */
.product-content {
    flex-direction: column;
    max-width: 600px;
    margin: 0 auto;
}

.product-gallery {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 60vh;
    position: relative;
}

.nav-arrow {
    background: none;
    border: none;
    font-family: var(--font-main);
    font-size: 24px;
    cursor: pointer;
    padding: 20px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.nav-arrow.left {
    left: 20px;
}

.nav-arrow.right {
    right: 20px;
}

.product-gallery img {
    max-height: 100%;
    max-width: 80%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.product-meta {
    text-align: center;
    margin-top: 20px;
}

.product-meta h1,
.product-meta p {
    text-transform: uppercase;
    margin-bottom: 10px;
    font-weight: 500;
}

.add-btn {
    background: none;
    border: 1px solid black;
    /* Circle or square? Yeezy uses minimal text or symbol */
    border: none;
    font-size: 40px;
    cursor: pointer;
    font-family: var(--font-main);
    text-transform: uppercase;
    margin-top: 10px;
}

/* Cart Overlay Specifics */
/* Cart Overlay Specifics */
.cart-content {
    align-items: flex-start;
    padding-top: 80px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 80px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.cart-left h2 {
    font-size: 12px;
    margin-bottom: 25px;
    margin-top: 40px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    color: #666;
}

.cart-left h2:first-child {
    margin-top: 0;
}

.cart-left input,
.cart-left select {
    display: block;
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 0;
    margin-bottom: 20px;
    font-family: var(--font-main);
    /* text-transform: uppercase; Removed to allow lowercase */
    border-radius: 0;
    font-size: 13px;
    transition: border-color 0.3s ease;
    color: var(--text-color);
}

.cart-left input:focus,
.cart-left select:focus {
    outline: none;
    border-bottom-color: black;
}

.cart-left input::placeholder {
    color: #999;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Order Summary */
.cart-right {
    background-color: #fff;
    padding: 40px;
    border: 1px solid #f0f0f0;
}

.line-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-size: 13px;
    color: #444;
}

.line-item.total {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-weight: 600;
    font-size: 16px;
    color: black;
}

.checkout-btn {
    width: 100%;
    background-color: black;
    color: white;
    border: none;
    padding: 18px;
    font-family: var(--font-main);
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-top: 30px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.checkout-btn:hover {
    background-color: #333;
}

/* Error State Styles */
.input-error {
    border-bottom: 1px solid red !important;
}

#checkout-message {
    font-size: 11px;
    color: red;
    text-transform: uppercase;
    margin-top: 10px;
    height: 15px;
    /* Prevent jump */
    text-align: center;
    font-weight: 600;
}

.taxes-notice {
    text-align: center;
    font-size: 10px;
    color: #999;
    margin-top: 15px;
    text-transform: uppercase;
}

/* Responsive */
@media (max-width: 768px) {
    #product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .center-nav {
        /* Hide full menu on mobile initially? Or simplified */
        display: none;
    }

    .cart-content {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
        overflow-y: auto;
    }
}

/* Authentication Pages */
.nav-link-right {
    color: var(--text-color);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 500;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    padding-top: 80px;
    /* Header space */
    animation: fadeUp 0.8s ease-out forwards;
}

.auth-container h1 {
    font-size: 24px;
    margin-bottom: 40px;
    margin-bottom: 40px;
    letter-spacing: 2px;
    /* Increased tracking */
    font-weight: 400;
}

.auth-form {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 400px;
    gap: 25px;
    /* Increased spacing */
}

.auth-form input {
    background: transparent;
    border: none;
    border-bottom: 1px solid #ccc;
    /* Lighter default border */
    padding: 15px 0;
    font-family: var(--font-main);
    width: 100%;
    outline: none;
    font-size: 14px;
    transition: border-color 0.3s ease, padding 0.3s ease;
}

.auth-form input:focus {
    border-bottom: 1px solid black;
    padding-left: 10px;
    /* Gentle slide effect */
}

.auth-form input::placeholder {
    color: #999;
    transition: opacity 0.3s ease;
}

.auth-form input:focus::placeholder {
    opacity: 0.5;
}

.auth-submit {
    margin-top: 30px;
    background: black;
    color: white;
    border: 1px solid black;
    padding: 15px;
    font-family: var(--font-main);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.auth-submit:hover {
    background: transparent;
    color: black;
}

.auth-submit:active {
    transform: scale(0.98);
    /* Pressed effect */
}

.auth-switch {
    margin-top: 40px;
    color: #666;
    text-decoration: none;
    font-size: 11px;
    letter-spacing: 1px;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.auth-switch:hover {
    color: black;
    border-bottom-color: black;
}

/* Size Selector */
.size-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    margin-top: 10px;
}

.size-btn {
    background: transparent;
    border: none;
    color: #999;
    /* Light grey when unselected */
    width: 40px;
    /* Keep hit area */
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 16px;
    /* Slightly larger for readability without border */
    font-weight: 500;
    transition: all 0.2s ease;
}

.size-btn:hover {
    color: black;
}

.size-btn.selected {
    background: transparent;
    color: black;
    font-weight: 700;
    /* Bold to indicate selection */
    color: black;
    font-weight: 700;
    /* Bold to indicate selection */
    border: none;
}

/* Cart Badge */
.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: black;
    color: white;
    font-size: 10px;
    font-family: sans-serif;
    font-weight: bold;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.cart-badge.hidden {
    display: none;
}

/* Feedback State for Add Button */
.add-btn {
    transition: all 0.2s ease;
}

.add-btn.feedback {
    font-family: sans-serif;
    /* Clean font as requested */
    font-size: 14px;
    /* Smaller size */
    font-weight: bold;
    border: 1px solid transparent;
    /* Remove border look if needed, or keep */
}

/* User Menu Dropdown */
.user-menu {
    position: relative;
    display: inline-block;
    margin-right: 20px;
}

.user-name-btn {
    font-weight: 500;
    cursor: pointer;
    text-transform: uppercase;
    font-family: var(--font-main);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    border: 1px solid black;
    min-width: 160px;
    z-index: 300;
    display: none;
    flex-direction: column;
    margin-top: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.user-dropdown.show {
    display: flex;
}

.dropdown-item {
    padding: 12px 16px;
    text-decoration: none;
    color: black;
    font-size: 12px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
}