
/* Shop Styles */

.products {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-auto-flow: row;
}

.product {
    display: grid;
    grid-template-areas: 'productName'
                        'productImage'
                        'productPrice'
                        'addToCartButton';
    padding: 5px;
    margin: 5px;
    
}

.product-image {
    max-width: 200px;
    grid-area: productImage;
    margin: 0 auto;
    padding: 5px;
}

.product-name { grid-area: productName; }
.product-price { grid-area: productPrice; margin: 10px 0;}

.add-to-cart-btn {
	margin: 10px auto;
    padding: 5px;
    max-width: 100px;
    grid-area: addToCartButton;
}

/* --- Shopping Cart Icon --- */
.cart-icon {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #4a4a8a; /* A purple from your logo */
    color: white;
    border: 2px solid #fff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    z-index: 1001; /* Make sure it's above other content */
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #e64a19; /* A contrasting red/orange from your logo */
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: bold;
}

.cart-sidebar.open {
    right: 0; /* Slide into view */
}

/* --- Shopping Cart Sidebar --- */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px; /* Start off-screen */
    width: 380px;
    height: 100%;
    background-color: #1a1a2e; /* Dark blue background */
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transition: right 0.4s ease-in-out;
    display: flex;
    flex-direction: column;
}

/* --- Cart Header --- */
.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #112233; /* Matches your header */
    border-bottom: 2px solid #4a4a8a;
}

.cart-header h2 {
    margin: 0;
    color: #fff;
}

.cart-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}

/* --- Cart Items --- */
.cart-items {
    flex-grow: 1;
    overflow-y: auto; /* Allows scrolling if items overflow */
    padding: 20px;
}

/* --- Cart Total & Checkout --- */
.cart-total {
    padding: 20px;
    border-top: 2px solid #4a4a8a;
}

.total-amount {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: right;
}

.checkout-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: #e64a19;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.checkout-btn:hover {
    background-color: #ff6a3d;
}

.product-variations {
    margin: 10px 0;
}

.variation-selector {
    margin-bottom: 10px;
}

.variation-selector label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.size-selector {
    width: 50%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
}

.size-selector:focus,
.color-selector:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

.color-selector {
    width: 50%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
    margin-bottom: 10px;
}

.product-price-range {
    font-weight: bold;
    color: #4CAF50;
    margin: 5px 0;
}

.price-range {
    font-size: 16px;
}

.add-to-cart-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.add-to-cart-btn:disabled:hover {
    background-color: #ccc;
}

/* Cart item styling for variations */
.cart-item-variation {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Shipping Notice */
.shipping-notice {
    background-color: #e3f2fd;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    border-left: 4px solid #2196F3;
    text-align: center;
}

.shipping-notice p {
    margin: 0;
    color: #1976d2;
    font-size: 14px;
}

.subtotal-amount {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        width: 95%;
    }

    .products {
    display: flex;
    flex-direction: column;
    }

    .main-nav li {
        margin: 0 10px;
    }

    .main-nav a {
        padding: 8px 12px;
    }

    .logo-container {
        justify-content: space-between; /* Distribute space between logo and hamburger */
    }

    .logo-wrapper {
        text-align: left; /* Align logo to the left on mobile */
    }

    #logo {
        max-width: 200px;
        height: 50px;
    }

    #hamburger-icon {
        display: block; /* Show hamburger icon */
    }

    #nav-menu {
        display: none; /* Hide navigation menu */
    }

    #nav-menu.open {
        display: block; /* Show menu when 'open' class is added */
        width: 100%;
        text-align: center;
    }
    #nav-menu.open ul {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    #nav-menu.open ul li {
        width: 100%;
        margin: 0;
        padding: 0;
    }
    #nav-menu.open ul li a {
        width: 100%;
        box-sizing: border-box;
    }

    .main-nav {
        flex-direction: column;
    }

    .cart-icon {
    left: 20px;      /* Position from the left */
    right: auto;     /* Unset the right positioning */
    }

    .size-selector { width: 50%; }
    .color-selector { width: 50%; }
}