/* ============================================
   Style.css - Miel Naturel Agadir
   تصميم متجاوب Mobile-First
   ============================================ */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* الألوان الرئيسية - مستوحاة من العسل والطبيعة */
    --primary-color: #d4a017;
    --primary-dark: #b8860b;
    --secondary-color: #2e7d32;
    --accent-color: #ff8f00;
    
    /* ألوان محايدة */
    --text-dark: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --white: #ffffff;
    --light-bg: #faf8f3;
    --border-color: #e0d5c1;
    
    /* ألوان الحالات */
    --success: #4caf50;
    --warning: #ff9800;
    --error: #f44336;
    --info: #2196f3;
    
    /* القياسات */
    --header-height: 70px;
    --border-radius: 12px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.15);
    
    /* الخطوط */
    --font-ar: 'Segoe UI', 'Arabic Typesetting', Tahoma, sans-serif;
    --font-en: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

body {
    font-family: var(--font-en);
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* RTL Support */
[dir="rtl"] body {
    font-family: var(--font-ar);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-dark);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* ============================================
   Header Styles
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 13px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

/* Logo */
.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 40px;
    width: auto;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-dark);
}

/* Navigation */
.main-nav {
    flex: 1;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 20px;
    justify-content: center;
}

.nav-list a {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-list a:hover,
.nav-list a.active {
    color: var(--primary-color);
    background: rgba(212, 160, 23, 0.1);
}

/* Header Tools */
.header-tools {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Language Switcher */
.language-switcher {
    position: relative;
}

.lang-btn {
    background: none;
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: var(--light-bg);
    border-color: var(--primary-color);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    min-width: 150px;
    display: none;
    overflow: hidden;
}

.lang-dropdown.show {
    display: block;
}

.lang-dropdown a {
    display: block;
    padding: 10px 15px;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.lang-dropdown a:hover,
.lang-dropdown a.active {
    background: var(--light-bg);
    color: var(--primary-color);
}

/* Cart Icon */
.cart-icon {
    position: relative;
    font-size: 1.3rem;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.cart-icon:hover {
    color: var(--primary-color);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--error);
    color: var(--white);
    font-size: 0.7rem;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    display: none;
}

.cart-count.has-items {
    display: flex;
}

/* WhatsApp Link */
.whatsapp-link {
    font-size: 1.4rem;
    color: #25d366;
    transition: transform 0.3s ease;
}

.whatsapp-link:hover {
    transform: scale(1.1);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
    background: linear-gradient(135deg, #faf8f3 0%, #fff8e7 100%);
    display: flex;
    align-items: center;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-content {
    padding-right: 40px;
}

.hero-title {
    font-size: 2.7rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.badge i {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

/* Hero Image */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* ============================================
   Products Section
   ============================================ */
.products-section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* Product Card */
.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: var(--light-bg);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.stock-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.low-stock {
    background: var(--warning);
    color: var(--white);
}

.quick-view-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.product-card:hover .quick-view-btn {
    opacity: 1;
    transform: translateY(0);
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.product-name a:hover {
    color: var(--primary-color);
}

.product-description {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.5;
}

.product-meta {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-bottom: 15px;
}

.product-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.product-price small {
    font-size: 0.9rem;
    font-weight: 400;
}

.product-unit {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.product-actions {
    margin-top: auto;
    display: flex;
    gap: 10px;
}

.btn-add-to-cart {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add-to-cart:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-add-to-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-add-to-cart.added {
    background: var(--success);
}

/* ============================================
   Reviews Section
   ============================================ */
.reviews-section {
    padding: 80px 20px;
    background: var(--light-bg);
}

.reviews-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Google Badge */
.google-reviews-summary {
    text-align: center;
    margin-bottom: 40px;
}

.google-badge {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: var(--white);
    padding: 20px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.google-logo {
    width: 40px;
    height: 40px;
}

.rating-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.stars {
    color: #ffc107;
    font-size: 1.1rem;
}

.review-count {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: block;
    margin-top: 5px;
}

/* Reviews Grid */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.review-card {
    background: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.review-header {
    margin-bottom: 15px;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reviewer-avatar {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.verified-badge {
    font-size: 0.8rem;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.review-comment {
    color: var(--text-dark);
    margin: 15px 0;
    line-height: 1.6;
    font-style: italic;
}

.review-product {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ============================================
   Contact Section
   ============================================ */
.contact-section {
    padding: 80px 20px;
    text-align: center;
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
}

.contact-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.contact-card {
    display: block;
    padding: 40px 30px;
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    text-align: center;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.contact-card.whatsapp {
    border-color: #25d366;
}

.contact-card.whatsapp:hover {
    background: #25d366;
    color: var(--white);
}

.contact-card.phone {
    border-color: var(--primary-color);
}

.contact-card.phone:hover {
    background: var(--primary-color);
    color: var(--white);
}

.contact-card i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.contact-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.contact-number {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 10px;
    display: block;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: #2c1810;
    color: #d4c5b9;
    padding: 60px 20px 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h3,
.footer-section h4 {
    color: var(--white);
    margin-bottom: 20px;
}

.footer-section p {
    margin-bottom: 10px;
}

.footer-contact i {
    margin-right: 10px;
    color: var(--primary-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #d4c5b9;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.payment-methods {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 8px;
}

.footer-bottom {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   Notifications
   ============================================ */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2000;
    transform: translateX(120%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-left: 4px solid var(--success);
}

.notification-error {
    border-left: 4px solid var(--error);
}

.notification-success i {
    color: var(--success);
}

.notification-error i {
    color: var(--error);
}

/* ============================================
   Scroll to Top Button
   ============================================ */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 999;
    transition: all 0.3s ease;
}

.scroll-to-top.visible {
    display: flex;
}

.scroll-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(120%);
    }
    to {
        transform: translateX(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.8s ease forwards;
}

.animate-slide-in {
    animation: slideInRight 0.3s ease forwards;
}

/* Fade In Elements (Intersection Observer) */
.fade-in-element {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in-element.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    /* Header */
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-list {
        position: fixed;
        top: 0; 
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: calc(var(--header-height) + 20px) 20px 20px 20px; 
        box-shadow: var(--shadow-md);
        transform: translateY(-100vh); 
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: -1; 
    }
    
    .nav-list.active {
        transform: translateY(0);
    }
    
    /* Hero */
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content {
        padding-right: 0;
        order: 1;
    }
    
    .hero-image {
        order: 0;
        margin-bottom: 30px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .trust-badges {
        justify-content: center;
    }
    
    /* Products */
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    /* Reviews */
    .reviews-grid {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .payment-methods {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.6rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .header-tools {
        gap: 10px;
    }
    
    .logo-text {
        display: none;
    }
}

/* Account Icon */
.account-icon {
    position: relative;
    font-size: 1.3rem;
    color: var(--text-dark);
    transition: color 0.3s ease;
    padding: 5px;
}

.account-icon:hover {
    color: var(--primary-color);
}

.logged-in-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    background: var(--success);
    border-radius: 50%;
    border: 2px solid var(--white);
}

    /* أيقونة حساب العميل */
    .account-icon-wrapper {
        position: relative;
    }
    
    .account-icon-link {
        position: relative;
        font-size: 1.3rem;
        color: var(--text-dark, #333);
        transition: all 0.3s ease;
        padding: 8px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        text-decoration: none;
    }
    
    .account-icon-link:hover {
        color: var(--primary-color, #d4a017);
        background: rgba(212, 160, 23, 0.08);
    }
    
    .logged-in-dot {
        position: absolute;
        top: 4px;
        right: 4px;
        width: 9px;
        height: 9px;
        background: #4caf50;
        border-radius: 50%;
        border: 2px solid #fff;
        animation: pulse-dot 2s ease-in-out infinite;
        z-index: 1;
    }
    
    @keyframes pulse-dot {
        0%, 100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4); }
        50% { box-shadow: 0 0 0 5px rgba(76, 175, 80, 0); }
    }
    
    /* القائمة المنسدلة */
    .account-menu {
        position: absolute;
        top: calc(100% + 10px);
        left: -130px;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.15);
        min-width: 240px;
        padding: 8px 0;
        display: none;
        z-index: 1002;
        border: 1px solid #e0e0e0;
    }
    
    .account-menu.show {
        display: block;
    }
    
    .account-menu-header {
        padding: 14px 16px;
        border-bottom: 1px solid #f0f0f0;
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .account-menu-avatar {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: linear-gradient(135deg, #d4a017, #b8860b);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 1.1rem;
        flex-shrink: 0;
    }
    
    .account-menu-info {
        flex: 1;
        min-width: 0;
    }
    
    .account-menu-name {
        font-size: 0.9rem;
        font-weight: 600;
        color: #333;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .account-menu-phone {
        font-size: 0.75rem;
        color: #999;
        direction: ltr;
        text-align: left;
    }
    
    .account-menu a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 11px 16px;
        color: #333;
        text-decoration: none;
        font-size: 0.9rem;
        transition: all 0.2s ease;
    }
    
    .account-menu a:hover {
        background: #f8f8f8;
        color: #d4a017;
    }
    
    .account-menu a i {
        width: 20px;
        text-align: center;
        font-size: 1rem;
        color: #d4a017;
    }
    
    .account-menu .logout-link {
        color: #f44336;
        border-top: 1px solid #f0f0f0;
        margin-top: 4px;
        padding-top: 12px;
    }
    
    .account-menu .logout-link i {
        color: #f44336;
    }
    
    .account-menu .logout-link:hover {
        background: #ffebee;
        color: #c62828;
    }
    
    .account-menu .badge-count {
        margin-right: auto;
        background: #ff9800;
        color: #fff;
        padding: 2px 8px;
        border-radius: 10px;
        font-size: 0.7rem;
        font-weight: 700;
    }
    
    /* RTL */
    [dir="rtl"] .account-menu {
        left: auto;
        right: -130px;
    }
    
    [dir="rtl"] .logged-in-dot {
        right: auto;
        left: 4px;
    }
    
    [dir="rtl"] .account-menu-phone {
        text-align: right;
    }
    
    [dir="rtl"] .account-menu .badge-count {
        margin-right: 0;
        margin-left: auto;
    }
    
    /* Mobile */
    @media (max-width: 768px) {
        .account-menu {
            right: -50px;
            min-width: 220px;
        }
        
        [dir="rtl"] .account-menu {
            right: -50px;
            left: auto;
        }
    }