/* ═══════════════════════════════════════════════════════════════
   DAL MASO — Pagina I Vini (page-i-vini.php)
   Colori principali:
     Verde salvia:   #6A7854
     Ambra vino:     #C4843E
     Testo scuro:    #2F3624
     Avorio sfondo:  #FAF8F4
══════════════════════════════════════════════════════════════ */

/* ── Reset ────────────────────────────────────────────────── */
.dm-vini-page * {
    box-sizing: border-box;
}
.dm-vini-page {
    font-family: 'Google Sans Flex', 'Helvetica Neue', Arial, sans-serif;
    color: #2F3624;
    background: #FAF8F4;
    margin: 0;
    padding: 0;
}

/* Barra-titolo Elementor: foto di sfondo dedicata per la pagina I Vini
   (sovrascrive breadcrumb-blog.jpg su .pavo-breadcrumbs-148::before) */
.dm-page-vini .pavo-breadcrumbs-148::before {
    background-image: url('/wp-content/uploads/2026/06/Bt0t11S4QfYFWyv0-1-scaled.jpg') !important;
}

/* ── HERO — carosello bottiglie a scorrimento ─────────────── */
.dm-vini-hero {
    position: relative;
    width: 100%;
    background: #FAF8F4;            /* avorio: le foto bottiglia sono su bianco */
    padding: 56px 0 44px;
    overflow: hidden;
}
.dm-vini-hero__content {
    text-align: center;
    margin-bottom: 38px;
}
.dm-vini-hero__title {
    font-family: 'Kalnia', Georgia, serif;
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 600;
    color: #2F3624;                /* testo scuro su sfondo chiaro */
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin: 0;
}

/* Pista del carosello: scorre in loop infinito; i bordi sfumano in trasparenza */
.dm-bottle-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}
.dm-bottle-track {
    display: flex;
    align-items: flex-start;
    gap: 34px;
    width: max-content;
    animation: dm-bottle-scroll 70s linear infinite;
    will-change: transform;
}
.dm-bottle-carousel:hover .dm-bottle-track {
    animation-play-state: paused;  /* si ferma al passaggio del mouse */
}
.dm-bottle {
    flex: 0 0 auto;
    width: 134px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}
.dm-bottle__img-wrap {
    height: 270px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.dm-bottle__img {
    max-height: 270px;
    width: auto;
    object-fit: contain;
    transition: transform .35s ease;
}
.dm-bottle:hover .dm-bottle__img {
    transform: translateY(-8px) scale(1.05);
}
.dm-bottle__name {
    margin-top: 16px;
    font-family: 'Kalnia', Georgia, serif;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    line-height: 1.3;
    color: #6A7854;
    text-transform: uppercase;
    text-align: center;
}
@keyframes dm-bottle-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .dm-bottle-track { animation: none; }
}

/* ── FILTRO ───────────────────────────────────────────────── */
.dm-vini-filter {
    background: #ffffff;
    border-bottom: 1px solid #e8e4dc;
    padding: 20px 0;
}
.dm-vini-filter__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px 28px;
}
.dm-filter-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #6A7854;
    white-space: nowrap;
}
.dm-filter-options {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 22px;
}
.dm-filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #2F3624;
    user-select: none;
    line-height: 1;
}
.dm-filter-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.dm-filter-checkmark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    border: 1.5px solid #999;
    border-radius: 3px;
    background: #fff;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}
.dm-filter-option input:checked + .dm-filter-checkmark {
    background: #6A7854;
    border-color: #6A7854;
}
.dm-filter-option input:checked + .dm-filter-checkmark::after {
    content: '';
    display: block;
    width: 5px;
    height: 8px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
}
.dm-filter-option:hover .dm-filter-checkmark {
    border-color: #6A7854;
}

/* ── GRIGLIA ──────────────────────────────────────────────── */
.dm-vini-grid-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 56px 32px 80px;
}
.dm-vini-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 48px 32px;
}

/* ── CARD ─────────────────────────────────────────────────── */
.dm-wine-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: dm-card-fadein 0.4s ease both;
}
.dm-wine-card.dm-card-in {
    animation: dm-card-fadein 0.4s ease both;
}
@keyframes dm-card-fadein {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
.dm-wine-card__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    width: 100%;
}
.dm-wine-card__link:hover .dm-wine-card__img {
    transform: scale(1.04);
}
.dm-wine-card__link:hover .dm-wine-card__name {
    color: #6A7854;
}

/* Immagine bottiglia */
.dm-wine-card__img-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 280px;
    overflow: hidden;
    margin-bottom: 16px;
    background: #FAF8F4;
}
.dm-wine-card__img {
    width: 100%;
    height: 260px;
    object-fit: contain;
    object-position: bottom center;
    transition: transform 0.35s ease;
    display: block;
    mix-blend-mode: multiply;
}
.dm-wine-card__img-placeholder {
    width: 80px;
    height: 220px;
    background: #e8e4dc;
    border-radius: 40px;
}

/* Nome vino */
.dm-wine-card__name {
    font-family: 'Kalnia', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 500;
    color: #C4843E;
    text-align: center;
    margin: 0;
    letter-spacing: 0.02em;
    line-height: 1.3;
    transition: color 0.2s;
}

/* Placeholder quando non ci sono vini */
.dm-vini-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #888;
    padding: 60px 0;
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1100px) {
    .dm-vini-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) {
    .dm-vini-hero { padding: 40px 0 32px; }
    .dm-vini-hero__content { margin-bottom: 28px; }
    .dm-bottle { width: 115px; }
    .dm-bottle__img-wrap { height: 185px; }
    .dm-bottle__img { max-height: 185px; }
    .dm-bottle-track { gap: 36px; }
    .dm-bottle__name { font-size: 0.74rem; }
    .dm-vini-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 36px 20px;
    }
    .dm-vini-filter__inner { padding: 0 20px; }
    .dm-vini-grid-wrap     { padding: 36px 20px 60px; }
    .dm-wine-card__img-wrap { height: 220px; }
    .dm-wine-card__img { max-height: 200px; }
}
@media (max-width: 480px) {
    .dm-vini-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px 14px;
    }
    .dm-wine-card__img-wrap { height: 180px; }
    .dm-wine-card__img { max-height: 160px; }
    .dm-wine-card__name { font-size: 0.92rem; }
}

/* ── Stile tabella dettagli sul singolo prodotto ─────────────────── */
table.dm-wine-details {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 0.9rem;
}
table.dm-wine-details th,
table.dm-wine-details td {
    padding: 8px 12px;
    border-bottom: 1px solid #e8e4dc;
    text-align: left;
    vertical-align: top;
}
table.dm-wine-details th {
    color: #6A7854;
    font-weight: 600;
    width: 38%;
    white-space: nowrap;
}
table.dm-wine-details td {
    color: #2F3624;
}
