:root {
    --bg-color: #fdfdfd;
    --text-color: #1a1a1a;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.05);
    --accent-color: #c5a059;
    --accent-hover: #b38f4d;
    --accent-glow: rgba(197, 160, 89, 0.3);
    --btn-secondary: #f4efe6;
    --btn-secondary-hover: #ffffff;
    --btn-secondary-text: #1a1a1a;
    --btn-secondary-glow: rgba(244, 239, 230, 0.28);
    --card-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

body.dark-theme {
    --bg-color: #0a0a0b;
    --text-color: #e0e0e0;
    --glass-bg: rgba(15, 15, 15, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --accent-color: #d4af37;
    --accent-hover: #f1c40f;
    --accent-glow: rgba(212, 175, 55, 0.2);
    --btn-secondary: #efe8d8;
    --btn-secondary-hover: #ffffff;
    --btn-secondary-text: #111111;
    --btn-secondary-glow: rgba(239, 232, 216, 0.22);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    transition: background 0.5s cubic-bezier(0.4, 0, 0.2, 1), color 0.5s ease;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Background Blobs for depth */
body::before,
body::after {
    content: '';
    position: fixed;
    width: 80vw;
    height: 80vw;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.35;
    pointer-events: none;
    animation: blob-float 20s infinite alternate;
}

body::before {
    background: radial-gradient(circle, var(--accent-color) 0%, transparent 70%);
    top: -20vw;
    right: -20vw;
}

body::after {
    background: radial-gradient(circle, #2a5298 0%, transparent 70%);
    bottom: -20vw;
    left: -20vw;
    animation-delay: -5s;
}

@keyframes blob-float {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(5vw, 5vw) scale(1.1);
    }
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.05),
            transparent);
    transition: 0.5s;
    pointer-events: none;
}

.glass:hover::before {
    left: 100%;
}

.glass:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 2rem;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1400px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--accent-color), #fff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    opacity: 0.8;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

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

.cart-link {
    font-size: 1.2rem;
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -12px;
    background: var(--accent-color);
    color: #000;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    background-color: var(--bg-color);
    /* Fill color if image is not in scale */
    animation: heroFadeIn 2s ease-out forwards;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: var(--hero-desktop-url);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 0;
    animation: slowZoom 25s infinite alternate;
}

@media (max-width: 1024px) and (orientation: portrait) {
    .hero.has-mobile-hero .hero-bg {
        background-image: var(--hero-mobile-url, var(--hero-desktop-url));
    }
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.2) 0%,
            rgba(0, 0, 0, 0.5) 40%,
            rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    padding: 0 20px;
}

.hero-subtitle {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 10px;
    color: var(--accent-color);
    margin-bottom: 2.5rem;
    font-weight: 800;
    font-size: 0.9rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUpModern 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 0.6s;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1.5rem;
    backdrop-filter: blur(5px);
    border-radius: 4px;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3.8rem, 11vw, 7rem) !important;
    line-height: 1.1 !important;
    margin-bottom: 3rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -1px;
    text-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 5px 20px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: scale(0.96) translateY(40px);
    animation: fadeInUpModern 2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 0.8s;
}

.hero-description {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 6.5rem;
    font-size: 1.45rem;
    line-height: 1.8;
    font-weight: 400;
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.9);
    letter-spacing: 0.5px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUpModern 1.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 1s;
}

.cta-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 4.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUpModern 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 1s;
}

/* Buttons */
.btn {
    padding: 0.8rem 2rem;
    background: var(--accent-color);
    color: #000;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

.btn.large {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 1.25rem 2.5rem;
    border-radius: 50px;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.btn.large i {
    transition: transform 0.3s ease;
}

.btn.large:hover i {
    transform: translateX(5px);
}

.btn.secondary {
    background: var(--btn-secondary);
    border: 1px solid transparent;
    color: var(--btn-secondary-text);
    box-shadow: 0 4px 15px var(--btn-secondary-glow);
}

.btn.secondary:hover {
    background: var(--btn-secondary-hover);
    color: var(--btn-secondary-text);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--btn-secondary-glow);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.scroll-indicator:hover {
    opacity: 1;
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid #fff;
    border-radius: 15px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: #fff;
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 2s infinite;
}

@keyframes slowZoom {
    0% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(1.3);
    }
}

@keyframes scroll-wheel {
    0% {
        transform: translate(-50%, 0);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, 15px);
        opacity: 0;
    }
}

@keyframes fadeInUpModern {
    from {
        opacity: 0;
        transform: scale(0.98) translateY(40px);
        filter: blur(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

/* Hero ferma: stesso layout, senza zoom e senza ingresso di titolo e testo */
.hero.is-static {
    animation: none;
    opacity: 1;
}

.hero.is-static .hero-bg {
    animation: none;
    transform: none;
}

.hero.is-static .hero-subtitle,
.hero.is-static .hero-title,
.hero.is-static .hero-description {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
}

/* Bottoni hero già visibili, senza ingresso dal basso */
.hero.is-static-buttons .cta-buttons {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
}

@media (max-width: 768px) {
    .hero {
        align-items: stretch;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        min-height: 100%;
        padding-top: 110px;
        padding-bottom: 92px;
    }

    .hero-subtitle {
        letter-spacing: 6px;
        margin-bottom: 1.5rem;
        font-size: 0.8rem;
    }

    .hero-title {
        margin-bottom: 1.25rem;
    }

    .hero-title:empty,
    .hero-description:empty {
        display: none;
        margin: 0;
    }

    .hero-description {
        margin-bottom: 0;
        font-size: 1.1rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        margin-top: auto;
        width: 100%;
    }

    .btn.large {
        width: 100%;
        max-width: 300px;
    }
}

/* Form Elements Global Fixes */
select option {
    background-color: #fff;
    color: #000;
}

body.dark-theme select option {
    background-color: #1a1a1a;
    color: #fff;
}

select.appearance-none {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23999' %3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
    background-size: 1.5em;
    padding-right: 3.5rem;
}

body.dark-theme select.appearance-none {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23fff' %3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
}

/* Auth Pages */
.auth-container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.auth-card {
    width: 100%;
    max-width: 450px;
    padding: 3.5rem 2.5rem;
}

.auth-card h2 {
    font-size: 2rem;
    margin-bottom: 2.5rem;
    font-weight: 700;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.auth-card p {
    margin-top: 2rem;
    font-size: 0.95rem;
    opacity: 0.8;
}

.auth-card a {
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
}

.auth-card a:hover {
    text-decoration: underline;
}

/* Catalog Improvements */
.catalog-container {
    margin-top: 100px;
    padding: 2rem;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

.product-card {
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02);
}

.product-card img {
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Admin Dashboard Stats */
.stat-card {
    padding: 2rem;
    transition: all 0.3s ease;
}

.stat-card h3 {
    opacity: 0.6;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-card p {
    font-size: 2.5rem;
    font-weight: 800;
    margin-top: 0.5rem;
    color: var(--accent-color);
}


/* Product Detail Page Improvements */
.product-detail-container {
    grid-template-columns: minmax(400px, 1fr) 1.2fr;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    align-items: start;
    padding: 120px 2rem 4rem;
}

.product-image.glass {
    position: sticky;
    top: 100px;
    padding: 0;
    overflow: hidden;
    height: auto;
    max-height: calc(100vh - 150px);
}

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

.product-info.glass {
    padding: 4rem;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 200px);
}

.product-info h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.product-info .price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin: 1.5rem 0;
}

.product-info .description {
    margin: 2.5rem 0;
    line-height: 1.8;
    font-size: 1.1rem;
    opacity: 0.9;
}

.product-info .meta {
    margin-top: auto;
    padding: 2rem 0;
    border-top: 1px solid var(--glass-border);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.product-info .meta p {
    font-size: 0.95rem;
    opacity: 0.7;
}

.product-info .meta strong {
    display: block;
    font-size: 1.1rem;
    color: var(--text-color);
    opacity: 1;
    margin-top: 0.3rem;
}

@media (max-width: 1100px) {
    .product-detail-container {
        grid-template-columns: 1fr;
        padding-top: 100px;
    }

    .product-image.glass {
        position: static;
        max-height: 500px;
    }

    .product-info.glass {
        padding: 2rem;
    }
}

@media (max-width: 900px) {
    .catalog-container {
        grid-template-columns: 1fr;
    }

    .filters {
        position: static;
        width: 100%;
    }
}

/* Featured Sections */
.featured-sections {
    padding: 100px 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.featured-card {
    padding: 3rem;
    text-align: left;
}

.featured-card h3 {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

/* News Section */
.news-section {
    padding: 60px 2rem 100px;
    max-width: 1400px;
    margin: 0 auto;
}

.news-card {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 0;
    overflow: hidden;
    padding: 0 !important;
    min-height: 400px;
}

.news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--accent-glow);
}

.news-content {
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.news-tag {
    display: inline-block;
    color: var(--accent-color);
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 3px;
    margin-bottom: 1.5rem;
}

.news-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.news-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.8;
    margin-bottom: 2rem;
}

.news-date {
    font-size: 0.8rem;
    opacity: 0.5;
    font-weight: 600;
}

@media (max-width: 992px) {
    .news-card {
        grid-template-columns: 1fr;
    }

    .news-image {
        height: 300px;
    }

    .news-content {
        padding: 3rem 2rem;
    }
}

.featured-card p {
    opacity: 0.8;
    line-height: 1.6;
}

/* Floating WhatsApp Button - Brand Style */
.whatsapp-float {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 60px;
    height: 60px;
    background: var(--accent-color);
    color: #000 !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 10px 30px var(--accent-glow);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    animation: float-pulse 3s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-5px);
    background: #fff;
    box-shadow: 0 15px 40px rgba(255, 255, 255, 0.2);
}

@keyframes float-pulse {
    0% {
        box-shadow: 0 0 0 0 var(--accent-glow);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(212, 175, 55, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
    }
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 30px;
        right: 30px;
        width: 55px;
        height: 55px;
        font-size: 24px;
    }
}