:root {
    /* Holbox Caribbean Palette */
    --primary: #008B8B;
    /* Deep Turquoise (Caribbean Sea) */
    --secondary: #FF7F50;
    /* Coral (Sunset/Flowers) */
    --accent: #E0C097;
    /* Sand (Beige) */
    --text-dark: #2F4F4F;
    /* Dark Slate Gray (Warm dark text) */
    --text-light: #F5F5F5;
    /* White Smoke */
    --bg-light: #FDF5E6;
    /* Old Lace (Warm Sand Background) */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.brand-font {
    font-family: 'Playfair Display', serif;
}

/* Utilities */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--secondary);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-secondary:hover {
    background-color: var(--primary);
    color: white;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: 0.3s;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
    /* Gradient for readability on hero */
}

header.scrolled {
    background: rgba(245, 245, 220, 0.98);
    /* Solid light background */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
}

header.scrolled .logo,
header.scrolled .nav-links a,
header.scrolled .cart-icon-container {
    color: var(--primary);
    /* Dark text on light background */
}

/* Initial state (on Hero) - Light text */
header:not(.scrolled) .logo,
header:not(.scrolled) .nav-links a,
header:not(.scrolled) .cart-icon-container {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

header:not(.scrolled) .nav-links a::after {
    background-color: white;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--secondary);
    transition: 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.cart-icon-container {
    position: relative;
    cursor: pointer;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--secondary);
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../img/hero_beach_night.webp.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    font-weight: 300;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
}

.about-item {
    width: 100%;
}

.about-text {
    padding: 60px 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #fff;
}

.about-text h3 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
    font-weight: 400;
    font-style: italic;
    position: relative;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    max-width: 500px;
}

/* Menu Page */
.menu-header {
    padding-top: 120px;
    padding-bottom: 40px;
    text-align: center;
    background-color: var(--bg-light);
}

.category-filter {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary);
    color: white;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding-bottom: 80px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.product-img {
    height: 200px;
    background-color: #ddd;
    background-size: cover;
    background-position: center;
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.product-desc {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    flex-grow: 1;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.product-price {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.add-btn {
    background: var(--primary);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.add-btn:hover {
    background: var(--secondary);
    transform: scale(1.1);
}

/* Cart Modal - Premium Trust UI (Strict Implementation) */
.cart-modal {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    visibility: hidden;
    opacity: 0;
    transition: 0.3s;
    pointer-events: none;
}

.cart-modal.active {
    visibility: visible;
    opacity: 1;
    pointer-events: all;
}

.cart-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

.cart-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100%;
    /* Glassmorphism Premium */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
}

.cart-modal.active .cart-content {
    transform: translateX(0);
}

/* Trust Header - CRITICAL: Shield + Text + Icons Below */
.cart-header {
    padding: 25px 20px 15px;
    /* More top padding */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    /* Stacked layout */
    align-items: center;
    background: rgba(255, 255, 255, 0.5);
    position: relative;
}

.close-cart {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #999;
    transition: 0.3s;
}

.close-cart:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

.trust-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.trust-header-title i {
    color: var(--primary);
    /* Shield color */
    font-size: 1.1rem;
}

.header-trust-icons {
    display: flex;
    gap: 15px;
    font-size: 1.2rem;
    color: #999;
    opacity: 0.8;
}

/* Cart Items - Clean List (Compact) */
.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px 20px;
    min-height: 150px;
    /* Ensure visibility */
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.item-details h4 {
    font-size: 0.9rem;
    margin-bottom: 2px;
    color: var(--text-dark);
    font-weight: 600;
}

.item-details p {
    font-size: 0.8rem;
    color: #888;
}

.item-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.qty-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: #f0f0f0;
    color: #555;
    border-radius: 50%;
    font-size: 10px;
    cursor: pointer;
    transition: 0.2s;
}

.qty-btn:hover {
    background: var(--primary);
    color: white;
}

/* Footer Section - Compacted */
.cart-footer {
    padding: 15px 20px;
    /* Reduced vertical padding */
    background: white;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    /* Compact */
    color: var(--text-dark);
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

/* Payment Selector - Compact */
.payment-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    /* Compact */
}

.payment-card {
    flex: 1;
    height: 60px;
    /* Shorter cards */
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 0.7;
    filter: grayscale(100%);
}

.payment-card i {
    font-size: 1.1rem;
    color: #555;
}

.payment-card span {
    font-size: 0.65rem;
    font-weight: 600;
    color: #666;
}

.payment-card.active {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 139, 139, 0.15);
    opacity: 1;
    filter: grayscale(0%);
    transform: translateY(-2px);
}

.payment-card.active i {
    color: var(--primary);
}

/* Secure Card Form - Compacted */
.secure-form {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #eee;
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    margin-bottom: 8px;
    /* Tighter spacing */
}

.form-label {
    display: block;
    font-size: 0.7rem;
    color: #888;
    margin-bottom: 4px;
    font-weight: 500;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 10px;
    color: var(--primary);
    font-size: 0.8rem;
}

.secure-input {
    width: 100%;
    padding: 8px 8px 8px 32px;
    /* Smaller inputs */
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.85rem;
    outline: none;
    transition: 0.3s;
    background: white;
    color: #333;
}

.secure-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 139, 139, 0.1);
}

.form-row {
    display: flex;
    gap: 10px;
}

/* CTA Button - Compact */
.btn-checkout {
    width: 100%;
    padding: 14px;
    /* Smaller button */
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--secondary) 0%, #ff8c61 100%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 127, 80, 0.3);
    transition: all 0.3s;
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 127, 80, 0.4);
}

/* Security Footer - Compact */
.security-footer {
    margin-top: 12px;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.trust-icons {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 6px;
    opacity: 0.6;
    font-size: 1rem;
}

.secure-text {
    font-size: 0.65rem;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.secure-text i {
    font-size: 0.75rem;
    color: #27ae60;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {

    /* Header & Nav */
    header {
        padding: 10px 0;
    }

    .mobile-toggle {
        display: block !important;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0 10px;
        order: 2;
    }

    /* Adjust Cart & Lang Position */
    .cart-icon-container {
        order: 3;
    }

    .lang-selector {
        margin-left: auto !important;
        /* Push everything after logo to the right */
        margin-right: 10px !important;
        order: 1;
    }

    /* Ensure Nav container handles the push */
    nav {
        gap: 10px;
    }

    /* Nav Links Dropdown */
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 30px 0;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);

        /* Hidden state */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: 0.3s ease;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-links a {
        color: var(--text-dark) !important;
        /* Force dark text in dropdown */
        font-size: 1.2rem;
    }

    /* Hero Text */
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
        padding: 0 20px;
    }

    /* About Section - Stacked */
    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-item.about-img {
        height: 250px !important;
        /* Smaller image on mobile */
        order: -1;
        /* Image always on top of its text block? 
                      Actually row 1 is Img-Text. row 2 is Text-Img.
                      We want Img-Text, Img-Text. 
                   */
    }

    /* Reorder Row 2 specific */
    /* Select the 3rd child (Text Left) and 4th child (Img Right) */
    .about-grid>div:nth-child(3) {
        order: 2;
    }

    /* Text goes below */
    .about-grid>div:nth-child(4) {
        order: 1;
    }

    /* Img goes above */

    .about-text {
        padding: 40px 20px;
    }

    .about-text h3 {
        font-size: 2rem;
    }

    /* Cart Adjustments */
    .cart-content {
        max-width: 100%;
        /* Full width on mobile */
    }

    .payment-selector {
        gap: 5px;
    }

    .payment-card {
        height: 50px;
    }

    .payment-card i {
        font-size: 1rem;
    }

    .payment-card span {
        font-size: 0.6rem;
        display: none;
    }

    /* Hide text on very small screens? Or keep it */

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    #checkout-btn-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .payment-card span {
        display: none;
        /* Hide labels on iPhone SE/Small screens to fit 3 cards */
    }
}