/* Global Styles */
:root {
    /* 
    NOTE: These colors are placeholders based on the logo from:
    https://drive.google.com/file/d/1fIYd5yj3Nas1hVki1yOqXOm5KpXdVvym/view?usp=sharing
    Please adjust these colors to match the exact colors from the logo if needed.
    */
    --primary-color: #1a1a1a;  /* Almost black - adjust based on logo */
    --light-gray: #e0e0e0;     /* Light gray for header background */
    --secondary-color: #f9f7f3; /* Off-white - adjust based on logo */
    --accent-color: #c9a66b;   /* Gold - adjust based on logo */
    --wine-bg: #143D57;        /* Deep Blue for theme background */
    --food-bg: #143D57;        /* Unified theme color */
    --wine-text: #ffffff;      /* White text for dark theme */
    --wine-accent: #c9a66b;    /* Gold accent for dark theme */
    --wine-secondary-text: #b0c4de; /* Light steel blue for secondary text */
    --text-color: #333;
    --light-text: #f9f7f3;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    --font-family: 'Montserrat', 'Helvetica Neue', sans-serif;
    --heading-font: 'Playfair Display', 'Times New Roman', serif;
    /* Section band backgrounds */
    --section-bg-1: #143D57; /* light */
    --section-bg-2: #143D57; /* very light warm tint */
}

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600&family=Playfair+Display:wght@400;500;600;700&display=swap');

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

body {
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--wine-bg);
}

/* Prevent scrolling when menu is open */
body.menu-open {
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

h1, h2, h3, h4 {
    font-family: var(--heading-font);
    margin-bottom: 1rem;
    color: var(--wine-accent);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
}

h4 {
    font-size: 1.2rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

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

.btn {
    display: inline-block;
    background-color: var(--wine-accent);
    color: var(--wine-bg);
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    transition: background-color 0.3s;
    margin-top: 1rem;
}

.btn:hover {
    background-color: var(--accent-color);
    color: var(--light-text);
}

.subtitle {
    font-style: italic;
    color: var(--accent-color);
    margin-bottom: 2rem;
}

/* Header Styles */
header {
    background-color: var(--wine-bg);
    color: #ffffff;
    position: fixed;
    width: 100%;
    z-index: 100;
    padding: 1rem 0; /* increased for bigger headbar */
    transition: transform 0.4s ease, background-color 0.5s ease;
    min-height: 54px; /* ensure a taller header */
    display: flex;
    align-items: center;
}

/* Hamburger menu button */
.hamburger-menu {
    display: block;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.3rem; /* larger icon for bigger header */
    cursor: pointer;
    padding: 0.5rem; /* easier tap target */
    transition: color 0.3s ease;
    z-index: 102;
    position: relative;
}

.hamburger-menu:hover {
    color: var(--accent-color);
}

header.scrolled {
    background-color: var(--wine-bg);
    top: 0;
    transform: translateY(0);
    transition: transform 0.4s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Hide header when scrolling down */
header.header-hidden {
    transform: translateY(-100%) !important;
}

/* Make header on static pages have the scrolled appearance by default */
.static-page header#main-header {
    background-color: var(--wine-bg);
    top: 0;
    transition: transform 0.4s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Add space at the top of static pages to account for the fixed header */
.static-page main {
    padding-top: 80px; /* increased to match taller fixed header */
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: none; /* make container span full header width */
    margin: 0; /* remove centering */
    padding: 0 1rem; /* edge padding; tweak as needed */
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    text-align: left;
}

.logo-image {
    height: 48px; /* larger logo */
    margin-right: 5px;
    filter: brightness(0) invert(1);
}

.logo-text {
    display: none;
}

.logo h1 {
    color: #ffffff;
    margin-bottom: 0.05rem;
    font-size: 1.1rem; /* larger title */
    font-weight: 600;
    letter-spacing: 0.3px;
}

.tagline {
    font-style: italic;
    font-size: 0.6rem; /* slightly larger tagline */
    font-weight: 300;
    letter-spacing: 0.3px;
    color: var(--accent-color);
}

/* Sidebar navigation */
.main-nav {
    display: none;
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background-color: var(--wine-bg);
    padding: 5rem 2rem 2rem;
    z-index: 101;
    transition: right 0.3s ease;
    overflow-y: auto;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

/* Show navigation when it has the 'active' class */
.main-nav.active {
    display: block;
    right: 0;
}

/* Overlay when sidebar is active */
.main-nav.active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

nav {
    display: flex;
    align-items: center;
}

nav ul {
    display: flex;
    flex-direction: column;
    list-style: none;
    width: 100%;
}

nav li {
    margin: 1.5rem 0;
    width: 100%;
}

nav a {
    color: var(--light-text);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 0.5rem 0;
    position: relative;
    font-size: 1.2rem;
    transition: color 0.3s ease;
    display: block;
}

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

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

nav a:hover::after, nav a.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 600px;
    position: relative;
    color: var(--light-text);
    text-align: center;
    margin-bottom: 4rem;
    padding-top: 80px; /* Increased to account for taller fixed header */
    background-color: var(--wine-bg);
    background-image: none;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero::before {
    display: none;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 800px;
    width: 90%;
    padding: 0 2rem;
    z-index: 1;
}

.hero h2 {
    color: var(--wine-accent);
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero .subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--accent-color);
    font-weight: 300;
    letter-spacing: 1px;
}

.hero-buttons {
    margin-top: 2rem;
}

.hero-buttons .btn {
    margin: 0 0.5rem;
    padding: 1rem 2rem;
    background-color: transparent;
    border: 1px solid var(--accent-color);
    color: var(--light-text);
    transition: all 0.3s ease;
}

.hero-buttons .btn:hover {
    background-color: var(--accent-color);
    color: var(--wine-bg);
}

/* About Section */
.about-section, .philosophy-section {
    margin: 6rem 0;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--wine-accent);
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background-color: var(--accent-color);
    margin: 1rem auto 0;
}

.about-content, .philosophy-content {
    display: flex;
    gap: 4rem;
    align-items: center;
    margin-top: 2rem;
}

.about-text, .philosophy-text {
    flex: 1;
    padding: 2rem;
}

.about-text p, .philosophy-text p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-weight: 300;
    font-size: 1.05rem;
    color: #ffffff;
}

.about-image, .philosophy-image {
    flex: 1;
    position: relative;
    overflow: hidden;
    height: 600px;
    box-shadow: var(--shadow);
}

.about-image img, .philosophy-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.about-image:hover img, .philosophy-image:hover img {
    transform: scale(1.05);
}

/* Replace placeholder with actual images */
.about-image {
    background-image: url('../images/Roberto-vini.png');
    background-size: cover;
    background-position: center;
}

.philosophy-image {
    background-image: url('https://images.unsplash.com/photo-1507048331197-7d4ac70811cf?ixlib=rb-1.2.1&auto=format&fit=crop&w=1050&q=80');
    background-size: cover;
    background-position: center;
}

/* CTA Section */
/* Shared logo container for page intros (used on wine page too) */
.logo-container {
    margin-bottom: 2rem;
    padding-top: 2rem;
}

.page-logo {
    height: 80px;
}

.cta-section, .wine-cta, .food-cta {
    background-color: var(--wine-bg);
    background-image: none;
    color: var(--light-text);
    padding: 6rem 2rem;
    text-align: center;
    margin: 6rem 0 0;
    position: relative;
}

.cta-section::before, .wine-cta::before, .food-cta::before {
    display: none;
}

.cta-section .container, .wine-cta .container, .food-cta .container {
    position: relative;
    z-index: 1;
}

.cta-section h2, .wine-cta h3, .food-cta h3 {
    color: var(--light-text);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.cta-section p, .wine-cta p, .food-cta p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.8;
    font-weight: 300;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.cta-buttons .btn {
    background-color: transparent;
    color: var(--light-text);
    border: 1px solid var(--accent-color);
    padding: 1rem 2.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.cta-buttons .btn:hover {
    background-color: var(--accent-color);
    color: var(--wine-bg);
    transform: translateY(-3px);
}

/* Menu Styles */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem 0;
    background-color: var(--accent-color);
    color: var(--light-text);
}

.page-header h2 {
    color: var(--light-text);
}

.page-header .subtitle {
    color: var(--accent-color);
}

.menu-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.menu-item {
    background-color: white;
    padding: 1.5rem;
    border-radius: 4px;
    box-shadow: var(--shadow);
}

.menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

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

.description {
    font-style: italic;
    color: #666;
}

/* Wine Specific Styles */
.wine-intro {
    margin-top: 3rem;
    margin-bottom: 3rem;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.wine-intro h2 {
    color: var(--wine-accent);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.wine-intro .subtitle {
    color: var(--accent-color);
    margin-bottom: 2rem;
}

.wine-region {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.wine-tasting {
    background-color: white;
    padding: 2rem;
    border-radius: 4px;
    box-shadow: var(--shadow);
    margin: 3rem 0;
    text-align: center;
}

.tasting-options {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
}

.tasting-option {
    background-color: var(--secondary-color);
    padding: 1.5rem;
    border-radius: 4px;
    width: 300px;
}

.tasting-note {
    font-style: italic;
    color: #666;
}

/* Section full-width background bands for menu regions */
/* Applies to food sections and wine sections */
.food-section,
.menu-section {
    position: relative;
    z-index: 0; /* create stacking context for ::before */
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.food-section::before,
.menu-section::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw; /* full viewport width */
    background: var(--wine-bg); /* unified theme color */
    z-index: -1; /* behind section content */
}

/* Optional subtle top separator line for clarity */
.food-section::after,
.menu-section::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    top: 0;
    height: 1px;
    background: var(--border-color);
    opacity: 0.5;
}

/* If you want alternating bands, uncomment these:
.container > .food-section:nth-child(even)::before { background: var(--wine-bg); }
.wine-list > .menu-section:nth-child(even)::before { background: var(--wine-bg); }
*/

/* Footer Styles */
footer {
    background-color: #4f4c4c;
    color: #000000;
    padding: 0;
}

.footer-top {
    padding: 5rem 0 3rem;
    background-color: var(--wine-bg);
}

.footer-logo p, .contact p, .hours p {
    color: #ffffff;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-logo {
    flex: 1;
    max-width: 300px;
}

.footer-logo-container {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.footer-logo-image {
    height: 50px;
    margin-right: 10px;
    filter: brightness(0) invert(1);
}

.footer-logo h3 {
    color: var(--accent-color);
    font-size: 1.8rem;
    font-family: var(--heading-font);
}

.footer-logo p {
    font-weight: 300;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent-color);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    color: var(--accent-color);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.contact, .hours {
    flex: 1;
    max-width: 300px;
    padding: 0 1rem;
}

.contact h3, .hours h3 {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.contact p, .hours p {
    font-weight: 300;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.copyright {
    text-align: center;
    padding: 1.5rem 0;
    font-size: 0.9rem;
    font-weight: 300;
    background-color: #080808;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .container {
        padding: 1rem;
        width: 95%;
    }

    .header-container {
        padding: 0 1rem;
    }

    .hero h2 {
        font-size: 2.8rem;
    }

    .hero .subtitle {
        font-size: 1.2rem;
    }

    .about-content, .philosophy-content {
        gap: 2rem;
    }

    .about-image, .philosophy-image {
        height: 400px;
    }

    /* Wine page adjustments */
    .wine-intro {
        width: 90%;
    }

    .menu-items {
        gap: 1.5rem;
    }

    .tasting-options {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    header {
        padding: 0.75rem 0;
        min-height: 64px;
    }

    /* Mobile: remove margins/borders from CTA sections */
    .cta-section, .wine-cta, .food-cta {
        margin: 0;
        border: none;
    }

    /* Ensure wine page logo is visible right below the fixed header */
    .wine-intro {
        margin-top: 0.5rem;
    }

    .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0 1rem;
    }

    .logo {
        flex-direction: row;
        text-align: left;
        margin-bottom: 0;
    }

    .logo-image {
        height: 36px;
        margin-right: 8px;
        margin-bottom: 0;
    }

    .logo h1 {
        font-size: 1.1rem;
        margin-bottom: 0;
    }

    .tagline {
        font-size: 0.6rem;
    }

    /* No need to show hamburger menu button here as it's already shown by default */

    /* Adjust padding for static pages on mobile */
    .static-page main {
        padding-top: 80px;
    }

    .hero {
        min-height: 500px;
        padding-top: 80px; /* Adjust padding for larger mobile header */
    }

    .hero h2 {
        font-size: 2.2rem;
    }

    .hero .subtitle {
        font-size: 1rem;
    }

    .hero-buttons .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .about-content, .philosophy-content {
        flex-direction: column;
        gap: 2rem;
    }

    .philosophy-content {
        flex-direction: column-reverse;
    }

    .about-text, .philosophy-text {
        padding: 1rem 0;
    }

    .about-image, .philosophy-image {
        height: 300px;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .menu-items {
        grid-template-columns: 1fr;
    }

    .menu-item {
        padding: 1.25rem;
    }

    .cta-section h2, .wine-cta h3, .food-cta h3 {
        font-size: 2rem;
    }

    .cta-section p, .wine-cta p, .food-cta p {
        font-size: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    /* Wine page adjustments */
    .wine-intro {
        padding: 0 1rem;
        margin-top: 2rem;
    }

    .wine-intro h2 {
        font-size: 2rem;
    }

    .wine-intro .subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .wine-region {
        font-size: 0.9rem;
    }

    .wine-tasting {
        padding: 1.5rem;
    }

    .tasting-option {
        width: 100%;
        max-width: 300px;
    }

    .page-header {
        padding: 2rem 1rem;
    }

    .page-header h2 {
        font-size: 2rem;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        gap: 3rem;
        text-align: center;
    }

    .footer-logo, .contact, .hours {
        max-width: 100%;
    }

    .footer-logo-container {
        flex-direction: column;
        align-items: center;
    }

    .footer-logo-image {
        height: 50px;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .social-links {
        justify-content: center;
    }

    .tasting-options {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem 0.75rem;
    }

    .wine-intro {
        margin-top: 1.5rem;
    }

    .wine-intro h2 {
        font-size: 1.8rem;
    }

    .wine-intro .subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.2rem;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .hero .subtitle {
        font-size: 0.9rem;
    }

    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }

    .hero-buttons .btn {
        margin: 0;
        width: 100%;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

    .about-text p, .philosophy-text p {
        font-size: 0.95rem;
    }

    .about-image, .philosophy-image {
        height: 250px;
    }

    /* Menu and wine page adjustments */
    .menu-item-header h4 {
        font-size: 1.2rem;
    }

    .menu-item {
        padding: 1rem;
    }

    .description, .wine-region {
        font-size: 0.9rem;
    }

    .price {
        font-size: 0.95rem;
    }

    .wine-tasting h3 {
        font-size: 1.5rem;
    }

    .tasting-option {
        padding: 1rem;
    }

    .tasting-option h4 {
        font-size: 1.1rem;
    }

    .page-header {
        padding: 1.5rem 0.75rem;
    }

    .page-header h2 {
        font-size: 1.6rem;
    }

    /* Footer adjustments */
    .footer-content {
        padding: 0 0.75rem;
    }

    .contact h3, .hours h3, .footer-logo h3 {
        font-size: 1.1rem;
    }

    .contact p, .hours p, .footer-logo p {
        font-size: 0.9rem;
    }
}



/* --- Wine list styling and color semantics --- */
.wine-list .section-title {
    margin-top: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.25rem;
}
.wine-list .region-block {
    margin-top: 1rem;
}
.wine-list .region-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0.75rem 0 0.25rem 0;
    color: var(--wine-accent);
}
.wine-list ul.wines {
    list-style: none;
    margin: 0;
    padding: 0;
}
.wine-list li.wine-line {
    display: block;
    padding: 0.4rem 0.6rem;
    margin: 0.1rem 0;
    border-radius: 4px;
    line-height: 1.4;
}
.wine-list .wine-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* color semantics */
.text-red { color: #b4002d; }
.text-yellow { color: #c9a66b; }
.text-purple { color: #7a4a8a; }
.bg-yellow { background: rgba(201, 166, 107, 0.18); }
.bg-purple { background: rgba(122, 74, 138, 0.18); }

/* Responsive spacing */
@media (max-width: 640px) {
    .wine-list li.wine-line { padding: 0.45rem 0.5rem; }
}


/* --- Wine list 3-column row layout --- */
.wine-list ul.wines {
    list-style: none;
    margin: 0;
    padding: 0;
}
.wine-list li.wine-row {
    display: grid;
    /* Robust tracks: flexible info, FIXED price width */
    grid-template-columns: minmax(0, 1fr) minmax(10ch, 10ch);
    align-items: start;
    gap: 0.75rem 1rem;
    padding: 0.6rem 0.6rem;
    margin: 0.1rem 0;
    border-radius: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.wine-list li.wine-row .col {
    min-width: 0; /* enable text overflow handling */
}
/* Plain inline flow (not flex) so long spans (e.g. a long uvaggio list) wrap at word
   boundaries like normal text, instead of a flex item refusing to shrink and pushing
   the row wider than the viewport. The " - " separator comes from the ::before rule
   below, so no flex gap is needed. */
.wine-list li.wine-row .col1 .riga1,
.wine-list li.wine-row .col1 .riga2 {
    display: block;
}
.wine-list li.wine-row .col1 .riga1 > span,
.wine-list li.wine-row .col1 .riga2 > span {
    display: inline;
}
/* Allow long denominations or grape lists to wrap safely without breaking the grid.
   break-word prefers breaking at word boundaries, only splitting mid-word when a
   single word is itself too long to fit. */
.wine-list li.wine-row .col1 {
    overflow-wrap: break-word;
}
.wine-list li.wine-row .col1 .azienda {
    font-weight: 700;
}
/* Separator between Azienda and Nome only (Anno already carries its own parentheses). */
.wine-list li.wine-row .col1 .riga1 .azienda + .nome::before {
    content: " - ";
    font-weight: 400;
}
.wine-list li.wine-row .col1 .nome {
    font-weight: 600;
}
.wine-list li.wine-row .col1 .anno {
    color: var(--wine-secondary-text);
}
.wine-list li.wine-row .col1 .riga-denom {
    margin-top: 0.15rem;
    color: var(--wine-accent);
}
.wine-list li.wine-row .col1 .riga2 {
    font-size: 0.92rem;
    color: var(--wine-secondary-text);
}
.wine-list li.wine-row .col3 {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    white-space: nowrap;
    font-weight: 600;
    font-variant-numeric: tabular-nums; /* align price digits for consistent width */
}

/* Responsive adjustments */
@media (max-width: 920px) {
    .wine-list li.wine-row {
        grid-template-columns: minmax(0, 1fr) minmax(9ch, 9ch); /* fixed price on medium screens */
        gap: 0.6rem 0.75rem;
    }
}

/* Tablets: slightly compressed layout */
@media (max-width: 700px) {
    .wine-list li.wine-row {
        grid-template-columns: minmax(0, 1fr) minmax(8ch, 8ch);
        gap: 0.45rem 0.6rem;
        padding: 0.5rem 0.5rem;
    }
    .wine-list li.wine-row .col1 .riga1,
    .wine-list li.wine-row .col1 .riga2 {
        gap: 0.2rem 0.3rem;
    }
    .wine-list li.wine-row .col1 .riga2 { font-size: 0.85rem; }
    .wine-list li.wine-row .col3 { font-size: 0.95rem; }
}

/* Phones: [info | price] single row, info wraps onto multiple lines internally */
@media (max-width: 600px) {
    .wine-list li.wine-row {
        grid-template-columns: 1fr auto;
        grid-template-areas: "col1 col3";
        gap: 0.2rem 0.75rem;
        padding: 0.6rem 0.4rem;
    }
    .wine-list li.wine-row .col1 {
        grid-area: col1;
    }
    .wine-list li.wine-row .col3 {
        grid-area: col3;
        align-self: start;
        font-size: 0.95rem;
        justify-content: flex-end;
    }
    .wine-list li.wine-row .col1 .riga1 { font-size: 0.95rem; gap: 0.2rem 0.35rem; }
    .wine-list li.wine-row .col1 .riga2 { font-size: 0.82rem; gap: 0.15rem 0.25rem; }
}

/* Tiniest screens */
@media (max-width: 380px) {
    .wine-list li.wine-row { padding: 0.5rem 0.3rem; }
    .wine-list li.wine-row .col1 .riga1 { font-size: 0.88rem; }
    .wine-list li.wine-row .col1 .riga2 { font-size: 0.78rem; }
    .wine-list li.wine-row .col3 { font-size: 0.9rem; }
}


/* Back-to-top button (global) */
#backToTop {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--primary-color);
    color: var(--light-text);
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    display: inline-flex; /* keep in layout to avoid iOS display:none issues */
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
    z-index: 2000; /* above header and side menu */
}
#backToTop:hover, #backToTop:focus { background: var(--accent-color); outline: none; }
#backToTop.show { opacity: 1; visibility: visible; pointer-events: auto; }

@media (max-width: 480px) {
    #backToTop { right: 12px; bottom: 12px; width: 40px; height: 40px; font-size: 16px; }
}
