/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2ecc71;
    --secondary: #27ae60;
    --dark: #2c3e50;
    --light: #ecf0f1;
    --danger: #e74c3c;
    --warning: #f39c12;
    --info: #3498db;
    --success: #27ae60;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-brand .logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 50%;
    background: white;
    padding: 5px;
}

.nav-brand h2 {
    margin: 0;
    font-size: 1.8rem;
}

.nav-brand .tagline {
    font-size: 0.9rem;
    opacity: 0.9;
}

.nav-menu {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.user-dropdown-btn:hover {
    background: rgba(255,255,255,0.3);
}

.user-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    min-width: 200px;
    overflow: hidden;
    z-index: 1001;
}

.user-dropdown:hover .user-dropdown-menu,
.user-dropdown-menu:hover {
    display: block;
    animation: slideDown 0.3s ease;
}

.user-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--dark);
    text-decoration: none;
    transition: background 0.3s ease;
}

.user-dropdown-menu a:hover {
    background: var(--light);
}

.user-dropdown-menu a.logout-link {
    color: var(--danger);
    border-top: 1px solid var(--light);
}

.user-dropdown-menu a.logout-link:hover {
    background: #ffe5e5;
}

.user-name {
    background: rgba(255,255,255,0.2);
    padding: 8px 15px;
    border-radius: 25px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46,204,113,0.3);
}

.btn-secondary {
    background: white;
    color: var(--primary);
}

.btn-secondary:hover {
    background: var(--light);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-info {
    background: var(--info);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-lg {
    padding: 12px 25px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.85rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(46,204,113,0.9), rgba(39,174,96,0.9)), 
                url('../img/hero-bg.jpg') center/cover;
    color: white;
    text-align: center;
    padding: 80px 20px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.3rem;
    opacity: 0.9;
}

/* Section Title */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin: 3rem 0 2rem;
    color: var(--dark);
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

/* Products Section */
.products {
    padding: 3rem 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 2rem;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.badge-sold {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    margin-bottom: 10px;
    color: var(--dark);
    cursor: pointer;
    transition: color 0.3s ease;
}

.product-info h3:hover {
    color: var(--primary);
}

.product-info .price {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 10px;
}

.product-info .stock {
    color: #7f8c8d;
    margin-bottom: 15px;
}

.quantity-control {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.quantity-control button {
    width: 35px;
    height: 35px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s ease;
}

.quantity-control button:hover {
    background: var(--secondary);
}

.quantity-control input {
    width: 60px;
    text-align: center;
    border: 2px solid var(--light);
    border-radius: 5px;
    padding: 5px;
    font-size: 1rem;
}

/* Slider Section */
.slider-section {
    padding: 3rem 0;
    background: white;
}

.slider {
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

/* Testimonials */
.testimonials {
    padding: 3rem 0;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 2rem;
}

.testimonial-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.testimonial-header {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: center;
}

.testimonial-header img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-header h4 {
    margin: 0;
    color: var(--dark);
}

.rating {
    color: #f39c12;
}

.rating i {
    font-size: 0.9rem;
}

.rating i.active {
    color: #f39c12;
}

.testimonial-text {
    color: #555;
    line-height: 1.6;
    font-style: italic;
}

/* Maps */
.maps {
    padding: 3rem 0;
    background: white;
}

.map-container {
    margin-top: 2rem;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* Blog Section */
.blog-section {
    padding: 3rem 0;
    background: #f8f9fa;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 2rem;
}

.blog-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.blog-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.1);
}

.blog-info {
    padding: 20px;
}

.blog-info h3 {
    margin-bottom: 10px;
    color: var(--dark);
    font-size: 1.2rem;
    line-height: 1.4;
}

.blog-excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.blog-meta {
    display: flex;
    gap: 20px;
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Footer */
.footer {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer p {
    margin: 5px 0;
}

/* Auth Page */
.auth-page {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.2);
}

.auth-box-large {
    max-width: 600px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header i {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.auth-header h1 {
    color: var(--dark);
    margin-bottom: 10px;
}

.auth-header p {
    color: #7f8c8d;
}

.auth-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark);
    font-weight: 500;
}

.form-group label i {
    margin-right: 8px;
    color: var(--primary);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--light);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 0.85rem;
}

.auth-footer {
    margin-top: 25px;
    text-align: center;
    color: #7f8c8d;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert i {
    margin-right: 10px;
}

.alert-danger {
    background: #ffe5e5;
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.alert-success {
    background: #e8f8f5;
    color: var(--success);
    border-left: 4px solid var(--success);
}

.alert-info {
    background: #e3f2fd;
    color: var(--info);
    border-left: 4px solid var(--info);
}

.alert-warning {
    background: #fff3e0;
    color: var(--warning);
    border-left: 4px solid var(--warning);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    border-radius: 15px;
    position: relative;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 2rem;
    cursor: pointer;
    color: #7f8c8d;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--danger);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-brand {
        text-align: center;
    }
    
    .nav-brand .logo {
        width: 50px;
        height: 50px;
    }
    
    .nav-brand h2 {
        font-size: 1.4rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    
    .user-dropdown-menu {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .product-grid,
    .testimonial-grid {
        grid-template-columns: 1fr;
    }
    
    .auth-box {
        padding: 25px;
    }
    
    .form-row {
        grid-template-columns: 1fr !important;
    }
    
    .stats-grid,
    .stats-grid-3 {
        grid-template-columns: 1fr !important;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .date-range {
        grid-template-columns: 1fr !important;
    }
}