/* ============================================
   PREMIUM PRODUCT VARIATIONS
   Clean, Minimal, User-Friendly
   ============================================ */

/* === VARIATION CONTAINER === */
.variations.switch-variations {
    margin: 1rem 0 1.5rem;
}

.variations .variation-wrapper {
    margin-bottom: 1.25rem;
}

.variations .variation-wrapper:last-child {
    margin-bottom: 0;
}

/* === VARIATION LABEL === */
.variations dt {
    font-size: 13px;
    font-weight: 500;
    color: #111;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.variations dt .swatches-selected {
    font-weight: 400;
    color: #555;
}

/* === VARIATION VALUES === */
.variations dd {
    margin: 0;
    padding: 0;
}

/* Hide slider buttons completely */
.variations .js-btn-slider-btns,
.variations .js-btn-slider-wrapper .js-btn-slider-btns {
    display: none !important;
}

/* === TEXT SWATCHES === */
.variations .swatches.textswatches,
.variations .swatches.imgswatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    align-items: stretch;
}

.variations .swatches .col-auto {
    padding: 0;
    flex: 0 0 auto;
    max-width: 100%;
}

/* Text Swatch Button */
.variations label.swatches.swatches-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 48px;
    min-height: 44px;
    padding: 8px 16px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
    line-height: 1.3;
}

.variations label.swatches.swatches-text:hover {
    border-color: #111;
}

.variations label.swatches.swatches-text.active {
    border-color: #111;
    background: #111;
    color: #fff;
}

.variations label.swatches.swatches-text .label-variation {
    line-height: 1.3;
}

/* === IMAGE SWATCHES === */
.variations label.swatches.swatches-image {
    display: block;
    width: 48px;
    height: 48px;
    padding: 2px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: border-color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

.variations label.swatches.swatches-image:hover {
    border-color: #111;
}

.variations label.swatches.swatches-image.active {
    border-color: #111;
}

.variations label.swatches.swatches-image .square-image {
    width: 100%;
    height: 100%;
    margin: 0;
}

.variations label.swatches.swatches-image .square-image .inner {
    border-radius: 4px;
    overflow: hidden;
}

.variations label.swatches.swatches-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* === OUT OF STOCK / NOT AVAILABLE === */
.variations label.swatches.swatches-sold-out,
.variations label.swatches.swatches-not-in-stock,
.variations label.swatches.not-available {
    opacity: 0.4;
    cursor: not-allowed;
    position: relative;
}

.variations label.swatches.swatches-sold-out::after,
.variations label.swatches.swatches-not-in-stock::after,
.variations label.swatches.not-available::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 8px;
    right: 8px;
    height: 1px;
    background: #666;
    transform: rotate(-10deg);
}

.variations label.swatches.not-available:hover {
    border-color: #ccc;
}

/* === RADIO BUTTONS === */
.variations .custom-radio {
    margin-bottom: 6px;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #fff;
    transition: border-color 0.15s ease;
    box-sizing: border-box;
}

.variations .custom-radio:hover {
    border-color: #999;
}

.variations .custom-radio:has(input:checked) {
    border-color: #111;
}

.variations .custom-control-label {
    font-size: 13px;
    color: #333;
}

/* === SELECT / DROPDOWN === */
.variations .custom-select,
.variations .selectpicker,
.variations .bootstrap-select .dropdown-toggle {
    height: 42px;
    padding: 8px 36px 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    transition: border-color 0.15s ease;
    cursor: pointer;
}

.variations .custom-select:hover,
.variations .selectpicker:hover,
.variations .bootstrap-select .dropdown-toggle:hover {
    border-color: #111;
}

.variations .custom-select:focus,
.variations .selectpicker:focus,
.variations .bootstrap-select.show .dropdown-toggle {
    border-color: #111;
    box-shadow: none;
    outline: none;
}

.variations .bootstrap-select .dropdown-menu {
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    padding: 4px;
    margin-top: 4px;
}

.variations .bootstrap-select .dropdown-item {
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
}

.variations .bootstrap-select .dropdown-item:hover {
    background: #f5f5f5;
}

.variations .bootstrap-select .dropdown-item.selected {
    background: #111;
    color: #fff;
}

/* === PRICE BADGE === */
.variations .variation-badge {
    display: inline-flex;
    padding: 2px 6px;
    background: #f0f0f0;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    color: #333;
    margin-left: 6px;
}

/* === NOT AVAILABLE BADGE === */
.variations .badge-not-available {
    font-size: 10px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 3px;
}

/* === MOBILE OPTIMIZATION === */
@media (max-width: 575.98px) {
    .variations.switch-variations {
        margin: 0.75rem 0 1rem;
    }

    .variations .variation-wrapper {
        margin-bottom: 1rem;
    }

    .variations dt {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .variations .swatches.textswatches,
    .variations .swatches.imgswatches {
        gap: 8px;
    }

    .variations label.swatches.swatches-text {
        min-width: 44px;
        min-height: 40px;
        padding: 6px 12px;
        font-size: 13px;
        border-radius: 6px;
    }

    .variations label.swatches.swatches-image {
        width: 44px;
        height: 44px;
        border-radius: 6px;
    }

    .variations .custom-radio {
        padding: 8px 10px;
    }

    .variations .custom-select,
    .variations .selectpicker,
    .variations .bootstrap-select .dropdown-toggle {
        height: 40px;
        font-size: 13px;
    }
}

/* === SCROLLABLE SWATCHES (many options) === */
.variations .swatches.js-slider-items {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}

.variations .swatches.js-slider-items::-webkit-scrollbar {
    display: none;
}

/* === TOUCH FEEDBACK === */
@media (hover: none) {
    .variations label.swatches.swatches-text:active,
    .variations label.swatches.swatches-image:active {
        transform: scale(0.97);
    }
}

/* === FOCUS STATES (Accessibility) === */
.variations label.swatches:focus-within {
    outline: 2px solid #111;
    outline-offset: 2px;
}

.variations .custom-select:focus,
.variations input:focus {
    outline: 2px solid #111;
    outline-offset: 2px;
}

/* === HIDDEN RADIO INPUT === */
.variations .control-hidden {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* ============================================
   PRICE SECTION - Enterprise Minimal
   ============================================ */

.price_wrapper {
    margin: 20px 0;
}

/* Main Price */
.price_wrapper .price.h1 {
    font-size: 28px;
    font-weight: 600;
    color: #000;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

/* Price Note Container */
.price_wrapper .price-note {
    margin-top: 6px;
}

/* VAT & Shipping - subtle */
.price_wrapper .vat_info {
    font-size: 12px;
    color: #717171;
    margin-bottom: 12px;
}

.price_wrapper .vat_info a.shipment {
    color: #717171;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.price_wrapper .vat_info a.shipment:hover {
    color: #000;
}

/* UVP - Suggested Price */
.price_wrapper .suggested-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 13px;
    color: #717171;
    margin-bottom: 4px;
}

.price_wrapper .suggested-price span:first-child {
    display: none;
}

.price_wrapper .suggested-price .value {
    text-decoration: line-through;
    font-size: 15px;
    color: #717171;
}

/* Savings */
.price_wrapper .yousave {
    font-size: 13px;
    color: #008060;
    font-weight: 500;
}

.price_wrapper .yousave .percent {
    font-weight: 600;
}

.price_wrapper .yousave .value {
    font-weight: 500;
}

/* Mobile */
@media (max-width: 575.98px) {
    .price_wrapper .price.h1 {
        font-size: 24px;
    }
}

/* ============================================
   PRODUCT GALLERY - Mobile Thumbnails
   Enterprise Level - Clean & Minimal
   ============================================ */

/* Force show thumbnails on mobile */
@media (max-width: 991.98px) {
    /* Override base theme hiding */
    .product-detail .product-thumbnails-wrapper .product-thumbnails {
        display: flex !important;
    }

    /* Wrapper */
    #gallery_preview_wrapper.product-thumbnails-wrapper {
        display: block !important;
        width: 100% !important;
        padding: 16px 0 0 0 !important;
    }

    /* Thumbnail row container */
    #gallery_preview.product-thumbnails {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        justify-content: center !important;
        align-items: center !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 4px 12px !important;
    }

    #gallery_preview.product-thumbnails::-webkit-scrollbar {
        display: none;
    }

    /* Each thumbnail box */
    #gallery_preview.product-thumbnails > .square-image {
        flex: 0 0 60px !important;
        width: 60px !important;
        height: 60px !important;
        min-width: 60px !important;
        min-height: 60px !important;
        max-width: 60px !important;
        max-height: 60px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 2px solid #ccc !important;
        border-radius: 8px !important;
        overflow: hidden !important;
        opacity: 0.5;
        transition: all 0.15s ease;
        cursor: pointer;
        background: #fff !important;
        position: relative !important;
        display: block !important;
        box-sizing: border-box !important;
    }

    /* Active state */
    #gallery_preview.product-thumbnails > .square-image.preview-first,
    #gallery_preview.product-thumbnails > .square-image.slick-current {
        border: 2px solid #000 !important;
        opacity: 1 !important;
    }

    /* Inner - ABSOLUTE FILL */
    #gallery_preview.product-thumbnails > .square-image > .inner {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
    }

    /* Picture - ABSOLUTE FILL */
    #gallery_preview.product-thumbnails > .square-image > .inner > picture {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        display: block !important;
    }

    /* IMG - FILL AND COVER */
    #gallery_preview.product-thumbnails > .square-image img {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center center !important;
        transform: none !important;
        -webkit-transform: none !important;
        max-width: none !important;
        max-height: none !important;
        min-width: 100% !important;
        min-height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Hide slick dots */
    #gallery .slick-dots,
    #gallery_wrapper .slick-dots,
    .initial-slick-dots {
        display: none !important;
    }

    /* Hide slick arrows */
    #gallery_preview .slick-arrow,
    .slick-inital-arrow {
        display: none !important;
    }

    /* Show hidden thumbnails */
    #gallery_preview.product-thumbnails > .square-image.d-none {
        display: block !important;
    }
}

/* Desktop thumbnail refinements */
@media (min-width: 992px) {
    #gallery_preview .square-image {
        border: 2px solid transparent;
        border-radius: 6px;
        transition: border-color 0.15s ease;
    }

    #gallery_preview .square-image:hover {
        border-color: #000;
    }

    #gallery_preview .square-image.slick-current {
        border-color: #000;
    }
}
