/*
 * عجوة بكة - ملف CSS الرئيسي
 * Ajwat Bakkah - Main Stylesheet
 * تصميم مطابق لـ tmralbwadi.com مع ألوان مخصصة
 */

/* ===================================
   CSS Variables (المتغيرات)
   =================================== */
:root {
    /* Colors - ألوان دافئة للتمور */
    --primary: #8B5A2B;
    --primary-dark: #654321;
    --primary-light: #D2691E;
    --secondary: #DAA520;
    --accent: #F4A460;
    
    /* Background */
    --bg-cream: #FFF8F0;
    --bg-white: #FFFFFF;
    --bg-light: #FAF5EF;
    
    /* Text */
    --text-dark: #3D2914;
    --text-main: #5D4E37;
    --text-light: #8B7355;
    --text-muted: #A69580;
    
    /* Status */
    --success: #228B22;
    --danger: #CD5C5C;
    --warning: #DAA520;
    --info: #4682B4;
    
    /* Others */
    --border: #E8DFD5;
    --shadow: rgba(61, 41, 20, 0.1);
    
    /* Typography */
    --font-main: 'Tajawal', sans-serif;
    
    /* Spacing */
    --container-width: 1280px;
    --header-height: 70px;
    --announcement-height: 40px;
    
    /* Transitions */
    --transition: all 0.3s ease;
}

/* ===================================
   Reset & Base
   =================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-main);
    background-color: var(--bg-cream);
    direction: rtl;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

ul, ol {
    list-style: none;
}

/* ===================================
   Utilities
   =================================== */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.bg-cream { background-color: var(--bg-cream); }
.bg-white { background-color: var(--bg-white); }

.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-red { color: var(--danger); }
.text-success { color: var(--success); }

/* ===================================
   Announcement Bar (شريط الإعلانات)
   =================================== */
.announcement-bar {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    height: var(--announcement-height);
    overflow: hidden;
    display: flex;
    align-items: center;
}

.marquee {
    display: flex;
    animation: marquee 30s linear infinite;
    white-space: nowrap;
}

.marquee span {
    padding: 0 50px;
    font-size: 14px;
    font-weight: 500;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

/* ===================================
   Header
   =================================== */
.header {
    background: var(--bg-white);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px var(--shadow);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 32px;
}

.logo-text {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
}

/* Navigation */
.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-menu a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-main);
    padding: 10px 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-menu a:hover {
    color: var(--primary);
}

.nav-sale {
    color: var(--danger) !important;
    font-weight: 700 !important;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    transition: var(--transition);
    position: relative;
}

.header-btn:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.cart-btn .cart-count {
    position: absolute;
    top: -5px;
    left: -5px;
    width: 20px;
    height: 20px;
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn {
    display: none;
}

/* ===================================
   Search Modal
   =================================== */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
}

.search-modal.active {
    display: flex;
}

.search-modal-content {
    width: 100%;
    max-width: 600px;
    position: relative;
}

.search-form {
    display: flex;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.search-input {
    flex: 1;
    padding: 20px 30px;
    border: none;
    font-size: 18px;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
}

.search-submit {
    padding: 20px 30px;
    background: var(--primary);
    color: white;
    font-size: 18px;
}

.search-close {
    position: absolute;
    top: -50px;
    left: 0;
    color: white;
    font-size: 24px;
}

/* ===================================
   Mobile Menu
   =================================== */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100%;
    background: var(--bg-white);
    z-index: 2000;
    transition: right 0.3s ease;
    box-shadow: -5px 0 20px var(--shadow);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.mobile-menu-close {
    font-size: 24px;
    color: var(--text-main);
}

.mobile-nav {
    padding: 20px;
}

.mobile-nav a {
    display: block;
    padding: 15px 0;
    font-size: 16px;
    border-bottom: 1px solid var(--border);
}

.mobile-nav hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 10px 0;
}

/* ===================================
   Hero Slider
   =================================== */
.hero-slider {
    background: var(--bg-light);
}

.hero-slide {
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to left, rgba(101, 67, 33, 0.7), rgba(101, 67, 33, 0.3));
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    max-width: 600px;
    padding: 20px;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-btn {
    display: inline-block;
    padding: 15px 40px;
    background: var(--secondary);
    color: var(--text-dark);
    font-size: 18px;
    font-weight: 700;
    border-radius: 50px;
    transition: var(--transition);
}

.hero-btn:hover {
    background: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: white;
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--secondary);
}

/* ===================================
   Section Titles
   =================================== */
.section {
    padding: 60px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--secondary);
}

.section-link {
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.section-link:hover {
    color: var(--primary-dark);
}

/* ===================================
   Product Card
   =================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.product-card {
    background: var(--bg-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--shadow);
}

.product-image {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badges {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 1;
}

.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.badge-sale {
    background: var(--danger);
    color: white;
}

.badge-new {
    background: var(--success);
    color: white;
}

.product-actions {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(-10px);
    transition: var(--transition);
    z-index: 1;
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.product-action-btn {
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px var(--shadow);
    color: var(--text-main);
    font-size: 14px;
    transition: var(--transition);
}

.product-action-btn:hover {
    background: var(--primary);
    color: white;
}

.product-info {
    padding: 20px;
}

.product-category {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.product-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-name a:hover {
    color: var(--primary);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
}

.product-rating .stars {
    color: var(--secondary);
    font-size: 13px;
}

.product-rating .count {
    font-size: 12px;
    color: var(--text-muted);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.current-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
}

.old-price {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.add-to-cart-btn {
    width: 100%;
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.add-to-cart-btn:hover {
    background: var(--primary-dark);
}

/* ===================================
   Features Section
   =================================== */
.features {
    background: var(--bg-white);
    padding: 40px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.feature-item {
    padding: 20px;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 24px;
    color: var(--primary);
}

.feature-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.feature-desc {
    font-size: 13px;
    color: var(--text-light);
}

/* ===================================
   Testimonials
   =================================== */
.testimonials {
    background: var(--bg-light);
}

.testimonials-slider {
    padding: 20px 0;
}

.testimonial-card {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow);
}

.testimonial-stars {
    color: var(--secondary);
    font-size: 16px;
    margin-bottom: 15px;
}

.testimonial-text {
    font-size: 15px;
    color: var(--text-main);
    margin-bottom: 20px;
    line-height: 1.8;
}

.testimonial-author {
    font-weight: 700;
    color: var(--text-dark);
}

/* ===================================
   Footer
   =================================== */
.footer {
    background: var(--primary-dark);
    color: white;
    padding-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.footer-logo .logo-text {
    color: white;
}

.footer-desc {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 20px;
    line-height: 1.8;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--secondary);
}

.footer-col h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul a {
    font-size: 14px;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-col ul a:hover {
    opacity: 1;
    color: var(--secondary);
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-list i {
    width: 20px;
    color: var(--secondary);
}

.footer-payment {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 30px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-payment span {
    font-size: 14px;
    opacity: 0.8;
}

.payment-icons {
    display: flex;
    gap: 15px;
}

.payment-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.15);
    padding: 12px 18px;
    border-radius: 10px;
    transition: all 0.3s;
}

.payment-icon:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.payment-icon i {
    font-size: 28px;
    color: white;
}

.payment-icon span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.payment-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 5px;
    font-size: 12px;
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    font-size: 14px;
    opacity: 0.7;
}

/* ===================================
   WhatsApp Button
   =================================== */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4);
    z-index: 999;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ===================================
   Breadcrumbs
   =================================== */
.breadcrumbs {
    padding: 15px 0;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
}

.breadcrumbs-list {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.breadcrumbs-list a {
    color: var(--text-light);
}

.breadcrumbs-list a:hover {
    color: var(--primary);
}

.breadcrumbs-list .separator {
    color: var(--text-muted);
}

.breadcrumbs-list .current {
    color: var(--text-dark);
    font-weight: 500;
}

/* ===================================
   Buttons
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--text-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

/* ===================================
   Forms
   =================================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 90, 43, 0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* ===================================
   Alerts
   =================================== */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* ===================================
   Pagination
   =================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--border);
    background: var(--bg-white);
    color: var(--text-main);
    transition: var(--transition);
}

.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pagination .disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ===================================
   Responsive
   =================================== */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero-slide {
        height: 400px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .section-title {
        font-size: 22px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-payment {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .header-actions {
        gap: 10px;
    }
    
    .logo-text {
        font-size: 18px;
    }
    
    .hero-slide {
        height: 300px;
    }
    
    .hero-title {
        font-size: 24px;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .product-info {
        padding: 15px;
    }
    
    .product-name {
        font-size: 14px;
    }
    
    .current-price {
        font-size: 16px;
    }
}
