/* ===== CSS Variables ===== */
:root {
    --primary: #00b4d8;
    --primary-dark: #0096b7;
    --primary-light: #e0f7fa;
    --secondary: #7c3aed;
    --accent: #f59e0b;
    --dark: #1a2332;
    --dark-light: #253347;
    --light: #f8fafc;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --white: #ffffff;
    --shadow: 0 2px 15px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.15);
    --radius: 12px;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Heebo', sans-serif;
    background-color: var(--light);
    color: #333;
    direction: rtl;
}

/* ===== Navbar ===== */
.navbar {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    padding: 0.8rem 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}
.navbar-brand {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--white) !important;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.navbar-brand img {
    height: 55px;
    width: auto;
    filter: invert(1) hue-rotate(180deg) saturate(1.3);
}
.navbar-brand i { color: var(--primary); margin-left: 5px; }
.navbar .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--white) !important;
    background: rgba(255,255,255,0.1);
}
.navbar .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 30px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
}

/* ===== WhatsApp Button ===== */
.btn-whatsapp {
    background: #25D366;
    color: white !important;
    border: none;
    border-radius: 20px;
    padding: 6px 16px;
    font-weight: 500;
    transition: var(--transition);
}
.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37,211,102,0.3);
    color: white !important;
}

/* ===== Hero Section ===== */
.hero-section {
    background: linear-gradient(135deg, #fff6e9 0%, #fff0dc 50%, #fff6e9 100%);
    color: var(--dark);
    padding: 3.5rem 0;
    margin-bottom: 2rem;
    text-align: center;
}
.hero-section .hero-logo {
    height: 120px;
    width: auto;
    margin-bottom: 0.75rem;
}
.hero-section h1 { font-weight: 800; font-size: 2.5rem; margin-bottom: 0.5rem; }
.hero-section p { font-size: 1.2rem; opacity: 0.85; max-width: 600px; margin: 0 auto; }

/* ===== Search Bar ===== */
.search-container { max-width: 500px; margin: 1.5rem auto 0; }
.search-container .input-group {
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.search-container .form-control {
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
}
.search-container .form-control:focus { box-shadow: none; }
.search-container .btn { padding: 12px 24px; border: none; }

/* ===== Category Filters ===== */
.category-filters { padding: 1.5rem 0; }
.category-btn {
    border-radius: 50px;
    padding: 8px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    border: 2px solid var(--gray-light);
    background: var(--white);
    color: var(--dark);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.category-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,180,216,0.2);
}
.btn-check:checked + .category-btn {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(0,180,216,0.3);
}
.btn-check { display: none; }

/* ===== Product Cards ===== */
.product-card {
    border: none;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    background: var(--white);
    height: 100%;
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}
.product-card .img-wrapper { overflow: hidden; position: relative; background: #f5f5f5; aspect-ratio: 1 / 1; }
.product-card .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}
.product-card:hover .card-img-top { transform: scale(1.05); }
.product-card .card-body { padding: 0.8rem; }
.product-card .card-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dark);
    margin-bottom: 0.3rem;
}
.product-card .price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}
.product-card .card-footer {
    background: transparent;
    border-top: 1px solid var(--gray-light);
    padding: 0.7rem 0.8rem;
}
.product-card .btn-view {
    border-color: var(--primary);
    color: var(--primary);
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 500;
    transition: var(--transition);
}
.product-card .btn-view:hover {
    background: var(--primary);
    color: white;
}
.product-card .btn-order {
    background: #25D366;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 500;
    transition: var(--transition);
}
.product-card .btn-order:hover {
    background: #128C7E;
    transform: translateY(-2px);
}

/* Stagger animation delays */
.product-card:nth-child(1) { animation-delay: 0s; }
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.2s; }
.product-card:nth-child(4) { animation-delay: 0.3s; }
.product-card:nth-child(5) { animation-delay: 0.4s; }
.product-card:nth-child(6) { animation-delay: 0.5s; }

/* ===== Product Detail ===== */
.product-detail-img {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}
.product-detail-info h2 {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
}
.product-detail-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1rem;
}
.product-detail-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--gray);
    margin-bottom: 1.5rem;
}
.product-gallery {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 1rem;
}
.product-gallery img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}
.product-gallery img:hover,
.product-gallery img.active {
    border-color: var(--primary);
    transform: scale(1.05);
}
.category-badge {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
    margin: 2px;
}

/* ===== No Image Placeholder ===== */
.no-image {
    height: 240px;
    background: linear-gradient(135deg, var(--gray-light), #f0f0f0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-size: 3rem;
}

/* ===== About Page ===== */
.about-section { padding: 3rem 0; }
.about-section h2 {
    font-weight: 700;
    color: var(--dark);
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}
.about-section h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 0;
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

/* ===== Contact Page ===== */
.contact-card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.contact-card .card-body { padding: 2rem; }
.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-left: 15px;
    flex-shrink: 0;
}

/* ===== Login Page ===== */
.login-container { max-width: 400px; margin: 3rem auto; }
.login-card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.login-card .card-header {
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
    color: white;
    text-align: center;
    padding: 2rem;
    border: none;
}
.login-card .card-header i { font-size: 2.5rem; margin-bottom: 0.5rem; }
.login-card .card-body { padding: 2rem; }

/* ===== Dashboard ===== */
.dashboard-header {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}
.dashboard-stat {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}
.dashboard-stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.dashboard-stat .stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}
.dashboard-stat .stat-label { color: var(--gray); font-weight: 500; }
.dashboard-table {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.dashboard-table thead { background: var(--dark); color: white; }
.dashboard-table th { font-weight: 600; padding: 1rem; }
.dashboard-table td { padding: 0.8rem 1rem; vertical-align: middle; }

/* ===== Footer ===== */
.site-footer {
    background: var(--dark);
    color: rgba(255,255,255,0.8);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}
.site-footer h5 { color: white; font-weight: 600; margin-bottom: 1rem; }
.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    display: block;
    padding: 4px 0;
    transition: var(--transition);
}
.footer-links a:hover { color: var(--primary); padding-right: 8px; }
.footer-contact li { padding: 4px 0; }
.footer-contact i { color: var(--primary); margin-left: 8px; width: 20px; text-align: center; }
.site-footer hr { border-color: rgba(255,255,255,0.1); margin: 2rem 0 1rem; }

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,180,216,0.3);
    transition: var(--transition);
    z-index: 1000;
}
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray);
}
.empty-state i { font-size: 4rem; color: var(--gray-light); margin-bottom: 1rem; }
.empty-state h4 { color: var(--dark); margin-bottom: 0.5rem; }

/* ===== Product Count Badge ===== */
.product-count {
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 0.9rem;
    display: inline-block;
    margin-top: 0.5rem;
}

/* ===== Section Title ===== */
.section-title {
    font-weight: 700;
    color: var(--dark);
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 0;
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

/* ===== Custom Buttons ===== */
.btn-primary-custom {
    background: var(--primary);
    border: none;
    color: white;
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: 500;
    transition: var(--transition);
}
.btn-primary-custom:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,180,216,0.3);
}

/* ===== Form Styles ===== */
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(0,180,216,0.25);
}
.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fadeInUp { animation: fadeInUp 0.5s ease forwards; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero-section h1 { font-size: 1.8rem; }
    .hero-section p { font-size: 1rem; }
    .product-detail-price { font-size: 1.5rem; }
    .product-card .card-footer { flex-direction: column; gap: 0.5rem; }
    .product-card .card-footer .btn { width: 100%; }
}

/* ===== Breadcrumb ===== */
.breadcrumb { background: transparent; padding: 0; }
.breadcrumb-item a { color: var(--primary); text-decoration: none; }
.breadcrumb-item a:hover { text-decoration: underline; }

/* ===== WhatsApp Float ===== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25D366;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 20px rgba(37,211,102,0.4);
    transition: var(--transition);
    z-index: 1000;
    text-decoration: none;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37,211,102,0.5);
    color: white;
}

/* ===== Footer Logo ===== */
.footer-logo {
    height: 70px;
    width: auto;
    filter: invert(1) hue-rotate(180deg) saturate(1.3);
    margin-bottom: 0.75rem;
}
