/* Freshmart CSS */
:root {
    --c-primary: #f28482;
    --c-primary-dark: #e56b6f;
    --c-primary-light: #ffb5a7;
    --c-secondary: #ffdab9;
    --c-accent: #fec5bb;
    --c-bg: #ffffff;
    --c-surface: #f8edeb;
    --c-dark: #2b2d42;
    --c-text: #4a4e69;
    --c-text-muted: #8d99ae;
    --c-border: #fad2e1;

    --font-heading: "Outfit", sans-serif;
    --font-body: "Inter", sans-serif;

    --shadow-sm: 0 4px 12px rgba(242, 132, 130, 0.05);
    --shadow-md: 0 12px 32px rgba(242, 132, 130, 0.08);
    --shadow-lg: 0 24px 48px rgba(242, 132, 130, 0.12);
    --shadow-glass: 0 8px 32px 0 rgba(43, 45, 66, 0.05);
    --shadow-glow: 0 0 20px rgba(242, 132, 130, 0.4);

    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 32px;
    --radius-xl: 48px;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: var(--font-body);
    color: var(--c-text);
    background-color: var(--c-bg);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}
img {
    max-width: 100%;
    display: block;
}
ul {
    list-style: none;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--c-dark);
    font-weight: 700;
    line-height: 1.2;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}
.section {
    padding: 120px 0;
}

.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
    letter-spacing: 0.3px;
    font-family: var(--font-heading);
    white-space: nowrap;
}
.btn-primary {
    background: var(--c-primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--c-primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.btn-outline {
    background: transparent;
    color: var(--c-primary);
    border-color: var(--c-primary);
    border-width: 2px;
}
.btn-outline:hover {
    background: var(--c-primary);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 24px 0;
    transition: var(--transition);
}
.header.scrolled {
    padding: 16px 0;
}
.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px 12px 12px;
    border-radius: 50px;
    box-shadow: var(--shadow-glass);
}
.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--c-dark);
    display: flex;
    align-items: center;
}
.logo span {
    color: var(--c-primary);
}

.nav-links {
    display: flex;
    gap: 32px;
    background: rgba(248, 237, 235, 0.5);
    padding: 10px 24px;
    border-radius: 50px;
}
.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--c-dark);
    position: relative;
    white-space: nowrap;
}
.nav-link:hover {
    color: var(--c-primary);
}

.nav-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}
.cart-fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 950;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--c-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}
.cart-fab:hover {
    background: var(--c-primary-dark);
    transform: translateY(-3px);
}
.cart-fab[hidden] {
    display: none !important;
}
.cart-fab__badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--c-dark);
    color: #fff;
    font-size: 11px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.anim-fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.anim-fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}
.delay-1 {
    transition-delay: 0.1s;
}
.delay-2 {
    transition-delay: 0.2s;
}
.delay-3 {
    transition-delay: 0.3s;
}
.delay-4 {
    transition-delay: 0.4s;
}

body.cart-open #cart-drawer {
    transform: translateX(0) !important;
}
body.cart-open,
body.nav-open {
    overflow: hidden;
}

.hover-zoom:hover {
    transform: scale(1.05);
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: var(--c-primary-light);
}

@keyframes floating {
    0% {
        transform: translateY(0) rotate(-5deg);
    }
    50% {
        transform: translateY(-10px) rotate(-5deg);
    }
    100% {
        transform: translateY(0) rotate(-5deg);
    }
}

/* Mobile nav hamburger + drawer */
.nav-links__close {
    display: none;
}
@media (max-width: 992px) {
    .nav-links.nav-open .nav-links__close {
        display: flex;
        position: absolute;
        top: 24px;
        right: 24px;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: var(--c-surface);
        border: none;
        font-size: 1.6rem;
        line-height: 1;
        color: var(--c-dark);
        cursor: pointer;
    }
    .nav-links.nav-open {
        display: flex !important;
        position: fixed;
        top: 0;
        right: 0;
        width: 80%;
        max-width: 320px;
        height: 100%;
        background: #fff;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 100px 32px 32px;
        border-radius: 0;
        z-index: 200;
        box-shadow: var(--shadow-lg);
    }
}
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    border: none;
    background: var(--c-surface);
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
}
.nav-hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--c-dark);
    margin: 0 auto;
    transition: var(--transition);
}
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 190;
}
body.nav-open .nav-overlay {
    display: block;
}
body.nav-open .nav-hamburger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
body.nav-open .nav-hamburger span:nth-child(2) {
    opacity: 0;
}
body.nav-open .nav-hamburger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Gallery lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(20, 20, 24, 0.94);
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.lightbox.active {
    display: flex;
}
.lightbox__content {
    max-width: 90vw;
    max-height: 85vh;
    text-align: center;
}
.lightbox__img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: var(--radius-md);
    object-fit: contain;
}
.lightbox__caption {
    color: #fff;
    margin-top: 16px;
    font-size: 1rem;
}
.lightbox__close,
.lightbox__prev,
.lightbox__next {
    position: fixed;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}
.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
    background: var(--c-primary);
}
.lightbox__close {
    top: 24px;
    right: 24px;
}
.lightbox__prev {
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
}
.lightbox__next {
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 56px;
}
.pagination__link {
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--c-border);
    color: var(--c-text);
    font-weight: 600;
    transition: var(--transition);
}
.pagination__link:hover {
    border-color: var(--c-primary);
    color: var(--c-primary);
}
.pagination__link.active {
    background: var(--c-primary);
    border-color: var(--c-primary);
    color: #fff;
}

/* Stat counter suffix already rendered server-side; JS swaps the number */

/* Grid responsive utilities */
@media (max-width: 992px) {
    .nav-links {
        display: none;
    }
    .nav-hamburger {
        display: flex;
    }
    .hero-grid,
    .editorial-grid,
    .products-grid,
    .bento-grid,
    .features-grid,
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4,
    .footer-grid,
    .contact-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .hero-title {
        font-size: 3rem !important;
    }
    .section-title {
        font-size: 2.5rem !important;
    }
    .bento-item {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }
}

@media (max-width: 640px) {
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4,
    .products-grid,
    .bento-grid,
    .features-grid,
    .footer-grid,
    .contact-grid,
    .editorial-grid {
        grid-template-columns: 1fr !important;
    }
    .nav-cta {
        display: none !important;
    }
}
