/* --- 1. Global Styles & Variables --- */
:root {
    --bg-color: #0f0f0f;
    --primary-card-bg: #1a1a1a;
    --text-color: #ffffff;
    --text-muted: #888;
    --accent-color: #4ecdc4;
    --danger-color: #ff6b6b;
    --header-bg: rgba(15, 15, 15, 0.8);
    --transition-main: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

main {
    flex-grow: 1;
}

button {
    font-family: inherit;
}

/* --- 2. Global Header (Consistent with index.html) --- */
.global-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    background-color: var(--header-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-icon {
    fill: var(--text-muted);
    width: 24px;
    height: 24px;
    transition: var(--transition-main);
}

.nav-icon:hover {
    fill: var(--text-color);
    transform: scale(1.1);
}

/* --- 3. Category Page Styles --- */
.category-section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-transform: capitalize;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 50px;
}

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

/* --- 4. Product Card Styles (Copied from your design) --- */
.product-card {
    background: var(--primary-card-bg);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    transition: var(--transition-main);
}

.product-card:hover {
    transform: translateY(-10px);
}

.image-container {
    width: 100%;
    height: 380px;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .image-container img {
    transform: scale(1.1);
}

.wishlist-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition-main);
}

.wishlist-icon {
    width: 20px;
    height: 20px;
    stroke: #fff;
    fill: transparent;
    transition: var(--transition-main);
}

.wishlist-btn.active .wishlist-icon {
    stroke: var(--danger-color);
    fill: var(--danger-color);
}

.quick-view-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 10px 20px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    border: none;
    font-weight: 700;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.product-card:hover .quick-view-btn {
    opacity: 1;
    transform: translate(-50%, -60%);
}

.card-content {
    padding: 20px;
}

.product-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.product-category {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent-color);
}

.product-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 8px 0 16px;
    color: var(--text-color);
}

.option-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.color-options {
    display: flex;
    gap: 10px;
}

.color-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--primary-card-bg);
    outline: 1px solid var(--text-muted);
    transition: var(--transition-main);
}

.color-dot:hover {
    transform: scale(1.2);
}

.color-dot.active {
    outline-color: var(--accent-color);
}

/* --- 5. Modal Styles (Copied from your design) --- */
.product-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 100;
}

.product-modal.active {
    display: block;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    width: 90vw;
    max-width: 900px;
    height: 90vh;
    max-height: 600px;
    margin: auto;
    top:20vh;
    background: var(--primary-card-bg);
    border-radius: 20px;
    padding: 24px;
    animation: scaleIn 0.3s ease-out;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s;
}

.modal-details .product-title {
    font-size: 2rem;
    color: var(--text-color);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    height: 100%;
}

.modal-image {
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-details {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    gap: 1rem;
    justify-content: space-between;
}

.modal-details .product-price {
    font-size: 1.8rem;
    margin-top: 10px;
    margin-bottom: 20px;
}

.modal-description {
    color: var(--text-muted);
    margin-bottom: auto;
    line-height: 1.6;
}

.add-to-cart-btn {
    padding: 16px;
    border-radius: 12px;
    border: none;
    background: var(--accent-color);
    color: #000;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-main);
}

.size-btn {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    border: 1px solid var(--text-muted);
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: var(--transition-main);
}

.size-options {
    display: flex;
    gap: 10px;
}

.size-btn.active {
    background: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* --- 6. Global Footer (Consistent with index.html) --- */
.global-footer {
    background-color: #000;
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.social-links {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.social-icon {
    fill: var(--text-muted);
    width: 24px;
    height: 24px;
    transition: var(--transition-main);
}

.social-icon:hover {
    fill: var(--accent-color);
    transform: translateY(-3px);
}

.copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 1024px) {

    .container {
        padding: 0 16px;
    }

    .section-title {
        font-size: 2.1rem;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 24px;
    }

    .image-container {
        height: 320px;
    }

    .modal-content {
        max-width: 95vw;
        max-height: 90vh;
    }
}


@media (max-width: 768px) {

    /* Header */
    .global-header {
        padding: 14px 0;
    }

    .logo {
        font-size: 1.3rem;
    }

    .nav-links {
        gap: 18px;
    }

    /* Titles */
    .section-title {
        font-size: 1.9rem;
    }

    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 40px;
    }

    /* Cards */
    .image-container {
        height: 280px;
    }

    .product-title {
        font-size: 1.2rem;
    }

    .product-price {
        font-size: 1.15rem;
    }

    /* Modal */
    .modal-body {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .modal-content {
        padding: 20px;
        height: auto;
        max-height: 95vh;
        overflow-y: auto;
    }

    .modal-image {
        height: 280px;
    }
}

@media (max-width: 480px) {

    /* Header */
    .nav-container {
        padding: 0 14px;
    }

    .logo {
        font-size: 1.1rem;
    }

    /* Sections */
    .category-section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }

    /* Grid */
    .product-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Cards */
    .product-card {
        border-radius: 16px;
    }

    .image-container {
        height: 240px;
    }

    .card-content {
        padding: 16px;
    }

    .wishlist-btn {
        width: 36px;
        height: 36px;
    }

    .wishlist-icon {
        width: 18px;
        height: 18px;
    }

    .quick-view-btn {
        font-size: 0.9rem;
        padding: 8px 16px;
    }

    /* Modal */
    .modal-content {
        width: 95vw;
        max-height: auto;
        /* top: 2vh; */
        padding: 16px;
    }

    .modal-image {
        height: 220px;
    }

    .modal-details .product-title {
        font-size: 1.6rem;
    }

    .modal-details .product-price {
        font-size: 1.4rem;
    }

    .size-options {
        flex-wrap: wrap;
    }

    .size-btn {
        padding: 6px 12px;
    }
}
