:root {
    /* Colors - Inspired by Tunisian Mediterranean aesthetic */
    --primary: #1B3C59;
    /* Deep Mediterranean Blue */
    --secondary: #6B8E23;
    /* Olive Green */
    --accent: #D4AF37;
    /* Gold/Sand */
    --bg-light: #FCF9F5;
    /* Soft Cream */
    --text-dark: #2D2D2D;
    --text-light: #707070;
    --white: #FFFFFF;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;

    /* Spacing */
    --section-padding: 100px 5%;
    --container-width: 1200px;

    /* Transitions */
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* --- Loader Animation --- */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-light);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: transform 1s cubic-bezier(0.85, 0, 0.15, 1);
}

.loader-inner {
    text-align: center;
}

.loader-logo-text {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 12px;
    color: var(--primary);
    display: block;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(20px);
    animation: loaderTextFade 0.8s forwards 0.3s;
}

.loader-line {
    width: 0;
    height: 2px;
    background: var(--accent);
    margin: 0 auto;
    animation: loaderLineGrow 1.5s forwards 0.5s;
}

#loader.loaded {
    transform: translateY(-100%);
}

@keyframes loaderTextFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes loaderLineGrow {
    to {
        width: 100%;
    }
}

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

html,
body {
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-family: var(--font-body);
    line-height: 1.6;
    position: relative;
    overflow-y: hidden;
    /* Locked for loader */
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 5%;
    background: rgba(252, 249, 245, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

header.scrolled {
    padding: 15px 5%;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--primary);
}

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

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-icons {
    display: flex;
    gap: 20px;
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: var(--section-padding);
}

.hero-content {
    flex: 1;
    z-index: 2;
}

.hero-tagline {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--secondary);
    margin-bottom: 20px;
    display: block;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards 0.2s;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    line-height: 1.1;
    margin-bottom: 30px;
    color: var(--primary);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards 0.4s;
}

.hero-p {
    font-size: 1.1rem;
    max-width: 500px;
    color: var(--text-light);
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards 0.6s;
}

.hero-btns {
    display: flex;
    gap: 20px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards 0.8s;
}

.btn {
    padding: 15px 35px;
    border-radius: 0;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    border: 1px solid var(--primary);
}

.btn-primary:hover {
    background: transparent;
    color: var(--primary);
}

.hero-image {
    position: absolute;
    top: 50%;
    right: 5%;
    transform: translateY(-50%);
    width: 45%;
    height: 80vh;
    z-index: 1;
    overflow: hidden;
    border-radius: 200px 0 200px 0;
    opacity: 0;
    animation: fadeIn 1.5s forwards;
}

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

/* --- Section Titles --- */
.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 3rem;
    margin-bottom: 15px;
}

.section-title p {
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* --- Products Section --- */
.products {
    padding: var(--section-padding);
}

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

.product-card {
    display: block;
    background: var(--white);
    padding: 20px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.product-img {
    width: 100%;
    aspect-ratio: 1;
    margin-bottom: 20px;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-img img {
    transform: scale(1.05);
}

.product-info {
    text-align: center;
}

.product-cat {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--secondary);
    letter-spacing: 2px;
}

.product-name {
    font-size: 1.2rem;
    margin: 10px 0;
}

.product-price {
    font-weight: 700;
    color: var(--primary);
}

/* --- Heritage Section --- */
.heritage {
    padding: var(--section-padding);
    background: #EAE3D9;
    display: flex;
    align-items: center;
    gap: 60px;
}

.heritage-img {
    flex: 1;
    border-radius: 0 100px 0 100px;
    overflow: hidden;
    box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.05);
}

.heritage-img img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    transition: var(--transition);
}

.heritage-img:hover img {
    transform: scale(1.03);
}

.heritage-content {
    flex: 1;
}

.heritage h2 {
    font-size: 2.5rem;
    margin-bottom: 25px;
}

/* --- Blog Section --- */
.blog-card:hover .blog-img img {
    transform: scale(1.05);
}

.blog-card a {
    position: relative;
    display: inline-block;
    padding-bottom: 3px;
}

.blog-card a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.blog-card a:hover::after {
    width: 100%;
}

/* --- Newsletter --- */
.newsletter {
    padding: var(--section-padding);
    text-align: center;
    background: var(--primary);
    color: var(--white);
}

.newsletter h2 {
    margin-bottom: 20px;
}

.newsletter form {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    /* Wrap on mobile */
}

.newsletter input {
    padding: 15px 25px;
    width: 100%;
    max-width: 400px;
    border: none;
    font-family: inherit;
}

/* --- Footer --- */
footer {
    padding: 60px 5% 20px;
    background: var(--bg-light);
    border-top: 1px solid #eee;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h4 {
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.footer-col ul li {
    margin-bottom: 12px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid #eee;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* --- Animations --- */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 140px;
        padding-bottom: 60px;
        height: auto;
        min-height: 100vh;
    }

    .hero-image {
        position: relative;
        width: 100%;
        height: 60vh;
        max-height: 500px;
        right: 0;
        margin-top: 40px;
        transform: none;
        border-radius: 100px 0 100px 0;
        /* Slightly softer for mobile */
    }

    .hero-btns {
        justify-content: center;
    }

    .hero-p {
        margin-left: auto;
        margin-right: auto;
    }

    .heritage {
        flex-direction: column;
        padding: 80px 5%;
        gap: 40px;
    }

    .heritage-img img {
        height: 400px;
        /* Shorter for mobile */
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}