  /* ==================================================
   WINE AGE VERIFICATION
================================================== */

:root {
    --wine-age-primary: #6d1a24;
    --wine-age-primary-dark: #3b090f;
    --wine-age-primary-light: #912d39;
    --wine-age-gold: #d7ad68;
    --wine-age-gold-light: #f0d59e;
    --wine-age-cream: #f8f1e7;
}

/* Khóa scroll khi popup đang hiển thị */
body.wine-age-locked {
    overflow: hidden !important;
}

/* Popup mặc định ẩn để tránh nhấp nháy khi đã xác nhận */
.wine-age-gate {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.5s ease,
        visibility 0.5s ease;
}

.wine-age-gate.is-visible {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.wine-age-gate.is-leaving {
    opacity: 0;
    visibility: hidden;
}

/* Background */
.wine-age-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            circle at 20% 15%,
            rgba(215, 173, 104, 0.16),
            transparent 28%
        ),
        radial-gradient(
            circle at 85% 80%,
            rgba(109, 26, 36, 0.35),
            transparent 38%
        ),
        linear-gradient(
            135deg,
            rgba(24, 5, 8, 0.96),
            rgba(60, 10, 17, 0.94)
        );
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0.2;
}

/* Khung popup */
.wine-age-dialog {
    position: relative;
    width: min(100%, 610px);
    max-height: calc(100vh - 48px);
    overflow: hidden;
    color: var(--wine-age-cream);
    background:
        linear-gradient(
            145deg,
            rgba(126, 31, 43, 0.98),
            rgba(74, 12, 21, 0.99) 55%,
            rgba(48, 7, 13, 1)
        );
    border: 1px solid rgba(215, 173, 104, 0.55);
    border-radius: 50% 50% 46% 54% / 7% 7% 6% 6%;
    box-shadow:
        0 50px 100px rgba(0, 0, 0, 0.55),
        0 0 0 8px rgba(255, 255, 255, 0.025),
        inset 0 0 90px rgba(0, 0, 0, 0.18);
    transform: translateY(35px) scale(0.94);
    opacity: 0;
    transition:
        transform 0.75s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.55s ease;
}

.wine-age-gate.is-visible .wine-age-dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.wine-age-gate.is-leaving .wine-age-dialog {
    transform: translateY(20px) scale(0.96);
    opacity: 0;
}

/* Viền nghệ thuật bên trong */
.wine-age-dialog::before {
    content: "";
    position: absolute;
    inset: 12px;
    z-index: 1;
    pointer-events: none;
    border: 1px solid rgba(215, 173, 104, 0.25);
    border-radius: inherit;
}

/* Lớp ánh sáng chạy */
.wine-age-dialog::after {
    content: "";
    position: absolute;
    top: -70%;
    left: -45%;
    z-index: 0;
    width: 55%;
    height: 220%;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 235, 198, 0.07),
        transparent
    );
    transform: rotate(20deg);
    animation: wineAgeLight 7s ease-in-out infinite;
}

@keyframes wineAgeLight {
    0%,
    45% {
        left: -65%;
    }

    75%,
    100% {
        left: 130%;
    }
}

.wine-age-content {
    position: relative;
    z-index: 5;
    padding: 58px 66px 48px;
    text-align: center;
}

/* Con dấu 18+ */
.wine-age-seal {
    position: relative;
    display: flex;
    width: 112px;
    height: 112px;
    margin: 0 auto 25px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: var(--wine-age-gold-light);
    border: 1px solid rgba(215, 173, 104, 0.7);
    border-radius: 50%;
    background:
        radial-gradient(
            circle,
            rgba(215, 173, 104, 0.12),
            transparent 67%
        );
    box-shadow:
        0 0 0 6px rgba(215, 173, 104, 0.04),
        0 0 45px rgba(215, 173, 104, 0.12);
}

.wine-age-seal::before,
.wine-age-seal::after {
    content: "";
    position: absolute;
    inset: 7px;
    border: 1px dashed rgba(215, 173, 104, 0.42);
    border-radius: 50%;
}

.wine-age-seal::after {
    inset: -5px;
    border-style: solid;
    border-color:
        transparent
        rgba(215, 173, 104, 0.28);
    animation: wineAgeSealRotate 12s linear infinite;
}

@keyframes wineAgeSealRotate {
    to {
        transform: rotate(360deg);
    }
}

.wine-age-seal strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.25rem;
    line-height: 1;
    font-weight: 500;
}

.wine-age-seal-small {
    font-size: 0.54rem;
    font-weight: 700;
    letter-spacing: 0.28em;
}

/* Đường kẻ trang trí */
.wine-age-line {
    display: flex;
    max-width: 240px;
    margin: 0 auto 25px;
    align-items: center;
    justify-content: center;
    gap: 11px;
}

.wine-age-line span {
    width: 72px;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(215, 173, 104, 0.8)
    );
}

.wine-age-line span:last-child {
    transform: rotate(180deg);
}

.wine-age-line i {
    width: 7px;
    height: 7px;
    border: 1px solid var(--wine-age-gold);
    transform: rotate(45deg);
}

/* Nội dung */
.wine-age-eyebrow {
    margin-bottom: 13px;
    color: var(--wine-age-gold);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.28em;
}

.wine-age-content h2 {
    margin: 0;
    color: #fffaf2;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 5vw, 3.15rem);
    font-weight: 400;
    line-height: 1.12;
    text-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.wine-age-content h2 em {
    display: inline-block;
    margin-top: 5px;
    color: var(--wine-age-gold-light);
    font-weight: 400;
}

.wine-age-description {
    max-width: 455px;
    margin: 22px auto 28px;
    color: rgba(255, 248, 238, 0.78);
    font-size: 0.98rem;
    line-height: 1.75;
}

/* Nút xác nhận */
.wine-age-confirm {
    position: relative;
    display: inline-flex;
    min-width: 270px;
    min-height: 58px;
    padding: 7px 7px 7px 29px;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    overflow: hidden;
    color: #481019;
    border: 1px solid rgba(255, 225, 172, 0.75);
    border-radius: 100px;
    background:
        linear-gradient(
            135deg,
            #f6deb2,
            #d7ad68 55%,
            #f4d8a1
        );
    box-shadow:
        0 13px 35px rgba(16, 2, 4, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.65);
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}

.wine-age-confirm::before {
    content: "";
    position: absolute;
    top: -40%;
    left: -55%;
    width: 35%;
    height: 180%;
    background: rgba(255, 255, 255, 0.42);
    transform: rotate(20deg);
    transition: left 0.7s ease;
}

.wine-age-confirm:hover {
    color: #481019;
    transform: translateY(-3px);
    box-shadow:
        0 18px 40px rgba(16, 2, 4, 0.36),
        0 0 30px rgba(215, 173, 104, 0.18);
}

.wine-age-confirm:hover::before {
    left: 125%;
}

.wine-age-confirm:focus-visible {
    outline: 3px solid rgba(255, 226, 175, 0.4);
    outline-offset: 5px;
}

.wine-age-confirm-icon {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    color: #f5dfb8;
    border-radius: 50%;
    background: var(--wine-age-primary);
    transition: transform 0.35s ease;
}

.wine-age-confirm:hover .wine-age-confirm-icon {
    transform: translateX(3px) rotate(-5deg);
}

.wine-age-confirm-icon svg {
    width: 20px;
    height: 20px;
}

.wine-age-note {
    max-width: 430px;
    margin: 19px auto 0;
    color: rgba(255, 248, 238, 0.52);
    font-size: 0.72rem;
    line-height: 1.65;
}

.wine-age-signature {
    display: flex;
    margin-top: 30px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: rgba(215, 173, 104, 0.75);
}

.wine-age-signature span {
    width: 32px;
    height: 1px;
    background: rgba(215, 173, 104, 0.45);
}

.wine-age-signature strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.78rem;
    font-style: italic;
    font-weight: 400;
    letter-spacing: 0.08em;
}

/* Vòng tròn trang trí */
.wine-age-orbit {
    position: absolute;
    z-index: 2;
    pointer-events: none;
    border: 1px solid rgba(215, 173, 104, 0.15);
    border-radius: 50%;
}

.wine-age-orbit-1 {
    top: -95px;
    right: -75px;
    width: 260px;
    height: 260px;
}

.wine-age-orbit-2 {
    bottom: -145px;
    left: -110px;
    width: 340px;
    height: 340px;
}

/* Chùm nho cách điệu */
.wine-age-grape {
    position: absolute;
    z-index: 2;
    width: 95px;
    height: 130px;
    pointer-events: none;
    opacity: 0.12;
    transform: rotate(-20deg);
}

.wine-age-grape-left {
    bottom: 20px;
    left: 10px;
}

.wine-age-grape-right {
    top: 40px;
    right: -5px;
    transform: rotate(155deg);
}

.wine-age-grape span {
    position: absolute;
    width: 28px;
    height: 34px;
    border: 1px solid var(--wine-age-gold);
    border-radius: 50%;
}

.wine-age-grape span:nth-child(1) {
    top: 0;
    left: 34px;
}

.wine-age-grape span:nth-child(2) {
    top: 25px;
    left: 15px;
}

.wine-age-grape span:nth-child(3) {
    top: 25px;
    left: 51px;
}

.wine-age-grape span:nth-child(4) {
    top: 53px;
    left: 33px;
}

.wine-age-grape span:nth-child(5) {
    top: 81px;
    left: 33px;
}

.wine-age-grape span:nth-child(6) {
    top: 53px;
    left: 67px;
}

/* Responsive */
@media (max-width: 575.98px) {
    .wine-age-gate {
        padding: 14px;
    }

    .wine-age-dialog {
        max-height: calc(100vh - 28px);
        border-radius: 34px;
    }

    .wine-age-dialog::before {
        inset: 8px;
    }

    .wine-age-content {
        padding: 42px 24px 34px;
    }

    .wine-age-seal {
        width: 92px;
        height: 92px;
        margin-bottom: 21px;
    }

    .wine-age-seal strong {
        font-size: 1.9rem;
    }

    .wine-age-content h2 {
        font-size: 2rem;
    }

    .wine-age-description {
        margin-top: 17px;
        margin-bottom: 23px;
        font-size: 0.9rem;
        line-height: 1.65;
    }

    .wine-age-confirm {
        width: 100%;
        min-width: 0;
        min-height: 56px;
        padding-left: 24px;
    }

    .wine-age-eyebrow {
        font-size: 0.62rem;
        letter-spacing: 0.18em;
    }

    .wine-age-grape {
        opacity: 0.08;
    }

    .wine-age-signature {
        margin-top: 23px;
    }
}

/* Hạn chế animation khi người dùng bật Reduce Motion */
@media (prefers-reduced-motion: reduce) {
    .wine-age-dialog,
    .wine-age-gate,
    .wine-age-confirm,
    .wine-age-confirm-icon {
        transition: none;
    }

    .wine-age-dialog::after,
    .wine-age-seal::after {
        animation: none;
    }
}