/*
 * Shehyaara product-page styles only.
 * Intentionally scoped to body.single-product so header/footer remain untouched.
 */

body.single-product {
    --sdp-purple: #5422E8;
    --sdp-purple-dark: #3d16b7;
    --sdp-purple-soft: #f5f1ff;
    --sdp-purple-softer: #fbf9ff;
    --sdp-border: #e4dbff;
    --sdp-text: #24184a;
    --sdp-muted: #706789;
    --sdp-lime: #d8ff49;
    --sdp-white: #ffffff;
}

body.single-product .sdp-product-info {
    width: 100%;
    margin: 14px 0 4px;
    display: grid;
    gap: 10px;
    font: inherit;
}

body.single-product .sdp-delivery-card,
body.single-product .sdp-cod-card {
    box-sizing: border-box;
    width: 100%;
    border: 1px solid var(--sdp-border);
    background: linear-gradient(135deg, var(--sdp-purple-softer), var(--sdp-purple-soft));
    border-radius: 14px;
    color: var(--sdp-text);
}

body.single-product .sdp-delivery-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 16px;
    transition: opacity .18s ease, transform .18s ease;
}

body.single-product .sdp-delivery-card.is-hidden {
    display: none !important;
}

body.single-product .sdp-cod-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 11px 15px;
    font-weight: 650;
    font-size: 14px;
}

body.single-product .sdp-icon-wrap {
    flex: 0 0 auto;
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(84, 34, 232, .09);
    color: var(--sdp-purple);
}

body.single-product .sdp-delivery-copy {
    min-width: 0;
    flex: 1 1 auto;
}

body.single-product .sdp-delivery-heading-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 7px;
}

body.single-product .sdp-delivery-heading-row strong {
    font-size: 15px;
    line-height: 1.25;
    color: var(--sdp-purple-dark);
}

body.single-product .sdp-delivery-line {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--sdp-muted);
}

body.single-product .sdp-delivery-line b {
    color: var(--sdp-text);
    font-weight: 650;
}

body.single-product .sdp-preorder-pill,
body.single-product .sdp-advance-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
    white-space: nowrap;
}

body.single-product .sdp-preorder-pill {
    color: var(--sdp-purple-dark);
    background: #eee7ff;
}

body.single-product .sdp-advance-pill {
    color: #a51469;
    background: #ffe7f4;
}

/* Hide theme / third-party duplicate Buy Now controls detected by the plugin. */
body.single-product div.product .summary .sdp-native-buy-now-hidden {
    display: none !important;
}

/* Buy Now + Add to Cart action group */
body.single-product .sdp-action-buttons {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    clear: both !important;
    display: grid !important;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr) !important;
    gap: 8px !important;
    margin: 10px 0 0 !important;
    padding: 0 !important;
    float: none !important;
    align-items: stretch !important;
}

body.single-product .sdp-action-buttons > .button,
body.single-product .sdp-action-buttons > button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 50px !important;
    margin: 0 !important;
    border-radius: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    box-shadow: none !important;
}

body.single-product div.product form.cart .sdp-action-buttons .sdp-buy-now {
    -webkit-appearance: none !important;
    appearance: none !important;
    box-sizing: border-box !important;
    position: relative !important;
    inset: auto !important;
    float: none !important;
    overflow: hidden !important;
    padding: 0 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: row !important;
    white-space: nowrap !important;
    text-align: center !important;
    text-indent: 0 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    transform: none !important;
    translate: none !important;
    color: var(--sdp-purple) !important;
    background: var(--sdp-white) !important;
    background-image: none !important;
    border: 1.5px solid var(--sdp-purple) !important;
}

body.single-product div.product form.cart .sdp-action-buttons .sdp-buy-now::before,
body.single-product div.product form.cart .sdp-action-buttons .sdp-buy-now::after {
    content: none !important;
    display: none !important;
}

body.single-product div.product form.cart .sdp-action-buttons .sdp-buy-now * {
    position: static !important;
    inset: auto !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    translate: none !important;
    float: none !important;
    text-indent: 0 !important;
    color: inherit !important;
}

body.single-product div.product form.cart .sdp-action-buttons .sdp-buy-now > span {
    display: inline-flex !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    color: inherit !important;
    background: transparent !important;
    border: 0 !important;
}

body.single-product div.product form.cart .sdp-action-buttons .sdp-buy-now:hover,
body.single-product div.product form.cart .sdp-action-buttons .sdp-buy-now:focus {
    color: var(--sdp-white) !important;
    background: var(--sdp-purple-dark) !important;
    border-color: var(--sdp-purple-dark) !important;
}

body.single-product .sdp-buy-now-icon {
    font-size: 16px;
    line-height: 1;
}

body.single-product div.product form.cart .sdp-action-buttons .single_add_to_cart_button {
    -webkit-appearance: none !important;
    appearance: none !important;
    box-sizing: border-box !important;
    float: none !important;
    position: relative !important;
    padding: 0 18px !important;
    white-space: nowrap !important;
    background: var(--sdp-purple) !important;
    background-image: none !important;
    border: 1.5px solid var(--sdp-purple) !important;
    color: #fff !important;
}

body.single-product div.product form.cart .sdp-action-buttons .single_add_to_cart_button:hover,
body.single-product div.product form.cart .sdp-action-buttons .single_add_to_cart_button:focus {
    background: var(--sdp-purple-dark) !important;
    border-color: var(--sdp-purple-dark) !important;
}

/* Make product-summary wishlist controls touch-friendly without touching header wishlist icons. */
body.single-product div.product .summary .shehyaara-wishlist-enhanced {
    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 48px !important;
    margin: 10px 0 0 !important;
    padding: 10px 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    border: 1px solid var(--sdp-border) !important;
    border-radius: 12px !important;
    background: var(--sdp-white) !important;
    color: var(--sdp-purple) !important;
    font-size: 14px !important;
    font-weight: 650 !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

body.single-product div.product .summary .shehyaara-wishlist-enhanced:hover,
body.single-product div.product .summary .shehyaara-wishlist-enhanced:focus {
    background: var(--sdp-purple-soft) !important;
    border-color: #cfc0ff !important;
}

body.single-product .shehyaara-wishlist-label {
    display: inline !important;
    font: inherit !important;
    color: inherit !important;
}


body.single-product .sdp-shade-native-row {
    display: none !important;
}

body.single-product .sdp-purchase-meta-row {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(112px, 128px) minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
    margin: 12px 0 10px;
}

body.single-product .sdp-purchase-meta-row .quantity {
    margin: 0 !important;
    float: none !important;
    width: 100%;
}

body.single-product .sdp-purchase-meta-row .quantity .qty,
body.single-product .sdp-purchase-meta-row .quantity input.qty {
    width: 100%;
    min-height: 48px;
    border-radius: 12px;
}

body.single-product div.product .summary .shehyaara-wishlist-enhanced.sdp-wishlist-inline {
    width: 100% !important;
    min-height: 48px !important;
    margin: 0 !important;
    justify-content: center !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.single-product .sdp-action-buttons {
    margin-top: 0 !important;
}

/* Gallery polish */
body.single-product div.product .woocommerce-product-gallery {
    max-width: 96%;
    margin-left: auto;
    margin-right: auto;
}

body.single-product div.product .woocommerce-product-gallery .flex-viewport,
body.single-product div.product .woocommerce-product-gallery__wrapper,
body.single-product div.product .woocommerce-product-gallery__image,
body.single-product div.product .woocommerce-product-gallery__image > a {
    border-radius: 18px;
    overflow: hidden;
}

body.single-product div.product .woocommerce-product-gallery__wrapper img,
body.single-product div.product .woocommerce-product-gallery__image img {
    border-radius: 18px;
}

body.single-product div.product .woocommerce-product-gallery ol.flex-control-nav.flex-control-thumbs,
body.single-product div.product .woocommerce-product-gallery ul.flex-control-nav.flex-control-thumbs,
body.single-product div.product .flex-control-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

body.single-product div.product .woocommerce-product-gallery ol.flex-control-nav.flex-control-thumbs li,
body.single-product div.product .woocommerce-product-gallery ul.flex-control-nav.flex-control-thumbs li,
body.single-product div.product .flex-control-thumbs li {
    width: 72px !important;
    margin: 0 !important;
    float: none !important;
}

body.single-product div.product .woocommerce-product-gallery ol.flex-control-nav.flex-control-thumbs li img,
body.single-product div.product .woocommerce-product-gallery ul.flex-control-nav.flex-control-thumbs li img,
body.single-product div.product .flex-control-thumbs li img {
    width: 72px !important;
    height: 72px !important;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--sdp-border);
}


/* Shade selector redesign for variable products. */
body.single-product .summary .sdp-shade-native-select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
}

body.single-product .summary .sdp-shade-picker {
    margin-top: 10px;
    padding: 14px;
    border: 1px solid var(--sdp-border);
    border-radius: 16px;
    background: linear-gradient(180deg, #fff 0%, var(--sdp-purple-softer) 100%);
}

body.single-product .summary .sdp-shade-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

body.single-product .summary .sdp-shade-picker-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--sdp-text);
}

body.single-product .summary .sdp-shade-picker-selected {
    font-size: 12px;
    font-weight: 700;
    color: var(--sdp-purple);
    background: rgba(84, 34, 232, .08);
    border: 1px solid rgba(84, 34, 232, .12);
    border-radius: 999px;
    padding: 4px 9px;
    max-width: 58%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.single-product .summary .sdp-shade-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

body.single-product .summary .sdp-shade-option {
    width: 100%;
    border: 1px solid var(--sdp-border);
    background: #fff;
    border-radius: 14px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

body.single-product .summary .sdp-shade-option:hover,
body.single-product .summary .sdp-shade-option:focus {
    border-color: #c7b1ff;
    background: #fff;
    box-shadow: 0 8px 18px rgba(84, 34, 232, .08);
    outline: none;
}

body.single-product .summary .sdp-shade-option.is-selected {
    border-color: var(--sdp-purple);
    background: var(--sdp-purple-soft);
    box-shadow: 0 10px 22px rgba(84, 34, 232, .12);
}

body.single-product .summary .sdp-shade-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    background: #f7f4ff;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.single-product .summary .sdp-shade-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

body.single-product .summary .sdp-shade-thumb-fallback,
body.single-product .summary .sdp-shade-number {
    color: var(--sdp-text);
    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;
}

body.single-product .summary .sdp-shade-number {
    min-height: 16px;
    text-align: center;
    word-break: break-word;
}

body.single-product .summary .sdp-shade-preview {
    margin-top: 12px;
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    border: 1px dashed #cfbefd;
    border-radius: 14px;
    background: rgba(255, 255, 255, .9);
    padding: 10px;
}

body.single-product .summary .sdp-shade-preview-image {
    width: 68px;
    height: 68px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f5ff;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.single-product .summary .sdp-shade-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

body.single-product .summary .sdp-shade-preview-placeholder {
    color: var(--sdp-purple);
    font-weight: 700;
    font-size: 15px;
}

body.single-product .summary .sdp-shade-preview-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

body.single-product .summary .sdp-shade-preview-label {
    color: var(--sdp-text);
    font-size: 14px;
    line-height: 1.3;
}

body.single-product .summary .sdp-shade-preview-helper {
    color: var(--sdp-muted);
    font-size: 12px;
    line-height: 1.4;
}

body.single-product .summary .sdp-shade-clear-link {
    display: inline-flex !important;
    margin-top: 8px !important;
    color: var(--sdp-purple) !important;
    font-size: 12px !important;
    text-decoration: none !important;
}

body.single-product .summary .sdp-shade-clear-link:hover,
body.single-product .summary .sdp-shade-clear-link:focus {
    text-decoration: underline !important;
}

/* Keep controls comfortable on tablets and phones. */
@media (max-width: 768px) {
    body.single-product .summary .sdp-shade-picker {
        margin-top: 8px;
        padding: 12px;
        border-radius: 14px;
    }

    body.single-product .summary .sdp-shade-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    body.single-product .summary .sdp-shade-option {
        border-radius: 12px;
        padding: 7px;
        gap: 6px;
    }

    body.single-product .summary .sdp-shade-preview {
        grid-template-columns: 56px minmax(0, 1fr);
        gap: 9px;
    }

    body.single-product .summary .sdp-shade-preview-image {
        width: 56px;
        height: 56px;
    }

    body.single-product .sdp-product-info {
        margin-top: 12px;
        gap: 8px;
    }

    body.single-product .sdp-delivery-card {
        padding: 13px 13px;
        border-radius: 13px;
    }

    body.single-product .sdp-cod-card {
        padding: 10px 13px;
        border-radius: 13px;
        font-size: 13px;
    }

    body.single-product .sdp-icon-wrap {
        width: 31px;
        height: 31px;
        border-radius: 9px;
    }

    body.single-product .sdp-delivery-heading-row strong {
        font-size: 14px;
    }

    body.single-product .sdp-delivery-line {
        font-size: 13px;
    }

    body.single-product .sdp-action-buttons {
        grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr) !important;
        gap: 7px !important;
    }

    body.single-product .sdp-action-buttons .sdp-buy-now,
    body.single-product .sdp-action-buttons .single_add_to_cart_button {
        order: initial !important;
    }

    body.single-product .sdp-action-buttons > .button,
    body.single-product .sdp-action-buttons > button {
        min-height: 48px !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
        font-size: 14px !important;
    }

    body.single-product div.product .summary .shehyaara-wishlist-enhanced {
        min-height: 50px !important;
        font-size: 14px !important;
    }

    body.single-product .sdp-purchase-meta-row {
        grid-template-columns: 110px minmax(0, 1fr);
        gap: 8px;
        margin: 10px 0 8px;
    }

    body.single-product div.product .summary .shehyaara-wishlist-enhanced.sdp-wishlist-inline {
        font-size: 13px !important;
        padding: 8px 10px !important;
    }

    body.single-product div.product .woocommerce-product-gallery {
        max-width: 92%;
    }

    body.single-product div.product .woocommerce-product-gallery .flex-viewport,
    body.single-product div.product .woocommerce-product-gallery__wrapper,
    body.single-product div.product .woocommerce-product-gallery__image,
    body.single-product div.product .woocommerce-product-gallery__image > a,
    body.single-product div.product .woocommerce-product-gallery__wrapper img,
    body.single-product div.product .woocommerce-product-gallery__image img {
        border-radius: 16px;
    }

    body.single-product div.product .woocommerce-product-gallery ol.flex-control-nav.flex-control-thumbs li,
    body.single-product div.product .woocommerce-product-gallery ul.flex-control-nav.flex-control-thumbs li,
    body.single-product div.product .flex-control-thumbs li {
        width: 62px !important;
    }

    body.single-product div.product .woocommerce-product-gallery ol.flex-control-nav.flex-control-thumbs li img,
    body.single-product div.product .woocommerce-product-gallery ul.flex-control-nav.flex-control-thumbs li img,
    body.single-product div.product .flex-control-thumbs li img {
        width: 62px !important;
        height: 62px !important;
        border-radius: 12px;
    }
}

@media (max-width: 390px) {
    body.single-product .sdp-purchase-meta-row {
        grid-template-columns: 102px minmax(0, 1fr);
        gap: 7px;
    }

    body.single-product div.product .woocommerce-product-gallery ol.flex-control-nav.flex-control-thumbs li,
    body.single-product div.product .woocommerce-product-gallery ul.flex-control-nav.flex-control-thumbs li,
    body.single-product div.product .flex-control-thumbs li {
        width: 56px !important;
    }

    body.single-product div.product .woocommerce-product-gallery ol.flex-control-nav.flex-control-thumbs li img,
    body.single-product div.product .woocommerce-product-gallery ul.flex-control-nav.flex-control-thumbs li img,
    body.single-product div.product .flex-control-thumbs li img {
        width: 56px !important;
        height: 56px !important;
    }

    body.single-product .sdp-action-buttons {
        grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr) !important;
        gap: 6px !important;
    }

    body.single-product .sdp-action-buttons > .button,
    body.single-product .sdp-action-buttons > button {
        min-height: 46px !important;
        font-size: 13px !important;
        border-radius: 10px !important;
    }

    body.single-product .summary .sdp-shade-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.single-product .sdp-delivery-heading-row {
        align-items: flex-start;
    }

    body.single-product .sdp-preorder-pill,
    body.single-product .sdp-advance-pill {
        font-size: 10px;
        padding: 3px 7px;
    }
}

/* Smart 3-product add-on offers. Product page only; header/footer untouched. */
body.single-product .sdp-smart-offers {
    box-sizing: border-box;
    width: 100%;
    margin: 18px 0 8px;
    padding: 16px;
    border: 1px solid var(--sdp-border);
    border-radius: 16px;
    background: linear-gradient(145deg, #fff, var(--sdp-purple-softer));
    color: var(--sdp-text);
}

body.single-product .sdp-smart-offers-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 13px;
}

body.single-product .sdp-offer-kicker {
    display: block;
    margin-bottom: 2px;
    color: var(--sdp-purple);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .045em;
    text-transform: uppercase;
}

body.single-product .sdp-smart-offers h3 {
    margin: 0 !important;
    color: var(--sdp-text) !important;
    font-size: 18px !important;
    line-height: 1.25 !important;
}

body.single-product .sdp-offer-save-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #efffb7;
    color: #355200;
    font-size: 11px;
    font-weight: 750;
    white-space: nowrap;
}

body.single-product .sdp-offer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

body.single-product .sdp-offer-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #ece7fb;
    border-radius: 13px;
    background: #fff;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

body.single-product .sdp-offer-card:hover {
    transform: translateY(-1px);
    border-color: #d4c7ff;
    box-shadow: 0 7px 20px rgba(84, 34, 232, .07);
}

body.single-product .sdp-offer-card.is-added {
    border-color: #b8e45b;
}

body.single-product .sdp-offer-image {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #faf9fd;
}

body.single-product .sdp-offer-image img {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    object-fit: cover !important;
    display: block !important;
}

body.single-product .sdp-offer-content {
    padding: 10px;
}

body.single-product .sdp-offer-title {
    display: -webkit-box;
    min-height: 38px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--sdp-text) !important;
    font-size: 13px;
    font-weight: 680;
    line-height: 1.4;
    text-decoration: none !important;
}

body.single-product .sdp-offer-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    margin: 7px 0 9px;
    font-size: 13px;
}

body.single-product .sdp-offer-price del {
    color: #968eaa;
    font-size: 11px;
}

body.single-product .sdp-offer-price ins {
    color: var(--sdp-purple-dark);
    font-weight: 750;
    text-decoration: none;
}

body.single-product .sdp-offer-add {
    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 8px 9px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    border: 1px solid var(--sdp-purple) !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: var(--sdp-purple) !important;
    font-size: 12px !important;
    font-weight: 750 !important;
    line-height: 1.15 !important;
    box-shadow: none !important;
}

body.single-product .sdp-offer-add:hover,
body.single-product .sdp-offer-add:focus {
    background: var(--sdp-purple) !important;
    color: #fff !important;
}

body.single-product .sdp-offer-add.is-added,
body.single-product .sdp-offer-add:disabled {
    opacity: 1 !important;
    border-color: #9bd22b !important;
    background: #efffb7 !important;
    color: #355200 !important;
    cursor: default !important;
}

body.single-product .sdp-offer-note {
    margin: 10px 0 0 !important;
    color: var(--sdp-muted);
    font-size: 11px;
    line-height: 1.45;
}

@media (max-width: 768px) {
    body.single-product .sdp-smart-offers {
        margin-top: 14px;
        padding: 13px;
        border-radius: 14px;
    }

    body.single-product .sdp-smart-offers-head {
        align-items: center;
        margin-bottom: 11px;
    }

    body.single-product .sdp-smart-offers h3 {
        font-size: 16px !important;
    }

    body.single-product .sdp-offer-save-badge {
        max-width: 132px;
        white-space: normal;
        text-align: center;
        line-height: 1.2;
    }

    body.single-product .sdp-offer-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    body.single-product .sdp-offer-card {
        display: grid;
        grid-template-columns: 86px minmax(0, 1fr);
        align-items: stretch;
    }

    body.single-product .sdp-offer-image {
        aspect-ratio: 1 / 1;
        height: 100%;
        min-height: 104px;
    }

    body.single-product .sdp-offer-content {
        padding: 9px 10px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    body.single-product .sdp-offer-title {
        min-height: auto;
        font-size: 13px;
    }

    body.single-product .sdp-offer-price {
        margin: 5px 0 7px;
    }

    body.single-product .sdp-offer-add {
        min-height: 36px !important;
        font-size: 12px !important;
    }
}

/* Minimal gift packaging chooser. Product page only; header/footer untouched. */
body.single-product .sdp-gift-wrap {
    width: 100%;
    margin: 10px 0 4px;
}

body.single-product .sdp-gift-trigger {
    box-sizing: border-box;
    width: 100%;
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 13px;
    border: 1px solid var(--sdp-border);
    border-radius: 13px;
    background: #fff;
    color: var(--sdp-text);
    text-align: left;
    cursor: pointer;
    box-shadow: none;
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

body.single-product .sdp-gift-trigger:hover,
body.single-product .sdp-gift-trigger:focus {
    background: var(--sdp-purple-softer);
    border-color: #cfc0ff;
    outline: none;
}

body.single-product .sdp-gift-trigger.has-selection {
    border-color: #bfaeff;
    background: var(--sdp-purple-softer);
}

body.single-product .sdp-gift-trigger-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--sdp-purple-soft);
    font-size: 18px;
}

body.single-product .sdp-gift-trigger-copy {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

body.single-product .sdp-gift-trigger-copy strong {
    color: var(--sdp-text);
    font-size: 14px;
    line-height: 1.2;
}

body.single-product .sdp-gift-trigger-copy small {
    color: var(--sdp-muted);
    font-size: 12px;
    line-height: 1.25;
}

body.single-product .sdp-gift-chevron {
    flex: 0 0 auto;
    color: var(--sdp-purple);
    font-size: 24px;
    line-height: 1;
}

body.single-product.sdp-gift-open,
body.single-product.sdp-gift-open body {
    overflow: hidden;
}

body.single-product .sdp-gift-modal[hidden] {
    display: none !important;
}

body.single-product .sdp-gift-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}

body.single-product .sdp-gift-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

body.single-product .sdp-gift-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(22, 12, 48, .44);
    backdrop-filter: blur(2px);
}

body.single-product .sdp-gift-sheet {
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    width: min(680px, 100%);
    max-height: min(720px, calc(100vh - 40px));
    overflow: auto;
    padding: 18px;
    border: 1px solid var(--sdp-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(36, 24, 74, .22);
    transform: translateY(8px) scale(.99);
    transition: transform .18s ease;
}

body.single-product .sdp-gift-modal.is-open .sdp-gift-sheet {
    transform: translateY(0) scale(1);
}

body.single-product .sdp-gift-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

body.single-product .sdp-gift-kicker {
    display: block;
    margin-bottom: 2px;
    color: var(--sdp-purple);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .05em;
    text-transform: uppercase;
}

body.single-product .sdp-gift-head h3 {
    margin: 0 !important;
    color: var(--sdp-text) !important;
    font-size: 19px !important;
    line-height: 1.25 !important;
}

body.single-product .sdp-gift-close {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--sdp-border);
    border-radius: 50%;
    background: #fff;
    color: var(--sdp-text);
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
}

body.single-product .sdp-gift-products {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

body.single-product .sdp-gift-product {
    min-width: 0;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 10px;
    row-gap: 8px;
    align-items: center;
    padding: 10px;
    border: 1px solid #ece7fb;
    border-radius: 13px;
    background: #fff;
}

body.single-product .sdp-gift-product.is-selected {
    border-color: #b8a5ff;
    background: var(--sdp-purple-softer);
}

body.single-product .sdp-gift-product-image {
    grid-row: 1 / span 2;
    width: 64px;
    height: 64px;
    overflow: hidden;
    border-radius: 10px;
    background: #faf8ff;
}

body.single-product .sdp-gift-product-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    margin: 0 !important;
}

body.single-product .sdp-gift-product-copy {
    min-width: 0;
    align-self: end;
}

body.single-product .sdp-gift-product-copy strong {
    display: block;
    overflow: hidden;
    color: var(--sdp-text);
    font-size: 13px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.single-product .sdp-gift-product-copy > span {
    display: block;
    margin-top: 3px;
    color: var(--sdp-purple-dark);
    font-size: 13px;
    font-weight: 700;
}

body.single-product .sdp-gift-add {
    width: max-content !important;
    min-width: 86px !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 6px 11px !important;
    border: 1px solid var(--sdp-purple) !important;
    border-radius: 9px !important;
    background: #fff !important;
    color: var(--sdp-purple) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    box-shadow: none !important;
}

body.single-product .sdp-gift-add:hover,
body.single-product .sdp-gift-add:focus,
body.single-product .sdp-gift-product.is-selected .sdp-gift-add {
    background: var(--sdp-purple) !important;
    color: #fff !important;
}

body.single-product .sdp-gift-add.is-loading {
    opacity: .65;
}

body.single-product .sdp-gift-note {
    margin: 12px 0 0 !important;
    color: var(--sdp-muted);
    font-size: 11px;
    line-height: 1.45;
}

@media (max-width: 768px) {
    body.single-product .sdp-gift-wrap {
        margin-top: 8px;
    }

    body.single-product .sdp-gift-trigger {
        min-height: 52px;
        padding: 9px 12px;
    }

    body.single-product .sdp-gift-modal {
        align-items: flex-end;
        padding: 0;
    }

    body.single-product .sdp-gift-sheet {
        width: 100%;
        max-height: 78vh;
        padding: 16px;
        border-radius: 20px 20px 0 0;
        transform: translateY(22px);
    }

    body.single-product .sdp-gift-products {
        grid-template-columns: 1fr;
    }

    body.single-product .sdp-gift-product {
        grid-template-columns: 60px minmax(0, 1fr) auto;
        grid-template-rows: 1fr;
        gap: 9px;
    }

    body.single-product .sdp-gift-product-image {
        grid-row: auto;
        width: 60px;
        height: 60px;
    }

    body.single-product .sdp-gift-product-copy {
        align-self: center;
    }

    body.single-product .sdp-gift-add {
        min-width: 76px !important;
    }
}

@media (max-width: 390px) {
    body.single-product .sdp-gift-product {
        grid-template-columns: 54px minmax(0, 1fr) auto;
        padding: 8px;
    }

    body.single-product .sdp-gift-product-image {
        width: 54px;
        height: 54px;
    }

    body.single-product .sdp-gift-add {
        min-width: 68px !important;
        padding-inline: 9px !important;
    }
}

body.single-product div.product .summary form.cart > .sdp-native-buy-now-hidden,
body.single-product div.product .summary .sdp-native-buy-now-hidden { margin: 0 !important; padding: 0 !important; min-height: 0 !important; }

/* v1.5.4: shade picker sits outside the variation form, directly below price. */
body.single-product .summary .sdp-shade-picker {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
}
body.single-product .summary .sdp-shade-grid {
    align-items: stretch !important;
}
body.single-product .summary .sdp-shade-option {
    min-width: 0 !important;
    overflow: hidden !important;
}
body.single-product .summary .sdp-shade-thumb {
    display: block !important;
    overflow: hidden !important;
}
body.single-product .summary .sdp-shade-thumb img,
body.single-product .summary .sdp-shade-preview-image img {
    display: block !important;
    max-width: 100% !important;
    max-height: 100% !important;
}
body.single-product .summary .sdp-shade-preview-copy {
    overflow: hidden !important;
}

/* v1.5.5 — compact product viewport so shade selection and product image stay close together. */
body.single-product form.variations_form .variations.sdp-variations-empty,
body.single-product form.variations_form .single_variation.sdp-single-variation-empty {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

body.single-product form.variations_form .single_variation_wrap,
body.single-product form.variations_form .woocommerce-variation-add-to-cart {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.single-product div.product .summary .product_title {
    margin-bottom: 6px !important;
}

body.single-product div.product .summary > .price,
body.single-product div.product .summary p.price {
    margin-top: 0 !important;
    margin-bottom: 7px !important;
}

body.single-product div.product .summary .woocommerce-product-details__short-description {
    margin-top: 8px !important;
    margin-bottom: 8px !important;
}

body.single-product div.product .summary .woocommerce-product-details__short-description p {
    margin-top: 0 !important;
    margin-bottom: 6px !important;
}

body.single-product .summary .sdp-shade-picker {
    margin-top: 6px !important;
    margin-bottom: 8px !important;
    padding: 10px !important;
    border-radius: 14px !important;
}

body.single-product .summary .sdp-shade-picker-head {
    margin-bottom: 7px !important;
}

body.single-product .summary .sdp-shade-grid {
    gap: 7px !important;
}

body.single-product .summary .sdp-shade-option {
    padding: 5px !important;
    gap: 4px !important;
    border-radius: 11px !important;
}

body.single-product .summary .sdp-shade-preview {
    margin-top: 7px !important;
    grid-template-columns: 48px minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 7px !important;
    border-radius: 11px !important;
}

body.single-product .summary .sdp-shade-preview-image {
    width: 48px !important;
    height: 48px !important;
    border-radius: 10px !important;
}

body.single-product .summary .sdp-shade-preview-label {
    font-size: 13px !important;
}

body.single-product .summary .sdp-shade-preview-helper {
    font-size: 11px !important;
}

body.single-product .sdp-purchase-meta-row {
    margin-top: 7px !important;
    margin-bottom: 7px !important;
}

@media (max-width: 768px) {
    /* Main product image: intentionally compact, centered and rounded. */
    body.single-product div.product .woocommerce-product-gallery {
        box-sizing: border-box !important;
        width: min(80vw, 320px) !important;
        max-width: 320px !important;
        margin: 4px auto 10px !important;
        float: none !important;
    }

    body.single-product div.product .woocommerce-product-gallery .flex-viewport,
    body.single-product div.product .woocommerce-product-gallery__wrapper,
    body.single-product div.product .woocommerce-product-gallery__image,
    body.single-product div.product .woocommerce-product-gallery__image > a {
        border-radius: 14px !important;
        overflow: hidden !important;
    }

    body.single-product div.product .woocommerce-product-gallery__image img,
    body.single-product div.product .woocommerce-product-gallery__wrapper img {
        width: 100% !important;
        height: auto !important;
        max-height: 320px !important;
        object-fit: contain !important;
        border-radius: 14px !important;
    }

    /* One compact thumbnail strip instead of a multi-row gallery. */
    body.single-product div.product .woocommerce-product-gallery ol.flex-control-nav.flex-control-thumbs,
    body.single-product div.product .woocommerce-product-gallery ul.flex-control-nav.flex-control-thumbs,
    body.single-product div.product .flex-control-thumbs {
        width: 100% !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 6px !important;
        margin: 7px 0 0 !important;
        padding: 0 1px 2px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    body.single-product div.product .woocommerce-product-gallery ol.flex-control-nav.flex-control-thumbs::-webkit-scrollbar,
    body.single-product div.product .woocommerce-product-gallery ul.flex-control-nav.flex-control-thumbs::-webkit-scrollbar,
    body.single-product div.product .flex-control-thumbs::-webkit-scrollbar {
        display: none;
    }

    body.single-product div.product .woocommerce-product-gallery ol.flex-control-nav.flex-control-thumbs li,
    body.single-product div.product .woocommerce-product-gallery ul.flex-control-nav.flex-control-thumbs li,
    body.single-product div.product .flex-control-thumbs li {
        flex: 0 0 50px !important;
        width: 50px !important;
        height: 50px !important;
    }

    body.single-product div.product .woocommerce-product-gallery ol.flex-control-nav.flex-control-thumbs li img,
    body.single-product div.product .woocommerce-product-gallery ul.flex-control-nav.flex-control-thumbs li img,
    body.single-product div.product .flex-control-thumbs li img {
        width: 50px !important;
        height: 50px !important;
        object-fit: cover !important;
        border-radius: 9px !important;
    }

    /* Shade options use one horizontal row to save vertical space. */
    body.single-product .summary .sdp-shade-picker {
        padding: 9px !important;
        margin: 5px 0 7px !important;
    }

    body.single-product .summary .sdp-shade-picker-head {
        margin-bottom: 6px !important;
    }

    body.single-product .summary .sdp-shade-grid {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 7px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding: 0 0 3px !important;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    body.single-product .summary .sdp-shade-grid::-webkit-scrollbar {
        display: none;
    }

    body.single-product .summary .sdp-shade-option {
        flex: 0 0 58px !important;
        width: 58px !important;
        min-width: 58px !important;
        padding: 4px !important;
        border-radius: 10px !important;
    }

    body.single-product .summary .sdp-shade-thumb {
        width: 48px !important;
        height: 48px !important;
        aspect-ratio: auto !important;
        border-radius: 8px !important;
    }

    body.single-product .summary .sdp-shade-number {
        min-height: 0 !important;
        font-size: 10.5px !important;
        line-height: 1.15 !important;
    }

    body.single-product .summary .sdp-shade-preview {
        margin-top: 6px !important;
        grid-template-columns: 42px minmax(0, 1fr) !important;
        padding: 6px !important;
        gap: 7px !important;
    }

    body.single-product .summary .sdp-shade-preview-image {
        width: 42px !important;
        height: 42px !important;
        border-radius: 8px !important;
    }

    body.single-product .summary .sdp-shade-preview-copy {
        gap: 1px !important;
    }

    body.single-product div.product .summary .product_title {
        margin-top: 8px !important;
        margin-bottom: 4px !important;
        line-height: 1.16 !important;
    }

    body.single-product div.product .summary > .price,
    body.single-product div.product .summary p.price {
        margin-bottom: 5px !important;
    }

    body.single-product div.product .summary .woocommerce-product-details__short-description {
        margin: 6px 0 !important;
    }

    body.single-product div.product .summary .woocommerce-product-details__short-description p {
        margin-bottom: 4px !important;
    }
}

@media (max-width: 420px) {
    body.single-product div.product .woocommerce-product-gallery {
        width: min(76vw, 300px) !important;
        max-width: 300px !important;
    }

    body.single-product div.product .woocommerce-product-gallery__image img,
    body.single-product div.product .woocommerce-product-gallery__wrapper img {
        max-height: 300px !important;
    }

    body.single-product div.product .woocommerce-product-gallery ol.flex-control-nav.flex-control-thumbs li,
    body.single-product div.product .woocommerce-product-gallery ul.flex-control-nav.flex-control-thumbs li,
    body.single-product div.product .flex-control-thumbs li,
    body.single-product div.product .woocommerce-product-gallery ol.flex-control-nav.flex-control-thumbs li img,
    body.single-product div.product .woocommerce-product-gallery ul.flex-control-nav.flex-control-thumbs li img,
    body.single-product div.product .flex-control-thumbs li img {
        width: 46px !important;
        height: 46px !important;
        flex-basis: 46px !important;
    }
}

/* v1.5.6 — keep the purchase decision area compact. */
body.single-product div.product .summary .product_title,
body.single-product div.product .summary h1.product_title {
    font-size: clamp(27px, 2.25vw, 34px) !important;
    line-height: 1.14 !important;
    margin-top: 4px !important;
    margin-bottom: 5px !important;
    letter-spacing: -0.02em !important;
}

body.single-product div.product .summary .woocommerce-product-details__short-description.sdp-short-description-after-cart {
    margin: 10px 0 6px !important;
    padding: 0 !important;
}

body.single-product div.product .summary .woocommerce-product-details__short-description.sdp-short-description-after-cart p:last-child {
    margin-bottom: 0 !important;
}

@media (max-width: 768px) {
    body.single-product div.product .summary .product_title,
    body.single-product div.product .summary h1.product_title {
        font-size: 25px !important;
        line-height: 1.14 !important;
        margin-top: 3px !important;
        margin-bottom: 4px !important;
    }

    body.single-product div.product .summary .woocommerce-product-details__short-description.sdp-short-description-after-cart {
        margin-top: 9px !important;
        margin-bottom: 5px !important;
    }
}

@media (max-width: 420px) {
    body.single-product div.product .summary .product_title,
    body.single-product div.product .summary h1.product_title {
        font-size: 23px !important;
        line-height: 1.13 !important;
    }
}

/* v1.5.7 — remove wasted mobile whitespace inside the product page only. */
body.single-product .sdp-collapse-empty {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

body.single-product .sdp-compact-divider {
    margin: 7px 0 !important;
}

body.single-product.sdp-product-compact div.product .summary,
body.single-product.sdp-product-compact div.product .woocommerce-product-gallery {
    margin-bottom: 8px !important;
}

body.single-product.sdp-product-compact div.product form.cart,
body.single-product.sdp-product-compact div.product form.variations_form {
    margin-top: 0 !important;
    margin-bottom: 8px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

body.single-product.sdp-product-compact div.product form.variations_form .single_variation_wrap,
body.single-product.sdp-product-compact div.product form.variations_form .woocommerce-variation-add-to-cart,
body.single-product.sdp-product-compact div.product form.variations_form .single_variation {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    min-height: 0 !important;
}

body.single-product.sdp-product-compact div.product .product_meta {
    margin-top: 10px !important;
    padding-top: 10px !important;
}

body.single-product.sdp-product-compact div.product .sdp-smart-offers {
    margin-bottom: 8px !important;
}

body.single-product.sdp-product-compact div.product .sdp-smart-offers + .product_meta,
body.single-product.sdp-product-compact div.product .sdp-gift-option + .product_meta {
    margin-top: 8px !important;
}

@media (max-width: 768px) {
    /* Common WooCommerce/Blocksy spacing around breadcrumbs and product content. */
    body.single-product.sdp-product-compact .woocommerce-breadcrumb,
    body.single-product.sdp-product-compact .ct-breadcrumbs,
    body.single-product.sdp-product-compact [class*="breadcrumb"] {
        margin-top: 2px !important;
        margin-bottom: 5px !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        min-height: 0 !important;
    }

    body.single-product.sdp-product-compact .woocommerce-notices-wrapper:empty {
        display: none !important;
        margin: 0 !important;
        padding: 0 !important;
        height: 0 !important;
    }

    body.single-product.sdp-product-compact div.product {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    body.single-product.sdp-product-compact div.product .woocommerce-product-gallery {
        margin-top: 0 !important;
        margin-bottom: 7px !important;
    }

    body.single-product.sdp-product-compact div.product .summary {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    body.single-product.sdp-product-compact .summary .sdp-shade-picker {
        margin-bottom: 5px !important;
    }

    body.single-product.sdp-product-compact .sdp-purchase-meta-row {
        margin-top: 4px !important;
        margin-bottom: 6px !important;
    }

    body.single-product.sdp-product-compact .sdp-action-buttons {
        margin-top: 0 !important;
        margin-bottom: 7px !important;
    }

    body.single-product.sdp-product-compact div.product .summary .woocommerce-product-details__short-description.sdp-short-description-after-cart {
        margin-top: 6px !important;
        margin-bottom: 4px !important;
    }

    body.single-product.sdp-product-compact div.product .product_meta {
        margin-top: 6px !important;
        padding-top: 7px !important;
    }

    body.single-product.sdp-product-compact div.product .woocommerce-tabs,
    body.single-product.sdp-product-compact div.product .wc-tabs-wrapper {
        margin-top: 8px !important;
        padding-top: 0 !important;
    }

    body.single-product.sdp-product-compact div.product .woocommerce-tabs ul.tabs,
    body.single-product.sdp-product-compact div.product .wc-tabs {
        margin-top: 0 !important;
        margin-bottom: 6px !important;
    }
}


/* v1.5.8 — compact mobile gallery: preserve all images without a thumbnail wall. */
@media (max-width: 768px) {
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile {
        width: min(68vw, 280px) !important;
        max-width: 280px !important;
        margin: 2px auto 7px !important;
    }

    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .flex-viewport,
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .woocommerce-product-gallery__wrapper,
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .woocommerce-product-gallery__image,
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .woocommerce-product-gallery__image > a {
        border-radius: 13px !important;
        overflow: hidden !important;
    }

    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .woocommerce-product-gallery__image img,
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .woocommerce-product-gallery__wrapper img {
        width: 100% !important;
        height: auto !important;
        max-height: 270px !important;
        object-fit: contain !important;
        border-radius: 13px !important;
    }

    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile ol.flex-control-nav.flex-control-thumbs,
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile ul.flex-control-nav.flex-control-thumbs,
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .flex-control-thumbs {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 5px !important;
        overflow: visible !important;
        margin: 6px 0 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .flex-control-thumbs li,
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile ol.flex-control-nav.flex-control-thumbs li,
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile ul.flex-control-nav.flex-control-thumbs li {
        width: 100% !important;
        height: auto !important;
        min-width: 0 !important;
        flex: none !important;
        aspect-ratio: 1 / 1 !important;
        margin: 0 !important;
        overflow: hidden !important;
        border-radius: 9px !important;
    }

    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .flex-control-thumbs li img,
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile ol.flex-control-nav.flex-control-thumbs li img,
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile ul.flex-control-nav.flex-control-thumbs li img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        border-radius: 9px !important;
        display: block !important;
    }

    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .sdp-gallery-thumb-hidden {
        display: none !important;
    }

    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .sdp-gallery-viewall-tile {
        position: relative !important;
    }

    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .sdp-gallery-viewall-tile > img {
        filter: brightness(.64) !important;
    }

    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .sdp-gallery-more {
        -webkit-appearance: none !important;
        appearance: none !important;
        position: absolute !important;
        inset: 0 !important;
        z-index: 4 !important;
        width: 100% !important;
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 1px !important;
        padding: 2px !important;
        margin: 0 !important;
        border: 0 !important;
        border-radius: 9px !important;
        background: rgba(35, 18, 78, .54) !important;
        color: #fff !important;
        cursor: pointer !important;
        box-shadow: none !important;
        text-align: center !important;
    }

    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .sdp-gallery-more strong {
        font-size: 14px !important;
        line-height: 1 !important;
        color: inherit !important;
    }

    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .sdp-gallery-more span {
        font-size: 8px !important;
        line-height: 1.1 !important;
        color: inherit !important;
    }
}

@media (max-width: 420px) {
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile {
        width: min(64vw, 250px) !important;
        max-width: 250px !important;
    }

    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .woocommerce-product-gallery__image img,
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .woocommerce-product-gallery__wrapper img {
        max-height: 245px !important;
    }
}


/* v1.5.8 — make the gallery more compact and use a single thumbnail slider on mobile/tablet. */
@media (max-width: 1024px) {
    body.single-product div.product .woocommerce-product-gallery {
        box-sizing: border-box !important;
        width: min(72vw, 290px) !important;
        max-width: 290px !important;
        margin: 0 auto 8px !important;
        float: none !important;
    }

    body.single-product div.product .woocommerce-product-gallery .flex-viewport,
    body.single-product div.product .woocommerce-product-gallery__wrapper,
    body.single-product div.product .woocommerce-product-gallery__image,
    body.single-product div.product .woocommerce-product-gallery__image > a {
        border-radius: 12px !important;
        overflow: hidden !important;
    }

    body.single-product div.product .woocommerce-product-gallery__image img,
    body.single-product div.product .woocommerce-product-gallery__wrapper img {
        width: 100% !important;
        height: auto !important;
        max-height: 290px !important;
        object-fit: contain !important;
        border-radius: 12px !important;
    }

    body.single-product div.product .woocommerce-product-gallery ol.flex-control-nav.flex-control-thumbs,
    body.single-product div.product .woocommerce-product-gallery ul.flex-control-nav.flex-control-thumbs,
    body.single-product div.product .flex-control-thumbs {
        width: 100% !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 6px !important;
        margin: 6px 0 0 !important;
        padding: 0 0 3px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        white-space: nowrap !important;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    body.single-product div.product .woocommerce-product-gallery ol.flex-control-nav.flex-control-thumbs li,
    body.single-product div.product .woocommerce-product-gallery ul.flex-control-nav.flex-control-thumbs li,
    body.single-product div.product .flex-control-thumbs li {
        flex: 0 0 44px !important;
        width: 44px !important;
        height: 44px !important;
        margin: 0 !important;
        float: none !important;
    }

    body.single-product div.product .woocommerce-product-gallery ol.flex-control-nav.flex-control-thumbs li img,
    body.single-product div.product .woocommerce-product-gallery ul.flex-control-nav.flex-control-thumbs li img,
    body.single-product div.product .flex-control-thumbs li img {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        object-fit: cover !important;
        border-radius: 8px !important;
    }
}

@media (max-width: 480px) {
    body.single-product div.product .woocommerce-product-gallery {
        width: min(68vw, 270px) !important;
        max-width: 270px !important;
    }

    body.single-product div.product .woocommerce-product-gallery__image img,
    body.single-product div.product .woocommerce-product-gallery__wrapper img {
        max-height: 270px !important;
    }

    body.single-product div.product .woocommerce-product-gallery ol.flex-control-nav.flex-control-thumbs li,
    body.single-product div.product .woocommerce-product-gallery ul.flex-control-nav.flex-control-thumbs li,
    body.single-product div.product .flex-control-thumbs li,
    body.single-product div.product .woocommerce-product-gallery ol.flex-control-nav.flex-control-thumbs li img,
    body.single-product div.product .woocommerce-product-gallery ul.flex-control-nav.flex-control-thumbs li img,
    body.single-product div.product .flex-control-thumbs li img {
        width: 40px !important;
        height: 40px !important;
        flex-basis: 40px !important;
        min-width: 40px !important;
    }
}


/* v1.5.9 — final gallery override: force a true one-row thumbnail slider. */
@media (max-width: 1024px) {
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile {
        width: min(68vw, 270px) !important;
        max-width: 270px !important;
        margin: 0 auto 7px !important;
    }

    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .woocommerce-product-gallery__image img,
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .woocommerce-product-gallery__wrapper img {
        max-height: 260px !important;
    }

    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile ol.flex-control-nav.flex-control-thumbs,
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile ul.flex-control-nav.flex-control-thumbs,
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .flex-control-thumbs,
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .sdp-gallery-thumb-slider {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        grid-template-columns: none !important;
        gap: 6px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 6px 0 0 !important;
        padding: 0 0 4px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        white-space: nowrap !important;
        scroll-snap-type: x proximity;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile ol.flex-control-nav.flex-control-thumbs li,
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile ul.flex-control-nav.flex-control-thumbs li,
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .flex-control-thumbs li,
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .sdp-gallery-thumb-slider > li {
        display: block !important;
        flex: 0 0 42px !important;
        width: 42px !important;
        min-width: 42px !important;
        max-width: 42px !important;
        height: 42px !important;
        aspect-ratio: 1 / 1 !important;
        margin: 0 !important;
        float: none !important;
        overflow: hidden !important;
        border-radius: 8px !important;
        scroll-snap-align: start;
    }

    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile ol.flex-control-nav.flex-control-thumbs li img,
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile ul.flex-control-nav.flex-control-thumbs li img,
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .flex-control-thumbs li img,
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .sdp-gallery-thumb-slider > li img {
        display: block !important;
        width: 42px !important;
        min-width: 42px !important;
        height: 42px !important;
        object-fit: cover !important;
        border-radius: 8px !important;
    }

    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .sdp-gallery-thumb-hidden {
        display: block !important;
    }

    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .sdp-gallery-viewall-tile {
        position: static !important;
    }

    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .sdp-gallery-more {
        display: none !important;
    }
}

@media (max-width: 480px) {
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile {
        width: min(64vw, 250px) !important;
        max-width: 250px !important;
    }

    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .woocommerce-product-gallery__image img,
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .woocommerce-product-gallery__wrapper img {
        max-height: 245px !important;
    }
}

/* v1.6.0 — Blocksy-specific compact gallery. Keep the gallery container full width,
 * constrain only the main viewport, and force thumbnails into one horizontal rail. */
@media (max-width: 1024px) {
    body.single-product .ct-product-gallery-container.sdp-blocksy-gallery,
    body.single-product .ct-product-gallery-container.sdp-blocksy-gallery .woocommerce-product-gallery,
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        float: none !important;
        box-sizing: border-box !important;
    }

    /* Blocksy Flexy main image only — compact and centred, without narrowing the whole gallery column. */
    body.single-product .ct-product-gallery-container.sdp-blocksy-gallery .flexy-view {
        width: min(72vw, 300px) !important;
        max-width: 300px !important;
        margin: 0 auto !important;
        border-radius: 12px !important;
        overflow: hidden !important;
    }

    body.single-product .ct-product-gallery-container.sdp-blocksy-gallery .flexy-view .ct-media-container,
    body.single-product .ct-product-gallery-container.sdp-blocksy-gallery .flexy-view img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: 300px !important;
        object-fit: contain !important;
        border-radius: 12px !important;
    }

    /* Blocksy's native pills: one swipeable row, never a grid. */
    body.single-product .ct-product-gallery-container.sdp-blocksy-gallery .flexy-pills,
    body.single-product .ct-product-gallery-container.sdp-blocksy-gallery .flexy-pills.sdp-blocksy-pills-slider {
        display: block !important;
        width: min(86vw, 360px) !important;
        max-width: 360px !important;
        margin: 7px auto 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    body.single-product .ct-product-gallery-container.sdp-blocksy-gallery .flexy-pills > ol,
    body.single-product .ct-product-gallery-container.sdp-blocksy-gallery .flexy-pills > ul,
    body.single-product .ct-product-gallery-container.sdp-blocksy-gallery .sdp-blocksy-pills-rail {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 6px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 0 4px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        white-space: nowrap !important;
        scroll-snap-type: x proximity !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch !important;
    }

    body.single-product .ct-product-gallery-container.sdp-blocksy-gallery .flexy-pills > ol::-webkit-scrollbar,
    body.single-product .ct-product-gallery-container.sdp-blocksy-gallery .flexy-pills > ul::-webkit-scrollbar,
    body.single-product .ct-product-gallery-container.sdp-blocksy-gallery .sdp-blocksy-pills-rail::-webkit-scrollbar {
        display: none !important;
    }

    body.single-product .ct-product-gallery-container.sdp-blocksy-gallery .flexy-pills li,
    body.single-product .ct-product-gallery-container.sdp-blocksy-gallery .sdp-blocksy-pills-rail > li {
        display: block !important;
        flex: 0 0 44px !important;
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        height: 44px !important;
        margin: 0 !important;
        padding: 0 !important;
        float: none !important;
        overflow: hidden !important;
        border-radius: 8px !important;
        scroll-snap-align: start !important;
    }

    body.single-product .ct-product-gallery-container.sdp-blocksy-gallery .flexy-pills li .ct-media-container,
    body.single-product .ct-product-gallery-container.sdp-blocksy-gallery .flexy-pills li img,
    body.single-product .ct-product-gallery-container.sdp-blocksy-gallery .sdp-blocksy-pills-rail > li img {
        display: block !important;
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        height: 44px !important;
        object-fit: cover !important;
        border-radius: 8px !important;
    }

    /* WooCommerce built-in fallback: same geometry as Blocksy Flexy. */
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .flex-viewport {
        width: min(72vw, 300px) !important;
        max-width: 300px !important;
        margin: 0 auto !important;
        border-radius: 12px !important;
        overflow: hidden !important;
    }

    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .sdp-gallery-thumb-slider,
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile ol.flex-control-nav.flex-control-thumbs,
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile ul.flex-control-nav.flex-control-thumbs,
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .flex-control-thumbs {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 6px !important;
        width: min(86vw, 360px) !important;
        max-width: 360px !important;
        margin: 7px auto 0 !important;
        padding: 0 0 4px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        white-space: nowrap !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch !important;
    }

    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .sdp-gallery-thumb-slider::-webkit-scrollbar,
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .flex-control-thumbs::-webkit-scrollbar {
        display: none !important;
    }
}

@media (max-width: 480px) {
    body.single-product .ct-product-gallery-container.sdp-blocksy-gallery .flexy-view,
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .flex-viewport {
        width: min(70vw, 280px) !important;
        max-width: 280px !important;
    }

    body.single-product .ct-product-gallery-container.sdp-blocksy-gallery .flexy-view .ct-media-container,
    body.single-product .ct-product-gallery-container.sdp-blocksy-gallery .flexy-view img {
        max-height: 280px !important;
    }

    body.single-product .ct-product-gallery-container.sdp-blocksy-gallery .flexy-pills,
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .sdp-gallery-thumb-slider,
    body.single-product div.product .woocommerce-product-gallery.sdp-gallery-compact-mobile .flex-control-thumbs {
        width: min(88vw, 340px) !important;
        max-width: 340px !important;
    }
}


/* v1.6.1 — universal Blocksy/Woo thumbnail rail. These final rules intentionally
 * avoid relying on a specific Blocksy wrapper so the gallery cannot fall back to rows. */
@media (max-width: 1024px) {
    body.single-product div.product .ct-product-gallery-container,
    body.single-product div.product .woocommerce-product-gallery {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Keep the hero image compact without making the entire gallery column narrow. */
    body.single-product div.product .flexy-view,
    body.single-product div.product .woocommerce-product-gallery .flex-viewport {
        width: min(88vw, 330px) !important;
        max-width: 330px !important;
        margin: 0 auto !important;
        border-radius: 12px !important;
        overflow: hidden !important;
    }

    body.single-product div.product .flexy-view .ct-media-container,
    body.single-product div.product .flexy-view img,
    body.single-product div.product .woocommerce-product-gallery__image img,
    body.single-product div.product .woocommerce-product-gallery__wrapper img {
        max-height: 330px !important;
        object-fit: contain !important;
        border-radius: 12px !important;
    }

    /* Visible slider shell. Four-ish thumbnails are shown; the rest slide horizontally. */
    body.single-product div.product .sdp-thumb-slider-shell {
        box-sizing: border-box !important;
        position: relative !important;
        display: block !important;
        width: min(84vw, 286px) !important;
        max-width: 286px !important;
        min-height: 52px !important;
        margin: 7px auto 5px !important;
        padding: 0 25px !important;
        overflow: hidden !important;
    }

    body.single-product div.product .sdp-universal-thumb-pills,
    body.single-product div.product .flexy-pills.sdp-universal-thumb-pills {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    body.single-product div.product .sdp-universal-thumb-rail,
    body.single-product div.product .flexy-pills .sdp-universal-thumb-rail,
    body.single-product div.product .flexy-pills > ol,
    body.single-product div.product .flexy-pills > ul,
    body.single-product div.product ol.flex-control-nav.flex-control-thumbs,
    body.single-product div.product ul.flex-control-nav.flex-control-thumbs,
    body.single-product div.product .flex-control-thumbs {
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        grid-template-columns: none !important;
        grid-auto-flow: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 6px !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 50px !important;
        min-height: 50px !important;
        margin: 0 !important;
        padding: 3px 0 !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        white-space: nowrap !important;
        scroll-behavior: smooth !important;
        scroll-snap-type: x proximity !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch !important;
    }

    body.single-product div.product .sdp-universal-thumb-rail::-webkit-scrollbar,
    body.single-product div.product .flexy-pills > ol::-webkit-scrollbar,
    body.single-product div.product .flexy-pills > ul::-webkit-scrollbar,
    body.single-product div.product .flex-control-thumbs::-webkit-scrollbar {
        display: none !important;
    }

    body.single-product div.product .sdp-universal-thumb-rail > li,
    body.single-product div.product .flexy-pills li,
    body.single-product div.product .flex-control-thumbs li {
        box-sizing: border-box !important;
        display: block !important;
        flex: 0 0 44px !important;
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        height: 44px !important;
        min-height: 44px !important;
        max-height: 44px !important;
        margin: 0 !important;
        padding: 0 !important;
        float: none !important;
        overflow: hidden !important;
        border-radius: 8px !important;
        scroll-snap-align: start !important;
    }

    body.single-product div.product .sdp-universal-thumb-rail > li img,
    body.single-product div.product .flexy-pills li img,
    body.single-product div.product .flex-control-thumbs li img,
    body.single-product div.product .flexy-pills li .ct-media-container {
        box-sizing: border-box !important;
        display: block !important;
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        height: 44px !important;
        min-height: 44px !important;
        max-height: 44px !important;
        object-fit: cover !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 8px !important;
    }

    body.single-product div.product .sdp-thumb-nav {
        -webkit-appearance: none !important;
        appearance: none !important;
        position: absolute !important;
        top: 50% !important;
        z-index: 8 !important;
        width: 22px !important;
        height: 40px !important;
        min-width: 22px !important;
        min-height: 40px !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: translateY(-50%) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: var(--sdp-purple) !important;
        background: rgba(255,255,255,.96) !important;
        border: 1px solid var(--sdp-border) !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 8px rgba(84,34,232,.08) !important;
        font-size: 22px !important;
        line-height: 1 !important;
        cursor: pointer !important;
    }

    body.single-product div.product .sdp-thumb-prev { left: 0 !important; }
    body.single-product div.product .sdp-thumb-next { right: 0 !important; }
}

@media (max-width: 480px) {
    body.single-product div.product .flexy-view,
    body.single-product div.product .woocommerce-product-gallery .flex-viewport {
        width: min(88vw, 318px) !important;
        max-width: 318px !important;
    }

    body.single-product div.product .flexy-view .ct-media-container,
    body.single-product div.product .flexy-view img,
    body.single-product div.product .woocommerce-product-gallery__image img,
    body.single-product div.product .woocommerce-product-gallery__wrapper img {
        max-height: 318px !important;
    }

    body.single-product div.product .sdp-thumb-slider-shell {
        width: min(82vw, 276px) !important;
        max-width: 276px !important;
    }
}


/* v1.6.2 — tighter top-of-product layout and smaller title. */
body.single-product div.product .summary .product_title,
body.single-product div.product .summary h1.product_title {
    font-size: 28px !important;
    line-height: 1.12 !important;
    margin-top: 2px !important;
    margin-bottom: 4px !important;
}

@media (max-width: 768px) {
    body.single-product.sdp-product-compact .sdp-tight-product-ancestor {
        margin-top: 0 !important;
        padding-top: 0 !important;
        min-height: 0 !important;
    }

    body.single-product.sdp-product-compact .sdp-collapse-top-empty {
        display: none !important;
        height: 0 !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
    }

    body.single-product.sdp-product-compact .sdp-tight-breadcrumb,
    body.single-product.sdp-product-compact .woocommerce-breadcrumb,
    body.single-product.sdp-product-compact .ct-breadcrumbs,
    body.single-product.sdp-product-compact [class*="breadcrumb"] {
        margin-top: 0 !important;
        margin-bottom: 2px !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        min-height: 0 !important;
        line-height: 1.25 !important;
    }

    body.single-product.sdp-product-compact main,
    body.single-product.sdp-product-compact #main,
    body.single-product.sdp-product-compact .site-main {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    body.single-product.sdp-product-compact div.product,
    body.single-product.sdp-product-compact .product-entry-wrapper,
    body.single-product.sdp-product-compact .ct-product-container,
    body.single-product.sdp-product-compact .ct-container-full,
    body.single-product.sdp-product-compact .ct-container {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    body.single-product.sdp-product-compact div.product .woocommerce-product-gallery,
    body.single-product.sdp-product-compact div.product .ct-product-gallery-container,
    body.single-product.sdp-product-compact div.product .sdp-blocksy-gallery {
        margin-top: 0 !important;
    }

    body.single-product div.product .summary .product_title,
    body.single-product div.product .summary h1.product_title {
        font-size: 21px !important;
        line-height: 1.12 !important;
        margin-top: 3px !important;
        margin-bottom: 3px !important;
        letter-spacing: -0.015em !important;
    }

    body.single-product div.product .summary > .price,
    body.single-product div.product .summary p.price {
        margin-top: 0 !important;
        margin-bottom: 4px !important;
    }
}

@media (max-width: 420px) {
    body.single-product div.product .summary .product_title,
    body.single-product div.product .summary h1.product_title {
        font-size: 20px !important;
        line-height: 1.1 !important;
    }
}


/* v1.6.4 — slightly larger mobile gallery while still keeping the page compact. */
@media (max-width: 768px) {
    body.single-product div.product .flexy-view,
    body.single-product div.product .woocommerce-product-gallery .flex-viewport {
        width: min(95vw, 388px) !important;
        max-width: 388px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    body.single-product div.product .flexy-view .ct-media-container,
    body.single-product div.product .flexy-view img,
    body.single-product div.product .woocommerce-product-gallery__image img,
    body.single-product div.product .woocommerce-product-gallery__wrapper img {
        max-height: 388px !important;
    }

    body.single-product div.product .sdp-thumb-slider-shell {
        width: min(91vw, 366px) !important;
        max-width: 366px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

@media (max-width: 480px) {
    body.single-product div.product .flexy-view,
    body.single-product div.product .woocommerce-product-gallery .flex-viewport {
        width: min(calc(100vw - 18px), 392px) !important;
        max-width: 392px !important;
    }

    body.single-product div.product .flexy-view .ct-media-container,
    body.single-product div.product .flexy-view img,
    body.single-product div.product .woocommerce-product-gallery__image img,
    body.single-product div.product .woocommerce-product-gallery__wrapper img {
        max-height: 392px !important;
    }

    body.single-product div.product .sdp-thumb-slider-shell {
        width: min(calc(100vw - 28px), 370px) !important;
        max-width: 370px !important;
    }
}


/* v1.6.5 — selected shade is already shown by the active thumbnail/pill; remove duplicate preview block. */
body.single-product .summary .sdp-shade-preview {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    border: 0 !important;
}

body.single-product .summary .sdp-shade-picker {
    padding-bottom: 8px !important;
    margin-bottom: 5px !important;
}


/* v1.6.6 — remove the unnecessary shade heading text and tighten the header row. */
body.single-product .summary .sdp-shade-picker-title {
    display: none !important;
}

body.single-product .summary .sdp-shade-picker-head {
    justify-content: flex-end !important;
    margin-bottom: 8px !important;
}

@media (max-width: 768px) {
    body.single-product .summary .sdp-shade-picker-head {
        margin-bottom: 5px !important;
    }
}


/* v1.6.7 — remove the remaining top-right shade selection pill. */
body.single-product .summary .sdp-shade-picker-selected {
    display: none !important;
}

body.single-product .summary .sdp-shade-picker-head {
    display: none !important;
    margin: 0 !important;
}

body.single-product .summary .sdp-shade-picker {
    padding-top: 10px !important;
}

@media (max-width: 768px) {
    body.single-product .summary .sdp-shade-picker {
        padding-top: 8px !important;
    }
}


/* v1.7.0 — image thumbnail variation selector for every WooCommerce attribute, not only Shade. */
body.single-product .summary .sdp-variation-thumb-groups {
    width: 100%;
    display: grid;
    gap: 8px;
    margin: 5px 0 8px;
}

body.single-product .summary .sdp-variation-thumb-groups .sdp-shade-picker {
    margin: 0 !important;
}

body.single-product .sdp-variation-native-row {
    display: none !important;
}

body.single-product .summary .sdp-shade-option.is-disabled,
body.single-product .summary .sdp-shade-option:disabled {
    opacity: .38 !important;
    cursor: not-allowed !important;
    filter: grayscale(.25);
}

body.single-product .summary .sdp-shade-number {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 768px) {
    body.single-product .summary .sdp-variation-thumb-groups {
        gap: 6px;
        margin: 4px 0 6px;
    }

    body.single-product .summary .sdp-variation-thumb-picker {
        padding: 8px !important;
    }

    body.single-product .summary .sdp-variation-thumb-picker .sdp-shade-grid {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        gap: 7px !important;
        padding-bottom: 2px !important;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    body.single-product .summary .sdp-variation-thumb-picker .sdp-shade-grid::-webkit-scrollbar {
        display: none;
    }

    body.single-product .summary .sdp-variation-thumb-picker .sdp-shade-option {
        flex: 0 0 64px !important;
        width: 64px !important;
        min-width: 64px !important;
    }

    body.single-product .summary .sdp-variation-thumb-picker .sdp-shade-thumb {
        width: 54px !important;
        height: 54px !important;
    }

    body.single-product .summary .sdp-variation-thumb-picker .sdp-shade-number {
        font-size: 10.5px !important;
    }
}
