/* ========================================
   Showcase Section
======================================== */

.preview-showcase {
    position: relative;
    isolation: isolate;

    padding: 60px 0 40px;

    background: var(--bg-color-1-1, #121212);
    border-bottom: 1px solid var(--border-color-1);

    overflow: hidden;
}

.preview-showcase-inner {
    position: relative;
    z-index: 1;
}

/* ========================================
   Header
======================================== */

.preview-showcase-header {
    text-align: center;
    margin-bottom: 10px;
}

.preview-showcase-label {
    color: var(--accent-color, #c5a15c);

    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .22em;
    line-height: 1.7;

    text-transform: uppercase;
    margin-bottom: 12px;
}

.preview-showcase-heading {
    font-family: var(--font-title, Georgia, serif);
    font-size: clamp(2.2rem, 3.5vw, 3.2rem);
    font-weight: 400;
    line-height: 1.15;

    color: var(--text-color-1, #fff);

    text-wrap: balance;
}

/* ========================================
   Slider
======================================== */

.preview-showcase-slider[data-sliderer] {
    display: flex;
    flex-direction: column;

    width: 100%;
    height: auto;

    overflow: hidden;
}

/* Bottle Stage */

.preview-showcase-stage {
    position: relative;

    width: 100%;
    height: 330px;
    max-width: 1000px;

    margin: 0 auto;

    overflow: hidden;
    isolation: isolate;
}

/* Background Glow */

.preview-showcase-glow {
    position: absolute;
    top: 50%;
    left: 50%;

    width: 360px;
    height: 360px;

    transform: translate(-50%, -50%);

    background: radial-gradient(
        ellipse,
        rgba(197, 161, 92, .13),
        transparent 70%
    );

    pointer-events: none;
    z-index: -1;
}

/* Decorative Ring */

.preview-showcase-ring {
    position: absolute;
    top: 50%;
    left: 50%;

    width: 260px;
    height: 260px;

    transform: translate(-50%, -50%);

    border: 1px solid rgba(197, 161, 92, .12);
    border-radius: 50%;

    pointer-events: none;
    z-index: -1;
}

/* ========================================
   Bottle Slides
======================================== */

.preview-showcase-slider .preview-showcase-slide {
    position: absolute;
    top: 0;
    left: 50%;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;

    width: 32%;
    height: 100%;

    padding: 0 0 14px;

    background: transparent;
    border: none;

    opacity: 0;
    visibility: hidden;

    transform: translateX(-50%) scale(.65);

    pointer-events: none;
    cursor: pointer;

    transition:
        transform .8s cubic-bezier(.16, 1, .3, 1),
        opacity .6s ease,
        visibility .6s ease;
}

/* Center Bottle */

.preview-showcase-slider
.preview-showcase-slide[data-showcase-position="center"] {
    transform: translateX(-50%) scale(1);

    opacity: 1;
    visibility: visible;

    pointer-events: auto;
    z-index: 3;
}

/* Left Bottle */

.preview-showcase-slider
.preview-showcase-slide[data-showcase-position="left"] {
    transform: translateX(-145%) scale(.76);

    opacity: .5;
    visibility: visible;

    pointer-events: auto;
    z-index: 2;
}

/* Right Bottle */

.preview-showcase-slider
.preview-showcase-slide[data-showcase-position="right"] {
    transform: translateX(45%) scale(.76);

    opacity: .5;
    visibility: visible;

    pointer-events: auto;
    z-index: 2;
}

/* Side Bottle Hover */

.preview-showcase-slider
.preview-showcase-slide[data-showcase-position="left"]:hover,
.preview-showcase-slider
.preview-showcase-slide[data-showcase-position="right"]:hover {
    opacity: .85;
}

/* Hidden Slides */

.preview-showcase-slider
.preview-showcase-slide[data-showcase-position="hidden-left"] {
    transform: translateX(-205%) scale(.65);
}

.preview-showcase-slider
.preview-showcase-slide[data-showcase-position="hidden-right"] {
    transform: translateX(105%) scale(.65);
}

/* ========================================
   Bottle Image
======================================== */

.preview-showcase-bottle {
    display: block;

    width: 100%;
    height: calc(100% - 34px);

    min-height: 0;

    object-fit: contain;

    filter: drop-shadow(
        0 12px 18px rgba(0, 0, 0, .3)
    );

    user-select: none;
    -webkit-user-drag: none;
}

/* Side Bottle Names */

.preview-showcase-bottle-name {
    display: block;

    color: var(--text-color-2, #b8b8b8);

    font-family: var(--font-title, Georgia, serif);
    font-size: 1.3rem;
    font-weight: 400;
    line-height: 1.5;

    transition: opacity .3s ease;
}

.preview-showcase-slide.is-active
.preview-showcase-bottle-name {
    opacity: 0;
}

/* ========================================
   Product Information
======================================== */

.preview-showcase-information {
    position: relative;

    margin-top: -20px;

    text-align: center;
    z-index: 4;
}

.preview-showcase-info[hidden] {
    display: none;
}

.preview-showcase-info:not([hidden]) {
    animation: showcase-info-in .5s ease both;
}

@keyframes showcase-info-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

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

/* Product Name */

.preview-showcase-name {
    color: var(--text-color-1, #fff);

    font-family: var(--font-title, Georgia, serif);
    font-size: clamp(2.2rem, 3vw, 3rem);
    font-weight: 400;
    line-height: 1.12;

    margin-bottom: 6px;
}

/* Product Style */

.preview-showcase-style {
    color: var(--accent-color, #c5a15c);

    font-size: .75rem;
    letter-spacing: .1em;
    line-height: 1.7;

    margin-bottom: 6px;
}

/* Grape Varieties */

.preview-showcase-grapes {
    color: var(--text-color-2, #b8b8b8);

    font-size: .8rem;
    line-height: 1.7;

    margin-bottom: 16px;
}

/* ========================================
   Details Button
======================================== */

.preview-showcase-details {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 16px;
    padding: 12px 24px;

    background: var(--accent-color, #c5a15c);
    border: 1px solid var(--accent-color, #c5a15c);
    border-radius: 50px;

    color: #181818;

    font-family: inherit;
    font-size: .72rem;
    font-weight: 500;
    line-height: 1.5;

    letter-spacing: .08em;
    text-transform: uppercase;

    cursor: pointer;

    transition:
        color .3s ease,
        background .3s ease;
}

.preview-showcase-details:hover {
    background: transparent;
    color: var(--accent-color, #c5a15c);
}

.preview-showcase-details svg {
    flex-shrink: 0;
    transition: transform .3s ease;
}

.preview-showcase-details:hover svg {
    transform: translate(2px, -2px);
}

/* ========================================
   Navigation
======================================== */

.preview-showcase-navigation {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 20px;
    margin-top: 16px;
}

/* Navigation Arrows */

.preview-showcase-arrow {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    padding: 0;

    background: transparent;
    border: 1px solid var(--border-color-1, #333);
    border-radius: 50%;

    color: var(--text-color-1, #fff);

    cursor: pointer;

    transition:
        color .3s ease,
        background .3s ease,
        border-color .3s ease;
}

.preview-showcase-arrow svg {
    width: 20px;
    height: 20px;
}

.preview-showcase-arrow:hover {
    background: var(--accent-color, #c5a15c);
    border-color: var(--accent-color, #c5a15c);
    color: #181818;
}

/* ========================================
   Navigation Dots
======================================== */

.preview-showcase-dots {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 6px;
}

.preview-showcase-dot {
    display: grid;
    place-items: center;

    width: 24px;
    height: 28px;

    padding: 0;

    background: transparent;
    border: none;

    cursor: pointer;
}

.preview-showcase-dot::before {
    content: '';

    width: 6px;
    height: 6px;

    border-radius: 10px;

    background: rgba(255, 255, 255, .2);

    transition:
        width .4s ease,
        background .4s ease;
}

.preview-showcase-dot.is-active::before {
    width: 24px;
    background: var(--accent-color, #c5a15c);
}

.preview-showcase-dot:hover::before {
    background: var(--accent-color, #c5a15c);
}

/* ========================================
   Autoplay Control
======================================== */

.preview-showcase-progress {
    align-self: center;
    width: min(220px, 65%);
    height: 3px;
    margin-top: 18px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
}

.preview-showcase-progress [data-showcase-progress-bar] {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: var(--accent-color);
    transform: scaleX(0);
    transform-origin: left center;
}

[data-showcase-autoplay="paused"] .preview-showcase-progress {
    opacity: .5;
}

[data-themer="light"] .preview-showcase-progress {
    background: rgba(0, 0, 0, .12);
}

.preview-showcase-autoplay {
    align-self: center;

    padding: 6px 12px;
    margin-top: 6px;

    background: transparent;
    border: none;

    color: var(--text-color-2, #b8b8b8);

    font: inherit;
    font-size: .65rem;

    cursor: pointer;
}

.preview-showcase-autoplay:hover {
    color: var(--accent-color, #c5a15c);
}

/* ========================================
   Accessibility
======================================== */

.preview-showcase button:focus-visible,
.preview-detail button:focus-visible {
    outline: 2px solid var(--accent-color, #c5a15c);
    outline-offset: 4px;
}

/* ========================================
   Details Popup
======================================== */

.preview-detail {
    display: grid;
    grid-template-columns: .7fr 1fr;
    align-items: center;

    gap: 30px;
    padding: 60px 32px 36px;
}

.preview-detail img {
    display: block;

    width: 100%;
    height: 370px;

    object-fit: contain;
}

.preview-detail-description {
    color: var(--text-color-2, #b8b8b8);

    font-size: .9rem;
    line-height: 1.8;

    margin: 20px 0;
}

/* ========================================
   Tablet
======================================== */

@media (max-width: 1000px) {

    .preview-showcase-stage {
        height: 300px;
    }

    .preview-showcase-slider .preview-showcase-slide {
        width: 36%;
    }

    .preview-showcase-ring {
        width: 240px;
        height: 240px;
    }

    .preview-showcase-glow {
        width: 320px;
        height: 320px;
    }
}

/* ========================================
   Mobile
======================================== */

@media (max-width: 640px) {

    .preview-showcase {
        padding: 45px 0 30px;
    }

    .preview-showcase-header {
        margin-bottom: 8px;
    }

    .preview-showcase-label {
        font-size: .6rem;
        margin-bottom: 10px;
    }

    .preview-showcase-heading {
        font-size: 2.2rem;
    }

    .preview-showcase-stage {
        height: 250px;
    }

    .preview-showcase-slider .preview-showcase-slide {
        width: 44%;
        padding-bottom: 0;
    }

    .preview-showcase-slider
    .preview-showcase-slide[data-showcase-position="left"] {
        transform: translateX(-125%) scale(.62);
        opacity: .35;
    }

    .preview-showcase-slider
    .preview-showcase-slide[data-showcase-position="right"] {
        transform: translateX(25%) scale(.62);
        opacity: .35;
    }

    .preview-showcase-ring {
        width: 190px;
        height: 190px;
    }

    .preview-showcase-glow {
        width: 260px;
        height: 260px;
    }

    .preview-showcase-bottle {
        height: 100%;
    }

    .preview-showcase-bottle-name {
        display: none;
    }

    .preview-showcase-information {
        margin-top: 4px;
    }

    .preview-showcase-name {
        font-size: 2.2rem;
    }

    .preview-showcase-style {
        font-size: .68rem;
    }

    .preview-showcase-grapes {
        font-size: .72rem;
        margin-bottom: 14px;
    }

    .preview-showcase-details {
        font-size: .65rem;
        padding: 11px 20px;
    }

    .preview-showcase-navigation {
        gap: 14px;
        margin-top: 14px;
    }

    .preview-showcase-arrow {
        width: 36px;
        height: 36px;
    }

    .preview-detail {
        grid-template-columns: 1fr;

        gap: 20px;
        padding: 50px 22px 28px;
    }

    .preview-detail img {
        height: 240px;
    }
}

/* ========================================
   Light Theme
======================================== */

[data-themer="light"] .preview-showcase-dot::before {
    background: rgba(0, 0, 0, .18);
}

[data-themer="light"]
.preview-showcase-dot.is-active::before,
[data-themer="light"]
.preview-showcase-dot:hover::before {
    background: var(--accent-color, #c5a15c);
}

/* ========================================
   Reduced Motion
======================================== */

@media (prefers-reduced-motion: reduce) {

    .preview-showcase-slider .preview-showcase-slide,
    .preview-showcase-dot::before,
    .preview-showcase-arrow,
    .preview-showcase-details,
    .preview-showcase-details svg,
    .preview-showcase-bottle-name {
        transition: none;
    }

    .preview-showcase-info:not([hidden]) {
        animation: none;
    }

    .preview-showcase-details:hover svg {
        transform: none;
    }
}