/* ===== Product summary / Magento2-style buy box ===== */
.tp-m2-summary {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.tp-m2-summary-inner {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.04);
    margin-top: 0;
}

/* Header: title + price on right */
.tp-m2-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    height: auto;
}

.tp-m2-title-wrap .product_title {
    font-size: 1.6rem;
    margin: 0 0 4px;
    letter-spacing: 0.03em;
}

.tp-m2-sku {
    font-size: 0.85rem;
    color: #6f6a64;
}

.tp-m2-price-wrap {
    text-align: right;
    min-width: 110px;
}

.tp-m2-price-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #a08b7a;
}

.tp-m2-price-wrap .price {
    margin: 2px 0 0;
}

.tp-m2-price-wrap .woocommerce-Price-amount {
    font-size: 1.4rem;
    font-weight: 700;
    color: #624837;
}

/* Price reset (consolidated) */
.tp-m2-summary .price {
    float: none !important;
    position: static !important;
    margin: 0 !important;
}

/* Badges row (consolidated) */
.tp-m2-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
    clear: both;
    margin-top: 6px;
}

.tp-m2-badge {
    font-size: 0.78rem;
    border-radius: 999px;
    padding: 3px 10px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #f5f1ea;
    color: #4b3b30;
    white-space: nowrap;
}

.tp-m2-badge--in-stock {
    background: #e6f6ea;
    color: #166534;
    border-color: #bbf7d0;
}

.tp-m2-badge--pickup {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

/* Description */
.tp-m2-short {
    font-size: 0.92rem;
    line-height: 1.5;
    color: #4b3b30;
    margin-bottom: 14px;
}

.tp-m2-allergen {
    display: inline-block;
    margin-left: 4px;
    font-weight: 600;
    color: #b91c1c;
    font-size: 0.85rem;
}

/* BUY BOX layout */
.tp-m2-buybox {
    display: grid;
    /* grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); */
    gap: 16px;
    flex-direction: column;
    align-items: flex-start;
    padding :10px;
    border-radius: 10px;
    /* background: #f8f4ee; */
    border: 1px solid rgba(0, 0, 0, 0.03);
    margin-bottom: 10px;
}

/* Qty */
.tp-m2-qty-block {
    min-width: 0;
}

.tp-m2-qty-label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: #7a6a5d;
    margin-bottom: 4px;
}

.tp-m2-qty-wrap {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid #d1c4b8;
    overflow: hidden;
    background: #fff;
}

.tp-m2-qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #624837;
}

.tp-m2-qty-btn:hover {
    background: #f3f0eb;
}

.tp-m2-qty-input {
    width: 44px !important;
    border: none !important;
    text-align: center;
    font-size: 0.95rem;
    padding: 0;
    box-shadow: none;
}

.tp-m2-qty-input:focus {
    outline: none;
    box-shadow: none;
}

.tp-m2-qty-note {
    margin-top: 4px;
    font-size: 0.78rem;
    color: #7a6a5d;
}

/* CTA column */
.tp-m2-cta-block {
    /* display: flex; */
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    text-align: center !important;
}

.tp-m2-addtocart {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px !important;
    padding: 10px 50px !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, #e6b26f, #c67a3f) !important;
    border: none !important;
    color: #1f130b !important;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-size: 0.82rem;
}

.tp-m2-addtocart:hover {
    filter: brightness(0.97);
}

.tp-m2-cart-icon {
    font-size: 1rem;
}

.tp-m2-cta-meta {
    font-size: 0.8rem;
    color: #6b5a4b;
}

.tp-m2-location-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 10px;
    background: #fff;
    border: 1px solid #e5ddd3;
    margin-bottom: 2px;
}

/* Reassurance row */
.tp-m2-reassure {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    border-top: 1px dashed #e0d5c9;
    padding-top: 10px;
    margin-top: 4px;
}

.tp-m2-reassure-item {
    font-size: 0.78rem;
    color: #7a6a5d;
}

/* Woo Stock/Availability Cleanup */
.tp-m2-summary .stock,
.tp-m2-summary .woocommerce-variation-availability,
.single-product .summary .stock {
    display: none !important;
}

/* ==== Product layout: gallery left, summary right (Desktop) ==== */
.tp-m2-layout,
.oneColContent .product {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    margin-top: 10px;
}

/* left column: gallery */
.tp-m2-layout .woo-product-gallery-slider {
    flex: 0 0 42%;
    max-width: 480px;
    margin-bottom: 0;
}

.woo-product-gallery-slider {
    flex: 0 0 45%;
    max-width: 45%;
}

/* Kill inline Slick styles */
.woo-product-gallery-slider .slick-list,
.woo-product-gallery-slider .slick-track,
.woo-product-gallery-slider .woocommerce-product-gallery__image {
    width: 100% !important;
    left: 0 !important;
}

.woo-product-gallery-slider img {
    display: block;
    width: 100%;
    height: auto;
}

/* right column: summary */
.tp-m2-layout .tp-m2-summary {
    flex: 1 1 0;
    max-width: 650px;
}

.tp-m2-summary {
    flex: 1 1 0;
    max-width: 55%;
    margin-left: 0;
    margin-right: 0;
}

/* ====== PRODUCT GALLERY / VARIANT CAROUSEL ====== */

.woo-product-gallery-slider.woocommerce-product-gallery.wpgs--with-images.images {
    max-width: 620px;
    margin: 0 auto 20px;
}

/* Main image wrapper */
.tp-main-image-wrap {
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: #f5f1ea;
}

#tp-main-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Thumbs container: Retained for Flex setup around Swiper */
.tp-prod-thumbs {
    /* display: flex; REMOVED by Swiper base styles on .swiper */
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

/* Arrow buttons: REMOVED as Swiper takes over this styling */
/* .tp-prod-thumb-arrow {} */

/* Track: horizontal strip of thumbs: REMOVED, Swiper handles wrapper styles */
/* .tp-prod-thumbs-track {} */

/* Optional: nicer scrollbar on desktop: REMOVED, Swiper handles its own scrollbars/layout */
/* .tp-prod-thumbs-track::-webkit-scrollbar {} */
/* .tp-prod-thumbs-track::-webkit-scrollbar-thumb {} */

/* Each thumb button: Retained, though button inside slide is now better */
.tp-prod-thumb {
    flex: 0 0 auto;
    /* border: 0; REMOVED, apply to button inside */
    /* padding: 0; REMOVED, apply to button inside */
    background: none;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
    opacity: 0.8;
    transition: transform .12s ease, opacity .12s ease, box-shadow .12s ease;
}

.tp-prod-thumb img {
    display: block;
    /* width: 79px !important; */
    height: 65px !important;
    object-fit: cover;
    padding: 2px;
    margin-left: -2px;
}

/* Active thumb */
.tp-prod-thumb.is-active {
    opacity: 1;
    box-shadow: 0 0 0 2px #e5b26f;
    transform: translateY(-1px);
}

.tp-pulse {
    animation: tp-pulse 0.4s ease-out;
}

@keyframes tp-pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}


/* ===== Related products / Magento2-style grid ===== */

.tp-related {
    margin-top: 40px;
    text-align: center;
}

.tp-related > h2 {
    font-size: 1.35rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #5a3b2a;
    margin: 0 0 18px;
}

/* Centered row, wraps nicely */
.tp-related-grid {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;   /* <-- centers the row */
    gap: 24px;
    max-width: 1300px;         /* optional: keep it from going crazy wide */
}

/* Cards: fixed-ish width so centering looks clean */
.tp-related-item {
    flex: 0 1 280px;           /* basis ~280px, shrink if needed */
    max-width: 320px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    padding: 14px 14px 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.10);
    border: 1px solid rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.tp-related-price {
    margin-bottom: 10px;
}

.tp-related-title {
    font-size: 19px;
    font-weight: 700;
    /* line-height: 24px; */
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-top: 10px;
}

.tp-addons-root {
    margin-bottom: 1.75rem;
    padding: 1.1rem 1.3rem;
    border-radius: 14px;
    border: 1px solid #ead9c7;
    background: #fbf7f2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    font-size: 0.9rem;
}

.tp-addon-group:not(:last-child) {
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px dashed #e1d2c1;
}

.tp-addon-group-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.35rem;
    cursor: pointer;
}

.tp-addon-group-header-left {
    flex: 1 1 auto;
    min-width: 0;
}

.tp-addon-group-header-right {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
}

.tp-addon-group-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #624837;
}

.tp-addon-group-desc {
    margin-top: 0.15rem;
    color: #8a6b4a;
    font-size: 0.85rem;
}

.tp-addon-group-meta {
    text-align: right;
    font-size: 0.78rem;
    color: #a28764;
}

.tp-addon-group-meta span + span {
    margin-left: 0.35rem;
}

.tp-addon-required {
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: #f6e3cf;
    color: #7d5132;
    font-weight: 500;
}

.tp-addon-arrow {
    font-size: 0.9rem;
    color: #8a6b4a;
}

/* slightly dim collapsed groups */
.tp-addon-group.is-collapsed .tp-addon-group-title {
    color: #7b634a;
}

/* options list */

.tp-addon-options {
    margin-top: 0.25rem;
}

.tp-addon-option-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    gap: 0.75rem;
}

.tp-addon-option-info {
    flex: 1 1 auto;
    min-width: 0;
}

.tp-addon-option-name {
    font-size: 0.9rem;
    color: #4b3425;
    font-weight: 500;
}

.tp-addon-option-price {
    font-size: 0.8rem;
    color: #8a6b4a;
}

.tp-addon-option-controls {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* plus/minus buttons */

.tp-addon-btn {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid #d1b79a;
    background: #ffffff;
    color: #7a5a3d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    padding: 0;
    transition: background 0.12s ease, transform 0.05s ease, box-shadow 0.12s ease;
}

.tp-addon-btn:hover {
    background: #f3e3d3;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.tp-addon-btn:active {
    transform: translateY(1px);
    box-shadow: none;
}

.tp-addon-qty {
    min-width: 18px;
    text-align: center;
    font-size: 0.85rem;
    color: #4b3425;
}

@media (max-width: 768px) {
    .tp-addons-root {
        margin-bottom: 1.25rem;
        padding: 0.9rem 1rem;
    }
}

/* === Buybox: 3 stacked cards: addons / qty / CTA === */

/*
.tp-m2-buybox {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    margin-top: 0.75rem;
}
*/

.tp-buybox-card {
    width: 100%;
    box-sizing: border-box;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #ead9c7;
    padding: 1rem 1.3rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.tp-buybox-card-heading {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #a28764;
    margin-bottom: 0.45rem;
}

/* keep CTA card a bit tighter */
.tp-buybox-card--cta {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

.tp-m2-atc-block {
    margin-bottom: 0.35rem;
}

.tp-m2-atc-note {
    margin: 0;
    font-size: 0.8rem;
    color: #8a6b4a;
}

/* avoid double box inside addons card */
.tp-buybox-card--addons .tp-addons-root {
    margin: 0;
    padding: 0.4rem 0 0;
    border-radius: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

/* (Keep the rest as you already have: .tp-related-link, img, title, price, button, etc.) */

/* Mobile tweaks – flex will naturally stack, but you can tighten gaps if you want */
@media (max-width: 640px) {
    .tp-related-grid {
        gap: 16px;
    }
}

/* === Responsive tweaks === */

/* Tablet/Small Desktop Layout: Stack gallery/summary (max-width: 900px) */
@media (max-width: 900px) {
    .tp-m2-layout {
        display: block;
    }

    .tp-m2-layout .woo-product-gallery-slider {
        margin-bottom: 12px;
    }

    .tp-m2-layout .tp-m2-summary {
        width: 100% !important;
        max-width: 100%;
        margin: 0 auto 16px;
    }
}

/* Mobile / Tablet (max-width: 768px) */
@media (max-width: 768px) {
    /* Header/Price Layout */
    .tp-m2-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .tp-m2-price-wrap {
        text-align: left;
        display: flex;
        align-items: baseline;
        gap: 6px;
        margin-top: 2px;
    }

    .tp-m2-price-label {
        font-size: 0.9rem;
        text-transform: none;
        letter-spacing: 0;
        color: #7a6a5d;
    }

    .tp-m2-price-wrap .price {
        margin: 0;
    }



    /* Full Product Layout (oneColContent) */
    .oneColContent .product {
        flex-direction: column;
        gap: 12px;
    }

    .woo-product-gallery-slider {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
        margin: 0 auto 8px;
        overflow: hidden;
    }

    .woo-product-gallery-slider .slick-list,
    .woo-product-gallery-slider .slick-track,
    .woo-product-gallery-slider .woocommerce-product-gallery__image {
        width: 100% !important;
    }

    .tp-m2-summary {
        max-width: 100%;
        width: 100% !important;
    }

    /* Hide breadcrumb on mobile */
    #woocommerce-breadcrumb,
    nav.woocommerce-breadcrumb[aria-label="Breadcrumb"] {
        display: none;
    }

    /* Mobile gallery tweaks */
    .woo-product-gallery-slider.woocommerce-product-gallery.wpgs--with-images.images {
        margin-bottom: 14px;
    }
}
