/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --primary: #6C63FF;
    --primary-dark: #5548E8;
    --secondary: #4834DF;
    --accent: #FF6B6B;
    --accent-2: #4ECDC4;
    --dark: #2D3436;
    --light: #DFE6E9;
    --danger: #FF6B6B;
    --warning: #FFA502;
    --info: #3742FA;
    --success: #1DD1A1;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --gradient-5: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

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, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.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(102, 126, 234, 0.3);
    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: #f8f9fa;
}

.user-dropdown-menu a.logout-link {
    color: #FF6B6B;
    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: 50px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(240, 147, 251, 0.6);
}

.btn-danger {
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #ffa502, #ff6348);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #1dd1a1, #10ac84);
    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 {
    position: relative;
    color: white;
    text-align: center;
    padding: 120px 20px;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../uploads/bg-index.png') center/cover no-repeat;
    z-index: 1;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.85));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    text-shadow: 2px 2px 20px rgba(0,0,0,0.4);
    animation: fadeInDown 1s ease;
    letter-spacing: -1px;
    background: linear-gradient(to right, #fff, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.5rem;
    opacity: 0.95;
    text-shadow: 1px 1px 10px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease 0.3s both;
    font-weight: 300;
}

.hero-buttons {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.6s both;
}

.hero-buttons .btn {
    padding: 15px 35px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.hero-buttons .btn:first-child {
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
    color: white;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
}

.hero-buttons .btn:first-child:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 107, 107, 0.6);
}

.hero-buttons .btn:last-child {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    backdrop-filter: blur(10px);
}

.hero-buttons .btn:last-child:hover {
    background: white;
    color: #667eea;
    transform: translateY(-3px);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 0.95;
        transform: translateY(0);
    }
}

/* Section Title */
.section-title {
    text-align: center;
    font-size: 2.8rem;
    margin: 3rem 0 1rem;
    color: var(--dark);
    position: relative;
    padding-bottom: 20px;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 5px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
}

.section-title::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 5px;
    background: #667eea;
    border-radius: 3px;
    opacity: 0.5;
}

/* Products Section */
.products {
    padding: 4rem 0;
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 35px;
    margin-top: 2rem;
}

.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.product-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.product-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.15) rotate(2deg);
}

.badge-sold {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
    color: white;
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-info {
    padding: 25px;
}

.product-info h3 {
    margin-bottom: 12px;
    color: var(--dark);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.4;
}

.product-info h3:hover {
    color: #667eea;
    transform: translateX(5px);
}

.product-info .price {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    margin-bottom: 12px;
    display: block;
}

.product-info .stock {
    color: #7f8c8d;
    margin-bottom: 18px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-info .stock i {
    color: #667eea;
}

.quantity-control {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 18px;
    align-items: center;
}

.quantity-control button {
    width: 40px;
    height: 40px;
    border: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-control button:hover {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}

.quantity-control button:active {
    transform: scale(0.95);
}

.quantity-control input {
    width: 70px;
    text-align: center;
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
}

/* 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: 4rem 0;
    background: linear-gradient(135deg, #667eea10 0%, #764ba210 100%);
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 35px;
    margin-top: 2rem;
}

.testimonial-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.1);
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.15;
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.25);
    border-color: #667eea;
}

.testimonial-header {
    display: flex;
    gap: 15px;
    margin-bottom: 18px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.testimonial-header img {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid;
    border-image: linear-gradient(135deg, #667eea, #764ba2) 1;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.testimonial-header h4 {
    margin: 0;
    color: var(--dark);
    font-size: 1.1rem;
    font-weight: 700;
}

.rating {
    margin-top: 5px;
}

.rating i {
    font-size: 1rem;
    margin-right: 2px;
    background: linear-gradient(135deg, #ffa502, #ff6348);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rating i.active {
    background: linear-gradient(135deg, #ffa502, #ff6348);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.testimonial-text {
    color: #555;
    line-height: 1.8;
    font-style: italic;
    position: relative;
    z-index: 1;
    font-size: 1.05rem;
}

/* 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: 4rem 0;
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 35px;
    margin-top: 2rem;
}

.blog-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(79, 172, 254, 0.1);
}

.blog-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(79, 172, 254, 0.3);
    border-color: #4facfe;
}

.blog-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #4facfe15, #00f2fe15);
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.12);
}

.blog-info {
    padding: 25px;
}

.blog-info h3 {
    margin-bottom: 12px;
    color: var(--dark);
    font-size: 1.3rem;
    line-height: 1.4;
    font-weight: 700;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-info h3 {
    color: #4facfe;
}

.blog-excerpt {
    color: #555;
    line-height: 1.7;
    margin-bottom: 18px;
    font-size: 0.95rem;
}

.blog-meta {
    display: flex;
    gap: 20px;
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-bottom: 18px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light);
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-meta i {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 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;
    overflow-y: auto;
}

.auth-container {
    width: 100%;
    max-width: 450px;
    margin: auto;
}

.auth-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.2);
    margin: 20px 0;
}

.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 {
        padding: 80px 20px;
        min-height: 400px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .product-grid,
    .testimonial-grid,
    .blog-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;
    }
    
    .section-title {
        font-size: 2rem;
    }
}