/* ==========================================================================
   PRODUCT PAGE
   ========================================================================== */

body .woocommerce div.product div.images .woocommerce-product-gallery--columns-6 .flex-control-thumbs,
body .woocommerce div.product div.images.woocommerce-product-gallery--columns-6 .flex-control-thumbs {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 12px;
	margin-top: 12px;
}
body .woocommerce div.product div.images .woocommerce-product-gallery--columns-6 .flex-control-thumbs li,
body .woocommerce div.product div.images.woocommerce-product-gallery--columns-6 .flex-control-thumbs li {
	width: auto;
	float: none;
	margin: 0;
}
body .woocommerce-product-gallery--columns-6 .flex-control-thumbs li img {
	width: 100%;
	height: 71px;
	object-fit: cover;
	border-radius: 4px;
	border: 1px solid #e6edf3;
	opacity: 0.5;
	box-sizing: border-box;
	transition: border-color 0.15s ease, opacity 0.15s ease;
}
body .woocommerce-product-gallery--columns-6 .flex-control-thumbs li img.flex-active,
body .woocommerce-product-gallery--columns-6 .flex-control-thumbs li img:hover {
	border: 2px solid #c43c6b;
	opacity: 1;
}

body .woocommerce-breadcrumb {
    display: none;
}


/* Two-column layout */
body .ts-product-layout {
    display: grid;
    grid-template-columns: 1fr 480px;
    gap: 60px;
    align-items: start;
    margin: 20px 0;
}

/* Reset WooCommerce's float-based gallery/summary inside our grid */
body .ts-single-product .woocommerce-product-gallery,
body .ts-single-product .summary {
    float: none !important;
    width: auto !important;
}

body .ts-product-gallery,
body .ts-product-summary {
    min-width: 0;
    max-width: 100%;
}

@media (min-width: 769px) {
    body .ts-product-gallery,
    body .ts-product-summary {
        overflow: hidden;
    }
}

/* ---- Gallery: main image + horizontal thumbnail strip ---- */
body .ts-product-gallery .woocommerce-product-gallery {
    opacity: 1 !important;
}

body .ts-product-gallery .woocommerce-product-gallery__wrapper {
    display: block;
    position: relative;
}

body .ts-product-gallery .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image:first-child {
    display: block;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}

body .ts-product-gallery .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image:first-child img {
    width: 100%;
    height: auto;
    display: block;
}

body .ts-product-gallery .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image:not(:first-child) {
    display: inline-block;
    width: 94px;
    margin: 0 8px 8px 0;
    border-radius: 4px;
    overflow: hidden;
    vertical-align: top;
    cursor: pointer;
}

body .ts-product-gallery .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image:not(:first-child) img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---- Left column title + summary ---- */
body .ts-product-summary .product_title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--ts-text);
    line-height: 1.25;
    margin-bottom: 8px;
}

body .ts-product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

body .ts-stars {
    color: var(--ts-gold);
    font-size: 20px;
    line-height: 1;
    letter-spacing: 1px;
}

body .ts-review-count {
    font-family: var(--ts-font);
    font-size: 12px;
    font-weight: 300;
    color: var(--ts-text-muted);
    text-decoration: none;
}

body .ts-product-summary .woocommerce-product-details__short-description {
    font-family: var(--ts-font);
    font-size: 16px;
    font-weight: 300;
    color: var(--ts-text);
    line-height: 2;
    margin-bottom: 4px;
}

/* Panel wrapper (used in variable.php) */
body .ts-product-panel {
    background: var(--ts-bg-panel);
    border: 1px solid #E6EDF3;
    border-radius: var(--ts-radius-panel);
    padding: 16px;
    color: var(--ts-text);
    font-family: var(--ts-font);
}

body .ts-product-summary .ts-product-panel form.cart {
    margin-bottom: initial!important;
}

/* Unit price above the variation grid */
body .ts-unit-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    margin-bottom: 24px;
}

body .ts-unit-price__row {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

body .ts-price-original {
    font-size: 18px;
    font-weight: 400;
    font-family: var(--ts-font);
    color: var(--ts-text-muted);
    text-decoration: line-through;
    line-height: 1.2;
}

body .ts-price-value {
    font-size: 28px;
    font-weight: 700;
    font-family: var(--ts-font);
    color: var(--ts-text);
    line-height: 1.42;
}

body .ts-price-meta {
    font-size: 16px;
    font-weight: 300;
    color: var(--ts-text-muted);
    font-family: var(--ts-font);
    line-height: 1;
}

/* Variation rows container */
body .ts-variation-rows {
    border: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

body .ts-variation-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    background: var(--ts-bg-panel);
    min-height: 48px;
}

img.ts-variation-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: var(--ts-radius-thumb);
    flex-shrink: 0;
}

body .ts-variation-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

body .ts-variation-name {
    font-size: 16px;
    font-family: var(--ts-font);
    font-weight: 500;
    color: var(--ts-text);
    line-height: 1.3;
}

body .ts-variation-subtitle {
    font-size: 12px;
    font-family: var(--ts-font);
    color: var(--ts-text-muted);
    line-height: 1.2;
}

/* Add-on (optional accessory product) */
body .ts-addon-block {
    border-top: 1px solid var(--ts-border-light);
    padding-top: 16px;
    margin-bottom: 16px;
}

body .ts-addon-heading {
    font-size: 13px;
    font-weight: 600;
    color: var(--ts-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 10px;
}

body .ts-addon-oos {
    font-size: 12px;
    color: var(--ts-text-muted);
    font-style: italic;
}

/* Price summary */
body .ts-price-summary {
    border-top: 1px solid var(--ts-border-light);
    padding: 14px 0 8px;
    margin-bottom: 24px;
    font-family: var(--ts-font);
}

body .ts-price-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 16px;
    align-items: baseline;
    padding: 5px 0;
    font-size: 16px;
    color: var(--ts-text);
    font-weight: 500;
}

body .ts-price-row > *:last-child {
    text-align: right;
    min-width: 90px;
}

body .ts-price-row > *:nth-child(2) {
    text-align: left;
    color: var(--ts-text);
}

body .ts-total-row {
    border-top: 1px solid var(--ts-border-light);
    margin-top: 8px;
    padding-top: 10px;
    font-size: 16px;
    font-weight: 700;
}

body .ts-summary-total {
    font-size: 28px;
}

body .ts-summary-discount-amount {
    color: var(--ts-discount);
}

/* Signing checkbox */
body .ts-signing-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 0;
    background: none;
    border-radius: 0;
    border-top: 1px solid var(--ts-border-light);
    border-bottom: 1px solid var(--ts-border-light);
    margin-bottom: 16px;
    cursor: pointer;
    font-family: var(--ts-font);
    font-size: 14px;
    color: var(--ts-text);
    line-height: 1.4;
}

body .ts-signing-label small {
    display: block;
    color: var(--ts-text-muted);
    font-size: 13px;
}

body .ts-signing-checkbox {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #c43c6b;
}

/* Add to cart button */
body .ts-add-to-cart-btn {
    padding: 11px 24px;
    background: var(--ts-gold);
    color: var(--ts-text);
    border: none;
    border-radius: var(--ts-radius-panel);
    font-size: 16px;
    font-family: var(--ts-font);
    font-weight: 500;
    line-height: 26px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    width: 100%;
}

body .ts-btn-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}

body .ts-btn-inner[hidden] {
    display: none;
}

body .ts-add-to-cart-btn:hover:not(:disabled) {
    background: var(--ts-gold-hover);
}

body .ts-add-to-cart-btn:disabled {
    background: var(--ts-border);
    color: #fff;
    cursor: not-allowed;
}



body .ts-payment-logo-strip {
    height: 24px;
    width: auto;
    display: block;
    opacity: 0.85;
}

/* Discount badge on gallery main image */
body .ts-product-gallery {
    position: relative;
}

/* Sharp folded-banner tag (matches Figma 925:1715): straight top/right edges,
   bottom edge angled up toward the left. Gold token #FEBE0C = --ts-gold. */
body .ts-discount-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    left: auto;
    z-index: 10;
    background: var(--ts-gold);
    color: var(--ts-text);
    font-family: var(--ts-font);
    font-weight: 700;
    width: 150px;
    min-height: 156px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 0 14px 30px;
    line-height: 1.1;
    text-align: center;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 87%);
}

body .ts-discount-badge__amount {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.05;
}

body .ts-discount-badge__label {
    font-size: 15px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 2px;
}

/* ==========================================================================
   CUSTOM MOBILE SLIDER — completely independent of WooCommerce gallery
   ========================================================================== */

/* ==========================================================================
   ADDED TO CART POPUP
   ========================================================================== */

body .ts-cart-popup {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

body .ts-cart-popup:not([hidden]) {
    display: flex;
}

body .ts-cart-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s;
}

body .ts-cart-popup--open .ts-cart-popup__overlay {
    opacity: 1;
}

body .ts-cart-popup__panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    border-radius: var(--ts-radius-panel);
    overflow: hidden;
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

body .ts-cart-popup--open .ts-cart-popup__panel {
    transform: scale(1);
    opacity: 1;
}

/* Header — teal */
body .ts-cart-popup__header {
    background: #0e8a96;
    color: #fff;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

body .ts-cart-popup__header-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

body .ts-cart-popup__msg {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

body .ts-cart-popup__msg-main {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-family: var(--ts-font);
    font-size: 16px;
    font-weight: 500;
    line-height: 16px;
    letter-spacing: -0.24px;
}

body .ts-cart-popup__msg-main svg {
    flex-shrink: 0;
    margin-top: -1px;
}

body .ts-cart-popup__msg-sub {
    font-family: var(--ts-font);
    font-size: 12px;
    font-weight: 400;
    margin: 0;
    padding-left: 24px;
    padding-top: 7px;
    opacity: 0.9;
}

body .ts-cart-popup__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

body .ts-cart-popup__btn-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background: var(--ts-gold);
    color: var(--ts-text);
    border: none;
    border-radius: 10px;
    font-family: var(--ts-font);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    line-height: 20px;
    letter-spacing: -0.21px;
    cursor: pointer;
    white-space: nowrap;
}

body .ts-cart-popup__btn-cart:hover {
    background: var(--ts-gold-hover);
    color: var(--ts-text);
}

body .ts-cart-popup__btn-continue {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #fff;
    font-family: var(--ts-font);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    line-height: 20px;
    letter-spacing: -0.21px;
    padding: 12px 0;
    white-space: nowrap;
}

body .ts-cart-popup__btn-continue svg {
    flex-shrink: 0;
}

body .ts-cart-popup__close {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
    line-height: 1;
}

/* Body — cross-sells */
body .ts-cart-popup__body {
    background: var(--ts-bg-panel);
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
}

body .ts-cart-popup__cross-title {
    font-family: var(--ts-font-heading);
    font-size: 21px;
    font-weight: 700;
    color: var(--ts-text);
    margin: 0 0 16px;
    line-height: 28px;
}

body .ts-cart-popup__cross-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* Cross-sell product card */
body .ts-cross-popup__card {
    border: 1px solid var(--ts-border-light);
    border-radius: var(--ts-radius-input);
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
}

body .ts-cross-popup__image {
    display: block;
    height: 155px;
    overflow: hidden;
    background: var(--ts-border-light);
}

body .ts-cross-popup__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

body .ts-cross-popup__info {
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

body .ts-cross-popup__name {
    font-family: var(--ts-font);
    font-size: 16px;
    font-weight: 500;
    color: var(--ts-text);
    line-height: 1.2;
    margin: 0;
}

body .ts-cross-popup__rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    line-height: 16px;
}

body .ts-star {
    color: var(--ts-border-light);
}

body .ts-star--filled {
    color: var(--ts-gold);
}

body .ts-cross-popup__count {
    font-family: var(--ts-font);
    font-size: 12px;
    color: var(--ts-text-muted);
}

body .ts-cross-popup__prices {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    justify-content: flex-end;
}

body .ts-cross-popup__old-price {
    font-size: 12px;
    font-weight: 300;
    color: var(--ts-text-muted);
    text-decoration: line-through;
}

body .ts-cross-popup__price {
    font-family: var(--ts-font);
    font-size: 16px;
    font-weight: 700;
    color: var(--ts-text);
    line-height: 16px;
}

body .ts-cross-popup__add {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--ts-accent);
    font-family: var(--ts-font);
    font-size: 14px;
    font-weight: 500;
    text-decoration: underline;
    cursor: pointer;
    padding: 5px 0;
}

/* ==========================================================================
   END POPUP
   ========================================================================== */

/* Hidden on desktop */
body .ts-mobile-slider {
    display: none;
}

/* ---------- Product page — mobile ---------- */
@media (max-width: 768px) {
    body .site-main {
        padding-inline-end : 12px;
        padding-inline-start: 12px;
        padding: 0 12px;
    }

    body .ts-product-layout {
        grid-template-columns: 1fr;
        gap: 24px;
        max-width: 100%;
    }

    /* Hide WooCommerce gallery on mobile, show our slider */
    body .ts-product-gallery .woocommerce-product-gallery {
        display: none !important;
    }

    body .ts-mobile-slider {
        display: block;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        width: 100vw;
        overflow: hidden;
        border-radius: 0;
    }

    body .ts-mobile-slider__track {
        display: flex;
        transition: transform 0.3s ease;
    }

    body .ts-mobile-slider__slide {
        flex: 0 0 100%;
        width: 100%;
    }

    body .ts-mobile-slider__slide img {
        width: 100%;
        height: auto;
        display: block;
    }

    /* Arrow buttons */
    body .ts-mobile-slider__arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 5;
        width: 48px;
        height: 48px;
        border-radius: var(--ts-radius-panel);
        background: var(--ts-bg-panel);
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
        padding: 0;
    }

    body .ts-mobile-slider__arrow--prev {
        left: 8px;
    }

    body .ts-mobile-slider__arrow--next {
        right: 8px;
    }

    body .ts-mobile-slider__arrow svg {
        width: 20px;
        height: 20px;
        stroke: var(--ts-text);
        fill: none;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    /* Dot indicators */
    body .ts-mobile-slider__dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        padding: 12px 0;
    }

    body .ts-mobile-slider__dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--ts-border-light);
        border: none;
        padding: 0;
        cursor: pointer;
        transition: background 0.2s;
    }

    body .ts-mobile-slider__dot--active {
        background: var(--ts-text);
    }

    body .ts-variation-row {
        flex-wrap: wrap;
    }

    body .ts-variation-info {
        min-width: 0;
    }

    body .ts-variation-name {
        font-size: 13px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body .ts-qty-control {
        margin-left: auto;
    }

    body .ts-payment-logos {
        display: none;
    }
}

/* Product extra-content slot (above variation selector) */
body .ts-product-extra {
    display: block;
    width: 100%;
    margin-bottom: 16px;
}

/* Pre-sale ship date line (variation rows on the product page) */
body .ts-presale-line {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #FF4D6D;
    font-family: var(--ts-font, 'Montserrat', sans-serif);
    font-size: 13px;
    font-weight: 500;
    line-height: 16px;
}

body .ts-presale-line__icon-wrap {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

body .ts-presale-line__icon {
    display: block;
    width: 14px;
    height: 14px;
}

body .ts-variation-presale {
    display: block;
    margin-top: 4px;
}
