@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;800&display=swap');

:root {
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --primary-color: #ff9900;
}

body {
    font-family: 'Cairo', sans-serif;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
                url('https://images.pexels.com/photos/2312369/pexels-photo-2312369.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Glassmorphism */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    box-shadow: var(--glass-shadow);
    color: #fff;
}

.navbar {
    background: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(15px);
    top: 30px !important; /* مسافة لشريط الإعلانات */
}

/* Announcement Bar */
.announcement-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1050;
    font-weight: bold;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    padding: 5px 0;
    font-size: 0.85rem;
}

/* Scroll Menu */
.scroll-menu {
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.scroll-menu::-webkit-scrollbar { display: none; }

.cat-btn {
    display: inline-block;
    padding: 8px 20px;
    margin-left: 10px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 50px;
    transition: all 0.3s;
    cursor: pointer;
}
.cat-btn:hover, .cat-btn.active {
    background: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
    font-weight: bold;
    transform: scale(1.05);
}

/* Product Card */
.product-card {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    transition: transform 0.3s, box-shadow 0.3s;
    border-radius: 12px;
    overflow: hidden;
    border: none;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

/* Slider */
.carousel-item {
    text-align: center;
    background: rgba(0,0,0,0.2);
    border-radius: 15px;
}
.carousel-item img {
    width: 100%;
    height: 500px; 
    object-fit: contain !important;
    border-radius: 15px;
}

/* Flash Sale Timer */
.flash-timer {
    background: linear-gradient(45deg, #ff416c, #ff4b2b);
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 5px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(255, 75, 43, 0.4);
    animation: pulse-red 2s infinite;
}

/* Variants (Colors & Sizes) */
.variant-btn {
    border: 1px solid #fff;
    background: transparent;
    color: #fff;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 0.85rem;
    margin-right: 5px;
    margin-bottom: 5px;
    transition: 0.2s;
    cursor: pointer;
}
.variant-btn:hover { background: rgba(255,255,255,0.2); }
.variant-btn.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #000;
    font-weight: bold;
}

.color-circle {
    width: 25px; height: 25px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    border: 2px solid rgba(255,255,255,0.5);
    cursor: pointer;
    transition: 0.2s;
    vertical-align: middle;
}
.color-circle.selected {
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--primary-color);
    transform: scale(1.1);
}

/* Buy Now Button */
.btn-buy-now {
    background: linear-gradient(45deg, #11998e, #38ef7d);
    color: white;
    border: none;
    font-weight: bold;
    transition: 0.3s;
}
.btn-buy-now:hover {
    transform: translateY(-2px);
    color: white;
    box-shadow: 0 5px 15px rgba(56, 239, 125, 0.4);
}

/* Order Timeline */
.order-timeline {
    position: relative;
    padding-right: 20px;
    margin-top: 10px;
    border-right: 2px solid rgba(255,255,255,0.2);
}
.timeline-item {
    position: relative;
    margin-bottom: 15px;
}
.timeline-item::before {
    content: '';
    position: absolute;
    right: -26px;
    top: 5px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #444;
    border: 2px solid #fff;
}
.timeline-item.active::before {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 5px var(--primary-color);
}
.timeline-item.completed::before {
    background: #28a745;
    border-color: #28a745;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .carousel-item img { 
        height: auto !important;
        max-height: 300px;
        object-fit: contain !important;
    }
    .product-card .card-body { padding: 0.5rem; }
    .product-card h6.card-title { font-size: 0.85rem; margin-bottom: 2px; }
    .product-card small { font-size: 0.75rem; }
    .modal-fullscreen-md-down { width: 100vw; max-width: none; height: 100%; margin: 0; }
    .modal-fullscreen-md-down .modal-content { height: 100%; border-radius: 0; }
    .main-image-container { height: 250px !important; }
    .zoom-effect:hover { transform: none; }
}

/* Animations */
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); } 70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); } }
@keyframes pulse-red { 0% { box-shadow: 0 0 0 0 rgba(255, 65, 108, 0.7); } 70% { box-shadow: 0 0 0 5px rgba(255, 65, 108, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 65, 108, 0); } }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% {transform: translateY(0);} 40% {transform: translateY(-10px);} 60% {transform: translateY(-5px);} }

/* Helpers & Elements */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #111; }
::-webkit-scrollbar-thumb { background: #555; border-radius: 3px; }

.form-control, .form-select { background: rgba(255, 255, 255, 0.9); border: none; border-radius: 8px; }
.btn-primary { background-color: var(--primary-color); border: none; font-weight: bold; }

.wishlist-btn {
    position: absolute; top: 10px; left: 10px; background: rgba(255, 255, 255, 0.9);
    border: none; border-radius: 50%; width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.3s; z-index: 10; color: #ccc;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.wishlist-btn.active { color: #ff0000; transform: scale(1.1); }

.star-rating { color: #ffc107; font-size: 0.85rem; }
.star-rating .fa-regular { color: #ccc; }

.search-dropdown {
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(30, 30, 40, 0.98); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0 0 10px 10px; max-height: 300px; overflow-y: auto;
    z-index: 1000; display: none;
}
.search-item {
    padding: 10px; border-bottom: 1px solid rgba(255,255,255,0.05); cursor: pointer;
    display: flex; align-items: center; gap: 10px; transition: background 0.2s;
}
.search-item:hover { background: rgba(255,255,255,0.1); }
.search-item img { width: 45px; height: 45px; border-radius: 5px; object-fit: cover; }

.coupon-box {
    border: 1px dashed var(--primary-color); background: rgba(255,255,255,0.05);
    padding: 10px; border-radius: 8px; margin-top: 10px;
}

.floating-whatsapp {
    position: fixed; bottom: 20px; right: 20px; width: 60px; height: 60px;
    background-color: #25d366; color: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px; box-shadow: 0 4px 10px rgba(0,0,0,0.3); z-index: 1000;
    transition: all 0.3s ease; text-decoration: none; animation: pulse 2s infinite;
}
.floating-whatsapp:hover { transform: scale(1.1); background-color: #128c7e; color: white; }

.chat-wrapper { position: fixed; bottom: 20px; left: 20px; z-index: 2000; }
.chat-btn {
    width: 60px; height: 60px; background: linear-gradient(45deg, #007bff, #0056b3);
    color: white; border: none; border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,123,255,0.4); transition: transform 0.3s; animation: bounce 2s infinite;
}
.chat-btn:hover { transform: scale(1.1); }
.chat-box {
    position: absolute; bottom: 80px; left: 0; width: 300px; height: 400px;
    background: rgba(30, 30, 40, 0.98); display: flex; flex-direction: column;
    border-radius: 15px; overflow: hidden;
}
.chat-body { flex-grow: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.msg { padding: 8px 12px; border-radius: 10px; max-width: 80%; font-size: 0.85rem; }
.msg-user { align-self: flex-end; background: var(--primary-color); color: #000; }
.msg-support { align-self: flex-start; background: #444; color: #fff; }

footer .social-icon { width: 40px; height: 40px; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; border-radius: 50%; color: white; text-decoration: none; transition: 0.3s; }
footer .social-icon:hover { background: var(--primary-color); color: #000; transform: translateY(-3px); }
footer .hover-link { transition: 0.2s; }
footer .hover-link:hover { color: var(--primary-color) !important; padding-right: 5px; }

.skeleton { background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%); border-radius: 5px; background-size: 200% 100%; animation: 1.5s shine linear infinite; opacity: 0.1; }
@keyframes shine { to { background-position-x: -200%; } }

.reviews-list::-webkit-scrollbar { width: 5px; }
.reviews-list::-webkit-scrollbar-thumb { background: #555; border-radius: 10px; }

.zoom-effect { transition: transform 0.5s ease; cursor: zoom-in; }
.zoom-effect:hover { transform: scale(1.5); }

#relatedProductsContainer { min-height: 110px; padding-bottom: 10px; overflow-x: auto !important; display: flex; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
#relatedProductsContainer .glass-card { min-width: 110px !important; max-width: 110px !important; flex: 0 0 auto; margin-right: 8px; }
/* --- تنسيقات جديدة (التعليقات والكمية) --- */

/* 1. زر حذف التعليق (للأدمن) */
.delete-review-btn {
    background: none;
    border: none;
    color: #ff4d4d;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 2px 5px;
    transition: 0.3s;
}
.delete-review-btn:hover {
    color: #ff0000;
    transform: scale(1.1);
}

/* 2. تصميم الكمية الجديد (3 مربعات) */
.qty-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
    width: 120px; /* عرض مناسب */
}

.qty-btn {
    width: 35px;
    height: 35px;
    background: transparent;
    border: none;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.qty-btn:disabled {
    color: #555;
    cursor: not-allowed;
}

.qty-display {
    flex-grow: 1;
    text-align: center;
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* --- إصلاح ظهور الأيقونات العائمة --- */

/* 1. زر الواتساب (يمين) */
.floating-whatsapp {
    position: fixed !important; /* إجبار التثبيت */
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    z-index: 9999 !important; /* رقم عالي جداً عشان يظهر فوق الكل */
    text-decoration: none;
    transition: transform 0.3s ease;
    animation: pulse 2s infinite;
}
.floating-whatsapp:hover {
    transform: scale(1.1);
    background-color: #128c7e;
    color: white;
}

/* 2. زر الشات (يسار) */
.chat-wrapper {
    position: fixed !important;
    bottom: 20px;
    left: 20px;
    z-index: 9999 !important; /* رقم عالي جداً */
}

.chat-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,123,255,0.4);
    transition: transform 0.3s;
    animation: bounce 2s infinite;
    display: flex; /* لضمان توسيط الأيقونة */
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.chat-btn:hover {
    transform: scale(1.1);
}

/* صندوق الشات */
.chat-box {
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 300px;
    height: 400px;
    background: rgba(30, 30, 40, 0.98);
    display: flex;
    flex-direction: column;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}