/* 
    Zakaria Perfumes - Main Design System
    Theme: Minimalist Matte Black & White
*/

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

:root {
    --matte-black: #121212;
    --soft-black: #1a1a1a;
    --pure-white: #ffffff;
    --off-white: #f8f8f8;
    --gray-light: #eeeeee;
    --gray-dark: #666666;
    --accent: #d4af37; /* Gold for subtle luxury highlights */
    --success: #27ae60;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    direction: rtl;
    background-color: var(--pure-white);
    color: var(--matte-black);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Header & Navigation - Viola Dark Style */
header {
    background-color: var(--matte-black);
    color: var(--pure-white);
    padding: 15px 10%;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-left {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-center {
    flex: 2;
    text-align: center;
    font-weight: 900;
    font-size: 1.15rem;
    letter-spacing: 2px;
}

.header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.logo-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.2);
    background-color: white;
}

.logo-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.menu-btn, .cart-icon, .back-icon {
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--pure-white);
}

.cart-icon, .back-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: #e74c3c;
    color: var(--pure-white);
    font-size: 0.65rem;
    padding: 2px 5px;
    border-radius: 50%;
}



/* Product Card - Classic Centered Style */
.product-card {
    background-color: var(--pure-white);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--gray-light);
    display: flex;
    flex-direction: column;
    text-align: center;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.product-image {
    aspect-ratio: 1/1.3;
    padding: 10px;
}

.product-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.product-name {
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--matte-black);
}

/* Badges with Specific Colors */
.product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    margin-bottom: 12px;
}

.badge-item {
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 50px;
    font-weight: 700;
    color: white;
}

.badge-red { background-color: #ff4757; }    /* الأكثر مبيعاً */
.badge-purple { background-color: #8e44ad; } /* مميز و نادر */
.badge-green { background-color: #2ecc71; }  /* وصل حديثاً */
.badge-blue { background-color: #3498db; }   /* رجالي / الأكثر شعبية */
.badge-pink { background-color: #e84393; }   /* نسائي */

.view-details-btn {
    width: 100%;
    background-color: var(--matte-black);
    color: var(--pure-white);
    border: none;
    padding: 12px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    margin-top: auto;
    display: block;
}

.view-details-btn:hover {
    background-color: #333;
    transform: translateY(-2px);
}

/* Size Grid for Product Detail - 2 Columns like Image */
.size-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.size-option-rect {
    border: 1px solid #ddd;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    background-color: white;
}

.size-option-rect.active {
    border-color: var(--matte-black);
    background-color: #f0f0f0;
}

.size-option-rect .s-name {
    display: block;
    font-weight: 700;
    font-size: 1rem;
}

.size-option-rect .s-price {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-dark);
}

/* Size Circles for Cards */
.size-circles {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.size-circle {
    width: 34px;
    height: 34px;
    border: 1px solid var(--matte-black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
}

.size-option-rect.active {
    border-color: var(--matte-black);
    border-width: 2px;
}

.size-option-rect .s-name {
    display: block;
    font-weight: 700;
    font-size: 1.1rem;
}

.size-option-rect .s-price {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-dark);
}

/* Stock Status Styles */
.disabled-option {
    opacity: 0.6;
    cursor: not-allowed !important;
    background-color: #f5f5f5 !important;
    border-color: #eee !important;
}

.stock-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-top: 5px;
}

.stock-badge.oos {
    background-color: #ff4757;
    color: white;
}

.full-bottle-option.disabled-option {
    border-style: dashed;
}

.fb-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}


/* Description Card */
.description-card {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 15px;
    margin: 25px 0;
    line-height: 1.8;
    color: #444;
}

/* Quantity Selector - Dark Pill with White Center */
.quantity-pill {
    display: flex;
    align-items: center;
    background-color: var(--matte-black);
    border-radius: 40px;
    padding: 5px;
    width: 100%;
    max-width: 300px;
    margin: 20px auto;
}

.qty-pill-btn {
    flex: 1;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.qty-pill-value {
    flex: 1;
    background-color: white;
    color: black;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Suggested Products - Horizontal Scroll */
.suggested-scroll {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 1rem 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
}

.suggested-scroll::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari */
}

.suggested-scroll .product-card {
    min-width: 200px;
    scroll-snap-align: start;
}



/* Search Bar */
.search-container {
    padding: 1rem 10%;
    background-color: var(--pure-white);
}

.search-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.search-wrapper input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 1px solid var(--gray-light);
    border-radius: 25px; /* حواف دائرية فخمة */
    background-color: var(--off-white);
    font-size: 0.9rem;
    transition: var(--transition);
}

.search-wrapper input:focus {
    outline: none;
    border-color: var(--matte-black);
    background-color: var(--pure-white);
}

.search-wrapper i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-dark);
}

/* Section Styling */
.section-title {
    padding: 1rem 10% 0.5rem; /* تقليل البادينق لرفع العنوان للأعلى */
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--matte-black);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* دوام عمودين في الموبايل مثل فيولا */
    gap: 12px;
    padding: 1rem 10%;
}

@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 25px;
    }
}

/* Footer - Viola Dark Style */
footer {
    background-color: var(--matte-black);
    color: var(--pure-white);
    padding: 4rem 10% 2rem;
    margin-top: 5rem;
    text-align: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 768px) {
    .footer-container {
        grid-template-columns: repeat(3, 1fr);
        text-align: right;
    }
}

.footer-section h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 0;
    width: 40px;
    height: 3px;
    background-color: var(--pure-white);
    border-radius: 2px;
}

.footer-section p {
    color: #bbb;
    font-size: 0.95rem;
    line-height: 1.8;
}

.footer-feature {
    background-color: rgba(255,255,255,0.05);
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

@media (min-width: 768px) {
    .footer-feature { justify-content: flex-start; }
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    color: #bbb;
    justify-content: center;
}

@media (min-width: 768px) {
    .contact-item { justify-content: flex-start; }
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: #bbb;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--pure-white);
    padding-right: 5px;
}

.footer-bottom {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--pure-white);
    color: var(--matte-black);
}

/* Size Circles as Buttons */
.size-circle {
    width: 38px;
    height: 38px;
    border: 1px solid var(--matte-black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    background-color: var(--pure-white);
}

.size-circle:hover {
    background-color: var(--matte-black);
    color: var(--pure-white);
}

/* Removed duplicate view-details-btn styles to avoid alignment issues */

/* Floating WhatsApp */
/* Big Add to Cart Button */
.add-to-cart-big-btn {
    width: 100%;
    background-color: var(--matte-black);
    color: var(--pure-white);
    border: none;
    padding: 18px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 20px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.add-to-cart-big-btn:hover {
    background-color: #333;
    transform: translateY(-2px);
}

/* Toast Message */
/* Hero Slider Styles */
.hero-slider {
    position: relative;
    width: 95%;
    max-width: 1200px;
    margin: 20px auto 0;
    height: 180px; 
    overflow: hidden;
    background-color: var(--gray-light);
    border-radius: 15px; /* حواف شبه مربعة (زوايا مستديرة خفيفة) */
}

@media (min-width: 768px) {
    .hero-slider {
        height: 350px; /* تصغير الارتفاع للكمبيوتر */
    }
}

.product-detail-image {
    width: 100%;
    max-height: 250px; /* تصغير الارتفاع أكثر للموبايل ليكون مريحاً */
    display: flex;
    justify-content: center;
    background-color: #fff;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
}

@media (min-width: 768px) {
    .product-detail-image {
        flex: 1;
        max-height: 500px; /* حجم معقول للكمبيوتر */
        margin-bottom: 0;
    }
}

.product-detail-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto; /* الحفاظ على الأبعاد الحقيقية */
    height: auto;
    object-fit: contain;
}

/* Side Menu Styles */
.side-menu {
    position: fixed;
    top: 0;
    right: -300px; /* مخفية في البداية جهة اليمين */
    width: 300px;
    height: 100%;
    background-color: var(--matte-black);
    color: var(--pure-white);
    z-index: 2000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 15px rgba(0,0,0,0.5); /* عكس اتجاه الظل */
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
}

.side-menu.active {
    right: 0; /* تظهر عند إضافة كلاس active */
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 1999;
    display: none;
    backdrop-filter: blur(3px);
}

.menu-overlay.active {
    display: block;
}

.close-btn {
    align-self: flex-end;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    margin-bottom: 20px;
}

.side-menu-header {
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 30px;
    margin-bottom: 30px;
}

.side-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 2px solid var(--pure-white);
}

.side-menu-header h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.side-menu-header p {
    font-size: 0.85rem;
    color: #bbb;
    line-height: 1.6;
}

.side-menu-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.side-login-btn {
    width: 100%;
    background-color: var(--pure-white);
    color: var(--matte-black);
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    transition: var(--transition);
}

.side-login-btn:hover {
    background-color: #ddd;
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.side-nav a {
    color: #ddd;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
}

/* Categories Section */
.categories-container {
    display: flex;
    justify-content: center;
    gap: 48px; 
    padding: 10px 10% 5px; /* تقليل البادينق لرفع الأيقونات */
    background-color: var(--pure-white);
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.category-circle {
    width: 100px; /* العودة للحجم الطبيعي */
    height: 100px; /* العودة للحجم الطبيعي */
    border-radius: 50%;
    border: 1.5px solid var(--matte-black);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem; /* العودة لحجم الأيقونة الطبيعي */
    color: var(--matte-black);
    background-color: var(--pure-white);
    transition: var(--transition);
}

.category-item span {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--matte-black);
}

.category-item:hover .category-circle {
    background-color: var(--matte-black);
    color: var(--pure-white);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.category-item:hover span {
    color: #000;
}

.category-item.active-cat .category-circle {
    background-color: var(--matte-black);
    color: var(--pure-white);
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.category-item.active-cat span {
    color: #000;
    font-weight: 900;
}

/* Full Price Tag Style */
.full-bottle-container {
    margin-bottom: 25px;
}

.full-bottle-container label {
    display: block;
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--matte-black);
}

.full-bottle-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border: 1px solid var(--gray-light);
    border-radius: 15px;
    cursor: pointer;
    transition: var(--transition);
    background-color: var(--pure-white);
    position: relative;
    overflow: hidden;
}

.full-bottle-option:hover {
    background-color: #fafafa;
    border-color: #ccc;
}

.full-bottle-option.active {
    border-color: var(--matte-black);
    background-color: #f8f8f8;
    border-width: 2px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.full-bottle-option.active::after {
    content: '\f058'; /* fa-check-circle */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 10px;
    left: 10px;
    color: var(--matte-black);
    font-size: 1.1rem;
}

.fb-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fb-name {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--matte-black);
}

.fb-size {
    font-size: 0.85rem;
    color: var(--gray-dark);
}

.fb-price {
    font-weight: 900;
    font-size: 1.2rem;
    color: var(--matte-black);
}

.full-price-tag {
    background-color: #f9f9f9;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border: 1px dashed #ddd;
}


.price-label {
    font-size: 0.85rem;
    color: var(--gray-dark);
}

.price-val {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--matte-black);
}

/* Adjusting search container position */
.search-container {
    margin-top: 25px; /* تقليل المسافة لرفع البحث للأعلى */
    padding: 0 5% 15px;
}

/* Quick Search Dropdown */
.search-wrapper {
    position: relative; /* لضبط تموضع القائمة تحت الشريط */
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--pure-white);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.search-results-dropdown.active {
    display: block;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 15px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid #f5f5f5;
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background-color: #f9f9f9;
}

.search-item img {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    object-fit: cover;
    background-color: #fff;
    border: 1px solid #eee;
}

.search-item-info {
    display: flex;
    flex-direction: column;
}

.search-item-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--matte-black);
}

.search-item-brand {
    font-size: 0.75rem;
    color: var(--gray-dark);
}


.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background-color: var(--pure-white);
    transform: scale(1.2);
}

/* Auth Sidebar Styles */
.user-profile-section {
    padding: 25px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    background: rgba(255,255,255,0.03);
    border-radius: 15px;
}

.user-avatar {
    width: 70px;
    height: 70px;
    background-color: var(--accent); /* Gold for luxury */
    color: var(--matte-black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 900;
    text-transform: uppercase;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.welcome-msg {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--pure-white); /* White text for visibility */
    margin-bottom: 5px;
}

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    padding: 0 10px;
}

.auth-action-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.logout-btn {
    background-color: rgba(255, 77, 77, 0.1);
    color: #ff4d4d;
    border: 1.5px solid rgba(255, 77, 77, 0.3);
}

.logout-btn:hover {
    background-color: #ff4d4d;
    color: #fff;
}

.change-pass-btn {
    background-color: rgba(255, 255, 255, 0.05);
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.change-pass-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.admin-dash-btn {
    background-color: var(--pure-white);
    color: var(--matte-black);
    border: none;
    text-decoration: none;
}

.admin-dash-btn:hover {
    background-color: var(--accent);
    color: var(--matte-black);
}
