/* Clean Single Product Page Stylesheet */

/* Main 2-Column Product Section Layout */
.single-product .product-entry-wrapper,
.single-product div.product {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 40px !important;
    max-width: 1240px !important;
    margin: 20px auto 40px auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Ensure WooCommerce tabs and related products go to a full-width new line */
.single-product .woocommerce-tabs,
.single-product .related.products,
.single-product .upsells.products {
    width: 100% !important;
    flex: 0 0 100% !important;
    clear: both !important;
    margin-top: 40px !important;
}

/* ============================================================
   LEFT COLUMN: GALLERY
   ============================================================ */
.product-gallery-grid-wrap {
    flex: 0 0 48% !important;
    width: 48% !important;
    max-width: 48% !important;
    display: flex !important;
    gap: 16px !important;
    box-sizing: border-box !important;
}

.product-vertical-thumbnails {
    width: 76px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.product-vertical-thumbnails .thumb-item {
    width: 76px !important;
    height: 76px !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    border: 2px solid transparent !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    background: #f8fafc !important;
    box-sizing: border-box !important;
}

.product-vertical-thumbnails .thumb-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.product-vertical-thumbnails .thumb-item:hover {
    border-color: #cbd5e1 !important;
}

.product-vertical-thumbnails .thumb-item.active {
    border-color: #111111 !important;
}

.product-single-main-image-wrap {
    flex-grow: 1 !important;
    min-width: 0 !important;
}

.main-image-box {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    background: #f8fafc !important;
    position: relative !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03) !important;
    box-sizing: border-box !important;
}

#main-product-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: opacity 0.15s ease !important;
}

/* ============================================================
   RIGHT COLUMN: SUMMARY & DETAILS
   ============================================================ */
.single-product .summary.entry-summary {
    flex: 0 0 48% !important;
    width: 48% !important;
    max-width: 48% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* Product Title */
.single-product .summary.entry-summary h1.product_title {
    font-size: 26px !important;
    font-weight: 700 !important;
    color: #111111 !important;
    line-height: 1.3 !important;
    margin: 0 0 10px 0 !important;
    font-family: inherit !important;
}

/* Product Price */
.single-product .summary.entry-summary p.price {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #0e3020 !important;
    margin: 0 0 20px 0 !important;
    display: flex !important;
    align-items: baseline !important;
    gap: 10px !important;
}

.single-product .summary.entry-summary p.price ins,
.single-product .summary.entry-summary p.price > .woocommerce-Price-amount {
    text-decoration: none !important;
    color: #0e3020 !important;
}

.single-product .summary.entry-summary p.price del {
    font-size: 16px !important;
    color: #94a3b8 !important;
    font-weight: 400 !important;
}

/* Hide variations table (we render custom swatches) */
.single-product .summary.entry-summary .woocommerce-variation-description,
.single-product .summary.entry-summary table.variations {
    display: none !important;
}

/* 3 to 4 line Product Short Description */
.single-product .summary.entry-summary .woocommerce-product-details__short-description {
    display: block !important;
    font-size: 14px !important;
    line-height: 1.65 !important;
    color: #475569 !important;
    margin: 0 0 20px 0 !important;
}

.single-product .summary.entry-summary .woocommerce-product-details__short-description p {
    margin: 0 0 8px 0 !important;
    font-size: 14px !important;
    line-height: 1.65 !important;
    color: #475569 !important;
}

/* Color Swatches Grid */
.custom-colors-container {
    margin-bottom: 20px !important;
}

.custom-colors-container .colors-label {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    margin-bottom: 10px !important;
}

.custom-colors-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
}

.color-swatch-card {
    display: flex !important;
    flex-direction: column !important;
    width: 72px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    text-decoration: none !important;
    background: #ffffff !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    box-sizing: border-box !important;
}

.color-swatch-card:hover {
    border-color: #cbd5e1 !important;
}

.color-swatch-card.active {
    border: 2px solid #0e3020 !important;
}

.swatch-img-wrap {
    width: 100% !important;
    height: 58px !important;
    overflow: hidden !important;
    background: #f8fafc !important;
}

.swatch-img-wrap img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.swatch-label {
    font-size: 10px !important;
    color: #475569 !important;
    text-align: center !important;
    padding: 4px 2px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
}

.color-swatch-card.active .swatch-label {
    color: #0e3020 !important;
    font-weight: 700 !important;
}

/* Quantity Label & Selector */
.custom-quantity-label {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #475569 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    margin-bottom: 8px !important;
}

.custom-qty-wrapper {
    display: inline-flex !important;
    align-items: center !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 24px !important;
    padding: 0 10px !important;
    background: #ffffff !important;
    height: 44px !important;
    box-sizing: border-box !important;
    margin-bottom: 12px !important;
}

.custom-qty-wrapper input.qty {
    width: 32px !important;
    text-align: center !important;
    border: none !important;
    background: transparent !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    pointer-events: none !important;
    margin: 0 !important;
    padding: 0 !important;
    -moz-appearance: textfield !important;
}

.custom-qty-wrapper input.qty::-webkit-outer-spin-button,
.custom-qty-wrapper input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
}

.custom-qty-wrapper > *:not(input.qty):not(button.qty-btn) {
    display: none !important;
}

.custom-qty-wrapper button.qty-btn {
    display: flex !important;
    background: none !important;
    border: none !important;
    color: #475569 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    width: 26px !important;
    height: 26px !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}

/* Cart Form & Add to Cart Button */
.single-product .summary.entry-summary form.cart {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin: 16px 0 !important;
    width: 100% !important;
}

.single-product .summary.entry-summary form.cart button.single_add_to_cart_button {
    width: 100% !important;
    height: 48px !important;
    background: #b5986d !important;
    border: none !important;
    border-radius: 24px !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
}

.single-product .summary.entry-summary form.cart button.single_add_to_cart_button:hover {
    background: #9d8258 !important;
}

/* Payment & PayPal Links (Hidden - Only Add to Cart is displayed) */
.custom-checkout-wishlist-block,
.custom-paypal-btn,
.custom-more-payment-link,
.ppcp-gateway-button,
.paypal-buttons,
.woocommerce-paypal-payments-express-checkout-button,
[class*="paypal-button"],
[id*="paypal-button"],
.express-checkout-button {
    display: none !important;
}

/* Benefits Section */
.custom-benefits-list {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 10px !important;
    margin-top: 20px !important;
    padding-top: 16px !important;
    border-top: 1px solid #f1f5f9 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.benefit-tile {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 4px !important;
    flex: 1 !important;
}

.benefit-tile .benefit-icon {
    font-size: 15px !important;
    color: #475569 !important;
}

.benefit-tile .benefit-text {
    font-size: 11px !important;
    font-weight: 500 !important;
    color: #475569 !important;
    line-height: 1.2 !important;
}

/* Hide SKU meta row (Blocksy/Odoo) */
.sp-meta-row:has(.sku_wrapper),
.sp-meta-row:has(.sku) {
    display: none !important;
}

/* Category & SKU Meta */
.single-product .summary.entry-summary .product_meta {
    margin-top: 16px !important;
    font-size: 11px !important;
    color: #64748b !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
}

/* Hide SKU */
.product_meta .sku_wrapper,
.single-product .sku_wrapper,
.woocommerce.single-product span.sku_wrapper {
    display: none !important;
}

/* Image fills container — remove all padding */
.sp-main-img-wrap {
    padding: 0 !important;
    margin: 0 !important;
}

.sp-main-img {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
}

.main-image-box {
    padding: 0 !important;
}

#main-product-image,
.woocommerce-product-gallery__image img,
.woocommerce-product-gallery .wp-post-image {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* Responsive Rules */
@media (max-width: 1024px) {
    .single-product .product-entry-wrapper,
    .single-product div.product {
        flex-direction: column !important;
        gap: 30px !important;
    }
    
    .product-gallery-grid-wrap,
    .single-product .summary.entry-summary {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 640px) {
    .product-gallery-grid-wrap {
        flex-direction: column-reverse !important;
    }
    
    .product-vertical-thumbnails {
        width: 100% !important;
        flex-direction: row !important;
        overflow-x: auto !important;
    }
}
