:root {
    --primary-color: #d32f2f;
    /* Red from the reference image */
    --text-color: #333;
    --bg-color: #f5f5f5;
    --white: #fff;
    --border-color: #e0e0e0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

/* Header */
header {
    background-color: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.brand span {
    color: var(--text-color);
    font-weight: 300;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.search-bar {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    background: #fafafa;
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    width: 200px;
}

.icon {
    font-size: 1.2rem;
    cursor: pointer;
}

.cart-icon {
    position: relative;
}

.badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 0.7rem;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Main Layout */
.container {
    display: flex;
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1rem;
    gap: 2rem;
}

/* Sidebar Filters */
.filters {
    width: 250px;
    flex-shrink: 0;
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    height: fit-content;
}

.filter-group {
    margin-bottom: 2rem;
}

.filter-title {
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
}

.checkbox-group label {
    display: flex;
    gap: 10px;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #555;
    cursor: pointer;
}

/* Product Grid */
.product-grid {
    flex-grow: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-img-box {
    height: 350px;
    background: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    overflow: hidden;
    position: relative;
}

.product-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--white);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.product-info {
    padding: 1rem;
}

.brand-name {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.2rem;
}

.product-title {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.price {
    font-weight: 600;
    color: var(--text-color);
}

/* Try-On Widget Button - Side Tab */
.tryon-toggle {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: #444;
    color: var(--white);
    padding: 1.3rem 0.65rem;
    /* Increased padding by ~30% */
    writing-mode: vertical-rl;
    text-orientation: mixed;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    font-weight: 600;
    font-size: 1.2rem;
    /* Increased font size */
    display: flex;
    align-items: center;
    gap: 13px;
    /* Increased gap */
}

.tryon-toggle i {
    transform: rotate(90deg);
}

/* Drawer / Iframe Container */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}

.drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100%;
    background: var(--white);
    z-index: 1002;
    transition: right 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
}

.drawer.open {
    right: 0;
}

.drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

.drawer-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-color);
}

.close-btn {
    cursor: pointer;
    font-size: 1.2rem;
    color: #666;
}

.tryon-frame {
    flex-grow: 1;
    border: none;
    width: 100%;
}

/* Responsive Design */
@media (max-width: 992px) {
    .container {
        flex-direction: column;
    }

    .filters {
        width: 100%;
        display: none;
        /* Hide filters on mobile for simplicity, or make toggleable */
    }

    .header-actions .search-bar input {
        width: 120px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 1rem;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .brand {
        font-size: 1.2rem;
    }

    .nav-links {
        display: none;
        /* Hide nav links on mobile */
    }

    .header-actions {
        margin-left: auto;
    }

    .drawer {
        width: 100%;
        /* Full screen drawer on mobile */
        right: -100%;
    }

    .tryon-toggle {
        padding: 1rem 0.6rem;
        /* Slightly smaller on very small screens if needed, otherwise keep large */
        font-size: 1rem;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns on mobile */
        gap: 1rem;
    }

    .product-img-box {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
        /* 1 column on very small screens */
    }
}