/* Color Palette */
:root {
    --primary-maroon: #600404;    /* Deep maroon */
    --accent-maroon: #800000;     /* Rich maroon */
    --dark-bg: #120101;           /* Nearly black with slight red tint */
    --darker-maroon: #4c0202;     /* Darker maroon for elements */
    --text-light: #dcdcdc;        /* Light red text */
    --text-muted: #800000;        /* Muted maroon */
    --almost-black: rgba(0, 0, 0, 0.85);
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #000000;
    background-image: url('/static/img/background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--text-light);
    line-height: 1.7;
    min-height: 100vh;
    position: relative;
}

/* Add an overlay to enhance content visibility */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        145deg,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(74, 4, 4, 0.75) 100%
    );
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 1;
}

/* Navigation */
nav {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.8rem 0;
    border-bottom: 2px solid var(--accent-maroon);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

nav .container {
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    letter-spacing: 2px;
    color: var(--text-light);
    text-shadow: 0 0 10px rgba(61, 47, 47, 0.5);
}

.brand img {
    height: 60px;
    margin-right: 15px;
    filter: drop-shadow(0 0 8px rgba(128, 0, 0, 0.6));
    transition: transform 0.3s ease;
}

.brand:hover img {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    padding: 0.8rem 1.2rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.nav-link:hover {
    background-color: var(--accent-maroon);
    box-shadow: 0 0 15px rgba(128, 0, 0, 0.3);
}

/* Cart icon styling */
.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--text-light);
    color: black;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-light);
    font-family: 'Cinzel', serif;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

h1 {
    font-size: 2.5rem;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
}

h1::after {
    content: '';
    display: block;
    width: 100px;
    height: 3px;
    background-color: var(--accent-maroon);
    margin-top: 0.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 2rem 0;
}

.filter-tabs button {
    background-color: var(--almost-black);
    color: var(--text-light);
    border: 1px solid var(--accent-maroon);
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Roboto', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
}

.filter-tabs button:hover {
    background-color: var(--accent-maroon);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(128, 0, 0, 0.3);
}

.filter-tabs button.active {
    background-color: var(--accent-maroon);
    box-shadow: 0 0 10px rgba(128, 0, 0, 0.5);
}

/* Products Grid */
#products-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background: var(--almost-black);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(128, 0, 0, 0.3);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(128, 0, 0, 0.4);
    border-color: var(--accent-maroon);
}

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.new-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(145deg, var(--text-light), var(--accent-maroon));
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 2;
}

.product-info {
    padding: 1rem;
}

.product-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.price {
    font-weight: 700;
    color: var(--text-light) !important;
    font-size: 1.2rem;
    margin: 0.5rem 0;
}

/* Product color dots */
.product-colors-preview {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Modal Styling */
.modal {
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: var(--almost-black);
    border: 1px solid var(--accent-maroon);
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.7);
    color: var(--text-light);
}

.close-modal {
    color: var(--text-light);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.close-modal:hover {
    color: white;
    opacity: 1;
    transform: rotate(90deg);
}

#modal-product-image {
    border-radius: 4px;
    border: 1px solid rgba(128, 0, 0, 0.3);
}

.modal-content h2 {
    font-family: 'Cinzel', serif;
    margin-top: 0;
}

.product-description {
    color: #ddd;
    margin: 1rem 0;
}

/* Color options in modal */
.color-option {
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.color-option.selected {
    box-shadow: 0 0 0 2px var(--text-light);
    transform: scale(1.1);
}

/* Size options in modal */
.size-option {
    background-color: transparent;
    color: var(--text-light);
    border: 1px solid rgba(128, 0, 0, 0.5);
}

.size-option:hover {
    background-color: rgba(128, 0, 0, 0.3);
}

.size-option.selected {
    background-color: var(--accent-maroon);
    color: white;
    border-color: var(--accent-maroon);
}

/* Quantity control */
.quantity-control {
    border: 1px solid rgba(128, 0, 0, 0.5);
}

.quantity-btn {
    background-color: rgba(0, 0, 0, 0.3);
    color: var(--text-light);
}

.quantity-btn:hover {
    background-color: var(--accent-maroon);
    color: white;
}

/* Add to cart button */
.add-to-cart-btn {
    background: linear-gradient(145deg, var(--accent-maroon), var(--primary-maroon));
    border: none;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.add-to-cart-btn:hover {
    background: linear-gradient(145deg, var(--text-light), var(--accent-maroon));
    box-shadow: 0 5px 15px rgba(128, 0, 0, 0.4);
    transform: translateY(-2px);
}

/* Cart page styling */
.cart-page {
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid rgba(128, 0, 0, 0.3);
}

.cart-header {
    background-color: rgba(0, 0, 0, 0.4);
    color: var(--text-light);
    border-bottom: 1px solid rgba(128, 0, 0, 0.5);
}

.cart-item {
    border-bottom: 1px solid rgba(128, 0, 0, 0.3);
}

.cart-item-name {
    color: var(--text-light);
    font-family: 'Cinzel', serif;
}

.cart-item:hover {
    background-color: rgba(0, 0, 0, 0.5);
}
nav
.remove-item-btn {
    background-color: rgba(0, 0, 0, 0.6);
    color: var(--text-light);
    border: 1px solid rgba(128, 0, 0, 0.5);
}

.remove-item-btn:hover {
    background-color: var(--accent-maroon);
    color: white;
    border-color: var(--accent-maroon);
}

.cart-subtotal {
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.continue-shopping {
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--text-light);
    border: 1px solid var(--accent-maroon);
}

.continue-shopping:hover {
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
}

.clear-cart {
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--text-light);
    border: 1px solid var(--accent-maroon);
}

.clear-cart:hover {
    background-color: var(--accent-maroon);
    color: white;
}

.checkout {
    background: linear-gradient(145deg, var(--accent-maroon), var(--primary-maroon));
    color: white;
}

.checkout:hover {
    background: linear-gradient(145deg, var(--text-light), var(--accent-maroon));
}

/* Shop page styling */
.shop-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.shop-sidebar {
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid rgba(128, 0, 0, 0.3);
    height: fit-content;
}

.shop-sidebar h2 {
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.shop-sidebar h2:first-child {
    margin-top: 0;
}

.category-filter,
.collection-filter {
    list-style: none;
}

.category-filter li,
.collection-filter li {
    margin-bottom: 0.5rem;
}

.filter-link {
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    padding: 0.5rem;
    border-radius: 4px;
}

.filter-link:hover {
    background-color: rgba(128, 0, 0, 0.2);
    padding-left: 0.8rem;
}

.filter-link.active {
    background-color: var(--accent-maroon);
    color: white;
}

.price-filter {
    margin-top: 1.5rem;
}

.price-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.price-input-group {
    display: flex;
    align-items: center;
}

.price-input-group label {
    width: 40px;
}

.price-input-group input {
    flex: 1;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(128, 0, 0, 0.3);
    padding: 0.5rem;
    border-radius: 4px;
    color: white;
}

.apply-filter {
    background: linear-gradient(145deg, var(--accent-maroon), var(--primary-maroon));
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    width: 100%;
}

.apply-filter:hover {
    background: linear-gradient(145deg, var(--text-light), var(--accent-maroon));
}

.shop-main {
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid rgba(128, 0, 0, 0.3);
}

.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(128, 0, 0, 0.3);
    flex-wrap: wrap;
    gap: 1rem;
}

.shop-header h1 {
    margin: 0;
    font-size: 1.8rem;
}

.shop-header h1::after {
    display: none;
}

.shop-controls {
    display: flex;
    gap: 1rem;
}

.search-box {
    position: relative;
}

.search-box input {
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(128, 0, 0, 0.3);
    padding: 0.6rem 2.5rem 0.6rem 1rem;
    border-radius: 4px;
    color: white;
    width: 200px;
}

.search-box i {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.sort-dropdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-dropdown label {
    color: var(--text-light);
}

.sort-dropdown select {
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(128, 0, 0, 0.3);
    padding: 0.6rem 1rem;
    border-radius: 4px;
    color: white;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath fill='%23de3e3e' d='M6 8 0 0h12L6 8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

#no-products-message {
    text-align: center;
    padding: 3rem 0;
}

#reset-filters {
    background: linear-gradient(145deg, var(--accent-maroon), var(--primary-maroon));
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

#reset-filters:hover {
    background: linear-gradient(145deg, var(--text-light), var(--accent-maroon));
}

/* Footer */
footer {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 1.5rem 0;
    margin-top: 3rem;
    border-top: 2px solid var(--accent-maroon);
    position: relative;
    z-index: 1;
}

/* Cart notification */
.cart-notification {
    background: linear-gradient(145deg, var(--accent-maroon), var(--primary-maroon));
    color: white;
    border-left: 4px solid var(--text-light);
}

/* Media Queries */
@media (max-width: 992px) {
    .shop-container {
        grid-template-columns: 1fr;
    }
    
    .shop-controls {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    nav .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    #products-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .shop-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .shop-controls {
        flex-direction: column;
        width: 100%;
    }
    
    .search-box, 
    .search-box input,
    .sort-dropdown,
    .sort-dropdown select {
        width: 100%;
    }
}

@media (max-width: 576px) {
    #products-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .product-image {
        height: 150px;
    }
    
    .product-modal-grid {
        display: flex;
        flex-direction: column;
    }
}