:root {
    --color-red: #D42426;
    --color-green: #165B33;
    --color-gold: #F8B229;
    --color-snow: #F0F0F0;
    --color-dark-green: #0B2E1A;
    --color-bg: #0f2027;
    /* Fallback */
    --font-heading: 'Mountains of Christmas', cursive;
    --font-body: 'Outfit', sans-serif;
    --card-bg: rgba(255, 255, 255, 0.1);
    --card-border: rgba(255, 255, 255, 0.2);
    --shadow-soft: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

body {
    font-family: var(--font-body);
    background: linear-gradient(to bottom, #0f2027, #203a43, #2c5364);
    color: var(--color-snow);
    min-height: 100vh;
    overflow-x: hidden;
}

.snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.hero {
    text-align: center;
    padding: 4rem 1rem;
    position: relative;
    z-index: 2;
}

.title {
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--color-gold);
    text-shadow: 0 0 10px rgba(248, 178, 41, 0.5);
    margin-bottom: 0.5rem;
    animation: glow 2s ease-in-out infinite alternate;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

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

.product-card {
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    opacity: 0;
    /* For scroll animation */
    transform: translateY(20px);
}

.product-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    border-color: var(--color-gold);
}

.card-image-container {
    height: 250px;
    overflow: hidden;
    position: relative;
}

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

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

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-badges {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 0.5rem;
}

.badge {
    background: var(--color-red);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.product-name {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--color-gold);
}

.short-description {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    color: #ddd;
}

.price {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: auto;
    color: var(--color-snow);
    margin-bottom: 1rem;
}

.view-btn {
    display: inline-block;
    background: var(--color-green);
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.view-btn:hover {
    background: #1e7e45;
    transform: scale(1.02);
}

.footer {
    text-align: center;
    padding: 3rem;
    margin-top: 3rem;
    color: rgba(255, 255, 255, 0.6);
    position: relative;
    z-index: 2;
}

@keyframes glow {
    from {
        text-shadow: 0 0 10px rgba(248, 178, 41, 0.5);
    }

    to {
        text-shadow: 0 0 20px rgba(248, 178, 41, 0.8), 0 0 10px rgba(248, 178, 41, 0.5);
    }
}

/* Filters */
.filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-snow);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-red);
    border-color: var(--color-red);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 36, 38, 0.4);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

.modal-content {
    background: linear-gradient(135deg, #1a2a33, #2c3e50);
    margin: 5% auto;
    padding: 0;
    border: 1px solid var(--color-gold);
    width: 90%;
    max-width: 900px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: var(--color-snow);
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--color-red);
}

.modal-body {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .modal-body {
        flex-direction: row;
    }
}

.modal-image-container {
    flex: 1;
    overflow: hidden;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

@media (min-width: 768px) {
    .modal-image-container {
        border-top-right-radius: 0;
        border-bottom-left-radius: 16px;
    }
}

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

.modal-details {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.modal-details h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--color-gold);
    margin-bottom: 0.5rem;
}

.modal-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.modal-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-green);
}

.modal-stock {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.9rem;
}

.modal-rating {
    color: var(--color-gold);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.modal-features {
    list-style: none;
    margin: 1.5rem 0;
}

.modal-features li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.modal-features li::before {
    content: '🎄';
    position: absolute;
    left: 0;
}

.modal-actions {
    margin-top: auto;
    display: flex;
    gap: 1rem;
}

.buy-btn {
    flex: 2;
    background: var(--color-red);
    color: white;
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.2s;
}

.buy-btn:hover {
    transform: scale(1.05);
    background: #b01c1e;
}

.wishlist-btn {
    flex: 1;
    background: transparent;
    border: 1px solid var(--color-red);
    color: var(--color-red);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.wishlist-btn:hover {
    background: var(--color-red);
    color: white;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Snow Animation */
.snowflake {
    position: absolute;
    color: #fff;
    font-size: 1em;
    font-family: Arial;
    text-shadow: 0 0 1px #000;
    filter: blur(1px);
}

@keyframes snowfall {
    0% {
        transform: translateY(-10vh) translateX(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) translateX(100px) rotate(360deg);
        opacity: 0.3;
    }
}