* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #ff6b6b;
    --secondary: #4ecdc4;
    --dark: #292f36;
    --light: #f7fff7;
    --gray: #f1f1f1;
    --accent: #ffd166;
}

body {
    background-color: var(--light);
    color: var(--dark);
}

/* Header & Navigation */
header {
    background-color: white;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar {
    background-color: var(--dark);
    color: white;
    padding: 8px 0;
    text-align: center;
    font-size: 14px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
}

.logo span {
    color: var(--secondary);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-container {
    position: relative;
}

.search-container input {
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid #ddd;
    width: 200px;
    outline: none;
    transition: width 0.3s;
}

.search-container input:focus {
    width: 250px;
    border-color: var(--secondary);
}

.search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--dark);
    cursor: pointer;
}

.auth-buttons button, .cart-btn {
    padding: 8px 20px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.login-btn {
    background-color: transparent;
    border: 2px solid var(--secondary);
    color: var(--secondary);
}

.login-btn:hover {
    background-color: var(--secondary);
    color: white;
}

.register-btn {
    background-color: var(--primary);
    color: white;
}

.register-btn:hover {
    background-color: #ff5252;
}

.cart-btn {
    background-color: var(--secondary);
    color: white;
    display: flex;
    align-items: center;
    gap: 5px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    display: none;
}

.user-info span {
    font-weight: 600;
}

.logout-btn {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1445205170230-053b83016050?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1471&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 100px 20px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero h2 {
    font-size: 32px;
    margin-bottom: 10px;
    color: var(--secondary);
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.shop-now-btn {
    background-color: var(--primary);
    color: white;
    padding: 15px 40px;
    border-radius: 30px;
    border: none;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.shop-now-btn:hover {
    background-color: #ff5252;
}

/* Products Section */
.products-section {
    padding: 80px 5%;
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 40px;
    color: var(--dark);
}

.section-subtitle {
    text-align: center;
    color: #666;
    max-width: 700px;
    margin: 0 auto 40px;
    font-size: 18px;
}

.products-filter {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border-radius: 20px;
    border: 2px solid var(--secondary);
    background-color: transparent;
    color: var(--secondary);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.filter-btn.active, .filter-btn:hover {
    background-color: var(--secondary);
    color: white;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-10px);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--primary);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.new-badge {
    background-color: var(--secondary);
}

.product-image {
    height: 200px;
    background-color: var(--gray);
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.product-edition {
    color: #777;
    font-size: 14px;
    margin-bottom: 10px;
}

.product-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 18px;
    margin-right: 10px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background-color: white;
    cursor: pointer;
    font-weight: bold;
}

.quantity-display {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
}

.stock-info {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.stock-info.in-stock {
    color: var(--secondary);
}

.stock-info.low-stock {
    color: orange;
}

.stock-info.out-of-stock {
    color: var(--primary);
}

.add-to-cart {
    width: 100%;
    padding: 10px;
    background-color: var(--dark);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.add-to-cart:hover:not(:disabled) {
    background-color: var(--primary);
}

.add-to-cart:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Page Section (About Us) */
.page-section {
    padding: 80px 5%;
    background-color: white;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-text h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: var(--dark);
}

.about-text p {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #555;
}

.about-image {
    flex: 1;
    min-width: 300px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.feature-card {
    background-color: var(--light);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 40px;
    color: var(--secondary);
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 15px;
    color: var(--dark);
}

/* Blog Section */
.blog-section {
    padding: 80px 5%;
    background-color: #f9f9f9;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.blog-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.blog-card:hover {
    transform: translateY(-10px);
}

.blog-image {
    height: 200px;
    background-color: var(--gray);
    position: relative;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--primary);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.blog-content {
    padding: 25px;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    color: #777;
    font-size: 14px;
    margin-bottom: 15px;
}

.blog-content h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--dark);
}

.blog-content p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.read-more {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.blog-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Contact Section */
.contact-section {
    padding: 80px 5%;
}

.contact-container {
    display: flex;
    gap: 50px;
    flex-wrap: wrap;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-form-container {
    flex: 1;
    min-width: 300px;
}

.contact-card {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.contact-card h3 {
    color: var(--dark);
    margin-bottom: 20px;
    font-size: 24px;
}

.contact-details {
    margin-top: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.contact-icon {
    background-color: var(--light);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--secondary);
    font-size: 20px;
}

.contact-text h4 {
    margin-bottom: 5px;
    color: var(--dark);
}

.contact-form {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary);
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

.submit-btn {
    background-color: var(--primary);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
}

.submit-btn:hover {
    background-color: #ff5252;
}

/* Admin Panel */
.admin-panel {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    margin: 50px 5%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: none;
}

.admin-title {
    color: var(--dark);
    margin-bottom: 30px;
    text-align: center;
}

.admin-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.admin-btn {
    padding: 10px 20px;
    background-color: var(--secondary);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

.admin-btn.delete {
    background-color: var(--primary);
}

.crud-form {
    background-color: var(--gray);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: none;
}

.form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.products-table th, .products-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.products-table th {
    background-color: var(--dark);
    color: white;
}

.products-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.table-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

/* Cart Modal */
.cart-modal {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    height: 100%;
    background-color: white;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    padding: 20px;
    transition: right 0.3s;
    z-index: 1000;
    overflow-y: auto;
}

.cart-modal.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close-cart {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

.cart-item-details {
    flex: 1;
}

.cart-item-details h4 {
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background-color: white;
    cursor: pointer;
}

.remove-item {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 12px;
}

.cart-total {
    margin-top: 20px;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    margin-top: 20px;
    cursor: pointer;
}

/* Login Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    display: none;
}

.modal {
    background-color: white;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    padding: 30px;
}

.modal h2 {
    margin-bottom: 20px;
    text-align: center;
    color: var(--dark);
}

.modal .form-group {
    margin-bottom: 20px;
}

.modal-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}

.modal-btn.secondary {
    background-color: var(--secondary);
}

.modal-switch {
    text-align: center;
    margin-top: 15px;
}

.modal-switch button {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-weight: 600;
}

.error-message {
    color: var(--primary);
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: none;
}

/* Footer */
footer {
    background-color: var(--dark);
    color: white;
    padding: 50px 5% 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-column h3 {
    margin-bottom: 20px;
    color: var(--secondary);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: var(--secondary);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #aaa;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .search-container input {
        width: 150px;
    }
    
    .search-container input:focus {
        width: 180px;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .hero h2 {
        font-size: 24px;
    }
    
    .products-grid, .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .cart-modal {
        width: 300px;
    }
    
    .about-content, .contact-container {
        flex-direction: column;
    }
}