/**
 * Toy Kingdom Product Detail Page Styles
 * Matches reference design exactly
 */

/* Main Product Detail Wrapper - Full Width Background */
.toy-kingdom-product-detail-wrapper {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background: #FFEDE0;
    padding: 0;
}

#main-content{
    padding: 0 !important;
}

/* Main Product Detail Container */
.toy-kingdom-product-detail {
    padding: 0 0 40px 0;
    min-height: 100%;
}

.product-detail-wrapper {
    display: grid;
    grid-template-columns: 0.75fr 1.25fr;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Product Image Section with Zoom Support */
.product-image-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toy-kingdom-gallery {
    position: relative;
}

.wrap-detail-gallery {
    position: relative;
}

.product-detail-gallery-js .mid {
    position: relative;
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    margin-bottom: 12px;
}

.product-detail-gallery-js .mid img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    cursor: crosshair;
}

/* Thumbnails Gallery */
.gallery-control {
    margin-top: 8px;
    width: 100% !important;
}

.gallery-control .toy-kingdom-thumbnails,
.gallery-control .gallery-slider.toy-kingdom-thumbnails,
.gallery-control .carousel.toy-kingdom-thumbnails {
    display: flex !important;
    gap: 8px !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    padding: 5px 0 !important;
    position: relative !important;
}

/* Override slick slider styles for thumbnails - force flexbox layout */
.gallery-control .toy-kingdom-thumbnails.slick-slider,
.gallery-control .toy-kingdom-thumbnails.slick-initialized {
    display: flex !important;
}

.gallery-control .toy-kingdom-thumbnails .slick-list {
    display: flex !important;
    width: 100% !important;
    overflow: visible !important;
}

.gallery-control .toy-kingdom-thumbnails .slick-track {
    display: flex !important;
    width: 100% !important;
    transform: none !important;
    left: 0 !important;
}

.gallery-control .toy-kingdom-thumbnails .slick-slide {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    width: auto !important;
    height: auto !important;
    display: flex !important;
    float: none !important;
}

.gallery-control .toy-kingdom-thumbnails .slick-slide > div {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
}

.gallery-control .toy-kingdom-thumbnails a {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    border: 2px solid transparent !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    width: 100% !important;
    min-height: 150px !important;
    height: 150px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.gallery-control .toy-kingdom-thumbnails a.active {
    border-color: #FF6B35 !important;
}

.gallery-control .toy-kingdom-thumbnails a img {
    width: 100% !important;
    height: 100% !important;
    min-height: 150px !important;
    object-fit: cover !important;
    display: block !important;
}

/* Zoom Container Styles */
.zoomContainer {
    z-index: 999;
}

.zoomWindow {
    border: 1px solid #ccc;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.zoomLens {
    border: 1px solid #FF6B35;
    background: rgba(255, 107, 53, 0.1);
}

/* Product Info Section */
.product-info-section {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px;
}

.product-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.product-availability {
    font-size: 16px;
    margin-bottom: 10px;
}

.in-stock {
    color: #50C878;
    font-weight: 600;
}

.out-of-stock {
    color: #FF6B35;
    font-weight: 600;
}

/* Price Section */
.product-price-section {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.old-price {
    font-size: 20px;
    color: #999;
    text-decoration: line-through;
}

.current-price {
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

.save-badge {
    background: #50C878;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    margin-left: 10px;
}

/* Quantity and Add to Cart Section */
.product-quantity-addcart-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
    order: 1 !important;
}

.quantity-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-wrapper label {
    font-weight: 600;
    color: #333;
    margin: 0;
}

.quantity-input-wrapper {
    position: relative;
}

.quantity {
    display: flex !important;
    align-items: center;
    gap: 0;
    background: #FF6B35 !important;
    border-radius: 8px;
    padding: 4px;
    border: none !important;
}

.quantity input[type="number"] {
    width: 50px;
    text-align: center;
    border: none !important;
    background: #fff !important;
    padding: 8px 4px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    -moz-appearance: textfield;
    appearance: textfield;
    margin: 0 4px;
}

.quantity input[type="number"]::-webkit-outer-spin-button,
.quantity input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

/* Remove square buttons, keep only rounded ones */
.quantity .minus,
.quantity .plus,
.quantity button[type="button"],
.quantity-input-wrapper button,
.product-quantity-addcart-section .quantity button {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    border: none !important;
    background: #fff !important;
    border-radius: 50% !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: #333 !important;
    padding: 0 !important;
    margin: 0 4px !important;
    line-height: 1;
    box-shadow: none !important;
}

.quantity .minus:hover,
.quantity .plus:hover,
.quantity button[type="button"]:hover,
.quantity-input-wrapper button:hover {
    background: #f0f0f0 !important;
}

/* Override WooCommerce default quantity input styling */
.quantity-input-wrapper .quantity,
.product-quantity-addcart-section .quantity {
    display: flex !important;
    align-items: center;
    background: #FF6B35 !important;
    border-radius: 8px;
    padding: 4px;
    border: none !important;
}

/* Variable Product Variations - Display inline on ONE line */
.toy-kingdom-product-detail .variations,
.toy-kingdom-product-detail-page .variations,
.product-info-section .variations {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 15px !important;
    align-items: center !important;
    margin-bottom: 0 !important;
    width: 100% !important;
    overflow-x: auto !important;
}

.toy-kingdom-product-detail .variations .detail-attr,
.toy-kingdom-product-detail-page .variations .detail-attr,
.product-info-section .variations .detail-attr {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 0 !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
}

.toy-kingdom-product-detail .variations .detail-attr .title-atttr,
.toy-kingdom-product-detail-page .variations .detail-attr .title-atttr,
.product-info-section .variations .detail-attr .title-atttr {
    margin: 0 !important;
    margin-right: 5px !important;
    white-space: nowrap !important;
    font-weight: 600 !important;
    color: #333 !important;
    flex-shrink: 0 !important;
}

.toy-kingdom-product-detail .variations .detail-attr .select-box,
.toy-kingdom-product-detail-page .variations .detail-attr .select-box,
.product-info-section .variations .detail-attr .select-box {
    min-width: 150px !important;
    flex-shrink: 0 !important;
    background: #ffffff !important;
}

/* Select box background - pure white */
.toy-kingdom-product-detail .variations .detail-attr select,
.toy-kingdom-product-detail-page .variations .detail-attr select,
.product-info-section .variations .detail-attr select,
.toy-kingdom-product-detail .variations .detail-attr .select-box select,
.toy-kingdom-product-detail-page .variations .detail-attr .select-box select,
.product-info-section .variations .detail-attr .select-box select {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

/* Select2 dropdown background - pure white */
.toy-kingdom-product-detail .variations .detail-attr .select2-container .select2-selection,
.toy-kingdom-product-detail-page .variations .detail-attr .select2-container .select2-selection,
.product-info-section .variations .detail-attr .select2-container .select2-selection,
.toy-kingdom-product-detail .variations .detail-attr .select2-container .select2-selection__rendered,
.toy-kingdom-product-detail-page .variations .detail-attr .select2-container .select2-selection__rendered,
.product-info-section .variations .detail-attr .select2-container .select2-selection__rendered {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

.toy-kingdom-product-detail .variations .detail-attr.type-color,
.toy-kingdom-product-detail .variations .detail-attr.type-label,
.toy-kingdom-product-detail .variations .detail-attr.type-select,
.toy-kingdom-product-detail-page .variations .detail-attr.type-color,
.toy-kingdom-product-detail-page .variations .detail-attr.type-label,
.toy-kingdom-product-detail-page .variations .detail-attr.type-select,
.product-info-section .variations .detail-attr.type-color,
.product-info-section .variations .detail-attr.type-label,
.product-info-section .variations .detail-attr.type-select {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-shrink: 0 !important;
}

/* Single variation wrap - buttons COMPLETELY on next line */
.toy-kingdom-product-detail .single_variation_wrap,
.toy-kingdom-product-detail-page .single_variation_wrap,
.product-info-section .single_variation_wrap {
    width: 100% !important;
    margin-top: 20px !important;
    clear: both !important;
    display: block !important;
}

.toy-kingdom-product-detail .single_variation_wrap .detail-attr.qty-cart,
.toy-kingdom-product-detail-page .single_variation_wrap .detail-attr.qty-cart,
.product-info-section .single_variation_wrap .detail-attr.qty-cart {
    width: 100% !important;
    display: none !important; /* Hide qty-cart from variation wrap */
}

/* Ensure variations form structure */
.toy-kingdom-product-detail .variations_form,
.toy-kingdom-product-detail-page .variations_form,
.product-info-section .variations_form {
    display: block !important;
    width: 100% !important;
}

/* Buttons section - COMPLETELY below variations */
.toy-kingdom-product-detail .variations_form + .add-to-cart-buttons,
.toy-kingdom-product-detail-page .variations_form + .add-to-cart-buttons,
.toy-kingdom-product-detail .single_variation_wrap + .add-to-cart-buttons,
.toy-kingdom-product-detail-page .single_variation_wrap + .add-to-cart-buttons,
.product-info-section .variations_form + .add-to-cart-buttons,
.product-info-section .single_variation_wrap + .add-to-cart-buttons {
    clear: both !important;
    margin-top: 20px !important;
    width: 100% !important;
    display: block !important;
}

/* Hide buttons for variable products - they should appear after variations */
.toy-kingdom-product-detail .variations_form ~ .product-quantity-addcart-section .add-to-cart-buttons,
.toy-kingdom-product-detail-page .variations_form ~ .product-quantity-addcart-section .add-to-cart-buttons,
.product-info-section .variations_form ~ .product-quantity-addcart-section .add-to-cart-buttons {
    display: flex !important;
    clear: both !important;
    margin-top: 20px !important;
    width: 100% !important;
}

/* For variable products, hide buttons that appear before variations */
.toy-kingdom-product-detail .product-quantity-addcart-section:has(~ .variations_form) .add-to-cart-buttons,
.toy-kingdom-product-detail-page .product-quantity-addcart-section:has(~ .variations_form) .add-to-cart-buttons,
.product-info-section .product-quantity-addcart-section:has(~ .variations_form) .add-to-cart-buttons {
    display: none !important;
}

/* Alternative selector for browsers that don't support :has() */
.toy-kingdom-product-detail .variations_form {
    order: 1;
}

.toy-kingdom-product-detail .product-quantity-addcart-section {
    order: 2;
}

/* Force variations to appear first, then buttons */
.toy-kingdom-product-detail .product-info-section,
.toy-kingdom-product-detail-page .product-info-section {
    display: flex;
    flex-direction: column;
}

.toy-kingdom-product-detail .product-info-section .variations_form,
.toy-kingdom-product-detail-page .product-info-section .variations_form {
    order: 1;
}

.toy-kingdom-product-detail .product-info-section .product-quantity-addcart-section,
.toy-kingdom-product-detail-page .product-info-section .product-quantity-addcart-section {
    order: 2;
}

/* Ensure buttons appear after variations form for variable products */
.toy-kingdom-product-detail .variations_form + .product-quantity-addcart-section .add-to-cart-buttons,
.toy-kingdom-product-detail-page .variations_form + .product-quantity-addcart-section .add-to-cart-buttons,
.product-info-section .variations_form + .product-quantity-addcart-section .add-to-cart-buttons {
    display: flex !important;
    clear: both !important;
    margin-top: 20px !important;
    width: 100% !important;
}

/* Add to Cart Buttons Section */
.add-to-cart-buttons {
    display: flex;
    flex-direction: row;
    gap: 8px !important;
    width: 100%;
}

.add-to-cart-button-wrapper {
    flex: 0 0 50% !important;
    width: 50% !important;
    min-width: 0;
    
    align-items: stretch;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 50% !important;
}

.add-to-cart-button-wrapper form,
.add-to-cart-button-wrapper .single_variation_wrap,
.add-to-cart-button-wrapper .woocommerce-variation-add-to-cart {
    width: 100% !important;
    max-width: 100% !important;
}

/* For variable products: variations on one line, buttons below */
/* Variations form should take full width */
.add-to-cart-button-wrapper form.variations_form,
.add-to-cart-button-wrapper .variations_form {
    width: 100% !important;
    display: block !important;
}

/* Keep buttons side by side for variable products (same as single products) */
.add-to-cart-buttons:has(form.variations_form),
.add-to-cart-buttons:has(.variations_form) {
    flex-direction: row !important;
    gap: 8px !important;
}

.add-to-cart-buttons:has(form.variations_form) .add-to-cart-button-wrapper,
.add-to-cart-buttons:has(.variations_form) .add-to-cart-button-wrapper {
    width: 50% !important;
    flex: 0 0 50% !important;
    margin-bottom: 0 !important;
}

.add-to-cart-buttons:has(form.variations_form) .buy-now-button-wrapper,
.add-to-cart-buttons:has(.variations_form) .buy-now-button-wrapper {
    width: 50% !important;
    flex: 0 0 50% !important;
    margin-top: 90px !important;
}

/* Messenger button should also be below for variable products */
.product-quantity-addcart-section:has(form.variations_form) .messenger-order-button-wrapper,
.product-quantity-addcart-section:has(.variations_form) .messenger-order-button-wrapper {
    margin-top: 15px !important;
    width: 100% !important;
}

/* IMPORTANT: Show add to cart button for variable products - don't hide it! */
.add-to-cart-button-wrapper .single_variation_wrap,
.add-to-cart-button-wrapper .single_variation_wrap .woocommerce-variation,
.add-to-cart-button-wrapper .single_variation_wrap .woocommerce-variation-add-to-cart {
    display: block !important;
    width: 100% !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.add-to-cart-button-wrapper .single_variation_wrap .single_add_to_cart_button,
.add-to-cart-button-wrapper .single_variation_wrap button[type="submit"],
.add-to-cart-button-wrapper form.variations_form .single_add_to_cart_button,
.add-to-cart-button-wrapper form.variations_form button[type="submit"],
.add-to-cart-button-wrapper .single_variation_wrap .woocommerce-variation-add-to-cart button,
.add-to-cart-button-wrapper .single_variation_wrap .woocommerce-variation-add-to-cart .single_add_to_cart_button {
    display: block !important;
    width: 100% !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-top: 15px !important;
}

/* Show variation price when available */
.add-to-cart-button-wrapper .single_variation_wrap .woocommerce-variation-price {
    display: none !important; /* Hide default price, we show it in product-price-section */
}

/* Hide the duplicate qty-cart wrapper inside single_variation_wrap */
.add-to-cart-button-wrapper .single_variation_wrap .detail-attr.qty-cart {
    display: block !important;
}

.woocommerce-variation-description{
    display: none !important;
}

/* Ensure single_variation_wrap is visible when variation is selected */
.single_variation_wrap:not(:empty) {
    display: block !important;
    visibility: visible !important;
}

/* Show add to cart button when variation is selected */
.woocommerce-variation-add-to-cart {
    display: block !important;
    width: 100% !important;
}

.woocommerce-variation-add-to-cart .single_add_to_cart_button {
    display: block !important;
    width: 100% !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Force add to cart button to always be visible for variable products */
.toy-kingdom-product-detail-page .variations_form .single_add_to_cart_button,
.toy-kingdom-product-detail-page .variations_form button[type="submit"],
.toy-kingdom-product-detail-page .variations_form .woocommerce-variation-add-to-cart,
.toy-kingdom-product-detail-page .variations_form .woocommerce-variation-add-to-cart .single_add_to_cart_button,
.toy-kingdom-product-detail-page .add-to-cart-button-wrapper .variations_form .single_add_to_cart_button,
.toy-kingdom-product-detail-page .add-to-cart-button-wrapper form.cart .single_add_to_cart_button,
.toy-kingdom-product-detail-page .add-to-cart-button-wrapper .woocommerce-variation-add-to-cart,
.toy-kingdom-product-detail-page .add-to-cart-button-wrapper .woocommerce-variation-add-to-cart .single_add_to_cart_button {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
}


/* Ensure proper order: Quantity/Buttons first, then Collapsible sections */

/* Make sure special instructions is part of quantity section */
.special-instructions-wrapper {
    order: 3 !important;
    margin-top: 15px !important;
}

.add-to-cart-buttons form.cart {
    display: flex;
    flex-direction: row;
    gap: 0;
    margin: 0;
    padding: 0;
    width: 100%;
    min-width: 0;
    height: 100%;
}

.add-to-cart-button-wrapper form.cart,
.buy-now-button-wrapper form {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100%;
    display: flex;
    align-items: stretch;
    flex: 1 1 100%;
}

.buy-now-button-wrapper {
    flex: 0 0 50%;
    width: 50%;
    min-width: 0;
    display: flex;
    align-items: stretch;
    padding: 0;
    margin: 0;
}

/* Hide quantity input from add to cart form since we have it above */
.add-to-cart-buttons form.cart .quantity,
.add-to-cart-buttons form.cart .quantity-input-wrapper,
.add-to-cart-buttons form.cart input.qty,
.add-to-cart-buttons form.cart .quantity-input,
.add-to-cart-buttons form.cart .quantity-wrapper {
    display: none !important;
}

/* Hide any duplicate quantity selectors */
.product-info-section .quantity:not(#product-quantity-display .quantity),
.product-info-section form.cart .quantity {
    display: none !important;
}

/* Ensure only the display quantity is visible */
#product-quantity-display {
    display: block !important;
}

/* Both add to cart button sections should look the same */
.add-to-cart-buttons-top,
.add-to-cart-buttons-bottom {
    margin: 0;
}

.woocommerce div.product form.cart button.single_add_to_cart_button{
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
}

.bzotech-form-cart-single{
    align-items: center;
    margin-top:0 !important;
}

/* Add to Cart Button - White with black border - Boxy design */
.single_add_to_cart_button {
    background: #fff !important;
    color: #333 !important;
    padding: 15px 30px !important;
    border: 2px solid #333 !important;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    min-height: 50px !important;
    height: 100% !important;
    text-align: center !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    flex: 1 1 100% !important;
}

.add-to-cart-button-wrapper .single_add_to_cart_button,
.add-to-cart-button-wrapper form.cart .single_add_to_cart_button,
.add-to-cart-button-wrapper button[type="submit"] {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
}

.single_add_to_cart_button:hover {
    background: #f5f5f5 !important;
    border-color: #000 !important;
}

/* Buy Now Button - Orange with white text and icon - Boxy design */
.buy-now-button {
    background: #FF6B35 !important;
    color: #fff !important;
    padding: 15px 30px !important;
    border: 2px solid transparent !important;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    min-height: 50px !important;
    height: 100% !important;
    text-align: center !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    flex: 1 1 100% !important;
}

.buy-now-button-wrapper .buy-now-button {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
}

.buy-now-button:hover {
    background: #E55A2B !important;
}

.buy-now-button svg {
    display: inline-block;
    margin-right: 8px;
}

/* Messenger Order Button */
.messenger-order-button-wrapper {
    margin-top: 15px;
    width: 100%;
}

.messenger-order-button {
    background: #1e88e5 !important;
    color: #ffffff !important;
    padding: 15px 30px;
    border: 2px solid #1e88e5 !important;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100%;
    text-align: center !important;
    text-decoration: none !important;
    box-sizing: border-box;
}

.messenger-order-button:hover {
    background: #f5f5f5 !important;
    border-color: #000 !important;
    color: #333 !important;
    text-decoration: none !important;
}

.messenger-order-button svg {
    display: inline-block;
    margin-right: 8px;
    fill: #ffffff;
}

/* Collapsible Sections */
.product-collapsible-sections {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px !important;
    clear: both !important;
    width: 100% !important;
    order: 2 !important;
}

.collapsible-section {
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 6px;
    overflow: hidden;
    background: transparent;
}

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: transparent;
    cursor: pointer;
    transition: background 0.3s;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.collapsible-header:hover {
    background: rgba(255,255,255,0.1);
}

.collapsible-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.toggle-icon {
    font-size: 12px;
    color: #666;
}

.collapsible-content {
    padding: 20px;
    background: transparent;
    border-top: 1px solid #ddd;
    display: none;
}

.collapsible-section.active .collapsible-content {
    display: block;
}

.collapsible-section.active .collapsible-header {
    border-bottom: 1px solid #ddd;
}

.collapsible-section.active .toggle-icon {
    transform: rotate(90deg);
}

/* Service Guarantees Section */
.toy-kingdom-service-guarantees {
    background: #FFEDE0;
    padding: 40px 0;
    width: 100%;
    margin: 0;
}

.service-guarantees-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.service-guarantee-item {
    text-align: center;
    background: transparent;
    padding: 30px 20px;
    border-radius: 8px;
    border: 2px solid;
}

.service-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    color: #FF6B35;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-guarantee-item h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* Section Titles */
.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 30px;
}

/* Hide WooCommerce tabs and additional information sections */
.woocommerce-tabs,
.woocommerce-product-attributes,
.woocommerce-product-details__short-description,
.product_meta,
.woocommerce-product-details__short-description,
.tabs,
.woocommerce-Tabs-panel {
    display: none !important;
}

/* Container width for product sections */
.toy-kingdom-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Product sections - within container width */
.toy-kingdom-popular-products-section,
.toy-kingdom-related-products-section,
.toy-kingdom-hot-selling-section,
.toy-kingdom-new-arrivals-section {
    display: block;
    margin: 0;
}

.toy-kingdom-customer-reviews,
.toy-kingdom-service-guarantees {
    width: 100vw !important;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    display: block;
}

/* Products Carousel - Use same styles as homepage */
.products-carousel {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 20px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.products-carousel::-webkit-scrollbar {
    display: none;
}

/* Product cards should use exact same styling as homepage */
/* Import all homepage product card styles - don't override */

/* Ensure product cards are not distorted */
.toy-kingdom-popular-products-section .toy-kingdom-product-card,
.toy-kingdom-related-products-section .toy-kingdom-product-card,
.toy-kingdom-hot-selling-section .toy-kingdom-product-card,
.toy-kingdom-new-arrivals-section .toy-kingdom-product-card {
    flex: 0 0 auto;
    min-width: 240px;
    max-width: none;
    width: auto;
    /* Product cards should have white background - that's correct */
}

/* Product cards in single product page sliders (Related, Latest, Upsell) */
.single-related-product .swiper-slide .toy-kingdom-product-card,
.single-related-product .swiper-wrapper .toy-kingdom-product-card {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Ensure swiper slides contain product cards properly */
.single-related-product .swiper-slide {
    height: auto;
    display: flex;
}

.single-related-product .swiper-slide .toy-kingdom-product-card {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Products Grid (for sections that still use grid) */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Product cards in grid should have white background like homepage */

/* Hot Selling Now section - use carousel like Popular Products */
.toy-kingdom-hot-selling-section .products-carousel {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 20px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.toy-kingdom-hot-selling-section .products-carousel::-webkit-scrollbar {
    display: none;
}

/* New Arrival Products section - use carousel like Popular Products */
.toy-kingdom-new-arrivals-section .products-carousel {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 20px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.toy-kingdom-new-arrivals-section .products-carousel::-webkit-scrollbar {
    display: none;
}

/* Carousel Navigation */
.carousel-navigation {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.carousel-prev,
.carousel-next {
    background: #FF6B35;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    transition: all 0.3s;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: #E55A2B;
    color: #fff;
}

/* See More Button */
.see-more-btn-wrapper {
    text-align: center;
    margin-top: 30px;
}

.see-more-btn {
    background: #FF6B35;
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.see-more-btn:hover {
    background: #E55A2B;
}

/* Customer Reviews Section */
.toy-kingdom-customer-reviews {
    background: #FFEDE0;
    padding: 40px 0;
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.reviews-rating {
    display: flex;
    align-items: center;
    gap: 15px;
}

.reviews-count {
    font-size: 16px;
    color: #666;
}

.write-review-btn {
    background: #FF6B35;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.write-review-btn:hover {
    background: #E55A2B;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.review-item {
    background: transparent;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.1);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-icon {
    font-size: 20px;
}

.author-name {
    font-weight: 600;
    color: #333;
}

.review-date {
    color: #666;
    font-size: 14px;
}

.review-time {
    color: #999;
    font-size: 12px;
}

.review-content {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.review-actions {
    display: flex;
    gap: 15px;
}

.like-btn,
.dislike-btn {
    background: transparent;
    border: 1px solid #ddd;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    color: #333;
}

.like-btn:hover,
.dislike-btn:hover {
    background: rgba(255,255,255,0.1);
}

/* Responsive Design */
@media (max-width: 992px) {
    .product-detail-wrapper {
        grid-template-columns: 1fr;
    }
    
    .service-guarantees-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .service-guarantees-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .reviews-header {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .product-title{
        margin-top: 15px !important;
    }
    
    /* Mobile: Smaller thumbnail images - proportionally reduced */
    .gallery-control .toy-kingdom-thumbnails,
    .gallery-control .gallery-slider.toy-kingdom-thumbnails,
    .gallery-control .carousel.toy-kingdom-thumbnails {
        gap: 6px !important;
        justify-content: flex-start !important;
        flex-wrap: nowrap !important;
    }
    
    .gallery-control .toy-kingdom-thumbnails a {
        min-height: 60px !important;
        height: 60px !important;
        max-width: 60px !important;
        width: 60px !important;
        flex: 0 0 60px !important;
        border: 2px solid transparent !important;
        min-width: 60px !important;
    }
    
    /* Only active thumbnail should have orange border */
    .gallery-control .toy-kingdom-thumbnails a.active {
        border-color: #FF6B35 !important;
    }
    
    /* Non-active thumbnails should have transparent border */
    .gallery-control .toy-kingdom-thumbnails a:not(.active) {
        border-color: transparent !important;
    }
    
    .gallery-control .toy-kingdom-thumbnails a img {
        min-height: 60px !important;
        height: 60px !important;
        width: 60px !important;
        object-fit: cover !important;
    }
    
    .gallery-control .toy-kingdom-thumbnails .slick-slide {
        flex: 0 0 60px !important;
        width: 60px !important;
        max-width: 60px !important;
        min-width: 60px !important;
    }
    
    .gallery-control {
        margin-top: 6px !important;
    }
    
    /* Mobile: Variation dropdowns - full width and visible */
    .variations .detail-attr {
        width: 100% !important;
        flex: 1 1 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 15px !important;
    }
    
    .variations .detail-attr .select-box,
    .variations .detail-attr select,
    .variations .detail-attr .woocommerce-variation-select-wrapper,
    .variations .detail-attr .select2-container {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }
    
    .variations .detail-attr select[name^="attribute_"] {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
        text-overflow: ellipsis !important;
    }
    
    /* Ensure variations container doesn't cut off */
    .variations,
    .variations_form .variations {
        flex-wrap: wrap !important;
        width: 100% !important;
        overflow: visible !important;
    }
    
    /* Mobile: Buttons side by side with minimal padding and font size */
    .add-to-cart-buttons {
        flex-direction: row !important;
        gap: 4px !important;
        width: 100% !important;
    }
    
    .add-to-cart-button-wrapper,
    .buy-now-button-wrapper {
        flex: 1 1 50% !important;
        width: 50% !important;
        max-width: 50% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .single_add_to_cart_button,
    .buy-now-button {
        width: 100% !important;
        max-width: 100% !important;
        padding: 8px 10px !important;
        font-size: 12px !important;
        font-weight: 500 !important;
        border-radius: 4px !important;
        min-height: 36px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Reduce icon size on mobile */
    .single_add_to_cart_button svg,
    .buy-now-button svg {
        width: 14px !important;
        height: 14px !important;
        margin-right: 4px !important;
    }
    
    /* Hide icons on mobile for cleaner look (optional - uncomment if needed) */
    /* .single_add_to_cart_button svg,
    .buy-now-button svg {
        display: none !important;
    } */
    
    /* Mobile: Messenger button also compact */
    .messenger-order-button-wrapper {
        width: 100% !important;
        margin-top: 2px !important;
    }
    
    .messenger-order-button {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        padding: 8px 10px !important;
        font-size: 12px !important;
        font-weight: 500 !important;
        min-height: 36px !important;
    }
    
    .messenger-order-button svg {
        width: 14px !important;
        height: 14px !important;
        margin-right: 4px !important;
    }
}

/* ============================================
   Product Card Styles (from homepage)
   ============================================ */

/* Product Card */
.toy-kingdom-product-card {
    min-width: 240px;
    background: #fff;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
    transition: all 0.3s;
    flex: 0 0 auto;
}

.toy-kingdom-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

/* Wishlist Icon Top Left */
.product-wishlist {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
}

.wishlist-btn {
    background: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.wishlist-btn:hover {
    background: #f5f5f5;
}

.wishlist-btn svg {
    width: 18px;
    height: 18px;
}

.wishlist-btn.active svg {
    fill: #ff4444;
    stroke: #ff4444;
}

/* OFF Tag Top Right */
.product-discount-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #fff;
    color: #ff4444;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
    line-height: 1.2;
    border: 1px solid #333;
}

.product-image {
    margin-bottom: 12px;
    text-align: center;
    position: relative;
    margin-top: 0;
    padding: 0;
    width: 100%;
}

.product-image img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    border-radius: 4px;
    padding: 0;
}

.product-info {
    text-align: left;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    line-height: 1.4;
    min-height: 40px;
}

.product-name a {
    color: #333;
    text-decoration: none;
}

.product-name a:hover {
    color: #ff6b35;
}

/* SKU and Rating on Same Line */
.product-sku-rating {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.product-sku {
    font-size: 11px;
    color: #999;
    font-weight: 400;
}

.product-rating-single {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rating-star {
    font-size: 14px;
    color: #ff4444;
}

.rating-value {
    font-size: 12px;
    color: #333;
    font-weight: 500;
}

/* Price and Add to Cart on Same Line */
.product-price-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex: 1;
}

.toy-kingdom-product-card .current-price {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.toy-kingdom-product-card .original-price {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
    font-weight: 400;
}

.toy-kingdom-product-card .add-to-cart-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
    display: inline-block;
    background: #F4F4F4;
    color: #333;
    white-space: nowrap;
}

.toy-kingdom-product-card .add-to-cart-btn:hover {
    background: #e5e5e5;
    color: #000;
}


.bzotech-form-cart-single .detail-qty{
    display: none !important;
}

.single_add_to_cart_button{
    border-radius: 10px !important;
    margin-bottom: 0px !important;
}

.buy-now-button{
    border-radius: 10px !important;
}

.messenger-order-button{
    border-radius: 10px !important;
}

.detail-qty{
    border: 2px solid;
    border-radius: 50px !important;
}

.toy-kingdom-thumbnails{
    min-width: 300px !important;
}

/* Special Instructions Field Styling */
.special-instructions-wrapper {
    margin-top: 15px;
    width: 100%;
}

.special-instructions-wrapper label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.special-instructions-field {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    box-sizing: border-box;
    background: #f5f5f5;
    transition: border-color 0.3s, background 0.3s;
}

.special-instructions-field:focus {
    outline: none;
    border-color: #FF6B35;
    background: #fff;
}

/* Additional rules to ensure proper layout for variable products */
.toy-kingdom-product-detail-page .variations_form {
    display: block !important;
    width: 100% !important;
}

.toy-kingdom-product-detail-page .variations_form .variations {
    margin-bottom: 0 !important;
}

.toy-kingdom-product-detail-page .variations_form .single_variation_wrap {
    margin-top: 20px !important;
    clear: both !important;
    display: block !important;
    width: 100% !important;
}

/* Hide any buttons that might appear inside single_variation_wrap */
.toy-kingdom-product-detail-page .single_variation_wrap .single_add_to_cart_button,
.toy-kingdom-product-detail-page .single_variation_wrap button[type="submit"],
.toy-kingdom-product-detail-page .single_variation_wrap .add-to-cart-buttons {
    display: none !important;
}

/* Ensure add-to-cart-buttons appear after variations_form */
.toy-kingdom-product-detail-page .variations_form ~ .add-to-cart-buttons,
.toy-kingdom-product-detail-page .product-quantity-addcart-section .add-to-cart-buttons {
    clear: both !important;
    margin-top: 10px !important;
    width: 100% !important;
    display: flex !important;
    gap: 10px !important;
}



/* Hide View Cart link/button after adding to cart */
.toy-kingdom-product-detail-page .added_to_cart,
.toy-kingdom-product-detail-page a.added_to_cart,
.toy-kingdom-product-detail-page .wc-forward,
.toy-kingdom-product-detail-page .woocommerce-message,
.toy-kingdom-product-detail-page .woocommerce-info a.button,
.toy-kingdom-product-detail-page a.added_to_cart.wc-forward,
.add-to-cart-buttons .added_to_cart,
.add-to-cart-button-wrapper .added_to_cart,
.single_add_to_cart_button + .added_to_cart {
    display: none !important;
}

.woocommerce div.product form.cart .reset_variations{
    display:  none !important;
}

.woocommerce-variation-availability{
    display: none !important;
}