/* ═══════════════════════════════════════
   نظام Responsive موحّد - vbcardsa.com
   Mobile-First Approach (320px - 1920px+)
═══════════════════════════════════════ */

/* ═══════════════════════════════════════
   اللون الرئيسي للمتجر - افتراضي عالمي
═══════════════════════════════════════ */

html {
    min-height: 100vh;
    background-color: #0d1624 !important;
    overflow-x: hidden !important;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden !important;
    max-width: 100vw;
    background-color: #0d1624 !important;
    color: #ffffff;
}

/* أي wrapper رئيسي يكون شفاف */
.main-wrapper,
main,
.page-content,
.page-wrapper,
#main-content,
#wrapper,
.mainer,
.main {
    background-color: transparent !important;
}

/* الصور كلها responsive */
img {
    max-width: 100%;
    height: auto;
}

/* الفيديوهات */
iframe, video, embed, object {
    max-width: 100%;
}

/* الجداول لا تكسر */
.table-responsive,
table {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* النصوص الطويلة */
h1, h2, h3, h4, h5, h6, p, a, span {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ═══════════════════════════════════════
   إصلاحات للعروض الثابتة المكتشفة
═══════════════════════════════════════ */

/* إصلاح .add-cart 230px */
.add-cart a,
.add-cart {
    max-width: 100% !important;
}

/* أي عنصر بـ inline width style */
[style*="width:"][style*="px"] {
    max-width: 100% !important;
}

/* ═══════════════════════════════════════
   Mobile صغير (320px - 374px)
═══════════════════════════════════════ */
@media (max-width: 374px) {
    body {
        font-size: 13px;
    }

    .container,
    .container-fluid {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .header_c_container {
        padding: 0 8px !important;
    }

    h1 { font-size: 20px !important; }
    h2 { font-size: 17px !important; }
    h3 { font-size: 15px !important; }

    /* المنتجات - عمودان متراصان */
    .product-grid,
    .products-row {
        gap: 6px;
    }
}

/* ═══════════════════════════════════════
   Mobile عادي (375px - 575px)
═══════════════════════════════════════ */
@media (min-width: 375px) and (max-width: 575px) {
    body {
        font-size: 14px;
    }

    .container,
    .container-fluid {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* الأزرار: عرض كامل */
    .btn-primary,
    .btn-secondary,
    .add-cart a {
        width: 100%;
        padding: 10px 16px;
        text-align: center;
    }

    /* السلايدر */
    .slider-section,
    .swiper-slide img {
        height: auto;
    }

    /* الفوتر */
    .footer-section,
    footer {
        padding: 20px 12px;
    }

    /* sidebar mobile */
    .sidebar-mobile {
        width: 100% !important;
        max-width: 280px;
    }
}

/* ═══════════════════════════════════════
   Tablet (576px - 991px)
═══════════════════════════════════════ */
@media (min-width: 576px) and (max-width: 991px) {
    .container {
        max-width: 100%;
        padding: 0 16px;
    }

    /* المنتجات - 3 أعمدة */
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ═══════════════════════════════════════
   Tablet كبير (992px - 1199px)
═══════════════════════════════════════ */
@media (min-width: 992px) and (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
}

/* ═══════════════════════════════════════
   Desktop (1200px+)
═══════════════════════════════════════ */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* ═══════════════════════════════════════
   إصلاحات RTL للعربية
═══════════════════════════════════════ */
[dir="rtl"] body,
.rtl {
    text-align: right;
}

/* ═══════════════════════════════════════
   تحسينات اللمس للموبايل
═══════════════════════════════════════ */
@media (hover: none) and (pointer: coarse) {
    /* الأزرار حجم لمس أفضل */
    button,
    .btn,
    a.btn,
    input[type="submit"] {
        min-height: 44px;
        min-width: 44px;
    }

    /* روابط في القوائم */
    nav a,
    .menu a {
        padding: 12px 8px;
    }
}

/* ═══════════════════════════════════════
   إصلاحات Mobile - أيقونات + سهم الصعود
═══════════════════════════════════════ */

@media (max-width: 1024px) {

    /* ─── سهم الصعود فوق البار السفلي ─── */
    #scrollUp {
        bottom: 80px !important;
        z-index: 10000 !important;
    }

    .back-to-top {
        bottom: 80px !important;
        z-index: 10000 !important;
    }

    /* ─── البار السفلي: z-index أقل من سهم الصعود ─── */
    .bottom_bar {
        z-index: 9999 !important;
    }

    /* ─── أيقونات header_c مرئية على الموبايل ─── */
    .header_c_icons {
        display: flex !important;
        align-items: center !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .header_c_icons a {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .header_c_icons a i,
    .header_c_icons a .fa-solid,
    .header_c_icons a [class*="fa-"] {
        display: inline-block !important;
        visibility: visible !important;
        font-size: 1.2rem !important;
        color: white !important;
    }

    /* الـ icon wrapper لا يختفي */
    .header_c_icons .icon {
        display: inline-flex !important;
        position: relative !important;
        overflow: visible !important;
    }

    /* ─── padding للصفحة تحت البار السفلي ─── */
    body {
        padding-bottom: 70px;
    }

    footer {
        margin-bottom: 60px;
    }
}

/* ═══════════════════════════════════════
   إصلاح WOW.js على الجوال
   WOW.js sets visibility:hidden inline — override with !important
   mobile:true by default so it runs, but scroll detection fails on iOS
═══════════════════════════════════════ */

@media (max-width: 1024px) {
    .wow {
        visibility: visible !important;
    }

    .wow.animate__animated {
        opacity: 1 !important;
        animation-duration: 0.01ms !important;
        animation-delay: 0s !important;
    }
}

/* ═══════════════════════════════════════
   إصلاح الدردشة على الجوال
═══════════════════════════════════════ */

/* منع iOS zoom عند focus على input الدردشة */
#chatbotInput,
.chatbot-input input,
.chatbot-input textarea {
    font-size: 16px !important;
}

@media (max-width: 768px) {

    /* تثبيت الصفحة عند فتح الدردشة */
    body.chatbot-open {
        overflow: hidden !important;
    }

    /* نافذة الدردشة fullscreen على الجوال */
    .chatbot-window.active {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        z-index: 9999999 !important;
        margin: 0 !important;
    }

    /* رأس الدردشة ثابت */
    .chatbot-header {
        position: sticky !important;
        top: 0 !important;
        z-index: 10 !important;
        flex-shrink: 0 !important;
    }

    /* منطقة الرسائل تملأ المساحة المتبقية */
    .chatbot-messages {
        flex: 1 !important;
        height: auto !important;
        max-height: none !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* حقل الإدخال يلصق في الأسفل */
    .chatbot-input {
        position: sticky !important;
        bottom: 0 !important;
        flex-shrink: 0 !important;
        z-index: 10 !important;
    }
}

/* ═══════════════════════════════════════
   إصلاح الفراغات البيضاء في الهيدر
═══════════════════════════════════════ */

/* أي wrapper مباشر داخل body يكون شفاف */
body > div:not([class]):not([id]),
body > section,
body > article {
    background-color: transparent;
}

/* الـ header wrappers الفارغة تكون شفافة */
.header-area,
header.header-area,
.header-wrapper,
.header-container,
.header-middle,
.header-bottom {
    background-color: transparent !important;
}

/* الـ header الرئيسي يحتفظ بخلفيته الداكنة */
header[style*="background"] {
    background-color: #0d1624 !important;
}

/* header_c يحتفظ بلونه */
.header_c {
    background-color: #1e2b3f !important;
}

/* أي divider أو border لا يكون أبيض */
hr,
.divider,
.separator {
    background-color: rgba(255,255,255,0.1) !important;
    border-color: rgba(255,255,255,0.1) !important;
}

/* ═══════════════════════════════════════
   الأقسام - Grid ثابت 3×2
═══════════════════════════════════════ */

.popular-categories .carausel-10-columns-cover {
    overflow: visible !important;
}

.popular-categories .carausel-10-columns {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    max-width: 900px !important;
    margin: 0 auto !important;
    transform: none !important;
    width: 100% !important;
}

.popular-categories .carausel-10-columns > .card-2 {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    min-width: unset !important;
}

.popular-categories .slider-arrow,
.popular-categories #carausel-10-columns-arrows {
    display: none !important;
}

@media (max-width: 768px) {
    .popular-categories .carausel-10-columns {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px !important;
        max-width: 100% !important;
    }
}

/* ═══════════════════════════════════════
   قسم البلس - منتجين في الصف على الجوال
═══════════════════════════════════════ */

@media (max-width: 768px) {

    .carausel-4-columns-cover {
        overflow: visible !important;
    }

    .carausel-4-columns {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        transform: none !important;
        padding: 0 12px !important;
    }

    .carausel-4-columns > *,
    .carausel-4-columns .product-cart-wrap,
    .carausel-4-columns .product-card {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        transform: none !important;
    }

    .carausel-4-columns img {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
    }

    .carausel-4-columns + .slider-arrow,
    .carausel-4-columns ~ .slick-arrow {
        display: none !important;
    }
}

/* ═══════════════════════════════════════
   إزالة الخلفية البيضاء من صورة المنتج
   المصدر: main.css - .detail-gallery .product-image-slider { background-color: #fff }
═══════════════════════════════════════ */
.detail-gallery .product-image-slider {
    background-color: transparent !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
}

/* ═══════════════════════════════════════
   صفحة المنتج - Hero Section v2
═══════════════════════════════════════ */

.product-hero-v2 {
    padding: 8px 0 24px;
    direction: rtl;
}

.product-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(5,150,105,0.1));
    border: 1px solid rgba(16,185,129,0.3);
    color: #10b981;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 14px;
}

.tag-pulse {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
    flex-shrink: 0;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

.product-hero-v2 .product-title {
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 16px;
    line-height: 1.35;
    letter-spacing: -0.3px;
}

.price-section {
    margin-bottom: 16px;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(5,150,105,0.04));
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.price-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(16,185,129,0.12), transparent 70%);
    pointer-events: none;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.price-section .old-price {
    color: rgba(255,255,255,0.4);
    text-decoration: line-through;
    font-size: 15px;
}

.discount-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}

.current-price {
    font-size: 40px;
    font-weight: 800;
    color: #10b981;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    text-shadow: 0 2px 20px rgba(16,185,129,0.3);
}

.current-price svg {
    width: 28px !important;
    height: 28px !important;
    fill: #10b981 !important;
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.rating-display {
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,0.05);
    padding: 7px 13px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
}

.rating-text {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    font-weight: 500;
}

.trust-badges-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
    padding: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
}

.trust-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-align: center;
    padding: 8px 4px;
    border-radius: 8px;
    transition: all 0.25s;
    cursor: default;
}

.trust-badge:hover {
    background: rgba(16,185,129,0.08);
    transform: translateY(-2px);
}

.badge-icon {
    font-size: 22px;
}

.trust-badge span {
    color: rgba(255,255,255,0.8);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.3;
}

.stock-indicator {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 12px 16px;
}

.stock-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.stock-icon { font-size: 16px; }

.stock-text {
    font-weight: 700;
    font-size: 14px;
}

.stock-text.in-stock  { color: #10b981; }
.stock-text.low-stock { color: #f59e0b; animation: blink-stock 2s infinite; }
.stock-text.out-stock { color: #ef4444; }

@keyframes blink-stock {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.65; }
}

.stock-bar {
    height: 5px;
    background: rgba(255,255,255,0.06);
    border-radius: 100px;
    overflow: hidden;
    margin-top: 2px;
}

.stock-fill {
    height: 100%;
    background: linear-gradient(90deg, #ef4444, #f59e0b);
    border-radius: 100px;
    transition: width 0.5s ease;
}

/* موبايل */
@media (max-width: 768px) {
    .product-hero-v2 .product-title { font-size: 20px; }
    .current-price { font-size: 34px; }
    .trust-badges-row { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════
   CTA Section v2
═══════════════════════════════════════ */

.cta-section-v2 {
    padding: 20px 0;
    direction: rtl;
}

/* ── Quantity Selector ── */
.qty-selector-v2 {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 14px;
}

.qty-label {
    display: block;
    color: rgba(255,255,255,0.5);
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.qty-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 12px;
}

.qty-btn {
    width: 44px;
    height: 44px;
    background: rgba(16,185,129,0.1);
    border: 1.5px solid rgba(16,185,129,0.3);
    color: #10b981;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: #10b981;
    color: #fff;
    transform: scale(1.05);
}

.qty-btn:active { transform: scale(0.95); }

.qty-input {
    width: 68px;
    height: 44px;
    background: rgba(255,255,255,0.05);
    border: 1.5px solid rgba(255,255,255,0.1);
    color: #fff;
    border-radius: 12px;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    outline: none;
    -moz-appearance: textfield;
}

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

.qty-total {
    text-align: center;
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    padding-top: 10px;
    border-top: 1px dashed rgba(255,255,255,0.07);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.qty-total strong {
    color: #10b981;
    font-size: 17px;
    margin: 0 4px;
}

.qty-total svg {
    width: 13px !important;
    height: 13px !important;
    fill: #10b981 !important;
}

/* ── Primary Button ── */
.btn-cta-primary {
    width: 100%;
    padding: 17px 22px;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 16px;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 8px 24px rgba(16,185,129,0.35), inset 0 1px 0 rgba(255,255,255,0.15);
    text-align: right;
}

.btn-cta-primary::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
    transition: left 0.55s;
}

.btn-cta-primary:hover::before { left: 100%; }

.btn-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(16,185,129,0.5);
}

.btn-cta-primary:active { transform: translateY(0); }

.btn-shine {
    position: absolute;
    top: -50%; right: -50%;
    width: 80px; height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
    transform: rotate(35deg);
    animation: btn-shine 3.5s infinite;
    pointer-events: none;
}

@keyframes btn-shine {
    0%   { right: -50%; }
    100% { right: 150%; }
}

.btn-icon { font-size: 24px; flex-shrink: 0; }

.btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
    flex: 1;
}

.btn-main { font-size: 17px; font-weight: 800; }
.btn-sub  { font-size: 11px; opacity: 0.82; font-weight: 500; margin-top: 2px; }

.btn-arrow {
    margin-right: auto;
    flex-shrink: 0;
    transition: transform 0.3s;
}

.btn-cta-primary:hover .btn-arrow { transform: translateX(-4px); }

/* ── Disabled state ── */
.btn-cta-disabled {
    background: #1e2b3f !important;
    box-shadow: none !important;
    color: #566880 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.btn-cta-disabled .btn-shine { display: none; }

/* ── Secondary Buttons ── */
.cta-secondary-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.btn-cta-secondary {
    padding: 13px 14px;
    background: rgba(255,255,255,0.05);
    border: 1.5px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.85);
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 14px;
    transition: all 0.25s;
}

.btn-cta-secondary.cart:hover {
    background: rgba(16,185,129,0.1);
    border-color: rgba(16,185,129,0.4);
    color: #10b981;
    transform: translateY(-2px);
}

.btn-cta-secondary.gift:hover {
    background: rgba(236,72,153,0.1);
    border-color: rgba(236,72,153,0.4);
    color: #ec4899;
    transform: translateY(-2px);
}

.btn-emoji { font-size: 17px; }

/* ── Features Bar ── */
.cta-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 11px;
    background: rgba(16,185,129,0.04);
    border: 1px solid rgba(16,185,129,0.1);
    border-radius: 10px;
}

.feature-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: rgba(255,255,255,0.65);
    font-size: 11px;
    font-weight: 500;
}

.feature-icon { color: #10b981; font-weight: 700; font-size: 12px; }

/* موبايل */
@media (max-width: 768px) {
    .btn-cta-primary  { padding: 15px 18px; }
    .btn-main         { font-size: 15px; }
    .btn-icon         { font-size: 21px; }
    .qty-btn          { width: 40px; height: 40px; }
    .qty-input        { width: 60px; height: 40px; font-size: 16px; }
}

/* ═══════════════════════════════════════
   Product Tabs v2
═══════════════════════════════════════ */

.product-tabs-v2 {
    margin-top: 28px;
    direction: rtl;
}

.tabs-header {
    display: flex;
    gap: 4px;
    padding: 6px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-bottom: none;
    border-radius: 14px 14px 0 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.tabs-header::-webkit-scrollbar { display: none; }

.tab-btn {
    flex: 1;
    min-width: 82px;
    padding: 11px 10px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.55);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.25s;
    position: relative;
    white-space: nowrap;
}

.tab-btn:hover {
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.04);
}

.tab-btn.active {
    background: linear-gradient(135deg, rgba(16,185,129,0.18), rgba(5,150,105,0.09));
    color: #10b981;
    box-shadow: 0 4px 12px rgba(16,185,129,0.12);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(16,185,129,0.6);
}

.tab-icon  { font-size: 20px; }
.tab-label { font-weight: 700; font-size: 12px; }

.tabs-body {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 0 0 14px 14px;
    padding: 22px 20px;
    min-height: 180px;
}

.tab-pane         { display: none; animation: fadeInTab 0.3s ease-out; }
.tab-pane.active  { display: block; }

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(7px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tab-content-inner {
    color: rgba(255,255,255,0.82);
    line-height: 1.85;
    font-size: 14px;
    direction: rtl;
}

.tab-content-inner p  { margin-bottom: 10px; }
.tab-content-inner h1,
.tab-content-inner h2,
.tab-content-inner h3,
.tab-content-inner h4 { color: #fff; margin: 14px 0 7px; }

/* Info List */
.info-list { list-style: none; padding: 0; margin: 0; }

.info-list li {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.info-list li:hover {
    background: rgba(16,185,129,0.05);
    border-color: rgba(16,185,129,0.2);
    transform: translateX(-3px);
}

.info-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.info-list li strong { color: #10b981; font-weight: 700; }

.terms-warning {
    background: linear-gradient(135deg, rgba(245,158,11,0.14), rgba(217,119,6,0.07));
    border: 1px solid rgba(245,158,11,0.28);
    color: #f59e0b;
    padding: 11px 15px;
    border-radius: 10px;
    margin-bottom: 14px;
    font-weight: 600;
    text-align: center;
    font-size: 13px;
}

.warning-item {
    background: rgba(239,68,68,0.07) !important;
    border-color: rgba(239,68,68,0.22) !important;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 11px;
}

.feature-card {
    background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(5,150,105,0.04));
    border: 1px solid rgba(16,185,129,0.18);
    border-radius: 14px;
    padding: 18px 14px;
    text-align: center;
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 22px rgba(16,185,129,0.18);
    border-color: rgba(16,185,129,0.38);
}

.feature-card-icon { font-size: 32px; margin-bottom: 9px; }
.feature-card h4   { color: #fff; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.feature-card p    { color: rgba(255,255,255,0.55); font-size: 11px; margin: 0; }

/* موبايل */
@media (max-width: 768px) {
    .tab-btn       { min-width: 74px; padding: 9px 7px; }
    .tab-icon      { font-size: 17px; }
    .tabs-body     { padding: 15px 13px; }
    .features-grid { gap: 8px; }
    .feature-card  { padding: 14px 10px; }
    .feature-card-icon { font-size: 26px; }
}

/* ═══════════════════════════════════════
   Social Proof v2
═══════════════════════════════════════ */

.social-proof-v2 {
    margin: 16px 0 20px;
    direction: rtl;
}

.bestseller-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    padding: 7px 16px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
    box-shadow: 0 4px 14px rgba(245,158,11,0.4);
    animation: bestsellerPulse 2.2s ease-in-out infinite;
}

@keyframes bestsellerPulse {
    0%,100% { box-shadow: 0 4px 14px rgba(245,158,11,0.4); }
    50%      { box-shadow: 0 4px 26px rgba(245,158,11,0.7); }
}

.badge-fire {
    font-size: 15px;
    animation: fireWave 1.1s ease-in-out infinite;
}

@keyframes fireWave {
    0%,100% { transform: rotate(-5deg); }
    50%      { transform: rotate(5deg); }
}

.proof-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.proof-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 11px 10px;
    transition: all 0.25s;
}

.proof-item:hover {
    background: rgba(16,185,129,0.05);
    border-color: rgba(16,185,129,0.2);
    transform: translateY(-2px);
}

.proof-icon-wrapper {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.proof-icon-wrapper.buyers  { background: rgba(59,130,246,0.14); color: #3b82f6; }
.proof-icon-wrapper.recent  { background: rgba(245,158,11,0.14); color: #f59e0b; }
.proof-icon-wrapper.viewers { background: rgba(16,185,129,0.14); color: #10b981; }

.pulse-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 7px;
    height: 7px;
    background: #10b981;
    border-radius: 50%;
    animation: pulseDot 1.6s infinite;
}

.pulse-dot.live {
    background: #ef4444;
    animation: pulseLive 1.6s infinite;
}

@keyframes pulseDot {
    0%,100% { opacity:1; transform:scale(1); }
    50%      { opacity:0.55; transform:scale(1.25); }
}

@keyframes pulseLive {
    0%   { box-shadow: 0 0 0 0 rgba(239,68,68,0.7); }
    70%  { box-shadow: 0 0 0 7px rgba(239,68,68,0); }
    100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}

.proof-info {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    min-width: 0;
}

.proof-number {
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.proof-label {
    color: rgba(255,255,255,0.55);
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
}

/* Live Ticker */
.live-ticker {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(16,185,129,0.07), rgba(5,150,105,0.03));
    border: 1px solid rgba(16,185,129,0.18);
    border-radius: 12px;
    padding: 10px 14px;
    overflow: hidden;
}

.ticker-icon {
    width: 22px;
    height: 22px;
    background: rgba(239,68,68,0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.ticker-text {
    color: rgba(255,255,255,0.82);
    font-size: 12px;
    font-weight: 500;
    flex: 1;
    transition: opacity 0.4s, transform 0.4s;
}

/* موبايل */
@media (max-width: 768px) {
    .proof-grid            { grid-template-columns: repeat(3,1fr); gap: 6px; }
    .proof-item            { padding: 9px 8px; gap: 7px; }
    .proof-icon-wrapper    { width: 32px; height: 32px; border-radius: 8px; }
    .proof-number          { font-size: 12px; }
    .proof-label           { font-size: 9px; }
    .live-ticker           { font-size: 11px; }
}


/* ═══════════════════════════════════════
   NEW PRODUCT PAGE CSS (Phases 5-7)
═══════════════════════════════════════ */

/* ═══════════════════════════════════════
   Sticky Buy Bar (Mobile Only)
═══════════════════════════════════════ */
.sticky-buy-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: rgba(13, 22, 36, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 -8px 24px rgba(0,0,0,0.3);
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    direction: rtl;
}

.sticky-buy-bar.visible {
    transform: translateY(0);
}

.sticky-bar-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.sticky-price-info {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    min-width: 90px;
}

.sticky-price-label {
    color: rgba(255,255,255,0.5);
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sticky-price-value {
    display: flex;
    align-items: baseline;
    gap: 4px;
    color: #10b981;
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
}

.sticky-riyal {
    width: 16px !important;
    height: 16px !important;
}

.sticky-buy-btn {
    flex: 1;
    padding: 14px 18px;
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border: none !important;
    border-radius: 12px;
    color: white !important;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(16,185,129,0.4),
                inset 0 1px 0 rgba(255,255,255,0.2);
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.sticky-buy-btn span,
.sticky-buy-btn .sticky-btn-icon {
    color: white !important;
}

.sticky-buy-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s;
}

.sticky-buy-btn:active::before {
    left: 100%;
}

.sticky-buy-btn:active {
    transform: scale(0.98);
}

.sticky-buy-btn.disabled {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.4);
    cursor: not-allowed;
    box-shadow: none;
}

.sticky-btn-icon {
    font-size: 20px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.sticky-bar-spacer {
    display: none;
}

@media (max-width: 768px) {
    .sticky-buy-bar {
        display: block;
    }

    .sticky-bar-spacer {
        display: block;
        height: 80px;
    }
}

/* ═══════════════════════════════════════
   Breadcrumb v2
═══════════════════════════════════════ */
.breadcrumb-v2 {
    padding: 16px 0;
    direction: rtl;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.breadcrumb-link:hover {
    color: #10b981;
    background: rgba(16,185,129,0.08);
    border-color: rgba(16,185,129,0.2);
    text-decoration: none;
    transform: translateY(-1px);
}

.breadcrumb-link.home {
    color: #10b981;
    background: rgba(16,185,129,0.08);
    border-color: rgba(16,185,129,0.15);
}

.breadcrumb-link.home:hover {
    background: rgba(16,185,129,0.15);
}

.breadcrumb-separator {
    color: rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    transform: rotate(180deg);
}

.breadcrumb-current {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    color: white;
    background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(5,150,105,0.08));
    border: 1px solid rgba(16,185,129,0.3);
    border-radius: 8px;
    font-weight: 600;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .breadcrumb-v2 {
        padding: 12px 0;
        margin-bottom: 8px;
    }

    .breadcrumb-list {
        font-size: 11px;
        gap: 4px;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 4px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .breadcrumb-list::-webkit-scrollbar {
        display: none;
    }

    .breadcrumb-item {
        flex-shrink: 0;
    }

    .breadcrumb-link,
    .breadcrumb-current {
        padding: 5px 10px;
        font-size: 11px;
        white-space: nowrap;
    }

    .breadcrumb-current {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .breadcrumb-separator {
        flex-shrink: 0;
        padding: 0 2px;
    }
}

/* ═══════════════════════════════════════
   Share Bar v2
═══════════════════════════════════════ */
.share-bar-v2 {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    direction: rtl;
}

body .share-bar-v2 .share-btn,
.share-bar-v2 button.share-btn,
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(16,185,129,0.06) !important;
    border: 1px solid rgba(16,185,129,0.2) !important;
    color: #10b981 !important;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
}

body .share-bar-v2 .share-btn:hover,
.share-bar-v2 button.share-btn:hover,
.share-btn:hover {
    background: linear-gradient(135deg, rgba(16,185,129,0.18), rgba(5,150,105,0.1)) !important;
    border-color: rgba(16,185,129,0.5) !important;
    color: #10b981 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16,185,129,0.25);
}

.share-btn.copy.copied {
    background: linear-gradient(135deg, rgba(16,185,129,0.3), rgba(5,150,105,0.2)) !important;
    border-color: #10b981 !important;
    color: #10b981 !important;
}

.share-btn svg,
.share-btn span {
    color: inherit !important;
    fill: currentColor;
    transition: transform 0.2s;
}

.share-btn:hover svg {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .share-bar-v2 {
        gap: 6px;
    }

    .share-btn {
        padding: 6px 10px;
        font-size: 11px;
    }

    .share-btn span {
        display: none;
    }

    .share-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* ═══════════════════════════════════════
   Page Animations
═══════════════════════════════════════ */
.product-hero-v2,
.cta-section-v2,
.social-proof-v2,
.product-tabs-v2 {
    animation: slideUpFade 0.6s ease-out backwards;
}

.product-hero-v2  { animation-delay: 0.1s; }
.social-proof-v2  { animation-delay: 0.2s; }
.cta-section-v2   { animation-delay: 0.3s; }
.product-tabs-v2  { animation-delay: 0.4s; }

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.detail-gallery {
    animation: imageReveal 0.8s ease-out;
}

@keyframes imageReveal {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: scale(1); }
}

/* ═══════════════════════════════════════
   Global UX Improvements
═══════════════════════════════════════ */
html {
    scroll-behavior: smooth;
}

::selection {
    background: rgba(16,185,129,0.3);
    color: white;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 2px;
    border-radius: 6px;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
}

::-webkit-scrollbar-thumb {
    background: rgba(16,185,129,0.4);
    border-radius: 100px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(16,185,129,0.6);
}

/* ═══════════════════════════════════════
   إصلاح: مساحة قسرية أسفل الصفحة
═══════════════════════════════════════ */

@media (max-width: 768px) {
    .related-products-section {
        margin-bottom: 100px !important;
        padding-bottom: 30px !important;
    }

    .related-card,
    .related-grid {
        position: relative;
        z-index: 1;
    }

    .sticky-bar-spacer {
        display: block !important;
        height: 100px !important;
        width: 100%;
        background: transparent;
    }

    footer,
    .footer,
    #footer,
    .main-footer {
        margin-bottom: 90px !important;
    }

    .sticky-buy-bar {
        z-index: 9999 !important;
    }

    .related-card .btn,
    .related-card button,
    .related-card a.btn {
        position: relative !important;
        z-index: 1 !important;
    }
}
