/* -----------------------------------------
   TBP PRODUCT DETAIL PAGE (Figma design)
----------------------------------------- */

body.tbp-product-page .woocommerce-breadcrumb,
body.tbp-product-page .woocommerce-products-header,
body.tbp-product-page .product .onsale,
body.tbp-product-page .woocommerce-notices-wrapper .woocommerce-message,
body.tbp-product-page .woocommerce-message {
    display: none !important;
}

/* Two-column layout */
body.tbp-product-page div.product {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px 70px;
    align-items: start;
    max-width: 1200px;
    margin: 40px auto 80px;
}

body.tbp-product-page div.product .woocommerce-product-gallery,
body.tbp-product-page div.product .summary {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
}

/* -------------------- GALLERY -------------------- */
body.tbp-product-page .woocommerce-product-gallery__wrapper {
    margin: 0;
}

body.tbp-product-page .woocommerce-product-gallery__image,
body.tbp-product-page .woocommerce-product-gallery__image a,
body.tbp-product-page .woocommerce-product-gallery__image img {
    border-radius: 4px;
}

body.tbp-product-page .woocommerce-product-gallery__image {
    background: #e3e3e3;
    overflow: hidden;
}

body.tbp-product-page .woocommerce-product-gallery__image img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Gallery thumbnails under main image */
body.tbp-product-page .flex-control-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

body.tbp-product-page .flex-control-thumbs li {
    width: 72px;
    height: 72px;
    margin: 0;
    float: none;
}

body.tbp-product-page .flex-control-thumbs li img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    background: #e3e3e3;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}

body.tbp-product-page .flex-control-thumbs li img:hover,
body.tbp-product-page .flex-control-thumbs li img.flex-active {
    opacity: 1;
    border-color: #111111;
}

/* -------------------- SUMMARY -------------------- */
body.tbp-product-page .summary .product_title {
    font-size: 2.4rem;
    font-weight: 700;
    color: #111111;
    line-height: 1.15;
    margin: 0 0 18px;
}

body.tbp-product-page .summary .woocommerce-product-details__short-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #2b2b2b;
    margin-bottom: 22px;
}

body.tbp-product-page .summary .woocommerce-product-details__short-description p {
    margin: 0 0 10px;
}

/* Price + quantity row (built by JS at the top of form.cart) */
body.tbp-product-page .tbp-pp-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 22px;
    margin-bottom: 22px;
    border-bottom: 1px solid #d7d7d7;
}

body.tbp-product-page .tbp-pp-price-row .price {
    font-size: 1.35rem;
    font-weight: 700;
    color: #e05b2b !important;
    margin: 0 !important;
}

body.tbp-product-page .tbp-pp-price-row .price del {
    opacity: 0.5;
    font-weight: 500;
    margin-right: 8px;
}

body.tbp-product-page .tbp-pp-price-row .price ins {
    text-decoration: none;
}

/* Quantity stepper */
body.tbp-product-page .tbp-pp-qty {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

body.tbp-product-page .tbp-pp-qty-btn {
    -webkit-appearance: none;
    appearance: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #b9b9b9 !important;
    background: #ffffff !important;
    color: #6b6b6b !important;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: none;
    transition: border-color 0.15s ease, color 0.15s ease;
}

body.tbp-product-page .tbp-pp-qty-btn:hover {
    border-color: #111111 !important;
    color: #111111 !important;
}

body.tbp-product-page .tbp-pp-qty .quantity {
    margin: 0 !important;
    float: none !important;
}

body.tbp-product-page .tbp-pp-qty input.qty {
    width: 44px;
    height: 38px;
    border: 1.5px solid #111111;
    border-radius: 8px;
    background: #ffffff;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: #111111;
    padding: 0;
    -moz-appearance: textfield;
}

body.tbp-product-page .tbp-pp-qty input.qty::-webkit-outer-spin-button,
body.tbp-product-page .tbp-pp-qty input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* -------------------- VARIATIONS / SWATCHES -------------------- */
body.tbp-product-page table.variations {
    border: none;
    margin: 0 0 8px;
}

body.tbp-product-page table.variations tr {
    display: block;
    margin-bottom: 18px;
}

body.tbp-product-page table.variations th.label,
body.tbp-product-page table.variations td.value {
    display: block;
    padding: 0;
    border: none;
    background: transparent;
}

body.tbp-product-page table.variations th.label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 10px;
}

body.tbp-product-page table.variations th.label label {
    font-weight: 500;
    margin: 0;
}

/* Swatch plugin items (Variation Swatches for WooCommerce & similar) */
body.tbp-product-page .variable-items-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 !important;
    padding: 0;
}

body.tbp-product-page .variable-items-wrapper .variable-item {
    min-width: 34px;
    height: 34px;
    margin: 0 !important;
    border: 1px solid #c4c4c4;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

body.tbp-product-page .variable-items-wrapper .variable-item:hover {
    border-color: #111111;
}

body.tbp-product-page .variable-items-wrapper .variable-item.selected,
body.tbp-product-page .variable-items-wrapper .variable-item.selected:hover {
    border-color: #111111;
    box-shadow: 0 0 0 1px #111111 !important;
}

body.tbp-product-page .variable-items-wrapper .variable-item.button-variable-item.selected {
    background: #111111;
    color: #ffffff;
}

body.tbp-product-page .variable-items-wrapper .color-variable-item span.variable-item-span {
    border-radius: 4px;
}

/* Hide redundant native bits */
body.tbp-product-page .woocommerce-variation-price,
body.tbp-product-page .woocommerce-variation-availability,
body.tbp-product-page .reset_variations {
    display: none !important;
}

/* -------------------- CATEGORY ADD-ONS (trip modal parity) -------------------- */
body.tbp-product-page .tbp-pp-addons {
    margin: 18px 0 8px;
    padding: 16px 18px;
    background: #f3f4f6;
    border-radius: 10px;
}

body.tbp-product-page .tbp-pp-addons__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

body.tbp-product-page .tbp-pp-addons__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #111111;
}

body.tbp-product-page .tbp-pp-addons__hint {
    margin: 4px 0 0;
    font-size: 0.78rem;
    color: #64748b;
}

body.tbp-product-page .tbp-pp-addons__badge {
    flex-shrink: 0;
    padding: 2px 12px;
    border-radius: 4px;
    background: var(--tbp-primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
}

body.tbp-product-page .tbp-pp-addons__list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid #e0e0e0;
}

body.tbp-product-page .tbp-pp-addon-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 10px 4px;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background 0.15s ease;
}

body.tbp-product-page .tbp-pp-addon-row:last-child {
    border-bottom: none;
}

body.tbp-product-page .tbp-pp-addon-row:hover {
    background: rgba(255, 255, 255, 0.55);
}

body.tbp-product-page .tbp-pp-addon-row__title {
    font-size: 0.85rem;
    color: #1a1a1a;
    line-height: 1.4;
}

body.tbp-product-page .tbp-pp-addon-row__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

body.tbp-product-page .tbp-pp-addon-row__price {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

body.tbp-product-page .tbp-pp-addon-row__check {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 1px solid #9ca3af;
    background: #fff;
    color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

body.tbp-product-page .tbp-pp-addon-row.is-selected .tbp-pp-addon-row__check {
    border-color: #111;
    background: #111;
    color: #fff;
}

body.tbp-product-page .tbp-pp-addon-row__qty {
    display: none;
    align-items: center;
    gap: 6px;
}

body.tbp-product-page .tbp-pp-addon-row.is-selected .tbp-pp-addon-row__qty {
    display: inline-flex;
}

body.tbp-product-page .tbp-pp-addon-qty-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid #1a1a1a;
    background: #fff;
    color: #1a1a1a;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* -------------------- TOTAL + BUTTONS -------------------- */
body.tbp-product-page .tbp-pp-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 22px;
    margin: 6px 0 18px;
    border-top: 1px solid #d7d7d7;
}

body.tbp-product-page .tbp-pp-total-label {
    font-size: 0.95rem;
    color: #1a1a1a;
}

body.tbp-product-page .tbp-pp-total-value {
    font-size: 1rem;
    font-weight: 500;
    color: #111111;
}

body.tbp-product-page .tbp-pp-actions {
    display: flex;
    gap: 16px;
    width: 100%;
}

body.tbp-product-page .tbp-pp-actions .single_add_to_cart_button,
body.tbp-product-page .tbp-pp-actions .tbp-pp-confirm-btn {
    flex: 1 1 0;
    min-width: 0;
    height: 48px;
    border-radius: 4px !important;
    border: 1.5px solid #111111 !important;
    background: #111111 !important;
    color: #ffffff !important;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    padding: 0 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
    transition: background 0.2s ease, color 0.2s ease;
}

body.tbp-product-page .tbp-pp-actions .single_add_to_cart_button:hover,
body.tbp-product-page .tbp-pp-actions .tbp-pp-confirm-btn:hover {
    background: #2b2b2b !important;
    color: #ffffff !important;
}

body.tbp-product-page .tbp-pp-actions .single_add_to_cart_button.disabled,
body.tbp-product-page .tbp-pp-actions .single_add_to_cart_button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Keep the variation wrap full width */
body.tbp-product-page .woocommerce-variation-add-to-cart {
    display: block;
}

/* -------------------- CART SUMMARY BAR -------------------- */
.tbp-pp-cart-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    max-width: 1200px;
    margin: 24px auto 0;
    padding: 12px 18px;
    background: #fdf2ec;
    border: 1px solid #f0c9b4;
    border-radius: 10px;
    font-size: 0.85rem;
    color: #1a1a1a;
}

.tbp-pp-cart-bar__label {
    font-weight: 700;
    color: #e05b2b;
    flex-shrink: 0;
}

.tbp-pp-cart-bar__item {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.tbp-pp-cart-bar__item strong {
    font-weight: 600;
}

.tbp-pp-cart-bar__price {
    font-weight: 700;
    color: #111111;
}

.tbp-pp-cart-bar__price .woocommerce-Price-amount {
    color: inherit;
}

.tbp-pp-cart-bar__qty {
    color: #555555;
}

.tbp-pp-cart-bar__variation {
    color: #555555;
    font-size: 0.8rem;
}

.tbp-pp-cart-bar__btn {
    margin-left: auto;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 16px;
    border-radius: 4px;
    background: #e05b2b;
    color: #ffffff !important;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s ease;
}

.tbp-pp-cart-bar__btn:hover,
.tbp-pp-cart-bar__btn:focus {
    background: #c84d22;
    color: #ffffff !important;
}

@media (max-width: 600px) {
    .tbp-pp-cart-bar {
        margin-top: 14px;
        padding: 10px 14px;
        font-size: 0.78rem;
    }

    .tbp-pp-cart-bar__btn {
        margin-left: 0;
        width: 100%;
    }
}

/* -------------------- RESPONSIVE -------------------- */
@media (max-width: 900px) {
    body.tbp-product-page div.product {
        grid-template-columns: 1fr;
        gap: 30px;
        margin: 20px auto 60px;
    }

    body.tbp-product-page .summary .product_title {
        font-size: 1.8rem;
    }
}

@media (max-width: 600px) {
    body.tbp-product-page .summary .product_title {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }

    body.tbp-product-page .summary .woocommerce-product-details__short-description {
        font-size: 0.88rem;
    }

    body.tbp-product-page .tbp-pp-price-row {
        padding-bottom: 16px;
        margin-bottom: 16px;
    }

    body.tbp-product-page .tbp-pp-price-row .price {
        font-size: 1.15rem;
    }

    body.tbp-product-page .flex-control-thumbs li {
        width: 56px;
        height: 56px;
    }

    body.tbp-product-page .tbp-pp-actions {
        flex-direction: row;
        gap: 10px;
    }

    body.tbp-product-page .tbp-pp-actions .single_add_to_cart_button,
    body.tbp-product-page .tbp-pp-actions .tbp-pp-confirm-btn {
        width: 100%;
        height: 46px;
    }
}

.tbp-pass-purchase-notice {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #334155;
    font-size: 0.9rem;
}

.tbp-pass-purchase-notice--warning {
    background: #fff7ed;
    color: #9a3412;
}
