/* HEADER STYLES */
:root {
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Poppins', sans-serif;
    --color-primary: #e9c31e; /* Yellow from original header */
    --color-dark: #1a1a1a; /* Darker black for header/footer */
    --color-white: #ffffff;
    --brand-green: #3d8705;
    --brand-green-dark: #316d04;
    --text-dark: #2d2d30;
    --bg-light: #fdfdfd;
    --bg-off-white: #faf9f7;
}

html, body {
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-light);
    color: #333;
    margin: 0;
    line-height: 1.6;
    position: relative;
}

.page-wrapper {
    position: relative;
    overflow-x: hidden;
}

/* This is a placeholder for your header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    background-color: rgba(253, 253, 253, 0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* --- Language Switcher Styles --- */
.language-switcher {
    display: flex;
    gap: 0.5rem;
}

.language-switcher button {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-light);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.language-switcher button:not(.is-active):hover {
    border-color: var(--text-dark);
    color: var(--text-dark);
}

.language-switcher button.is-active {
    background-color: var(--brand-green);
    border-color: var(--brand-green);
    color: white;
}

/* Cart Toggle Button in Header */
.cart-toggle-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #333;
}
.cart-item-count {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: var(--brand-green);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    transform: scale(0);
    transition: transform 0.2s ease;
}
.cart-toggle-btn.has-items .cart-item-count {
    transform: scale(1);
}

/* Flyout Panel */
.cart-flyout-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.cart-flyout {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background-color: #fff;
    box-shadow: -5px 0 25px rgba(0,0,0,0.1);
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0.2, 0.2, 1);
    display: flex;
    flex-direction: column;
}
body.cart-is-open .cart-flyout-overlay {
    opacity: 1;
    pointer-events: all;
}
body.cart-is-open .cart-flyout {
    transform: translateX(0);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eee;
}
.cart-header h3 { margin: 0; }
.close-cart-btn {
    background: none;
    border: none;
    font-size: 2rem;
    font-weight: 300;
    color: #888;
    cursor: pointer;
}

.cart-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem;
}
.cart-empty-message { text-align: center; color: #888; padding-top: 2rem; }

.cart-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
}
.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    background-color: #faf9f7;
}
.cart-item-details { flex-grow: 1; }
.cart-item-details h4 { margin: 0 0 0.25rem 0; font-size: 1rem; }
.cart-item-details .item-price { color: #888; font-size: 0.9rem; }

.remove-item-btn {
    background: none; border: none; font-size: 1.25rem; color: #ccc; cursor: pointer; transition: color 0.2s ease;
}
.remove-item-btn:hover { color: #e74c3c; }

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid #eee;
    background-color: #fdfdfd;
}
.cart-subtotal {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.checkout-btn {
    display: block;
    width: 90%;
    text-align: center;
    background-color: var(--brand-green);
    color: white;
    text-decoration: none;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}
.checkout-btn:hover { background-color: var(--brand-green-dark); }

/* CONTENT STYLES*/
h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

/* --- Hero Introduction Section --- */
.hero-introduction {
    height: 80vh;
    min-height: 500px;
    /*width: 100%;*/
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    background-color: #fdfdfd;
}

.hero-text {
    max-width: 600px;
}

.main-headline {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.sub-headline {
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 0 auto 2rem auto;
    color: #555;
}

/* --- Product Grid Layout --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    background-color: #fdfdfd;
}

/* --- Product Tile --- */
.product-tile {
    aspect-ratio: 1 / 1; 
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    padding: 2.5rem;
    text-align: center;
    position: relative;
    transition: background-color 0.3s ease;
    /* ADDED: Set initial state for animation. The elements will start invisible and slightly down. */
    opacity: 0;
    visibility: hidden;
    transform: translateY(40px);
}

.product-tile__image {
    max-width: 90%;
    max-height: 60%;
    object-fit: contain; 
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.product-tile:hover .product-tile__image {
    transform: scale(1.05);
}

.product-tile__content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.product-tile__title {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.product-tile__button {
    
    color: #333;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
}

.product-tile:hover .product-tile__button {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* --- Product-Specific Background Colors --- */
.product-tile--color-silver { background-color: #e9e9ed; color: #2d2d30; }
.product-tile--color-natural { background-color: #f5f1e9; color: #4a443a; }
.product-tile--color-blue { background-color: #e4eff7; color: #2c3a47; }
.product-tile--color-green { background-color: #e3efde; color: #2a3d25; }
.product-tile--color-beige { background-color: #f4ece6; color: #5c4e44; }
.product-tile--color-white { background-color: #f7f7f7; color: #333; }
.product-tile--color-grey { background-color: #e8e8e8; color: #333; }

.product-tile--color-silver .product-tile__button,
.product-tile--color-natural .product-tile__button,
.product-tile--color-blue .product-tile__button,
.product-tile--color-green .product-tile__button,
.product-tile--color-beige .product-tile__button {
    color: #111;
}

/* --- Responsive Styles for Mobile --- */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-tile {
        aspect-ratio: 4 / 5;
        padding: 2rem;
    }

    .product-tile__image {
        max-height: 55%;
    }
}