/* ==========================================================================
   Product detail (Bootstrap refresh)
   ========================================================================== */

.application-wrapper {
    background-color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.product-page {
    color: #1f1f1f;
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.product-page .product-breadcrumb .breadcrumb {
    --bs-breadcrumb-divider: "";
    background-color: transparent;
    font-size: 0.875rem;
    margin-bottom: 0;
    padding: 0;
}

.product-page .product-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    padding-right: 0;
    content: none;
}

.product-page .product-breadcrumb .breadcrumb-item a {
    color: inherit;
    font-weight: 700;
    text-decoration: none;
}

.product-page .product-breadcrumb .breadcrumb-item a:hover,
.product-page .product-breadcrumb .breadcrumb-item a:focus {
    color: inherit;
    text-decoration: underline;
}

.product-page .breadcrumb-separator {
    color: #6c757d;
    font-size: 1rem;
    margin-left: 0rem;
    margin-right: 0rem;
    vertical-align: middle;
}

.product-page .product-breadcrumb .breadcrumb-item {
    margin-bottom: 0.125rem;
    padding-left: 0;
}

.product-carousel {
    background: #f5f5f7;
    border-radius: 1.25rem;
    padding: 1.5rem;
    position: relative;
}

.product-carousel .carousel-inner {
    border-radius: 1rem;
    overflow: hidden;
}

.product-carousel .carousel-item {
    align-items: center;
    justify-content: center;
    min-height: 280px;
    display: none;
    transition: transform 0.35s ease-in-out, opacity 0.35s ease-in-out;
}

.product-carousel .carousel-item.active,
.product-carousel .carousel-item-next,
.product-carousel .carousel-item-prev {
    display: flex;
}

.product-carousel .carousel-item img {
    max-height: 420px;
    object-fit: contain;
    width: 100%;
}

.product-carousel .product-video-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
    min-height: 420px;
    height: 420px;
    max-height: 420px;
}

.product-carousel .product-video {
    max-height: 420px;
    width: 100%;
    height: 420px;
    min-height: 420px;
    object-fit: contain;
    background-color: transparent;
    position: relative;
    display: block;
}

.product-carousel .product-video[poster] {
    object-fit: contain;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.product-carousel .product-video-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.3) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

/* WebKit (Chrome, Safari, Edge) контроли */
.product-carousel .product-video::-webkit-media-controls-panel {
    background-color: transparent !important;
    background-image: linear-gradient(to top, rgba(0, 0, 0, 0.4) 0%, transparent 100%) !important;
}

.product-carousel .product-video::-webkit-media-controls-play-button,
.product-carousel .product-video::-webkit-media-controls-pause-button {
    background-color: transparent !important;
}

.product-carousel .product-video::-webkit-media-controls-timeline,
.product-carousel .product-video::-webkit-media-controls-current-time-display,
.product-carousel .product-video::-webkit-media-controls-time-remaining-display,
.product-carousel .product-video::-webkit-media-controls-fullscreen-button {
    background-color: transparent !important;
}

/* Приховуємо регулятор гучності та кнопку мute */
.product-carousel .product-video::-webkit-media-controls-volume-slider,
.product-carousel .product-video::-webkit-media-controls-mute-button {
    display: none !important;
}

/* Приховуємо меню з трьома крапками (overflow menu) */
.product-carousel .product-video::-webkit-media-controls-overlay-enclosure {
    display: none !important;
}

/* Приховуємо додаткові елементи меню */
.product-carousel .product-video::-webkit-media-controls-overlay-play-button {
    display: none !important;
}

/* Приховуємо кнопку меню (три крапки) через різні селектори */
.product-carousel .product-video::-webkit-media-controls-overlay-enclosure,
.product-carousel .product-video::-webkit-media-controls-overlay-play-button,
.product-carousel .product-video::-webkit-media-controls-overlay-fullscreen-button {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
}

/* Додаткові спроби приховати меню */
.product-carousel .product-video::-webkit-media-controls-enclosure > *:last-child {
    display: none !important;
}

.product-carousel .product-video::-webkit-media-controls-enclosure {
    background-color: transparent !important;
    background-image: linear-gradient(to top, rgba(0, 0, 0, 0.4) 0%, transparent 100%) !important;
}

/* Стандартні (Firefox) контроли */
.product-carousel .product-video::-moz-media-controls-panel {
    background-color: transparent !important;
    background-image: linear-gradient(to top, rgba(0, 0, 0, 0.4) 0%, transparent 100%) !important;
}

.product-carousel .product-video::--moz-media-controls {
    background-color: transparent !important;
}

/* Приховуємо регулятор гучності в Firefox */
.product-carousel .product-video::-moz-media-controls-volume-slider,
.product-carousel .product-video::-moz-media-controls-mute-button {
    display: none !important;
}

.product-purchase-row {
    display: flex;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.product-purchase-row .product-quantity-control {
    display: flex;
    align-items: stretch;
    min-height: 2.8rem;
}

.product-purchase-row .product-quantity-control .product-quantity-input {
    width: 3rem;
    min-width: 3rem;
    height: 3rem;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 0;
    text-align: center;
}

.product-purchase-row .product-quantity label {
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.product-purchase-row .quantity-buttons {
    display: flex;
    flex-direction: column;
    height: 3rem;
    gap: 0.25rem;
    margin-left: 0.2rem;
}

.product-purchase-row .quantity-buttons .btn {
    border-radius: 0.5rem;
    padding: 0.2rem;
    width: 2.4rem;
    height: calc((100% - 0.25rem) / 2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.2s ease, opacity 0.2s ease;
    background-color: #ffffff;
    border-color: #c8cdd2;
    color: #333333;
}

.product-purchase-row .quantity-buttons .btn:hover {
    background-color: #ffffff;
    border-color: #7f848b;
    color: #333333;
    box-shadow: none;
    transform: none;
}

.product-purchase-row .quantity-buttons .btn:focus,
.product-purchase-row .quantity-buttons .btn:focus-visible,
.product-purchase-row .quantity-buttons .btn:active {
    background-color: #ffffff;
    border-color: #c8cdd2;
    box-shadow: none;
    color: #333333;
    outline: none;
}

.product-purchase-row .quantity-buttons .btn.is-disabled {
    opacity: 0.4;
    pointer-events: none;
}

.product-purchase-row .quantity-buttons .btn.active,
.product-purchase-row .quantity-buttons .btn:focus-visible {
    box-shadow: inset 0 0 0 1px #333;
}

.product-purchase-row .product-cta .btn {
    padding: 0.6rem 1.5rem;
    min-width: 140px;
}

.product-purchase-row .quantity-buttons .btn:not(:disabled):not(.disabled).active,
.product-purchase-row .quantity-buttons .btn:not(:disabled):not(.disabled):active,
.product-purchase-row .quantity-buttons .btn.btn-outline-secondary.dropdown-toggle.show {
    background-color: #ffffff;
    border-color: #c8cdd2;
    color: #333333;
    box-shadow: none;
}

@media (max-width: 575.98px) {
    .product-carousel {
        padding: 1rem;
    }

    .product-carousel .carousel-item {
        min-height: 220px;
    }

    .product-carousel .product-video-wrapper {
        min-height: 220px;
        height: auto;
        max-height: 420px;
    }

    .product-carousel .product-video {
        max-height: 420px;
        height: auto;
        min-height: 220px;
        width: 100%;
    }

    .product-page .product-breadcrumb .breadcrumb {
        justify-content: center;
        text-align: center;
    }

    .product-purchase-row .product-cta .btn {
        min-width: auto;
        width: 100%;
    }
}

@media (max-width: 320px) {
    .product-page .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        max-width: 100%;
        box-sizing: border-box;
    }

    .product-page .row.g-5 {
        --bs-gutter-x: 1rem;
        --bs-gutter-y: 1rem;
        margin-left: 0;
        margin-right: 0;
    }

    .product-page .row.g-5 > * {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .product-carousel {
        padding: 0.75rem;
        box-sizing: border-box;
    }

    .product-purchase-row {
        gap: 0.5rem;
        margin-left: 0;
        margin-right: 0;
    }

    .product-purchase-row .product-quantity-control {
        flex-shrink: 0;
    }

    .product-purchase-row .product-quantity-control .product-quantity-input {
        width: 2.5rem;
        min-width: 2.5rem;
        height: 2.5rem;
        font-size: 0.95rem;
    }

    .product-purchase-row .quantity-buttons {
        height: 2.5rem;
        margin-left: 0.15rem;
    }

    .product-purchase-row .quantity-buttons .btn {
        width: 2rem;
    }

    .product-purchase-row .product-cta {
        flex: 1 1 100%;
        margin-top: 0.5rem;
        width: 100%;
    }

    .product-purchase-row .product-cta .btn {
        width: 100%;
        padding: 0.5rem 1rem;
        box-sizing: border-box;
    }

    .product-variants {
        gap: 0.5rem !important;
    }

    .product-options .btn-outline-secondary {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
}

@media (min-width: 768px) {
    .product-purchase-row .product-cta {
        max-width: 260px;
    }
}

.product-thumbnails {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.15rem 0.15rem 0.65rem;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.product-thumbnails::-webkit-scrollbar {
    height: 0.45rem;
}

.product-thumbnails::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 999px;
}

.product-thumbnails::-webkit-scrollbar-thumb {
    background: #d3d3d3;
    border-radius: 999px;
}

.product-thumbnails .product-thumbnail-item {
    flex: 0 0 clamp(74px, 15vw, 96px);
    scroll-snap-align: start;
}

.product-thumbnails .thumbnail-button {
    align-items: center;
    background: #fff;
    border: 1px solid transparent;
    border-radius: 0.75rem;
    display: flex;
    height: 100%;
    justify-content: center;
    padding: 0.35rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

.product-thumbnails .thumbnail-button.active,
.product-thumbnails .thumbnail-button:focus-visible {
    border-color: #e0a000;
    box-shadow: 0 0 0 0.15rem rgba(249, 177, 1, 0.25);
    outline: 0;
}

.product-thumbnails img {
    aspect-ratio: 1 / 1;
    border-radius: 0.5rem;
    max-height: 80px;
    object-fit: cover;
    width: 100%;
}

.product-thumbnails .thumbnail-video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-thumbnails .thumbnail-video-wrapper img {
    border-radius: 0.5rem;
    max-height: 80px;
    object-fit: cover;
    width: 100%;
}

.product-thumbnails .thumbnail-play-icon {
    position: absolute;
    color: #fff;
    font-size: 1.5rem;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.product-thumbnails .thumbnail-play-icon.material-symbols-outlined {
    font-size: 1.5rem;
}

.product-hero-copy {
    display: flex;
    flex-direction: column;
}

.product-hero-copy > .display-6 {
    margin-bottom: 1rem !important;
}

.product-hero-copy .product-price-row {
    order: 2;
    margin-bottom: 1rem;
}

.product-hero-copy .lead {
    order: 3;
    margin-bottom: 0 !important;
    color: #000000;
}

.product-current-price {
    color: #000000;
    font-size: 1.5rem !important;
    line-height: 1.2;
}

.product-current-price .pretty-currency {
    display: inline-flex;
    align-items: baseline;
    gap: 0.25rem;
}

.product-price-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.product-price-row .product-old-price {
    order: 1;
}

.product-price-row .product-current-price {
    order: 2;
}

.product-price-row .product-discount-badge {
    order: 3;
}

.product-old-price {
    color: #6c757d;
    font-size: 1.5rem;
    line-height: 1.2;
    text-decoration: line-through;
    text-decoration-color: #000;
}

.product-discount-badge {
    display: inline-flex;
    align-items: center;
}

.product-discount-badge .badge {
    background-color: #000000;
    color: #fff;
    border-radius: 0.2rem;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.25rem 0.6rem;
}

.product-badge {
    background-color: #000;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.2rem;
}

.product-badge--inline {
    display: inline-block;
    align-self: flex-start;
}

.product-variant-picker legend,
.product-quantity-block .form-label {
    color: #7a7a7a;
    font-size: 0.9rem;
    font-weight: 500;
}
.product-options .btn-outline-secondary {
    border: 1px solid #c8cdd2;
    color: #333;
    font-size: 0.85rem;
    padding: 0.6rem 1.1rem;
    transition: all 0.2s ease;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.product-options .product-variant-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-width: 5.5rem;
    font-size: 0.85rem;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
}

.product-options .product-variant-picker .product-variants {
    width: 100%;
    flex-wrap: nowrap;
    align-items: stretch;
}

.product-options .product-variant-picker .product-variant-btn {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    max-width: none;
    align-self: stretch;
    padding: 0.6rem 0.35rem;
}

.product-options .product-variant-btn__label,
.product-options .product-variant-btn__price {
    font-size: inherit;
    font-weight: 600;
    color: #292929;
}

.product-options .product-variant-btn__price {
    white-space: nowrap;
}

.product-options .btn-outline-secondary:hover {
    background-color: #f8f9fa;
    border-color: #333;
    color: #333;
}

.product-options .btn-check:checked + .btn-outline-secondary {
    background-color: rgba(249, 177, 1, 0.18);
    border-color: #f9b101;
    box-shadow: inset 0 0 0 1px #f9b101;
    color: #292929;
}

.product-options .btn-check:focus + .btn-outline-secondary {
    outline: none;
    box-shadow: inset 0 0 0 1px #f9b101;
    border-color: #f9b101;
    background-color: rgba(249, 177, 1, 0.12);
}

.product-options .btn-check:focus-visible + .btn-outline-secondary {
    outline: none;
    box-shadow: inset 0 0 0 1px #f9b101;
    border-color: #f9b101;
    background-color: rgba(249, 177, 1, 0.12);
}

.product-quantity-control .product-quantity-input {
    border-radius: 0.75rem;
    font-weight: 600;
}

.product-carousel .carousel-control-prev,
.product-carousel .carousel-control-next {
    bottom: auto;
    height: calc(100% - 150px);
    top: 1.5rem;
    width: 3rem;
}

.product-carousel .carousel-control-prev-icon,
.product-carousel .carousel-control-next-icon {
    filter: invert(100%);
    width: 3rem;
    height: 3rem;
}

.product-quantity-input::-webkit-outer-spin-button,
.product-quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.product-quantity-input {
    appearance: textfield;
    -moz-appearance: textfield;
}

.product-cta .add_item {
    border-radius: 999px;
    font-weight: 600;
    background-color: #f9b101;
    border-color: #f9b101;
    color: #292929;
}

.product-cta .add_item:hover,
.product-cta .add_item:focus,
.product-cta .add_item:active {
    background-color: #e0a000;
    border-color: #e0a000;
    color: #292929;
}

.product-cashback-info {
    color: #7a7a7a;
    font-size: 0.85rem;
}

.product-cashback-info .material-symbols-outlined {
    font-size: 1rem;
}

.product-feature-list {
    list-style: none;
    margin: 0;
    padding-left: 0.75rem;
}

/* Додатковий зазор після розгорнутого опису перед блоком особливостей (список або заголовок на кшталт Shoofiller) */
.product-info-intro + .product-feature-list,
.product-info-intro + .product-features-title {
    padding-top: 0.75rem;
}

.product-feature-list li {
    position: relative;
    padding-left: 1.2rem;
    font-size: 0.95rem;
    margin-bottom: 0.45rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.product-feature-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 0;
    color: #0f5132;
}

.product-features-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.product-info-intro {
    color: #000000;
    font-size: 0.95rem;
}

.product-accordion .accordion-item {
    border: 0;
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}

.product-accordion .accordion-item:first-child {
    border-top: 1px solid var(--bs-border-color, #dee2e6);
}

.product-accordion .accordion-item:last-child {
    border-bottom: none;
}

.product-accordion .accordion-button {
    font-weight: 600;
    color: #000000;
}

.product-accordion .accordion-button:not(.collapsed) {
    color: #000000;
    background-color: rgba(249, 177, 1, 0.08);
}

.product-accordion .accordion-body {
    color: #495057;
    font-size: 0.95rem;
    line-height: inherit;
}

.product-back-link .btn {
    border-radius: 999px;
    padding-left: 1.75rem;
    padding-right: 1.75rem;
}

.product-back-link .material-symbols-outlined {
    vertical-align: middle;
}
