/* =========================================================
   MRPSN WooCommerce Product Page Overrides
   This file is loaded only on single product pages.
   ========================================================= */

/* Main product card */
.psn-product-layout {
    direction: rtl;
    width: 100%;
    gap: 22px !important;
    padding: 22px !important;
    border-radius: var(--mrpsn-radius-lg) !important;
    background: #fff !important;
    box-shadow: var(--mrpsn-shadow-lg) !important;
}

.psn-product-layout > .e-con-inner,
.psn-product-layout .e-con-inner {
    gap: inherit;
}

/* Gallery */
.psn-product-gallery {
    position: relative;
    isolation: isolate;
}

.psn-product-gallery div.images,
.psn-product-gallery .woocommerce-product-gallery {
    margin-bottom: 0 !important;
}

.psn-product-gallery .woocommerce-product-gallery__wrapper,
.psn-product-gallery .woocommerce-product-gallery__image,
.psn-product-gallery .woocommerce-product-gallery__image a,
.psn-product-gallery .woocommerce-product-gallery__image img.wp-post-image {
    border-radius: var(--mrpsn-radius-lg);
}

.psn-product-gallery .woocommerce-product-gallery__image {
    background: var(--mrpsn-soft);
}

.psn-product-gallery .flex-control-thumbs li img {
    border-radius: var(--mrpsn-radius-sm);
    border: 1px solid transparent;
    opacity: .72;
    transition: opacity .2s ease, border-color .2s ease, transform .2s ease;
}

.psn-product-gallery .flex-control-thumbs li img.flex-active,
.psn-product-gallery .flex-control-thumbs li img:hover {
    opacity: 1;
    border-color: rgba(var(--mrpsn-blue-rgb), .25);
    transform: translateY(-1px);
}

.psn-product-gallery .onsale {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    left: auto !important;

    z-index: 2 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 8px 14px !important;
    min-height: 34px !important;
    min-width: auto !important;

    background: linear-gradient(135deg, rgb(254, 144, 49), rgba(254, 144, 49, .85)) !important;
    color: #fff !important;

    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1 !important;

    border-radius: 8px !important;
    box-shadow: 0 8px 20px rgba(254, 144, 49, .25) !important;

    pointer-events: none !important;

}

/* Category pill */
.psn-product-category-meta .product_meta > * {
    display: none !important;
}

.psn-product-category-meta .posted_in {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--mrpsn-soft);
    color: var(--mrpsn-muted);
    font-size: 12px;
    font-weight: 850;
    line-height: 1.45;
}

.psn-product-category-meta .posted_in .detail-label {
    color: var(--mrpsn-muted);
}

.psn-product-category-meta .posted_in a {
    color: var(--mrpsn-blue);
    text-decoration: none !important;
}

.psn-product-category-meta .posted_in a:hover {
    color: var(--mrpsn-blue-dark);
}

/* Title */
.psn-product-title,
.psn-product-title .product_title,
.psn-product-title h1 {
    margin: 0 !important;
}

.psn-product-title .product_title,
.psn-product-title h1 {
    color: var(--mrpsn-ink);
    font-size: clamp(21px, 2.1vw, 32px);
    font-weight: 950;
    line-height: 1.55;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

/* Info column spacing */
.psn-product-short-info,
.psn-product-color,
.psn-product-category-meta,
.psn-product-title {
    margin-bottom: 14px;
}

.psn-product-color {
    margin-top: 4px;
}

/* Purchase box */
.psn-product-purchase-box {
    gap: 14px !important;
    padding: 24px !important;
    border: 1px solid var(--mrpsn-line) !important;
    border-radius: var(--mrpsn-radius-lg) !important;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%) !important;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.055) !important;
}

.psn-product-purchase-box > .elementor-element {
    width: 100%;
}

/* Add to cart – full-width button */
.psn-product-add-to-cart .single_add_to_cart_button {
    width: 100% !important;
}

/* Benefits should feel supporting, not loud. */
.psn-product-benefits {
    opacity: .92;
}

@media (max-width: 1024px) {
    .psn-product-layout {
        flex-wrap: wrap !important;
    }

    .psn-product-layout > .e-con,
    .psn-product-layout > .elementor-element {
        width: calc(50% - 11px) !important;
    }

    .psn-product-purchase-box {
        width: 100% !important;
    }
}

@media (max-width: 767px) {
    .psn-product-layout {
        gap: 16px !important;
        padding: 12px !important;
        border-radius: 20px !important;
    }

    .psn-product-layout > .e-con,
    .psn-product-layout > .elementor-element {
        width: 100% !important;
    }

    .psn-product-purchase-box {
        padding: 14px !important;
        border-radius: 20px !important;
    }
}


