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

:root {
    --primary-color: #2d8659;
    --secondary-color: #ff6b35;
    --accent-color: #f7931e;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --gradient-primary: linear-gradient(135deg, #2d8659 0%, #34a574 100%);
    --gradient-secondary: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    background-color: var(--light-bg);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Modern Navigation */
.navbar {
    background: var(--white) !important;
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand img {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

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

/* Offers Banner Carousel */
.offers-banner {
    background: var(--gradient-primary);
    padding: 1rem 0;
    position: relative;
    overflow: hidden;
}

.offers-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.offer-slide {
    text-align: center;
    color: white;
    padding: 0.5rem 0;
}

.offer-slide h4 {
    font-weight: 600;
    margin: 0;
    font-size: 1.1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.offer-slide .badge {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
    margin-left: 0.5rem;
}

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.hero-section .lead {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* Modern Cards */
.card {
    border: none;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.product-card {
    height: 100%;
    position: relative;
}

.product-card .card-img-top {
    transition: transform 0.4s ease;
    height: 250px;
    object-fit: cover;
}

.product-card:hover .card-img-top {
    transform: scale(1.1);
}

.product-card .badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

.stock-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}

.stock-badge.in-stock {
    background: var(--success-color);
    color: white;
}

.stock-badge.low-stock {
    background: var(--warning-color);
    color: var(--text-dark);
}

.stock-badge.out-of-stock {
    background: var(--danger-color);
    color: white;
}

/* Modern Buttons */
.btn {
    border-radius: 12px;
    font-weight: 600;
    padding: 0.75rem 2rem;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-success {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(45, 134, 89, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 134, 89, 0.4);
    color: white;
}

.btn-outline-success {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-success:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

/* Categories Section */
.categories-section {
    background: var(--white);
    padding: 80px 0;
}

.category-card {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.category-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover::after {
    opacity: 1;
}

.category-card h5 {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-weight: 700;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Featured Products */
.featured-products {
    background: linear-gradient(to bottom, var(--light-bg), var(--white));
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* Offer Cards */
.offer-card {
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    background: var(--gradient-secondary);
    color: white;
    padding: 2.5rem;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.offer-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

.offer-card h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.offer-card p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    opacity: 0.95;
}

/* Testimonials */
.testimonials-section {
    background: var(--white);
    padding: 80px 0;
}

.testimonial-card {
    border-radius: 20px;
    padding: 2rem;
    height: 100%;
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

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

.stars {
    color: var(--warning-color);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background: var(--gradient-primary) !important;
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

footer h5 {
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

footer a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: all 0.3s ease;
}

footer a:hover {
    color: white;
    transform: translateX(5px);
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    margin-right: 0.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-3px);
}

/* Forms */
.form-control, .form-select {
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    padding: 0.875rem 1.25rem;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(45, 134, 89, 0.15);
    outline: none;
}

/* Badges */
.badge {
    padding: 0.5rem 1rem;
    font-weight: 600;
    border-radius: 20px;
    font-size: 0.875rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    min-width: 300px;
}

/* Admin Panel */
.admin-sidebar {
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    min-height: 100vh;
    padding: 20px 0;
    box-shadow: var(--shadow-md);
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 12px 20px;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0.25rem 1rem;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: var(--gradient-primary);
    color: white;
    transform: translateX(5px);
}

/* Stock Management Styles */
.stock-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
}

.stock-indicator::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.stock-indicator.in-stock {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.stock-indicator.in-stock::before {
    background: var(--success-color);
}

.stock-indicator.low-stock {
    background: rgba(255, 193, 7, 0.1);
    color: #d39e00;
}

.stock-indicator.low-stock::before {
    background: var(--warning-color);
}

.stock-indicator.out-of-stock {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

.stock-indicator.out-of-stock::before {
    background: var(--danger-color);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
    
    .offer-card {
        min-height: 180px;
        padding: 2rem;
    }
    
    .offer-card h3 {
        font-size: 1.5rem;
    }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* Price Display */
.price-display {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.price-original {
    text-decoration: line-through;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-right: 0.5rem;
}

/* Pulse Animation for Stock Alerts */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.stock-alert {
    animation: pulse 2s infinite;
}
