/* assets/css/product.css - تنسيقات صفحة المنتج */

/* منع تكبير الصفحة بسلاسة تامة بدون تعطيل التمرير السريع على الموبايل */
html, body {
    touch-action: manipulation;
    overscroll-behavior-x: none;
    -webkit-text-size-adjust: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* منع التكبير التلقائي لمتصفح الآيفون عند الكتابة داخل الحقول النصية فقط */
@media (max-width: 991.98px) {
    input:not([type="file"]):not([type="radio"]):not([type="checkbox"]),
    textarea,
    select {
        font-size: 16px !important;
    }
    .mobile-bottom-padding {
        padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

.tabular-nums { font-variant-numeric: tabular-nums; }
.cursor-pointer { cursor: pointer; }
.active-thumb { border-color: #0284c7 !important; border-width: 2.5px !important; }
.scrollbar-hidden::-webkit-scrollbar { display: none; }
.scrollbar-hidden { -ms-overflow-style: none; scrollbar-width: none; }

/* الإطار الرئيسي للصورة مع عرض النظارة كاملة بدون قصّ وزووم سلس على الكمبيوتر */
.main-img-box {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #ffffff;
    overflow: hidden;
    border-radius: 16px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}
@media (hover: hover) and (pointer: fine) {
    .main-img-box.has-zoom { cursor: zoom-in; }
}
.main-img-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    will-change: transform;
    transition: transform 0.18s ease-out;
}
.slider-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    color: #0f172a;
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    z-index: 4;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.slider-nav-btn:hover {
    background: #0284c7;
    color: #ffffff;
}
.slider-prev-btn { right: 10px; }
.slider-next-btn { left: 10px; }

.img-counter-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(15, 23, 42, 0.78);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 50rem;
    z-index: 4;
    pointer-events: none;
}
.zoom-tip-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(248, 250, 252, 0.94);
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 50rem;
    z-index: 4;
    pointer-events: none;
}

/* الهوية الذهبية البرتقالية الموحدة لعروض الباقات */
.bundle-offer-box {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1.5px dashed #f59e0b;
    border-radius: 14px;
    padding: 12px;
    position: relative;
}
.bundle-offer-ribbon {
    background: linear-gradient(135deg, #ea580c 0%, #f59e0b 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.bundle-discount-tag {
    background: #dc2626;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 999px;
}
.bundle-savings-tag {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
    font-weight: 800;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 999px;
}
.bundle-price-text {
    color: #b45309;
    font-weight: 900;
}
.smart-bundle-row {
    background: #ffffff;
    border: 1px solid #fcd34d;
    border-radius: 10px;
    padding: 9px 10px;
}
.btn-bundle-sm {
    background: linear-gradient(135deg, #ea580c 0%, #f59e0b 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    padding: 6px 13px;
    white-space: nowrap;
    box-shadow: 0 3px 8px rgba(234, 88, 12, 0.25);
    transition: filter 0.2s ease;
    text-align: center;
}
.btn-bundle-sm:hover {
    filter: brightness(1.06);
    color: #ffffff !important;
}
.btn-buy-bundle-main {
    background: linear-gradient(135deg, #ea580c 0%, #f59e0b 100%);
    color: #ffffff !important;
    border: none;
    box-shadow: 0 6px 18px rgba(234, 88, 12, 0.3);
}
.btn-buy-bundle-main:hover {
    filter: brightness(1.05);
    color: #ffffff !important;
}

/* صندوق رفع الروشتة في وضع الباقة */
.bundle-rx-card {
    background: #fffbeb;
    border: 1.5px solid #f59e0b;
    border-radius: 14px;
    padding: 13px;
    transition: box-shadow 0.25s ease;
}
.rx-highlight-pulse {
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.35) !important;
}

/* ملحوظة المقاسات المختصرة */
.rx-limit-note {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-right: 3px solid #f59e0b;
    color: #334155;
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 0.76rem;
    line-height: 1.5;
}

/* وحدة التحكم بالكمية المتناسقة مع زر الشراء */
.qty-stepper-box {
    display: flex;
    align-items: center;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    background-color: #ffffff;
    height: 48px;
    overflow: hidden;
}
.qty-stepper-btn {
    width: 34px;
    height: 100%;
    border: none;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 800;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    transition: background-color 0.15s ease;
}
.qty-stepper-btn:active {
    background: #e2e8f0;
}
.qty-stepper-input {
    width: 100%;
    min-width: 0;
    height: 100%;
    border: none;
    text-align: center;
    font-weight: 800;
    color: #0f172a;
    background: transparent;
    padding: 0;
    -moz-appearance: textfield;
}
.qty-stepper-input::-webkit-outer-spin-button,
.qty-stepper-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.main-buy-btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* أزرار المشاركة السريعة */
.btn-share-social {
    border-radius: 50rem;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 5px 11px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    transition: all 0.2s ease;
}
.btn-share-fb { background-color: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }
.btn-share-fb:hover { background-color: #2563eb; color: #ffffff; }
.btn-share-copy { background-color: #f1f5f9; color: #334155; border: 1px solid #cbd5e1; }
.btn-share-copy:hover { background-color: #475569; color: #ffffff; }

/* بطاقة المنتجات المشابهة متطابقة مع الصفحة الرئيسية والباقات */
.related-prod-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    background: #ffffff;
    border: 1px solid #e2e8f0 !important;
    overflow: hidden;
}
.related-prod-card:hover {
    transform: translateY(-3px);
    border-color: #bae6fd !important;
    box-shadow: 0 8px 18px rgba(2, 132, 199, 0.1) !important;
}
.related-img-holder {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.related-img-holder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.related-prod-card:hover .related-img-holder img {
    transform: scale(1.03);
}

/* الشريط السفلي الثابت للموبايل مع دعم الحافة السفلية للآيفون */
.mobile-sticky-bar {
    padding-top: 8px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    z-index: 1030;
}

/* زر إغلاق نافذة تكبير الصورة الواضح على جميع الخلفيات */
.lightbox-close-btn {
    background-color: rgba(15, 23, 42, 0.8) !important;
    padding: 0.65rem !important;
    border-radius: 50% !important;
    opacity: 1 !important;
}

/* ================================================================
   تحسينات السلاسة والتصميم الطبي لصفحة المنتج (product.css)
================================================================ */
.main-img-box {
    background: #FFFFFF !important;
    border: 1px solid #CBD5E1 !important;
    border-radius: 20px !important;
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06) !important;
}
.active-thumb {
    border-color: #0284C7 !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.16) !important;
}
.slider-nav-btn {
    background: rgba(255, 255, 255, 0.94) !important;
    border: 1px solid #CBD5E1 !important;
    color: #0F172A !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12) !important;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease !important;
}
.slider-nav-btn:hover {
    background: #0284C7 !important;
    color: #FFFFFF !important;
    border-color: #0284C7 !important;
}
#buyNowBtn,
.btn-primary {
    background: linear-gradient(135deg, #0284C7 0%, #0EA5E9 100%) !important;
    border: none !important;
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.28) !important;
    transition: transform 0.2s ease, filter 0.2s ease !important;
}
#buyNowBtn:hover,
.btn-primary:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}


/* ================================================================
   ضغط البيانات وتنسيق الموبايل والأزرار المجمعة (v2.0)
================================================================ */
.quick-help-strip {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}
.quick-help-btn {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 7px 6px;
    border-radius: 10px;
    background: #F8FAFC;
    border: 1px solid #CBD5E1;
    color: #0F172A;
    font-size: 11.5px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
.quick-help-btn:hover {
    background: #E0F2FE;
    border-color: #0284C7;
    color: #0369A1;
}
.quick-help-btn.is-wa {
    background: #F0FDF4;
    border-color: #BBF7D0;
    color: #15803D;
}
.quick-help-btn.is-wa:hover {
    background: #16A34A;
    color: #FFFFFF;
}
.product-lab-note {
    background: #F0F9FF;
    border: 1px solid #BAE6FD;
    color: #0369A1;
    border-radius: 10px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    margin-top: 10px;
}

@media (max-width: 767.98px) {
    .main-img-box {
        aspect-ratio: 4 / 3 !important;
        max-height: 265px !important;
        padding: 0 !important;
        border-radius: 14px !important;
    }
    .main-img-box img {
        object-fit: cover !important;
    }
    .thumb-item, .product-thumb-btn {
        width: 50px !important;
        height: 50px !important;
    }
    .quick-help-btn {
        font-size: 11px;
        padding: 6px 4px;
    }
    .mobile-sticky-bar {
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }
}
