/* Global Styles */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --dark-color: #1a1a2e;
    --light-color: #f8f9fa;
    --success-color: #4cc9f0;
    --danger-color: #f72585;
    --warning-color: #f8961e;
    --gray-color: #6c757d;
    --white-color: #ffffff;
    --black-color: #000000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background-color: var(--accent-color);
}

.btn-primary:hover {
    background-color: #3a7bd5;
}

/* Header Styles */
header {
    background-color: var(--white-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    padding: 15px 0;
}

.logo img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

nav ul {
    display: flex;
    align-items: center;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    font-weight: 500;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--primary-color);
}

nav ul li a.active {
    color: var(--primary-color);
    font-weight: 600;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 24px;
}

/* Hero Section */
.hero {
    padding: 150px 0 80px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.hero-content {
    max-width: 600px;
}

.hero h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
    color: var(--gray-color);
}

.hero-image img {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: float 3s ease-in-out infinite;
}

/* Products Section */
.products {
    padding: 80px 0;
}

.products h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    position: relative;
}

.products h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: var(--white-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px 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 15px 30px rgba(0, 0, 0, 0.15);
}

.product-image {
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 20px;
}

.category {
    background-color: var(--light-color);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.rating {
    color: var(--warning-color);
    font-size: 14px;
}

.product-info p {
    color: var(--gray-color);
    font-size: 14px;
    margin-bottom: 15px;
}

.product-actions {
    display: flex;
    justify-content: space-between;
}

/* About Section */
.about {
    padding: 80px 0;
    background-color: var(--white-color);
    text-align: center;
}

.about h2 {
    font-size: 36px;
    margin-bottom: 30px;
    position: relative;
}

.about h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.about p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 18px;
    color: var(--gray-color);
}

/* Footer Styles */
footer {
    background-color: var(--dark-color);
    color: var(--white-color);
    padding: 60px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-section p {
    margin-bottom: 10px;
    color: #b3b3b3;
}

.footer-section i {
    margin-right: 10px;
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: #b3b3b3;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 40px 0;
}

.auth-form {
    background-color: var(--white-color);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 500px;
    animation: fadeIn 0.5s ease;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header img {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
}

.auth-header h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--gray-color);
}

.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.form-group i {
    position: absolute;
    left: 15px;
    top: 40px;
    color: var(--gray-color);
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--gray-color);
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 500;
}

/* Product Detail Page */
.product-detail {
    padding: 150px 0 80px;
}

.product-images {
    margin-bottom: 30px;
}

.main-image {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-info {
    padding: 0 20px;
}

.product-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    text-align: center;
    padding: 20px 0;
}

.product-detail .product-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

.product-title {
    font-size: 32px;
    margin-bottom: 15px;
}

.product-meta {
    margin-bottom: 20px;
}

.product-meta .price {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
}

.product-meta .category {
    background-color: var(--light-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    margin-left: 15px;
}

.product-meta .rating {
    display: block;
    margin-top: 10px;
}

.product-description {
    margin-bottom: 30px;
}

.product-description h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.product-actions {
    margin-bottom: 30px;
}

.quantity {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.qty-btn {
    width: 40px;
    height: 40px;
    background-color: var(--light-color);
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#product-qty {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 1px solid #ddd;
    margin: 0 5px;
}

.product-details h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.product-details ul li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.product-details ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.related-products {
    padding: 60px 0;
    background-color: var(--light-color);
}

/* Admin Dashboard */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: var(--dark-color);
    color: var(--white-color);
    padding: 20px 0;
    position: fixed;
    height: 100%;
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    text-align: center;
}

.sidebar-header img {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
}

.sidebar-header h3 {
    font-size: 18px;
}

.sidebar-nav ul li {
    margin-bottom: 5px;
}

.sidebar-nav ul li a {
    display: block;
    padding: 12px 20px;
    color: #b3b3b3;
    transition: all 0.3s ease;
}

.sidebar-nav ul li a:hover {
    color: var(--white-color);
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-nav ul li a.active {
    color: var(--white-color);
    background-color: var(--primary-color);
}

.sidebar-nav ul li a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.admin-main {
    flex: 1;
    margin-left: 250px;
    background-color: #f5f7fb;
    min-height: 100vh;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: var(--white-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.admin-search {
    position: relative;
}

.admin-search input {
    padding: 10px 15px 10px 40px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 250px;
}

.admin-search i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
}

.admin-section {
    padding: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--white-color);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(67, 97, 238, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    color: var(--primary-color);
    font-size: 24px;
}

.stat-info h3 {
    font-size: 16px;
    color: var(--gray-color);
    margin-bottom: 5px;
}

.stat-info p {
    font-size: 24px;
    font-weight: 700;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h3 {
    font-size: 24px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

table th, table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

table tr:hover {
    background-color: #f5f7fb;
}

table img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
}

.action-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 5px;
    transition: all 0.3s ease;
}

.edit-btn {
    background-color: var(--accent-color);
    color: white;
}

.edit-btn:hover {
    background-color: #3a7bd5;
}

.delete-btn {
    background-color: var(--danger-color);
    color: white;
}

.delete-btn:hover {
    background-color: #e5176f;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.status-completed {
    background-color: #d4edda;
    color: #155724;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--white-color);
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: slideDown 0.3s ease;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--black-color);
}

#image-preview {
    width: 100px;
    height: 100px;
    border: 1px dashed #ddd;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#image-preview img {
    max-width: 100%;
    max-height: 100%;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.slide-in {
    animation: slideIn 1s ease forwards;
}

@keyframes slideIn {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero {
        padding: 120px 0 60px;
    }
    
    .hero h2 {
        font-size: 36px;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    nav ul {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--white-color);
        flex-direction: column;
        align-items: center;
        padding: 40px 0;
        transition: all 0.3s ease;
    }
    
    nav ul.active {
        left: 0;
    }
    
    nav ul li {
        margin: 15px 0;
    }
    
    .hero {
        text-align: center;
        padding: 100px 0 40px;
    }
    
    .hero-image {
        margin-top: 40px;
    }
    
    .product-detail {
        padding: 100px 0 40px;
    }
    
    .product-info {
        padding: 0;
        margin-top: 30px;
    }
    
    .admin-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .sidebar-nav ul {
        display: flex;
        overflow-x: auto;
    }
    
    .sidebar-nav ul li {
        flex: 0 0 auto;
    }
    
    .admin-main {
        margin-left: 0;
    }
}

@media (max-width: 576px) {
    .hero h2 {
        font-size: 28px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
}

/* Checkout Page */
.checkout {
    padding: 100px 0 50px;
}

.checkout-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.checkout-summary, .checkout-form {
    background-color: var(--white-color);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.checkout h2 {
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.cart-items {
    margin-bottom: 20px;
}

.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto auto;
    gap: 15px;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.cart-item:last-child {
    border-bottom: none;
}

.item-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
}

.item-info h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.item-info p {
    color: var(--gray-color);
    font-size: 14px;
}

.item-total {
    font-weight: 600;
}

.remove-item {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 18px;
}

.cart-total {
    margin-top: 20px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.total-row.grand-total {
    font-size: 18px;
    font-weight: 600;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.checkout-form .form-group {
    margin-bottom: 15px;
}

.checkout-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.checkout-form input,
.checkout-form textarea,
.checkout-form select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.checkout-form textarea {
    resize: vertical;
    min-height: 80px;
}

@media (max-width: 768px) {
    .checkout-container {
        grid-template-columns: 1fr;
    }
}