/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --accent: #4cc9f0;
    --light: #f8f9fa;
    --dark: #212529;
    --success: #4ade80;
    --warning: #facc15;
    --danger: #f87171;
    --gray: #6c757d;
    --light-gray: #e9ecef;
}

body {
    background-color: #f5f7ff;
    color: var(--dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.3);
}

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

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

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

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

.section-title p {
    color: var(--gray);
    max-width: 600px;
    margin: 20px auto 0;
}

/* Header Styles */
header {
    background: white;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.logo span {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links li a {
    font-weight: 600;
    color: var(--dark);
    transition: color 0.3s;
    position: relative;
    padding: 5px 0;
}

.nav-links li a:hover {
    color: var(--primary);
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.nav-links li a:hover::after {
    width: 100%;
}

.nav-icons {
    display: flex;
    gap: 20px;
    font-size: 1.3rem;
}

.nav-icons a {
    color: var(--dark);
    transition: color 0.3s;
    position: relative;
}

.nav-icons a:hover {
    color: var(--primary);
}

.cart-count {
    position: relative;
}

.cart-count::after {
    content: '0';
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-btns {
    display: flex;
    gap: 15px;
}

/* Categories Section */
.categories {
    background: white;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.category-card {
    background: var(--light);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.category-img {
    height: 200px;
    background: var(--light-gray);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 4rem;
    color: var(--primary);
}

.category-info {
    padding: 20px;
    text-align: center;
}

.category-info h3 {
    margin-bottom: 10px;
    color: var(--dark);
}

/* Products Section */
.products {
    background: var(--light);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px);
}

.product-img {
    height: 200px;
    background: var(--light-gray);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.product-img img {
    max-width: 80%;
    max-height: 80%;
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--danger);
    color: white;
    padding: 5px 10px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
}

.product-info {
    padding: 20px;
}

.product-category {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.product-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.current-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark);
}

.original-price {
    font-size: 1rem;
    color: var(--gray);
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    justify-content: space-between;
}

.add-to-cart {
    flex: 1;
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.add-to-cart:hover {
    background: var(--secondary);
}

.wishlist {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--light);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.3s;
}

.wishlist:hover {
    background: var(--danger);
    color: white;
}

/* Features Section */
.features {
    background: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    text-align: center;
    padding: 30px 20px;
    border-radius: 15px;
    background: var(--light);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: rgba(67, 97, 238, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: var(--primary);
}

.feature-card h3 {
    margin-bottom: 15px;
    color: var(--dark);
}

/* Newsletter Section */
.newsletter {
    background: linear-gradient(135deg, #3a0ca3, #4361ee);
    color: white;
    text-align: center;
    padding: 80px 0;
}

.newsletter h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.newsletter p {
    max-width: 600px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
}

.newsletter-form input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 50px 0 0 50px;
    font-size: 1rem;
}

.newsletter-form button {
    background: var(--accent);
    color: var(--dark);
    border: none;
    padding: 0 30px;
    border-radius: 0 50px 50px 0;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.newsletter-form button:hover {
    background: #38b6ff;
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding-top: 70px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary);
}

.footer-col p {
    margin-bottom: 20px;
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-5px);
}

.footer-links li {
    margin-bottom: 15px;
}

.footer-links a {
    opacity: 0.8;
    transition: all 0.3s;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--primary);
    padding-left: 5px;
}

.contact-info li {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    opacity: 0.8;
}

.contact-info i {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px 0;
    text-align: center;
}

.copyright {
    opacity: 0.7;
}

/* Auth Modal */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.auth-modal.active {
    opacity: 1;
    visibility: visible;
}

.auth-container {
    background: white;
    border-radius: 15px;
    width: 100%;
    max-width: 500px;
    overflow: hidden;
    transform: translateY(-50px);
    transition: transform 0.4s ease;
}

.auth-modal.active .auth-container {
    transform: translateY(0);
}

.auth-header {
    background: var(--primary);
    color: white;
    padding: 25px;
    text-align: center;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
}

.auth-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.form-group input:focus {
    border-color: var(--primary);
    outline: none;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Page Styles */
.page {
    display: none;
}

.page.active {
    display: block;
}

.page-header {
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 15px;
}

.page-content {
    padding: 50px 0;
}

.category-page .category-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.category-page .category-card {
    cursor: pointer;
}

.about-content {
    display: flex;
    gap: 50px;
    align-items: center;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
    height: 400px;
    background: var(--light-gray);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 5rem;
    color: var(--primary);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form .form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    height: 150px;
    resize: vertical;
}

.cart-container {
    display: flex;
    gap: 30px;
}

.cart-items {
    flex: 3;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.cart-item-img {
    width: 100px;
    height: 100px;
    background: var(--light-gray);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 20px;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--light);
    border: 1px solid #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.quantity {
    font-weight: 600;
}

.remove-item {
    color: var(--danger);
    cursor: pointer;
    margin-left: 20px;
}

.cart-summary {
    flex: 1;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    align-self: flex-start;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.summary-total {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 20px 0;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Filters */
.filters {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-weight: 600;
    color: var(--dark);
}

.filter-group select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
}

/* Search */
.search-container {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.search-container input {
    flex: 1;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .cart-container {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: white;
        flex-direction: column;
        align-items: center;
        padding-top: 50px;
        transition: all 0.3s ease;
    }

    .nav-links.active {
        left: 0;
    }

    .hero {
        padding: 70px 0;
    }

    .hero h1 {
        font-size: 2.3rem;
    }

    .hero-btns {
        flex-direction: column;
    }

    .newsletter-form {
        flex-direction: column;
        gap: 10px;
    }

    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
        border-radius: 50px;
    }
    
    .page-header h1 {
        font-size: 2.2rem;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .search-container {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .section {
        padding: 60px 0;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cart-item-img {
        margin-bottom: 15px;
    }
    
    .cart-item-actions {
        width: 100%;
        justify-content: space-between;
    }
}
