/* css/shop.css */

:root {
    --bg-color: #0A0A0A;
    --primary-card-color: #141414;
    --border-color: rgba(255, 255, 255, 0.1);
    --text-primary: #F5F5F7;
    --text-secondary: #A3A3A3;
    --accent-blue: #2563EB;
}

/* --- ADDED: Header & Navbar Base Styles --- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    /* Ensure header is above the slide-out menu */
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.25rem 40px;
}

/* Base Styles (No changes) */
.shop-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 120px 40px 60px;
}

.shop-header {
    text-align: center;
    margin-bottom: 60px;
}

.shop-header h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -2px;
    background: linear-gradient(90deg, #b3c0d7, #f5f5f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.shop-header p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 15px auto 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: var(--primary-card-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.product-image {
    width: 100%;
    height: 320px;
    object-fit: cover;
    background-color: #000;
}

.product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-info h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 10px;
}

.product-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    flex-grow: 1;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
}

.add-to-cart-btn {
    background-color: var(--accent-blue);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

.add-to-cart-btn:hover {
    background-color: #1D4ED8;
}

.cart-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--accent-blue);
    border-radius: 50%;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.4);
    z-index: 1001;
    transition: transform 0.3s ease;
}

.cart-fab:hover {
    transform: scale(1.1);
}

.cart-icon {
    font-size: 24px;
}

.cart-item-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--accent-red, #DC2626);
    color: white;
    font-size: 12px;
    font-weight: bold;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cart-modal {
    display: none;
    position: fixed;
    z-index: 1002;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.cart-modal-content {
    background-color: #181818;
    color: var(--text-primary);
    margin: 10% auto;
    padding: 30px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
}

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

.cart-modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
}

.close-cart-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
}

.cart-items-container {
    flex-grow: 1;
    max-height: 40vh;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.cart-item-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 15px;
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-info h4 {
    margin: 0 0 5px;
    font-size: 1.1rem;
}

.cart-item-info p {
    margin: 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.cart-item-actions {
    display: flex;
    align-items: center;
}

.cart-item-actions input {
    width: 50px;
    text-align: center;
    background-color: #2c2c2c;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 5px;
    margin: 0 10px;
    padding: 5px;
}

.remove-item-btn {
    background: none;
    border: none;
    color: var(--accent-red, #DC2626);
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: 15px;
}

.cart-modal-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    margin-top: 20px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.btn-checkout {
    width: 100%;
    padding: 15px;
    background-color: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-checkout:hover:not(:disabled) {
    background-color: #1D4ED8;
}

.btn-checkout:disabled {
    background-color: #555;
    cursor: not-allowed;
}

.empty-cart-message {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 0;
}

/* --- Mobile Navigation & Hamburger Menu --- */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    /* Must be above header to be clickable */
}

.hamburger .bar {
    width: 2rem;
    height: 0.25rem;
    background-color: var(--text-primary);
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
    position: relative;
    transform-origin: 1px;
}

/* Using 992px as a breakpoint for this nav bar */
@media (max-width: 992px) {

    /* **MODIFIED**: Styles for the full-screen mobile menu */
    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        /* MODIFIED: Start off-screen to the left */
        width: 100%;
        height: 100vh;
        background-color: var(--bg-color);
        /* MODIFIED: Darker background */
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: left 0.3s ease-in-out;
        /* MODIFIED: Animate 'left' property */
        z-index: -1;
        /* MODIFIED: Sit underneath the main header */
    }

    .nav-links.active {
        left: 0;
        /* MODIFIED: Slide in from the left */
    }

    /* Hide the Sign In button that's outside the list */
    #nav-cta-container {
        display: none;
    }

    /* Show the hamburger menu icon */
    .hamburger {
        display: flex;
    }

    /* Animate hamburger to an 'X' shape when active */
    .hamburger.active .bar:nth-child(1) {
        transform: rotate(45deg);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
        transform: translateX(20px);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: rotate(-45deg);
    }
}