/* =============================================
   Fajr Advanced — Single Product Page Styles
   fajradv.net | Arabic RTL
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap');

/* =============================================
   PRODUCT BREADCRUMB BANNER
   ============================================= */

.fajr-sp-banner {
    position: relative;
    background: linear-gradient(150deg, #071624 0%, #0a2540 40%, #0f4c81 85%, #1565c0 100%);
    padding: 44px 0 58px;
    overflow: hidden;
    direction: rtl;
    font-family: 'Cairo', sans-serif;
}

.fajr-sp-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

.fajr-sp-banner::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0; right: 0;
    height: 50px;
    background: #f8f9fb;
    clip-path: ellipse(60% 100% at 50% 100%);
    z-index: 2;
}

.fajr-sp-banner-glow {
    position: absolute;
    top: -80px; left: -80px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(21,101,192,0.45) 0%, transparent 65%);
    pointer-events: none;
    z-index: 1;
}

.fajr-sp-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 3;
}

/* Breadcrumb */
.fajr-sp-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.fajr-sp-breadcrumb a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color 0.25s;
}

.fajr-sp-breadcrumb a:hover { color: #fbbf24; }

.fajr-sp-breadcrumb .sep {
    color: rgba(255,255,255,0.3);
    font-size: 11px;
    transform: scaleX(-1);
    display: inline-block;
}

.fajr-sp-breadcrumb .current {
    color: rgba(255,255,255,0.9);
    font-weight: 600;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Banner row: category pill + title */
.fajr-sp-banner-cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245,158,11,0.18);
    border: 1px solid rgba(245,158,11,0.4);
    color: #fbbf24;
    padding: 5px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
    text-decoration: none;
}

.fajr-sp-banner-cat:hover {
    background: rgba(245,158,11,0.28);
    color: #fbbf24;
    text-decoration: none;
}

.fajr-sp-banner-title {
    font-size: clamp(1.6rem, 3.5vw, 2.6rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.2;
    font-family: 'Cairo', sans-serif;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5), 0 8px 32px rgba(0,0,0,0.3);
    margin: 0;
}

/* =============================================
   SINGLE PRODUCT CONTENT AREA
   ============================================= */

body.single-product #content,
body.single-product .site-content {
    background: #f8f9fb !important;
    font-family: 'Cairo', sans-serif !important;
}

body.single-product .content-wrapper {
    background: #f8f9fb;
}

/* Main product container */
body.single-product .product-image-summary-wrap {
    background: transparent;
    padding: 40px 0;
    direction: rtl;
}

/* =============================================
   PRODUCT IMAGE AREA
   ============================================= */

body.single-product .product-images {
    position: relative;
}

body.single-product .woocommerce-product-gallery {
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(15,76,129,0.15) !important;
}

body.single-product .woocommerce-product-gallery__wrapper img {
    border-radius: 16px !important;
}

body.single-product .flex-viewport {
    border-radius: 16px !important;
}

/* =============================================
   PRODUCT SUMMARY (title, price, etc.)
   ============================================= */

/* Hide WC's built-in breadcrumb — we have our custom banner */
body.single-product .single-breadcrumbs-wrapper {
    display: none !important;
}

body.single-product .summary-inner {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', sans-serif;
}

/* Title */
body.single-product .product_title {
    font-family: 'Cairo', sans-serif !important;
    font-size: clamp(1.6rem, 3vw, 2.4rem) !important;
    font-weight: 900 !important;
    color: #0d1b2a !important;
    line-height: 1.2 !important;
    margin-bottom: 12px !important;
}

/* Rating */
body.single-product .woocommerce-product-rating {
    direction: rtl;
    margin-bottom: 16px !important;
}

body.single-product .star-rating {
    direction: rtl;
}

/* Price */
body.single-product p.price,
body.single-product .price {
    font-family: 'Cairo', sans-serif !important;
    font-size: 2rem !important;
    font-weight: 900 !important;
    color: #0f4c81 !important;
    margin-bottom: 20px !important;
    display: flex !important;
    align-items: baseline !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

body.single-product .price del {
    color: #9ca3af !important;
    font-size: 1.2rem !important;
    font-weight: 500 !important;
    text-decoration: line-through !important;
}

body.single-product .price ins {
    text-decoration: none !important;
    color: #0f4c81 !important;
}

body.single-product .price .amount {
    font-family: 'Cairo', sans-serif !important;
}

/* Short description */
body.single-product .woocommerce-product-details__short-description {
    font-family: 'Cairo', sans-serif !important;
    font-size: 0.97rem !important;
    line-height: 1.85 !important;
    color: #374151 !important;
    margin-bottom: 24px !important;
    padding: 18px 20px !important;
    background: #f0f6ff !important;
    border-radius: 10px !important;
    border-right: 4px solid #0f4c81 !important;
    direction: rtl !important;
}

body.single-product .woocommerce-product-details__short-description ul {
    padding-right: 20px !important;
    padding-left: 0 !important;
    list-style: none !important;
}

body.single-product .woocommerce-product-details__short-description ul li {
    position: relative !important;
    padding-right: 20px !important;
    margin-bottom: 6px !important;
}

body.single-product .woocommerce-product-details__short-description ul li::before {
    content: '✓';
    position: absolute;
    right: 0;
    color: #0f4c81;
    font-weight: 700;
}

/* =============================================
   ADD TO CART BUTTON
   ============================================= */

body.single-product .cart {
    margin-bottom: 0 !important;
}

body.single-product .single_add_to_cart_button,
body.single-product button.single_add_to_cart_button {
    background: #0f4c81 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50px !important;
    font-family: 'Cairo', sans-serif !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    padding: 15px 36px !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 6px 24px rgba(15,76,129,0.3) !important;
    letter-spacing: 0.3px !important;
}

body.single-product .single_add_to_cart_button:hover {
    background: #1a6bb5 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 32px rgba(15,76,129,0.4) !important;
    color: #fff !important;
}

/* Quantity input */
body.single-product .quantity .input-text {
    border-radius: 50px !important;
    border: 2px solid #e5e7eb !important;
    font-family: 'Cairo', sans-serif !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    text-align: center !important;
    width: 70px !important;
    height: 50px !important;
    padding: 0 12px !important;
    color: #0d1b2a !important;
}

body.single-product .quantity {
    margin-bottom: 12px !important;
}

/* =============================================
   WHATSAPP CTA (injected via hook)
   ============================================= */

.fajr-sp-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25d366;
    color: #fff !important;
    padding: 15px 36px;
    border-radius: 50px;
    font-family: 'Cairo', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    margin-top: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 24px rgba(37,211,102,0.35);
    letter-spacing: 0.3px;
}

.fajr-sp-whatsapp:hover {
    background: #1db954;
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(37,211,102,0.5);
    color: #fff !important;
    text-decoration: none;
}

.fajr-sp-whatsapp svg {
    width: 22px;
    height: 22px;
    fill: #fff;
    flex-shrink: 0;
}

/* =============================================
   TRUST BADGES (injected via hook)
   ============================================= */

.fajr-sp-trust {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
    direction: rtl;
    font-family: 'Cairo', sans-serif;
}

.fajr-sp-trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    padding: 16px 8px;
    background: #f8f9fb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.fajr-sp-trust-item svg {
    width: 28px;
    height: 28px;
    fill: #0f4c81;
}

.fajr-sp-trust-item strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #0d1b2a;
    line-height: 1.3;
}

.fajr-sp-trust-item span {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.4;
}

/* =============================================
   PRODUCT META (categories, tags, SKU)
   ============================================= */

body.single-product .product_meta {
    font-family: 'Cairo', sans-serif !important;
    font-size: 0.9rem !important;
    color: #6b7280 !important;
    margin-top: 20px !important;
    direction: rtl !important;
    padding-top: 16px !important;
    border-top: 1px solid #e5e7eb !important;
}

body.single-product .product_meta a {
    color: #0f4c81 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
}

body.single-product .product_meta a:hover {
    text-decoration: underline !important;
}

/* =============================================
   PRODUCT TABS
   ============================================= */

body.single-product .woocommerce-tabs {
    direction: rtl;
    font-family: 'Cairo', sans-serif;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(15,76,129,0.08);
    overflow: hidden;
    margin: 8px 0 40px;
}

body.single-product .woocommerce-tabs ul.tabs {
    background: #f8f9fb !important;
    border-bottom: 2px solid #e5e7eb !important;
    padding: 0 24px !important;
    display: flex !important;
    gap: 4px !important;
    margin: 0 !important;
    list-style: none !important;
    direction: rtl !important;
}

body.single-product .woocommerce-tabs ul.tabs li {
    border: none !important;
    background: transparent !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

body.single-product .woocommerce-tabs ul.tabs li a {
    font-family: 'Cairo', sans-serif !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: #6b7280 !important;
    padding: 16px 24px !important;
    display: block !important;
    border-bottom: 3px solid transparent !important;
    text-decoration: none !important;
    transition: all 0.25s !important;
    margin-bottom: -2px !important;
}

body.single-product .woocommerce-tabs ul.tabs li.active a,
body.single-product .woocommerce-tabs ul.tabs li a:hover {
    color: #0f4c81 !important;
    border-bottom-color: #0f4c81 !important;
}

body.single-product .woocommerce-tabs .panel {
    padding: 32px 28px !important;
    font-family: 'Cairo', sans-serif !important;
    font-size: 0.97rem !important;
    line-height: 1.9 !important;
    color: #374151 !important;
    direction: rtl !important;
}

/* =============================================
   RELATED PRODUCTS
   ============================================= */

body.single-product .related.products,
body.single-product .upsells.products {
    direction: rtl;
    font-family: 'Cairo', sans-serif;
    padding: 0 0 60px;
}

body.single-product .related.products > h2,
body.single-product .upsells.products > h2 {
    font-family: 'Cairo', sans-serif !important;
    font-size: 1.6rem !important;
    font-weight: 900 !important;
    color: #0d1b2a !important;
    margin-bottom: 28px !important;
    position: relative;
    padding-bottom: 14px;
}

body.single-product .related.products > h2::after,
body.single-product .upsells.products > h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 4px;
    background: linear-gradient(90deg, #0f4c81, #f59e0b);
    border-radius: 2px;
}

body.single-product .related.products ul.products,
body.single-product .upsells.products ul.products {
    direction: rtl !important;
}

body.single-product .related.products ul.products li.product,
body.single-product .upsells.products ul.products li.product {
    background: #fff !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 24px rgba(15,76,129,0.10) !important;
    border: 1px solid #e5e7eb !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

body.single-product .related.products ul.products li.product:hover,
body.single-product .upsells.products ul.products li.product:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 40px rgba(15,76,129,0.18) !important;
    border-color: transparent !important;
}

body.single-product .related .woocommerce-loop-product__title,
body.single-product .upsells .woocommerce-loop-product__title {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 700 !important;
    font-size: 0.97rem !important;
    color: #0d1b2a !important;
}

body.single-product .related .price,
body.single-product .upsells .price {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 700 !important;
    color: #0f4c81 !important;
    font-size: 1rem !important;
}

body.single-product .related .button,
body.single-product .upsells .button {
    background: #0f4c81 !important;
    color: #fff !important;
    border-radius: 50px !important;
    font-family: 'Cairo', sans-serif !important;
    font-weight: 700 !important;
    border: none !important;
    transition: all 0.3s ease !important;
}

body.single-product .related .button:hover,
body.single-product .upsells .button:hover {
    background: #1a6bb5 !important;
    transform: translateY(-2px) !important;
}

/* =============================================
   SALE BADGE
   ============================================= */

body.single-product .onsale {
    background: #f59e0b !important;
    color: #0d1b2a !important;
    font-family: 'Cairo', sans-serif !important;
    font-weight: 700 !important;
    border-radius: 50px !important;
    font-size: 0.85rem !important;
    padding: 4px 14px !important;
}

/* =============================================
   STICKY ADD-TO-CART MOBILE BAR
   ============================================= */

@media (max-width: 768px) {
    .fajr-sp-sticky-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        border-top: 1px solid #e5e7eb;
        padding: 12px 16px;
        display: flex;
        gap: 10px;
        z-index: 9999;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.10);
        direction: rtl;
    }

    .fajr-sp-sticky-bar .fajr-sticky-cart {
        flex: 1;
        background: #0f4c81;
        color: #fff;
        border: none;
        border-radius: 50px;
        font-family: 'Cairo', sans-serif;
        font-size: 0.95rem;
        font-weight: 700;
        padding: 13px 20px;
        cursor: pointer;
        text-align: center;
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .fajr-sp-sticky-bar .fajr-sticky-wa {
        background: #25d366;
        color: #fff;
        border: none;
        border-radius: 50px;
        width: 52px;
        height: 52px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        text-decoration: none;
    }

    .fajr-sp-sticky-bar svg {
        width: 22px;
        height: 22px;
        fill: #fff;
    }

    /* Add bottom padding so sticky bar doesn't cover content */
    body.single-product {
        padding-bottom: 80px !important;
    }
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
    .fajr-sp-banner {
        padding: 32px 0 50px;
    }

    .fajr-sp-banner-inner {
        padding: 0 16px;
    }

    .fajr-sp-banner-title {
        font-size: 1.4rem;
    }

    .fajr-sp-trust {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .fajr-sp-trust-item {
        padding: 12px 6px;
    }

    .fajr-sp-trust-item svg {
        width: 22px;
        height: 22px;
    }

    .fajr-sp-trust-item strong {
        font-size: 0.75rem;
    }

    .fajr-sp-trust-item span {
        font-size: 0.68rem;
    }

    body.single-product .woocommerce-tabs .panel {
        padding: 20px 16px !important;
    }

    body.single-product .woocommerce-tabs ul.tabs {
        padding: 0 12px !important;
    }

    body.single-product .woocommerce-tabs ul.tabs li a {
        padding: 12px 14px !important;
        font-size: 0.88rem !important;
    }
}

@media (max-width: 480px) {
    .fajr-sp-trust {
        grid-template-columns: 1fr 1fr 1fr;
    }

    body.single-product p.price {
        font-size: 1.6rem !important;
    }
}
