/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #e63946;
    --primary-dark: #c1121f;
    --secondary: #1d3557;
    --accent: #457b9d;
    --light: #f1faee;
    --white: #ffffff;
    --gray: #6c757d;
    --dark: #212529;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --radius: 12px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: #f8f9fa;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

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

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 2.5rem;
    color: var(--secondary);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* ===== Navbar ===== */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: var(--shadow);
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.logo i {
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--secondary);
    transition: color 0.3s;
    position: relative;
}

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

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

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

.nav-icons {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.cart-icon {
    position: relative;
    font-size: 1.3rem;
    color: var(--secondary);
    cursor: pointer;
}

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--secondary);
    cursor: pointer;
}

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
    color: var(--white);
    padding: 100px 1.5rem;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content h1 span {
    color: #ffd166;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== Categories ===== */
.categories {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 1.5rem;
}

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

.category-card {
    background: var(--white);
    padding: 2rem;
    text-align: center;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.category-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.category-card h3 {
    color: var(--secondary);
    font-size: 1.1rem;
}

/* ===== Products ===== */
.products {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 1.5rem;
    background: #f8f9fa;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.8rem;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.product-img {
    height: 200px;
    background: linear-gradient(45deg, #e0e0e0, #f5f5f5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--accent);
    position: relative;
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-info {
    padding: 1.2rem;
}

.product-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
    color: var(--secondary);
}

.product-info .price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.8rem;
}

.product-info .price .old-price {
    font-size: 0.9rem;
    color: var(--gray);
    text-decoration: line-through;
    margin-left: 8px;
    font-weight: 400;
}

.add-to-cart {
    width: 100%;
    padding: 10px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

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

/* ===== About ===== */
.about {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 1.5rem;
}

.about-content p {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    color: var(--gray);
    font-size: 1.1rem;
}

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

.feature {
    text-align: center;
    padding: 1.5rem;
}

.feature i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.feature h4 {
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.feature p {
    color: var(--gray);
    font-size: 0.95rem;
}

/* ===== Contact ===== */
.contact {
    background: var(--secondary);
    color: white;
    padding: 60px 1.5rem;
}

.contact .section-title {
    color: white;
}

.contact .section-title::after {
    background: #ffd166;
}

.contact-container {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-item i {
    font-size: 1.4rem;
    color: #ffd166;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: 2px solid #ffd166;
}

.contact-form .btn {
    align-self: flex-start;
}

/* ===== Cart Modal ===== */
.cart-modal {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100%;
    background: white;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-modal.open {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid #eee;
}

.cart-header h2 {
    font-size: 1.3rem;
    color: var(--secondary);
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--gray);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
}

.empty-cart {
    text-align: center;
    color: var(--gray);
    margin-top: 2rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.cart-item-img {
    width: 60px;
    height: 60px;
    background: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent);
}

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

.cart-item-info h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.cart-item-info .item-price {
    color: var(--primary);
    font-weight: 600;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-item-qty button {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
}

.remove-item {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 1.1rem;
}

.cart-footer {
    padding: 1.2rem 1.5rem;
    border-top: 1px solid #eee;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.checkout-btn {
    width: 100%;
    text-align: center;
}

/* ===== Footer ===== */
footer {
    background: var(--dark);
    color: #adb5bd;
    padding: 50px 1.5rem 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: #343a40;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.social-links a:hover {
    background: var(--primary);
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #343a40;
    font-size: 0.9rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        box-shadow: var(--shadow);
        transition: left 0.3s;
    }

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

    .menu-toggle {
        display: block;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .cart-modal {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 70px 1rem;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.7rem;
    }
}
