/* ================================================
   Halal Catalog - Main Stylesheet
   ================================================ */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ================================================
   Global Styles
   ================================================ */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* ================================================
   Top Bar
   ================================================ */
.top-bar {
    font-size: 0.875rem;
}

/* ================================================
   Navigation
   ================================================ */
.navbar {
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* ================================================
   Hero Section
   ================================================ */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    min-height: 500px;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
}

.hero-section .lead {
    font-size: 1.25rem;
    font-weight: 300;
}

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
}

/* ================================================
   Search Section
   ================================================ */
.search-section {
    background-color: #f8f9fa;
}

.search-form input {
    border-right: none;
}

.search-form button {
    border-left: none;
}

/* ================================================
   Cards
   ================================================ */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.1);
}

.hover-lift:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.product-card .card-img-top {
    height: 250px;
}

/* ================================================
   Category Cards
   ================================================ */
.category-card .card {
    text-align: center;
    padding: 20px;
}

.category-card .card-body {
    padding: 1.5rem;
}

.category-card:hover {
    text-decoration: none;
}

/* ================================================
   Badges
   ================================================ */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
}

/* ================================================
   Buttons
   ================================================ */
.btn {
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.375rem 1rem;
    font-size: 0.875rem;
}

/* ================================================
   Features Section
   ================================================ */
.features-section {
    padding: 80px 0;
}

.feature-icon {
    margin: 0 auto;
}

/* ================================================
   Footer
   ================================================ */
.footer {
    background-color: #212529;
    color: #fff;
}

.footer a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover,
.hover-primary:hover {
    color: var(--primary-color) !important;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    transform: translateY(-3px);
}

/* ================================================
   Scroll to Top Button
   ================================================ */
#scrollToTop {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#scrollToTop:hover {
    background-color: #0b5ed7;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

#scrollToTop.show {
    display: block;
}

/* ================================================
   Utilities
   ================================================ */
.text-muted {
    color: #6c757d !important;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.rounded-circle {
    border-radius: 50% !important;
}

/* ================================================
   RTL Support
   ================================================ */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .text-md-end {
    text-align: left !important;
}

[dir="rtl"] .text-md-start {
    text-align: right !important;
}

/* ================================================
   Responsive
   ================================================ */
@media (max-width: 992px) {
    .hero-section {
        min-height: 400px;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 350px;
        padding: 40px 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .card-img-top {
        height: 180px;
    }
    
    .product-card .card-img-top {
        height: 200px;
    }
}

/* ================================================
   Loading Animation
   ================================================ */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ================================================
   Print Styles
   ================================================ */
@media print {
    .top-bar,
    .navbar,
    .footer,
    #scrollToTop {
        display: none !important;
    }
}