/**
 * Product page enhancement — modern card layout, better contrast & padding.
 * Loaded after the main bundle so these rules win.
 */

/* CSS variables defined in assets/css/colors.css (single source of truth) */

/* Unified single-product canvas: one neutral grey behind all white cards,
   so there are no competing cream/white background patches on the page. */
body.single-product {
    background: #f6f6f8;
}

/* Product detail wrapper: a calm, neutral canvas */
.product-detail-wrapper {
    background: #f6f6f8;
    padding: 40px 0;
}

.product-detail-container {
    align-items: flex-start;
}

/* The product-info box becomes a modern, padded card with real contrast */
.product-info-main {
    background: var(--sheeel-card);
    border: 1px solid var(--sheeel-line);
    border-radius: 18px;
    padding: 32px;
    box-shadow: var(--sheeel-shadow);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.product-info-main:hover {
    box-shadow: 0 16px 40px rgba(20, 20, 30, 0.12);
}

/* Sticky on wide screens for a premium feel */
@media (min-width: 993px) {
    .product-info-main {
        position: sticky;
        top: 24px;
    }
}

/* Title — strong, high-contrast */
.product-info-main .product-page-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--sheeel-ink);
    line-height: 1.35;
    letter-spacing: -0.01em;
    margin: 0 0 10px;
}

/* Product description under title */
.product-info-main .product-page-description {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0 0 12px;
    padding: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Brand — accent tint, not muted grey */
.product-info-main .product-brand-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--sheeel-accent);
    letter-spacing: 0.02em;
    margin-bottom: 18px;
    display: inline-block;
}

.product-info-main .product-brand-link:hover {
    color: var(--sheeel-ink);
}

/* Meta info — pill badges with clear contrast instead of thin rules */
.product-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px 0;
    border-top: 1px solid var(--sheeel-line);
    border-bottom: 1px solid var(--sheeel-line);
    margin-bottom: 22px;
}

.product-meta-info p {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--sheeel-ink-soft);
    background: #f4f4f6;
    border: 1px solid var(--sheeel-line);
    border-radius: 999px;
    padding: 6px 14px;
}

.product-meta-info .sku {
    direction: ltr;
}

[dir="rtl"] .product-meta-info .sku {
    direction: rtl;
}

.product-meta-info .in-stock {
    color: var(--sheeel-success);
    background: rgba(26, 158, 90, 0.10);
    border-color: rgba(26, 158, 90, 0.25);
}

.product-meta-info .low-stock {
    color: #b45309;
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.28);
}

.product-meta-info .bought-count {
    color: var(--sheeel-accent);
}

/* Price — pops with size and accent color */
.product-price-box {
    margin-bottom: 24px;
}

.product-price-box .price-container {
    align-items: baseline;
    gap: 12px;
}

.product-price-box .old-price {
    font-size: 17px;
    color: #9a9aa2;
    text-decoration: line-through;
}

.product-price-box .special-price {
    font-size: 36px;
    font-weight: 800;
    color: var(--sheeel-accent);
    letter-spacing: -0.02em;
}

.product-price-box .price-currency {
    font-size: 16px;
    font-weight: 600;
    color: var(--sheeel-ink-soft);
}

/* Express delivery callout */
.product-info-main .express-info {
    background: rgba(201, 28, 94, 0.08);
    color: #c91c5e;
    border: 1px solid rgba(201, 28, 94, 0.20);
    border-right: 4px solid #c91c5e;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

/* Add-to-cart area gets breathing room */
.product-info-main .cart {
    margin-top: 4px;
}

.product-info-main .product-social-share {
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--sheeel-line);
}

.product-info-main .share-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--sheeel-ink-soft);
    margin-bottom: 10px;
}

.product-info-main .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f4f4f6;
    border: 1px solid var(--sheeel-line);
    transition: transform 0.2s ease, background 0.2s ease;
}

.product-info-main .social-icon:hover {
    transform: translateY(-2px);
    background: #ececf0;
}

/* Tabs section — also carded for consistency */
.product-details-tabs {
    background: var(--sheeel-card);
    border: 1px solid var(--sheeel-line);
    border-radius: 18px;
    padding: 28px 32px;
    margin-top: 36px;
    box-shadow: var(--sheeel-shadow);
}

/* Mobile: drop sticky + tighten padding */
@media (max-width: 992px) {
    .product-info-main {
        padding: 24px 20px;
        border-radius: 14px;
    }
    .product-details-tabs {
        padding: 22px 20px;
    }
}

/* Quantity selector — bigger, clear black number, black border */
.product-info-main .quantity {
    margin-bottom: 22px;
}

.product-info-main .quantity input.qty,
.quantity input.input-text.qty {
    width: 74px !important;
    height: 52px !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #000 !important;
    text-align: center;
    border: 2px solid #000 !important;
    border-radius: 10px;
    background: #fff !important;
    padding: 0 8px !important;
    -moz-appearance: textfield;
}

.product-info-main .quantity input.qty:focus {
    outline: none;
    border-color: var(--sheeel-accent);
    box-shadow: 0 0 0 3px rgba(77, 63, 118, 0.15);
}

/* Add to cart button — dark gray background, white text */
.product-info-main .single_add_to_cart_button,
.single_add_to_cart_button.button.alt {
    background: #2b2b2f !important;
    color: #fff !important;
    border: none !important;
    border-radius: 12px;
    padding: 16px 30px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.product-info-main .single_add_to_cart_button:hover,
.single_add_to_cart_button.button.alt:hover {
    background: #3d3d42 !important;
    transform: translateY(-1px);
}

/* Social icons — brand-coloured logo on a clean white circle */
.product-info-main .social-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #e2e2e6;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-info-main .social-icon img,
.product-info-main .social-icon svg.si-glyph {
    width: 22px !important;
    height: 22px !important;
    display: block;
}

.product-info-main .social-icon.si-facebook { border-color: #1877F2; }
.product-info-main .social-icon.si-twitter  { border-color: #1DA1F2; }
.product-info-main .social-icon.si-whatsapp { border-color: #25D366; }

.product-info-main .social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

/* ---------------------------------------------------------------
   Page-wide consistency: one neutral canvas, white content cards.
   The default .product-detail-container has a cream background that
   clashes with the white info/tabs cards — make it transparent so
   the grey page canvas shows through uniformly.
   --------------------------------------------------------------- */
.product-detail-container {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    gap: 32px;
}

/* Related products section */
.related-products-section {
    background: transparent;
}

/* Reset grid on the <section class="related products"> so it doesn't become
   a grid container (it has class "products" which matches the base grid rule).
   Only the inner <ul class="products"> should be the grid. */
.related-products-section section.related {
    display: block !important;
}

.related-products-section .container > section.related > ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: clamp(16px, 2vw, 26px) !important;
    align-items: start;
    width: 100% !important;
    max-width: 100% !important;
}

.related-products-section .container > section.related > ul.products::before,
.related-products-section .container > section.related > ul.products::after {
    display: none !important;
    content: none !important;
}

@media (max-width: 1024px) {
    .related-products-section .container > section.related > ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .related-products-section .container > section.related > ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .related-products-section .container > section.related > ul.products {
        grid-template-columns: 1fr !important;
    }
}

.related-products-section h2,
.related.products > h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--sheeel-ink, #1c1c1e);
    margin: 0 0 20px;
    letter-spacing: -0.01em;
}

/* Modern, padded related-product cards.
   NOTE: the related loop renders WooCommerce's default markup
   (<li class="product"> … .woocommerce-loop-product__title / .price / .button),
   so we target those exact elements. */
.related-products-section li.product,
.related.products li.product {
    background: #fff !important;
    border: 1px solid var(--sheeel-line, #ececf0) !important;
    border-radius: 16px !important;
    box-shadow: var(--sheeel-shadow, 0 10px 30px rgba(20, 20, 30, 0.08)) !important;
    overflow: hidden;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

.related-products-section li.product:hover,
.related.products li.product:hover {
    border-color: var(--sheeel-accent, #4D3F76) !important;
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(20, 20, 30, 0.14) !important;
}

.related-products-section li.product .woocommerce-LoopProduct-link,
.related.products li.product .woocommerce-LoopProduct-link {
    display: block;
}

.related-products-section li.product img,
.related.products li.product img {
    width: 100% !important;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: #f4f4f6 !important;
}

.related-products-section li.product .woocommerce-loop-product__title,
.related.products li.product .woocommerce-loop-product__title {
    padding: 18px 20px 0 !important;
    margin: 0 !important;
    color: var(--sheeel-ink, #1c1c1e);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}

.related-products-section li.product .price,
.related.products li.product .price {
    display: block;
    padding: 10px 20px 20px !important;
    color: var(--sheeel-accent, #4D3F76) !important;
    font-weight: 800;
    font-size: 16px;
}

.related-products-section li.product .button,
.related.products li.product .button,
.related-products-section li.product .add_to_cart_button,
.related.products li.product .add_to_cart_button {
    margin: 0 20px 20px !important;
    flex-shrink: 0;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    text-align: center !important;
    align-self: stretch !important;
    color: #fff !important;
    background: var(--sheeel-primary, #4D3F76) !important;
    min-height: 48px;
    padding: 12px 20px !important;
    border-radius: 10px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none !important;
}
