/* ============================================
   CATALOGO MANGROVIA — PUBLIC STYLESHEET
   Boxed catalog layout, responsive, accessible
   ============================================ */


/* --- CSS Variables --- */
:root {
    --teal: #007a8c;
    --teal-dark: #005f6b;
    --teal-light: #e0f4f7;
    --green: #5a9e3e;
    --green-dark: #468a2e;
    --green-light: #e8f5e0;
    --brown: #4a3728;
    --brown-light: #6b5544;
    --text: #555555;
    --text-light: #666666;
    --text-dark: #333333;
    --white: #ffffff;
    --off-white: #f8f8f5;
    --light-gray: #f0f0ec;
    --border-gray: #e5e5e0;
    --gradient: linear-gradient(90deg, var(--teal), var(--green));
    --gradient-reverse: linear-gradient(90deg, var(--green), var(--teal));

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;

    /* Fluid spacing: scales between 375px and 1400px viewport */
    --space-xs: clamp(6px, 0.5vw, 8px);
    --space-sm: clamp(12px, 1.2vw, 16px);
    --space-md: clamp(20px, 2.5vw, 32px);
    --space-lg: clamp(36px, 5vw, 64px);
    --space-xl: clamp(48px, 7vw, 96px);
    --space-xxl: clamp(64px, 9vw, 128px);

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-round: 50%;

    --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-circle: 0 4px 20px rgba(0, 0, 0, 0.12);
    --shadow-page: 0 0 40px rgba(0, 0, 0, 0.08), 0 0 80px rgba(0, 0, 0, 0.04);

    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.6s ease-out;

    --nav-height: 72px;
    --content-max: 1200px;
    --content-narrow: 800px;

    /* Boxed catalog dimensions */
    --catalog-padding: clamp(0px, 3.5vw, 48px);
    --catalog-bg: #e8e4df;
    --indicator-height: 44px;

    /* Fluid typography scale */
    --fs-hero-title: clamp(1.375rem, 1rem + 3vw, 3rem);
    --fs-hero-tagline: clamp(1rem, 0.7rem + 1.5vw, 1.75rem);
    --fs-hero-subtitle: clamp(0.7rem, 0.55rem + 0.7vw, 1.125rem);
    --fs-category-title: clamp(1.25rem, 0.8rem + 2.8vw, 3.25rem);
    --fs-section-title: clamp(1.25rem, 0.9rem + 1.8vw, 2.25rem);
    --fs-section-title-green: clamp(1.25rem, 0.9rem + 1.5vw, 2rem);
    --fs-body: clamp(0.9375rem, 0.875rem + 0.25vw, 1rem);
    --fs-body-lg: clamp(0.9375rem, 0.85rem + 0.4vw, 1.0625rem);
    --fs-small: clamp(0.6875rem, 0.625rem + 0.25vw, 0.8125rem);
    --fs-product-name: clamp(1.125rem, 0.95rem + 0.7vw, 1.375rem);
    --fs-product-featured-name: clamp(1.25rem, 1rem + 1vw, 1.75rem);
    --fs-ordini-h2: clamp(1.25rem, 1rem + 1vw, 1.625rem);
    --fs-ordini-h3: clamp(1.0625rem, 0.9rem + 0.6vw, 1.25rem);

    /* Safe area fallbacks */
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-left: env(safe-area-inset-left, 0px);
    --safe-area-right: env(safe-area-inset-right, 0px);
}


/* ===========================================
   RESET & BASE
   =========================================== */

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

picture {
    display: contents;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 0;
}

body {
    font-family: var(--font-body);
    font-size: var(--fs-body);
    font-weight: 400;
    line-height: 1.7;
    color: var(--text);
    background-color: var(--catalog-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

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

a:hover {
    color: var(--teal-dark);
}

ul {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--brown);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}


/* ===========================================
   ACCESSIBILITY
   =========================================== */

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    background: var(--brown);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 0;
    color: var(--white);
    outline: 3px solid var(--teal);
    outline-offset: 2px;
}

/* Focus visible for keyboard users */
:focus-visible {
    outline: 3px solid var(--teal);
    outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* ===========================================
   BOXED CATALOG PAGE
   =========================================== */

.catalog-page {
    max-width: calc(1400px + var(--catalog-padding) * 2);
    margin: 0 auto;
    background-color: var(--white);
    box-shadow: var(--shadow-page);
    position: relative;
}


/* ===========================================
   SCROLL PROGRESS BAR
   =========================================== */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient);
    z-index: 1001;
    transition: width 0.1s linear;
}


/* ===========================================
   STICKY SECTION INDICATOR
   =========================================== */

.section-indicator {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 998;
    padding-bottom: var(--safe-area-bottom);
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-gray);
    opacity: 0;
    transform: translateY(100%);
    transition: opacity var(--transition-normal),
                transform var(--transition-normal);
    pointer-events: none;
}

.section-indicator.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.section-indicator-inner {
    display: flex;
    align-items: stretch;
    justify-content: center;
    max-width: 100%;
    margin: 0 auto;
    height: var(--indicator-height);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.section-indicator-inner::-webkit-scrollbar {
    display: none;
}

.section-indicator-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: border-color var(--transition-fast),
                color var(--transition-fast),
                background-color var(--transition-fast);
    min-height: var(--indicator-height);
    -webkit-tap-highlight-color: transparent;
}

.section-indicator-item:hover {
    background-color: rgba(0, 122, 140, 0.05);
}

.section-indicator-item.active {
    border-bottom-color: var(--teal);
}

.section-indicator-label {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color var(--transition-fast);
}

.section-indicator-item.active .section-indicator-label {
    color: var(--teal);
}

.section-indicator-item:hover .section-indicator-label {
    color: var(--teal-dark);
}


/* ===========================================
   HERO SECTION
   =========================================== */

.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 500px;
    max-height: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--brown);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 0;
}

.hero-content {
    text-align: center;
    padding: var(--space-xl) var(--space-md);
    z-index: 1;
    animation: heroFadeIn 1s ease-out forwards;
}

.hero-logo {
    max-width: clamp(140px, 20vw, 280px);
    margin: 0 auto var(--space-md);
    filter: brightness(10);
}

.hero-tagline {
    font-family: var(--font-heading);
    font-size: var(--fs-hero-tagline);
    font-weight: 600;
    color: var(--white);
    letter-spacing: 4px;
    margin-top: var(--space-sm);
}

.hero-cta {
    display: inline-block;
    margin-top: var(--space-md);
    padding: clamp(12px, 1.3vw, 18px) clamp(32px, 4vw, 56px);
    font-family: var(--font-heading);
    font-size: clamp(0.8125rem, 0.75rem + 0.25vw, 1rem);
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--brown);
    background: var(--white);
    border: none;
    border-radius: var(--radius-md);
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.hero-cta:hover {
    color: var(--brown);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.hero-version {
    font-family: var(--font-heading);
    font-size: clamp(0.625rem, 0.55rem + 0.3vw, 0.8125rem);
    font-weight: 600;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: var(--space-lg);
}

.hero-version-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    display: inline-block;
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.6);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(74, 222, 128, 0.6); }
    50% { opacity: 0.5; box-shadow: 0 0 12px rgba(74, 222, 128, 0.9); }
}

.hero-title {
    font-family: var(--font-heading);
    font-size: var(--fs-hero-title);
    font-weight: 800;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 6px;
    margin-bottom: var(--space-sm);
    line-height: 1.1;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: var(--fs-hero-subtitle);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    line-height: 0;
    z-index: 2;
}

.hero-wave img {
    width: 100%;
    height: auto;
    display: block;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ===========================================
   SECTION BASE
   =========================================== */

.page-section {
    position: relative;
    width: 100%;
    padding: var(--space-xl) 0 var(--space-xxl);
    background-color: var(--white);
    overflow: hidden;
}

.page-section--alt {
    background-color: var(--off-white);
}

.section-container {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
    display: flex;
    align-items: flex-start;
    gap: var(--space-lg);
}

.section-content {
    flex: 1;
    min-width: 0;
    position: relative;
    padding-left: var(--space-md);
}

.section-accent {
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 60px;
    background: var(--gradient);
    border-radius: 2px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: var(--fs-section-title);
    font-weight: 700;
    color: var(--brown);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: var(--space-md);
    line-height: 1.15;
}

.section-text {
    font-family: var(--font-body);
    font-size: var(--fs-body);
    font-weight: 400;
    line-height: 1.8;
    color: var(--text);
}

.section-text p,
.section-text br + br {
    margin-bottom: 1.5em;
}

.section-image {
    flex: 0 0 40%;
    max-width: 40%;
}

.section-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    object-fit: cover;
}

/* Section wave at bottom */
.section-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    line-height: 0;
    z-index: 2;
}

.section-wave img {
    width: 100%;
    height: auto;
    display: block;
}

.section-wave--top {
    top: 0;
    bottom: auto;
}


/* ===========================================
   FULL-WIDTH PHOTO DIVIDERS
   =========================================== */

.photo-divider {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 300px;
    max-height: 600px;
    overflow: hidden;
}

.photo-divider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-divider--teal {
    border: none;
}

.photo-divider--green {
    border: none;
}

/* Placeholder gradient for missing photos */
.photo-divider--placeholder {
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-divider--placeholder::after {
    content: '';
    width: 80px;
    height: 80px;
    background-image: url('../images/leaf-icon.svg');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.3;
}


/* ===========================================
   LEAF DIVIDER
   =========================================== */

.leaf-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg) 0;
}

.leaf-divider img {
    width: 40px;
    height: 40px;
    opacity: 0.7;
}

.leaf-divider--lines {
    gap: var(--space-sm);
}

.leaf-divider--lines::before,
.leaf-divider--lines::after {
    content: '';
    width: 60px;
    height: 1px;
    background: var(--border-gray);
}


/* ===========================================
   CATEGORY INTRO
   =========================================== */

.category-intro {
    position: relative;
    width: 100%;
    padding: var(--space-xl) 0 var(--space-xxl);
    background-color: var(--white);
    text-align: center;
    overflow: hidden;
}

.category-intro--alt {
    background-color: var(--off-white);
}

.category-intro-content {
    max-width: var(--content-narrow);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.category-intro-content .leaf-divider {
    padding: 0 0 var(--space-md);
}

.category-title {
    font-family: var(--font-heading);
    font-size: var(--fs-category-title);
    font-weight: 800;
    color: var(--brown);
    text-transform: uppercase;
    letter-spacing: 5px;
    margin-bottom: var(--space-md);
    line-height: 1.1;
}

.category-description {
    font-family: var(--font-body);
    font-size: var(--fs-body-lg);
    font-weight: 400;
    line-height: 1.8;
    color: var(--text);
    max-width: 700px;
    margin: 0 auto;
}

.category-cover {
    max-width: var(--content-max);
    margin: var(--space-lg) auto 0;
    padding: 0 var(--space-md);
}

.category-cover img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--radius-lg);
}


/* ===========================================
   PRODUCTS SECTION
   =========================================== */

.products-section {
    width: 100%;
    padding: var(--space-xl) 0;
    background-color: var(--white);
}

.products-container {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
}


/* ===========================================
   FEATURED PRODUCT (Full Width)
   =========================================== */

.product-featured {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--border-gray);
}

.product-featured:last-of-type {
    border-bottom: none;
}

.product-featured:nth-child(even) {
    flex-direction: row-reverse;
}

.product-featured-image {
    flex: 0 0 clamp(200px, 22vw, 320px);
    width: clamp(200px, 22vw, 320px);
    height: clamp(200px, 22vw, 320px);
    border-radius: var(--radius-round);
    overflow: hidden;
    box-shadow: var(--shadow-circle);
    position: relative;
}

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

.product-featured-info {
    flex: 1;
    min-width: 0;
}

.product-featured-info .product-name {
    font-size: var(--fs-product-featured-name);
    margin-bottom: var(--space-xs);
}

.product-featured-info .product-scientific {
    margin-bottom: var(--space-md);
}

.product-featured-info .product-description {
    font-size: var(--fs-body);
    line-height: 1.8;
    margin-bottom: var(--space-md);
}


/* ===========================================
   PRODUCT GRID
   =========================================== */

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    padding-top: var(--space-lg);
}


/* ===========================================
   PRODUCT CARD
   =========================================== */

.product-card {
    text-align: center;
    padding: var(--space-md);
    background-color: var(--white);
    border-radius: var(--radius-lg);
    transition: transform var(--transition-normal),
                box-shadow var(--transition-normal);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.product-card-image {
    width: clamp(150px, 15vw, 200px);
    height: clamp(150px, 15vw, 200px);
    margin: 0 auto var(--space-md);
    border-radius: var(--radius-round);
    overflow: hidden;
    box-shadow: var(--shadow-circle);
    position: relative;
}

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

/* Shared product typography */
.product-name {
    font-family: var(--font-heading);
    font-size: var(--fs-product-name);
    font-weight: 600;
    color: var(--brown);
    margin-bottom: 4px;
}

.product-scientific {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: var(--space-sm);
}

.product-description {
    font-family: var(--font-body);
    font-size: var(--fs-body);
    font-weight: 400;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: var(--space-sm);
}

/* Image placeholder (gradient circle) */
.product-image-placeholder {
    width: 100%;
    height: 100%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-placeholder img {
    width: 48px;
    height: 48px;
    opacity: 0.5;
}


/* ===========================================
   TAGS / BADGES
   =========================================== */

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
}

.product-card .product-tags {
    justify-content: center;
}

.tag-badge {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--tag-color, var(--teal));
    background-color: color-mix(in srgb, var(--tag-color, var(--teal)) 12%, transparent);
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
    transition: background-color var(--transition-fast),
                transform var(--transition-fast);
    cursor: default;
}

.tag-badge:hover {
    background-color: color-mix(in srgb, var(--tag-color, var(--teal)) 22%, transparent);
    transform: scale(1.05);
}

@supports not (background-color: color-mix(in srgb, red 12%, transparent)) {
    .tag-badge {
        background-color: var(--teal-light);
    }
}


/* ===========================================
   ORDINI / CONTACT SECTION (legacy)
   =========================================== */

.ordini-section {
    position: relative;
    width: 100%;
    padding: var(--space-xxl) 0 var(--space-xl);
    background-color: var(--off-white);
    overflow: hidden;
}

.ordini-section .section-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.ordini-section .section-content {
    padding-left: 0;
    max-width: var(--content-narrow);
}

.ordini-section .section-accent {
    display: none;
}

.ordini-section .section-title {
    text-align: center;
    margin-bottom: var(--space-lg);
}


/* ===========================================
   FOOTER
   =========================================== */

.catalog-footer {
    background-color: var(--brown);
    padding: var(--space-md) 0;
    text-align: center;
    position: relative;
    z-index: 3;
    /* Extra bottom padding for sticky indicator + safe area */
    padding-bottom: calc(var(--space-md) + var(--indicator-height) + 16px + var(--safe-area-bottom));
}

.footer-content {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
    position: relative;
    z-index: 1;
}

.footer-brand {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: var(--space-xs);
}

.footer-copy {
    font-family: var(--font-body);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.footer-logo {
    max-width: 140px;
    margin: 0 auto var(--space-sm);
    filter: brightness(10);
}

.footer-tagline {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 2px;
    margin-bottom: var(--space-md);
}

.footer-legal {
    font-family: var(--font-body);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.6;
    margin-bottom: var(--space-sm);
}

.footer-signature {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-signature a {
    font-family: var(--font-heading), sans-serif;
    text-decoration: none;
    font-size: 11px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    transition: color var(--transition-fast);
}

.footer-signature a:hover {
    color: rgba(255, 255, 255, 0.7);
}

.studio121-prefix {
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.3);
}


/* ===========================================
   SCROLL ANIMATIONS
   =========================================== */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-slow),
                transform var(--transition-slow);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.slide-left {
    transform: translateX(-40px);
}

.animate-on-scroll.slide-left.visible {
    transform: translateX(0);
}

.animate-on-scroll.slide-right {
    transform: translateX(40px);
}

.animate-on-scroll.slide-right.visible {
    transform: translateX(0);
}

.animate-on-scroll.scale-in {
    transform: scale(0.95);
}

.animate-on-scroll.scale-in.visible {
    transform: scale(1);
}

/* Staggered animation delays for grid items */
.products-grid .animate-on-scroll:nth-child(1) { transition-delay: 0s; }
.products-grid .animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.products-grid .animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.products-grid .animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }
.products-grid .animate-on-scroll:nth-child(5) { transition-delay: 0.4s; }
.products-grid .animate-on-scroll:nth-child(6) { transition-delay: 0.5s; }
.products-grid .animate-on-scroll:nth-child(7) { transition-delay: 0.6s; }
.products-grid .animate-on-scroll:nth-child(8) { transition-delay: 0.7s; }
.products-grid .animate-on-scroll:nth-child(9) { transition-delay: 0.8s; }


/* ===========================================
   PARALLAX
   =========================================== */

.hero-wave img {
    transition: transform 0.1s linear;
    will-change: transform;
}


/* ===========================================
   UTILITY CLASSES
   =========================================== */

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

.text-teal {
    color: var(--teal);
}

.text-green {
    color: var(--green);
}


/* ===========================================
   COMPACT INTRO (Manifesto + Panoramica + Formati)
   =========================================== */

.intro-compact {
    padding: var(--space-xl) 0;
    background-color: var(--white);
}

.intro-compact-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.intro-block--manifesto {
    display: flex;
    align-items: flex-start;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.intro-block-text {
    flex: 1;
    min-width: 0;
}

.intro-block-image {
    flex: 0 0 35%;
    max-width: 35%;
}

.intro-block-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    object-fit: cover;
}

.intro-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-gray);
}

.intro-column {
    padding: 0;
}

.panoramica-cards--compact {
    margin-top: var(--space-sm);
    gap: var(--space-sm);
}

.formati-list--compact {
    margin-top: var(--space-sm);
    gap: var(--space-sm);
    max-width: none;
}


/* ===========================================
   CATALOG-SPECIFIC: Section Labels
   =========================================== */

.section-label {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 500;
    color: var(--brown-light);
    letter-spacing: 4px;
    text-transform: uppercase;
    display: block;
    margin-bottom: var(--space-sm);
}

.section-title--green {
    color: var(--green);
    font-size: var(--fs-section-title-green);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-sm);
}

.section-subtitle {
    font-size: var(--fs-body-lg);
    color: var(--text);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.page-section--centered {
    text-align: center;
}

.page-section--centered .section-container {
    flex-direction: column;
    align-items: center;
}

.section-container--narrow {
    max-width: 700px;
}


/* ===========================================
   CATALOG-SPECIFIC: Category Header
   =========================================== */

.category-section {
    margin: 0;
}

.category-header {
    text-align: center;
    padding: var(--space-xl) var(--space-md) var(--space-lg);
    max-width: var(--content-max);
    margin: 0 auto;
}


/* ===========================================
   CATALOG-SPECIFIC: Product Grid (3-column PDF style)
   =========================================== */

.products-grid-catalog {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    max-width: 900px;
    margin: 0 auto var(--space-md);
    border-top: 1px solid var(--border-gray);
}

.product-card-catalog {
    text-align: center;
    padding: var(--space-md) var(--space-sm);
    border-bottom: 1px solid var(--border-gray);
    border-right: 1px solid var(--border-gray);
}

.product-card-catalog:nth-child(3n) {
    border-right: none;
}

/* Adaptive grid: 2-column for categories with 1-2 products */
.products-grid-catalog--two {
    grid-template-columns: repeat(2, 1fr);
    max-width: 600px;
}

.products-grid-catalog--two .product-card-catalog:nth-child(3n) {
    border-right: 1px solid var(--border-gray);
}

.products-grid-catalog--two .product-card-catalog:nth-child(2n) {
    border-right: none;
}

.product-card-name {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    color: var(--brown);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: var(--space-sm);
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card-image-wrap {
    width: clamp(100px, 14vw, 160px);
    height: clamp(100px, 14vw, 160px);
    margin: 0 auto var(--space-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card-image-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-image-placeholder {
    width: 80px;
    height: 80px;
    opacity: 0.3;
}


/* ===========================================
   CATALOG-SPECIFIC: Format Icons (leaf indicators)
   =========================================== */

.format-icons {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    margin-top: var(--space-xs);
}

.format-icon {
    display: inline-block;
}

/* Three leaf sizes — always shown, filled or outline */
.format-icon--baby-leaf,
.format-icon--baby {
    width: 16px;
    height: 24px;
}

.format-icon--nica {
    width: 22px;
    height: 32px;
}

.format-icon--grande {
    width: 28px;
    height: 40px;
}

.format-icon--outline {
    opacity: 0.35;
}

.format-legend {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: clamp(16px, 4vw, 48px);
    padding: var(--space-md) var(--space-md) var(--space-xl);
    max-width: 600px;
    margin: 0 auto;
}

.format-legend-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-family: var(--font-heading);
    font-size: clamp(10px, 0.5rem + 0.3vw, 12px);
    font-weight: 600;
    color: var(--brown);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-align: center;
}

/* Legend leaf sizes match product icon proportions */
.format-legend-item .format-icon--baby-leaf {
    width: clamp(14px, 1.2vw, 18px);
    height: clamp(20px, 1.8vw, 26px);
}

.format-legend-item .format-icon--nica {
    width: clamp(18px, 1.6vw, 24px);
    height: clamp(26px, 2.4vw, 34px);
}

.format-legend-item .format-icon--grande {
    width: clamp(22px, 2vw, 30px);
    height: clamp(32px, 3vw, 42px);
}


/* ===========================================
   CATALOG-SPECIFIC: Panoramica Cards
   =========================================== */

.panoramica-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.panoramica-card {
    padding: var(--space-md);
    border-left: 4px solid var(--teal);
    text-align: left;
}

.panoramica-card-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--teal);
    letter-spacing: 1px;
    margin-bottom: var(--space-xs);
}

.panoramica-card p {
    font-size: var(--fs-body);
    color: var(--text);
    line-height: 1.6;
}


/* ===========================================
   CATALOG-SPECIFIC: Formati List
   =========================================== */

.formati-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-top: var(--space-md);
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.formato-item {
    padding: 0;
}

.formato-name {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.formato-name--green {
    color: var(--green);
}

.formato-size {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
}

.formato-item p {
    font-size: var(--fs-body);
    color: var(--text);
    line-height: 1.6;
}


/* ===========================================
   CATALOG-SPECIFIC: Mix Products
   =========================================== */


/* ===========================================
   CATALOG-SPECIFIC: Ordini Bullets
   =========================================== */

.ordini-bullets {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    max-width: 550px;
    margin: var(--space-md) auto 0;
    text-align: left;
}

.ordini-bullet {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.ordini-bullet-dot {
    width: 10px;
    height: 10px;
    min-width: 10px;
    border-radius: 50%;
    background: var(--gradient);
    margin-top: 7px;
}

.ordini-bullet p {
    font-size: var(--fs-body);
    font-weight: 500;
    color: var(--brown);
    line-height: 1.5;
}


/* ===========================================
   CLOSING SECTION (Ordini + Contatti)
   =========================================== */

.closing-section {
    padding: var(--space-xl) 0;
    background-color: var(--white);
}

.closing-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.closing-block {
    margin-bottom: var(--space-xl);
    text-align: center;
}

.closing-subtitle {
    font-size: var(--fs-body);
    color: var(--text);
    margin-bottom: var(--space-md);
}

/* Ordini steps (numbered) */
.ordini-steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin: var(--space-md) 0;
}

.ordini-step {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.ordini-step-num {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: var(--gradient);
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.ordini-step p {
    font-size: var(--fs-body);
    color: var(--text-dark);
    line-height: 1.5;
    padding-top: 6px;
}

.ordini-note {
    font-size: var(--fs-body);
    color: var(--teal);
    font-weight: 500;
    font-style: italic;
    margin-top: var(--space-sm);
}

/* ── WYSIWYG "prose" content from admin ──
   Robust styling for any TinyMCE output: p, ol, ul, h2, h3, strong, em, a.
   Must look good regardless of what structure the admin inserts. */

.ordini-content {
    max-width: 600px;
    margin: 0 auto;
    font-size: var(--fs-body);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Headings */
.ordini-content h2,
.ordini-content h3 {
    font-family: var(--font-heading);
    color: var(--green);
    text-align: center;
    margin: var(--space-md) 0 var(--space-sm);
}
.ordini-content h2 { font-size: var(--fs-ordini-h2); font-weight: 700; line-height: 1.3; }
.ordini-content h3 { font-size: var(--fs-ordini-h3); font-weight: 600; }
.ordini-content :first-child { margin-top: 0; }

/* Paragraphs */
.ordini-content p {
    margin: var(--space-sm) 0 0;
    text-align: center;
}

/* Inline */
.ordini-content strong { color: var(--text-dark); font-weight: 700; }
.ordini-content a { color: var(--teal); text-decoration: underline; }

/* Lists — clean with green bold counter */
.ordini-content ul,
.ordini-content ol {
    margin: var(--space-sm) auto;
    padding: 0;
    max-width: 600px;
    text-align: left;
    list-style: none;
    counter-reset: ordini;
}

.ordini-content ul li,
.ordini-content ol li {
    margin-bottom: 8px;
    line-height: 1.6;
    color: var(--text-dark);
    padding-left: 2em;
    position: relative;
}

.ordini-content ol li {
    counter-increment: ordini;
}

.ordini-content ol li::before {
    content: counter(ordini) ".";
    position: absolute;
    left: 0;
    font-weight: 700;
    color: var(--teal);
}

.ordini-content ul li::before {
    content: "\2022";
    position: absolute;
    left: 0.5em;
    font-weight: 700;
    color: var(--teal);
}

/* Contact buttons */
.closing-contacts {
    margin-bottom: var(--space-xl);
    padding: var(--space-lg);
    background-color: var(--off-white);
    border-radius: var(--radius-lg);
    text-align: center;
}

.contact-buttons {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    flex-wrap: wrap;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    /* Minimum touch target */
    min-height: 48px;
    min-width: 48px;
    transition: transform var(--transition-fast),
                box-shadow var(--transition-fast);
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.contact-btn:active {
    transform: translateY(0);
}

.contact-btn--phone {
    background-color: var(--brown);
    color: var(--white);
}

.contact-btn--phone:hover {
    color: var(--white);
    background-color: var(--brown-light);
}

.contact-btn--whatsapp {
    background-color: #25D366;
    color: var(--white);
}

.contact-btn--whatsapp:hover {
    color: var(--white);
    background-color: #1da851;
}

.contact-btn--email {
    background-color: var(--teal);
    color: var(--white);
}

.contact-btn--email:hover {
    color: var(--white);
    background-color: var(--teal-dark);
}

.ordini-bullets--compact {
    margin-top: var(--space-sm);
    gap: var(--space-sm);
}


/* ===========================================
   CATALOG-SPECIFIC: Footer Enhanced
   =========================================== */

.footer-contacts {
    margin-bottom: var(--space-sm);
}

.footer-contacts a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.footer-contacts a:hover {
    color: var(--white);
}


/* ===========================================
   RESPONSIVE — 1400px (Boxed layout start)
   =========================================== */

@media (min-width: 1500px) {
    .catalog-page {
        margin-top: var(--catalog-padding);
        margin-bottom: var(--catalog-padding);
        border-radius: 4px;
    }
}


/* ===========================================
   RESPONSIVE — 1200px
   =========================================== */

@media (max-width: 1200px) {
    .category-title {
        letter-spacing: 4px;
    }
}


/* ===========================================
   RESPONSIVE — 992px (Tablet Landscape)
   =========================================== */

@media (max-width: 992px) {
    .category-title {
        letter-spacing: 3px;
    }

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

    .product-featured {
        gap: var(--space-md);
    }

    .hero-title {
        letter-spacing: 5px;
    }

    .hero-tagline {
        letter-spacing: 3px;
    }
}


/* ===========================================
   RESPONSIVE — 768px (Tablet Portrait)
   =========================================== */

@media (max-width: 768px) {
    :root {
        --nav-height: 60px;
    }

    /* Hero */
    .hero-title {
        letter-spacing: 4px;
    }

    .hero-subtitle {
        letter-spacing: 2px;
    }

    .hero-tagline {
        letter-spacing: 2px;
    }

    /* Sections stack vertically */
    .section-container {
        flex-direction: column;
        gap: var(--space-md);
    }

    .section-image {
        flex: none;
        max-width: 100%;
    }

    .section-title {
        letter-spacing: 2px;
    }

    /* Category */
    .category-title {
        letter-spacing: 2px;
    }

    .category-cover img {
        height: clamp(180px, 30vw, 280px);
    }

    /* Featured products - stack */
    .product-featured {
        flex-direction: column !important;
        text-align: center;
        gap: var(--space-md);
    }

    .product-featured-image {
        flex: none;
        width: clamp(200px, 50vw, 260px);
        height: clamp(200px, 50vw, 260px);
        margin: 0 auto;
    }

    .product-featured-info .product-tags {
        justify-content: center;
    }

    /* Grid */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Photo dividers */
    .photo-divider {
        height: 50vh;
        height: 50dvh;
        min-height: 250px;
        max-height: 400px;
    }

    /* Catalog grid - 2 columns */
    .products-grid-catalog {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
    }

    .product-card-catalog:nth-child(3n) {
        border-right: 1px solid var(--border-gray);
    }
    .product-card-catalog:nth-child(2n) {
        border-right: none;
    }

    .panoramica-cards {
        grid-template-columns: 1fr;
    }

    .format-legend {
        gap: clamp(12px, 3vw, 24px);
    }

    /* Intro compact responsive */
    .intro-block--manifesto {
        flex-direction: column;
        gap: var(--space-md);
    }

    .intro-block-image {
        flex: none;
        max-width: 100%;
    }

    .intro-columns {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    /* Section indicator */
    .section-indicator-label {
        font-size: 10px;
        letter-spacing: 0.5px;
    }

    /* Contact buttons */
    .contact-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .contact-btn {
        justify-content: center;
    }

    .hero-version {
        margin-top: var(--space-md);
    }
}


/* ===========================================
   RESPONSIVE — 576px (Mobile)
   =========================================== */

@media (max-width: 576px) {
    /* Remove boxed look on small screens */
    .catalog-page {
        box-shadow: none;
    }

    .hero {
        min-height: 400px;
        max-height: 700px;
    }

    .hero-title {
        letter-spacing: 3px;
    }

    .hero-subtitle {
        letter-spacing: 1.5px;
    }

    .section-title {
        letter-spacing: 1.5px;
    }

    .category-title {
        letter-spacing: 2px;
    }

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

    .product-card {
        padding: var(--space-sm);
    }

    .photo-divider {
        height: 40vh;
        height: 40dvh;
        min-height: 200px;
        max-height: 300px;
    }

    /* Catalog grid */
    .products-grid-catalog {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
    }

    .product-card-image-wrap {
        width: clamp(80px, 25vw, 110px);
        height: clamp(80px, 25vw, 110px);
    }

    .product-card-name {
        font-size: clamp(0.6875rem, 0.6rem + 0.4vw, 0.875rem);
        letter-spacing: 1px;
        min-height: 32px;
    }

    .product-card-catalog {
        padding: var(--space-sm) var(--space-xs);
    }

    .format-legend {
        gap: var(--space-sm);
    }

    /* Closing section */
    .closing-contacts {
        padding: var(--space-md);
    }

    .ordini-step-num {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 13px;
    }

    /* Footer extra padding for indicator + safe area */
    .catalog-footer {
        padding-bottom: calc(var(--space-md) + var(--indicator-height) + 12px + var(--safe-area-bottom));
    }

    .hero-version {
        margin-top: var(--space-sm);
    }

    /* Mix products stacked on mobile */
    .mix-products {
        grid-template-columns: 1fr;
    }

    /* Section indicator adjustments */
    .section-indicator-label {
        font-size: 9px;
        letter-spacing: 0;
    }

    .section-indicator-item {
        padding: 0 4px;
    }
}


/* ===========================================
   RESPONSIVE — 400px (Small mobile)
   =========================================== */

@media (max-width: 400px) {
    .hero-title {
        letter-spacing: 2px;
    }

    .hero-tagline {
        letter-spacing: 1px;
    }

    .category-title {
        letter-spacing: 1px;
    }

    .product-card-name {
        letter-spacing: 0.5px;
    }

    /* Section indicator at very small sizes */
    .section-indicator-label {
        font-size: 8px;
    }
}


/* ===========================================
   SCROLL TO TOP BUTTON
   =========================================== */

.scroll-top-btn {
    position: fixed;
    bottom: calc(var(--indicator-height) + 20px + var(--safe-area-bottom));
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--teal);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.3s ease;
    z-index: 90;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background: var(--dark-teal);
}

.scroll-top-btn:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

@media (max-width: 576px) {
    .scroll-top-btn {
        width: 40px;
        height: 40px;
        right: 12px;
    }
}

@media print {
    .scroll-top-btn {
        display: none !important;
    }
}


/* ===========================================
   PRINT STYLES
   =========================================== */

@media print {
    .section-indicator,
    .scroll-progress,
    .skip-link {
        display: none !important;
    }

    html {
        scroll-padding-top: 0;
    }

    body {
        color: #000;
        background: #fff;
        font-size: 12pt;
        line-height: 1.5;
    }

    .catalog-page {
        box-shadow: none;
        max-width: none;
    }

    .hero {
        min-height: auto;
        max-height: none;
        page-break-after: always;
    }

    .page-section,
    .category-intro,
    .products-section {
        padding: 30pt 0;
        page-break-inside: avoid;
    }

    .photo-divider {
        height: 200pt;
        max-height: none;
        page-break-after: always;
    }

    .product-featured {
        page-break-inside: avoid;
    }

    .product-card {
        page-break-inside: avoid;
    }

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

    .animate-on-scroll {
        opacity: 1 !important;
        transform: none !important;
    }

    .section-wave,
    .hero-wave {
        display: none;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    .tag-badge {
        border: 1px solid currentColor;
        background: transparent !important;
    }
}

/* ─── Lightbox Gallery ──────────────────────────────────────────── */

.product-card-catalog--has-gallery {
    cursor: pointer;
}

.product-card-catalog--has-gallery:hover .product-card-image-wrap {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

.product-card-catalog--has-gallery:focus {
    outline: 2px solid #007a8c;
    outline-offset: 4px;
    border-radius: 8px;
}

.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-close {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 1010;
    background: none;
    border: none;
    color: #333;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    padding: 8px;
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
    transform: scale(1.15);
}

.lightbox-prev,
.lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1010;
    background: rgba(0, 0, 0, 0.06);
    border: none;
    color: #333;
    font-size: 48px;
    line-height: 1;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 8px;
    opacity: 0.6;
    transition: opacity 0.2s, background 0.2s;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
}

.lightbox-prev {
    left: 16px;
}

.lightbox-next {
    right: 16px;
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-picture {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-picture img {
    max-width: 85vw;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 4px;
    user-select: none;
}

.lightbox-caption {
    color: #333;
    font-family: 'Open Sans', sans-serif;
    font-size: 15px;
    text-align: center;
    margin-top: 16px;
    max-width: 600px;
    line-height: 1.5;
    opacity: 0.9;
}

.lightbox-counter {
    color: rgba(0, 0, 0, 0.4);
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 500;
    margin-top: 8px;
    letter-spacing: 2px;
}

/* Lightbox mobile */
@media (max-width: 768px) {
    .lightbox-prev,
    .lightbox-next {
        font-size: 32px;
        padding: 8px 12px;
    }

    .lightbox-prev {
        left: 8px;
    }

    .lightbox-next {
        right: 8px;
    }

    .lightbox-close {
        top: 10px;
        right: 14px;
        font-size: 30px;
    }

    .lightbox-picture img {
        max-width: 95vw;
        max-height: 70vh;
    }

    .lightbox-caption {
        font-size: 13px;
        padding: 0 16px;
    }
}
