/* =========================================
   Habib Store | Premium Selection Styles
   ========================================= */

/* الألوان الأساسية والمتغيرات */
:root {
    --royal-green: #1a3c34;
    --gold: #c5a059;
    --soft-bg: #f8f9fa;
    --soft-gray: #f8fafa;
    --black: #0a0a0a;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--soft-bg);
    color: #333;
    scroll-behavior: smooth;
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- الهيدر والبانر الأساسي --- */
.hero-banner {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-banner img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    filter: brightness(0.60);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 300;
    margin: 0;
    letter-spacing: 2px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.4rem;
    opacity: 0.95;
    font-weight: 300;
    margin-top: 15px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* --- الحاويات والعناوين --- */
.container {
    max-width: 1300px;
    margin: 60px auto;
    padding: 0 25px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--royal-green);
    font-weight: 400;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 30%;
    width: 40%;
    height: 2px;
    background: var(--gold);
}

/* --- شبكة المنتجات (المعرض) --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 80px;
}

@media (min-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
}

.card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    border: 1px solid rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    position: relative;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.12);
    border-color: var(--gold);
}

.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--gold);
    color: white;
    font-size: 0.6rem;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 700;
    z-index: 5;
    text-transform: uppercase;
}

.img-wrapper {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    position: relative;
    background: #fff;
    padding: 10px;
    box-sizing: border-box;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: 0.8s;
}

.card-body {
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-body span {
    color: var(--gold);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 5px;
}

.card-body h3 {
    margin: 0;
    font-size: 0.95rem;
    color: var(--royal-green);
    font-weight: 600;
    line-height: 1.4;
}

/* --- أيقونة السلة العائمة --- */
.cart-float {
    position: fixed;
    top: 20px;
    left: 20px;
    background: white;
    color: var(--royal-green);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-decoration: none;
    z-index: 1000;
    font-size: 1.2rem;
    transition: 0.3s;
    border: 1px solid rgba(197, 160, 89, 0.3);
}

.cart-float:hover {
    transform: scale(1.1);
    border-color: var(--gold);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--gold);
    color: white;
    font-size: 0.75rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* --- زرار الواتساب --- */
.expert-btn {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: #25d366;
    color: white;
    padding: 18px 35px;
    border-radius: 60px;
    text-decoration: none;
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.3);
    z-index: 1000;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: 0.4s;
}

@media (max-width: 768px) {
    .expert-btn {
        bottom: 20px;
        right: 20px;
        padding: 15px 25px;
    }
    .expert-btn span { display: none; }
}

/* --- شريط النخبة الزجاجي (Habib Elite Glass Bar) --- */
#eliteGlassBar {
    position: fixed;
    bottom: -120px; 
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.15); 
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(197, 160, 89, 0.3); 
    border-radius: 30px;
    padding: 15px 25px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: all 1.2s cubic-bezier(0.19, 1, 0.22, 1);
    opacity: 0;
}

#eliteGlassBar.active {
    bottom: 30px; 
    opacity: 1;
}

.glass-header {
    min-width: 120px;
    border-left: 1px solid rgba(197, 160, 89, 0.4);
    padding-left: 15px;
}

.glass-header h3 {
    color: var(--royal-green);
    font-size: 0.85rem;
    margin: 0;
    font-weight: 700;
}

.glass-header span {
    color: var(--gold);
    font-size: 0.65rem;
}

.glass-items {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scrollbar-width: none;
    flex-grow: 1;
}

.glass-items::-webkit-scrollbar { display: none; }

.glass-card {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    min-width: 180px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.3s;
}

.glass-card:hover {
    background: rgba(197, 160, 89, 0.15);
    border-color: var(--gold);
}

.glass-card img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--gold);
}

.glass-card span {
    color: var(--royal-green);
    font-size: 0.75rem;
    font-weight: 700; 
    white-space: nowrap;
}

@media (max-width: 768px) {
    #eliteGlassBar { width: 95%; padding: 10px 15px; bottom: -120px;}
    #eliteGlassBar.active { bottom: 20px; }
    .glass-header { display: none; }
}

/* =========================================
   🔥 الإضافات الجديدة (أزرار المنتجات والكتالوج)
   ========================================= */

/* --- أزرار الشراء داخل الكارت --- */
.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding: 0 10px 15px;
}

.btn-add-cart, .btn-details {
    flex: 1;
    padding: 8px 0;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: 0.3s;
    text-align: center;
    text-decoration: none;
}

.btn-add-cart {
    background: var(--royal-green);
    color: white;
}

.btn-add-cart:hover {
    background: var(--gold);
}

.btn-details {
    background: transparent;
    color: var(--royal-green);
    border: 1px solid var(--gold);
}

.btn-details:hover {
    background: var(--soft-bg);
}

/* جملة السعر المرن */
.price-note {
    font-size: 0.7rem;
    color: #666;
    margin-top: 5px;
    font-weight: 500;
}

/* --- زر الكتالوج الطاير --- */
.catalog-float-btn {
    position: fixed;
    bottom: 110px; /* فوق الواتساب */
    right: 40px;
    background: rgba(26, 60, 52, 0.9); /* أخضر زجاجي */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--gold);
    color: white;
    padding: 12px 25px;
    border-radius: 30px;
    cursor: pointer;
    z-index: 999;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
}

.catalog-float-btn:hover {
    background: var(--gold);
    color: var(--royal-green);
}

@media (max-width: 768px) {
    .catalog-float-btn {
        bottom: 80px;
        right: 20px;
        padding: 10px 20px;
        font-size: 0.85rem;
    }
}

/* --- النافذة المنبثقة للكتالوج (Lightbox) --- */
.catalog-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.85); /* شاشة سوداء شفافة */
    backdrop-filter: blur(15px); /* تأثير الغبش */
    -webkit-backdrop-filter: blur(15px);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.4s ease-in-out;
}

.catalog-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.close-btn {
    position: absolute;
    top: 20px;
    left: 30px; /* شمال عشان عربي */
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    background: none;
    border: none;
    transition: 0.3s;
}

.close-btn:hover {
    color: var(--gold);
}

.slider-container {
    position: relative;
    width: 90%;
    max-width: 800px;
    height: 70vh; /* ياخد 70% من الشاشة */
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    border: 2px solid rgba(197, 160, 89, 0.3);
}

/* أسهم التقليب */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid var(--gold);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    z-index: 10;
}

.nav-arrow:hover {
    background: var(--gold);
    color: var(--royal-green);
}

.nav-right { right: -20px; }
.nav-left { left: -20px; }

@media (max-width: 768px) {
    .nav-arrow { width: 40px; height: 40px; font-size: 1.2rem; }
    .nav-right { right: 0px; }
    .nav-left { left: 0px; }
}

/* زرار تنفيذ التصميم داخل الكتالوج */
.order-design-btn {
    margin-top: 30px;
    background: #25d366;
    color: white;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-design-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(37, 211, 102, 0.4);
}
