/* ================================================================
   MyGiftsCorner - Single Product Page Styles
   ================================================================ */

/* --- Breadcrumbs --- */
body.single-product .woocommerce-breadcrumb {
    font-size: 13px !important;
    color: #888 !important;
    padding: 12px 0 !important;
    margin-bottom: 6px !important;
}

body.single-product .woocommerce-breadcrumb a {
    color: #8B6F47 !important;
    text-decoration: none !important;
}

body.single-product .woocommerce-breadcrumb a:hover {
    text-decoration: underline !important;
}

/* --- Product Layout --- */
body.single-product div.product {
    max-width: 1100px !important;
    margin: 0 auto !important;
}

/* --- Product Gallery --- */
body.single-product .woocommerce-product-gallery {
    border-radius: 12px !important;
    overflow: hidden !important;
    border: 1px solid #eee !important;
    background: #fafafa !important;
}

body.single-product .woocommerce-product-gallery img {
    border-radius: 0 !important;
}

body.single-product .woocommerce-product-gallery .flex-control-thumbs {
    padding: 10px 0 0 !important;
    gap: 8px !important;
    display: flex !important;
}

body.single-product .woocommerce-product-gallery .flex-control-thumbs li {
    border-radius: 8px !important;
    overflow: hidden !important;
    border: 2px solid transparent !important;
    transition: border-color 0.2s !important;
    cursor: pointer !important;
}

body.single-product .woocommerce-product-gallery .flex-control-thumbs li img {
    border-radius: 6px !important;
    opacity: 0.7 !important;
    transition: opacity 0.2s !important;
}

body.single-product .woocommerce-product-gallery .flex-control-thumbs li img:hover,
body.single-product .woocommerce-product-gallery .flex-control-thumbs li img.flex-active {
    opacity: 1 !important;
}

body.single-product .woocommerce-product-gallery .flex-control-thumbs li:has(img.flex-active) {
    border-color: #8B6F47 !important;
}

/* Gallery zoom icon */
body.single-product .woocommerce-product-gallery .woocommerce-product-gallery__trigger {
    background: rgba(255,255,255,0.9) !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    top: 12px !important;
    right: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

/* --- Product Title --- */
body.single-product .product_title {
    font-size: 26px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    line-height: 1.3 !important;
    margin: 0 0 10px 0 !important;
}

/* --- Price --- */
body.single-product .summary .price {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin-bottom: 6px !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

body.single-product .summary .price del {
    font-size: 16px !important;
    font-weight: 400 !important;
    color: #999 !important;
}

body.single-product .summary .price ins {
    text-decoration: none !important;
    font-weight: 700 !important;
}

/* Save badge next to price */
body.single-product .save-badge-text {
    display: inline-block !important;
    background: #f0f8f0 !important;
    color: #2D7D46 !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    margin-left: 4px !important;
}

/* --- Star Rating --- */
body.single-product .woocommerce-product-rating {
    margin-bottom: 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

body.single-product .star-rating {
    color: #F4A623 !important;
    font-size: 14px !important;
}

body.single-product .woocommerce-review-link {
    font-size: 13px !important;
    color: #8B6F47 !important;
    text-decoration: none !important;
}

body.single-product .woocommerce-review-link:hover {
    text-decoration: underline !important;
}

/* --- Short Description --- */
body.single-product .woocommerce-product-details__short-description {
    font-size: 14px !important;
    color: #555 !important;
    line-height: 1.7 !important;
    margin-bottom: 16px !important;
    padding-bottom: 16px !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

/* --- Expected Delivery (from your custom function) --- */
body.single-product .summary > p:has(span),
body.single-product .summary > p[style*="font-weight:bold"] {
    background: #f8fdf8 !important;
    border: 1px solid #d4edda !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    margin: 14px 0 !important;
    color: #1a1a1a !important;
}

/* --- Quantity + Add to Cart + Buy Now Row --- */
body.single-product form.cart {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin: 18px 0 !important;
    padding: 18px 0 !important;
    border-top: 1px solid #f0f0f0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

/* Quantity (styled by your +/- buttons) */
body.single-product form.cart .quantity {
    margin: 0 !important;
}

/* Add to Cart button */
body.single-product form.cart .single_add_to_cart_button {
    padding: 14px 28px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    background: #8B6F47 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    min-height: 50px !important;
    flex: 1 !important;
    min-width: 160px !important;
}

body.single-product form.cart .single_add_to_cart_button:hover {
    background: #74593a !important;
    transform: translateY(-1px) !important;
}

/* Buy Now button */
body.single-product form.cart + .button.alt,
body.single-product form.cart .button.alt:not(.single_add_to_cart_button) {
    padding: 14px 28px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    background: #2D7D46 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    min-height: 50px !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: 0 !important;
    flex: 1 !important;
    min-width: 140px !important;
}

body.single-product form.cart + .button.alt:hover,
body.single-product form.cart .button.alt:not(.single_add_to_cart_button):hover {
    background: #246838 !important;
    transform: translateY(-1px) !important;
}

/* --- Product Meta (SKU, Category, Tags) --- */
body.single-product .product_meta {
    margin-top: 18px !important;
    padding-top: 16px !important;
    border-top: 1px solid #f0f0f0 !important;
    font-size: 13px !important;
    color: #888 !important;
    line-height: 2 !important;
}

body.single-product .product_meta > span {
    display: block !important;
}

body.single-product .product_meta a {
    color: #8B6F47 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}

body.single-product .product_meta a:hover {
    text-decoration: underline !important;
}

/* --- Trust Strip under product summary --- */
body.single-product .summary::after {
    content: "🔒 Secure Payment  ·  🚚 Fast Delivery  ·  ↩️ Easy Returns";
    display: block;
    margin-top: 16px;
    padding: 12px 0;
    font-size: 12px;
    color: #888;
    text-align: center;
    border-top: 1px solid #f0f0f0;
    letter-spacing: 0.2px;
}

/* --- Product Tabs --- */
body.single-product .woocommerce-tabs {
    margin-top: 40px !important;
}

body.single-product .woocommerce-tabs ul.tabs {
    display: flex !important;
    gap: 0 !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 -1px 0 !important;
    border-bottom: 2px solid #eee !important;
    overflow: visible !important;
}

body.single-product .woocommerce-tabs ul.tabs::before,
body.single-product .woocommerce-tabs ul.tabs::after {
    display: none !important;
}

body.single-product .woocommerce-tabs ul.tabs li {
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    position: relative !important;
}

body.single-product .woocommerce-tabs ul.tabs li::before,
body.single-product .woocommerce-tabs ul.tabs li::after {
    display: none !important;
}

body.single-product .woocommerce-tabs ul.tabs li a {
    display: block !important;
    padding: 12px 20px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #888 !important;
    text-decoration: none !important;
    border-bottom: 3px solid transparent !important;
    transition: all 0.2s !important;
    background: none !important;
}

body.single-product .woocommerce-tabs ul.tabs li a:hover {
    color: #8B6F47 !important;
}

body.single-product .woocommerce-tabs ul.tabs li.active a {
    color: #8B6F47 !important;
    font-weight: 600 !important;
    border-bottom-color: #8B6F47 !important;
}

body.single-product .woocommerce-tabs .panel {
    padding: 24px 0 !important;
    border: none !important;
    background: none !important;
    font-size: 14px !important;
    color: #444 !important;
    line-height: 1.7 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

body.single-product .woocommerce-tabs .panel h2 {
    font-size: 20px !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
    margin: 0 0 14px 0 !important;
}

/* --- Reviews Tab --- */
body.single-product #reviews .comment-respond {
    background: #fafafa !important;
    border: 1px solid #eee !important;
    border-radius: 10px !important;
    padding: 20px !important;
    margin-top: 20px !important;
}

body.single-product #reviews .comment-respond input,
body.single-product #reviews .comment-respond textarea {
    padding: 12px 14px !important;
    border: 1.5px solid #d4d4d4 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    background: #fff !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

body.single-product #reviews .comment-respond input:focus,
body.single-product #reviews .comment-respond textarea:focus {
    border-color: #8B6F47 !important;
    box-shadow: 0 0 0 3px rgba(139,111,71,0.1) !important;
    outline: none !important;
}

body.single-product #reviews .comment-respond .form-submit input[type="submit"] {
    padding: 12px 24px !important;
    background: #8B6F47 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}

body.single-product #reviews .comment-respond .form-submit input[type="submit"]:hover {
    background: #74593a !important;
}

/* Individual reviews */
body.single-product #reviews .commentlist li {
    padding: 18px 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

body.single-product #reviews .commentlist .comment-text {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.single-product #reviews .commentlist .meta {
    font-size: 13px !important;
    color: #888 !important;
    margin-bottom: 6px !important;
}

body.single-product #reviews .commentlist .meta strong {
    color: #1a1a1a !important;
}

/* --- Related Products --- */
body.single-product .related.products {
    margin-top: 50px !important;
    padding-top: 30px !important;
    border-top: 1px solid #eee !important;
}

body.single-product .related.products > h2 {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin-bottom: 20px !important;
}

/* Related products use shop card styles (from shop-style.css) */

/* --- Sticky Buy Now bar (your custom function) --- */
#sticky-buy-now {
    border-top: 1px solid #eee !important;
}

#sticky-buy-now .button.alt {
    background: #2D7D46 !important;
    border-radius: 10px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    padding: 14px 24px !important;
    min-height: 50px !important;
}

#sticky-buy-now .button.alt:hover {
    background: #246838 !important;
}

/* --- Variable Product Selects --- */
body.single-product .variations td select {
    padding: 10px 14px !important;
    border: 1.5px solid #d4d4d4 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    background: #fafafa !important;
    min-height: 44px !important;
    width: 100% !important;
}

body.single-product .variations td select:focus {
    border-color: #8B6F47 !important;
    outline: none !important;
}

body.single-product .variations td.label label {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #333 !important;
}

body.single-product .reset_variations {
    font-size: 12px !important;
    color: #8B6F47 !important;
}

/* --- Out of Stock Badge --- */
body.single-product .stock.out-of-stock {
    background: #fef5f5 !important;
    color: #c0392b !important;
    border: 1px solid #f5c6c6 !important;
    border-radius: 8px !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

body.single-product .stock.in-stock {
    color: #2D7D46 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}

/* ===================== MOBILE ===================== */
@media (max-width: 768px) {
    body.single-product .product_title {
        font-size: 20px !important;
    }

    body.single-product .summary .price {
        font-size: 20px !important;
    }

    body.single-product form.cart {
        gap: 8px !important;
    }

    body.single-product form.cart .single_add_to_cart_button {
        padding: 12px 20px !important;
        font-size: 14px !important;
        min-height: 46px !important;
    }

    body.single-product form.cart .button.alt:not(.single_add_to_cart_button) {
        padding: 12px 20px !important;
        font-size: 14px !important;
        min-height: 46px !important;
    }

    body.single-product .woocommerce-tabs ul.tabs li a {
        padding: 10px 14px !important;
        font-size: 13px !important;
    }

    body.single-product .summary::after {
        font-size: 11px;
    }

    body.single-product .related.products > h2 {
        font-size: 18px !important;
    }
}

@media (max-width: 480px) {
    body.single-product form.cart {
        flex-direction: column !important;
    }

    body.single-product form.cart .single_add_to_cart_button,
    body.single-product form.cart .button.alt:not(.single_add_to_cart_button) {
        width: 100% !important;
        flex: none !important;
    }

    body.single-product .woocommerce-tabs ul.tabs {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    body.single-product .woocommerce-tabs ul.tabs::-webkit-scrollbar {
        display: none;
    }

    body.single-product .woocommerce-tabs ul.tabs li a {
        white-space: nowrap !important;
    }
}