* {
    @import url('https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400;1,700&family=Merriweather:ital,opsz,wght@0,18..144,300..900;1,18..144,300..900&family=Outfit:wght@100..900&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', 'Roboto', sans-serif; 
    line-height: 1.6;
    background: #f7f7f7;
    color: #222;
}

/* --- HEADER & NAVIGATION STYLES --- */
header {
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #0077ff, #00bbff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #222;
    font-weight: 500;
    transition: 0.3s ease;
    font-size: 15px;
}

.nav-link:hover {
    color: #0077ff;
}

.cart-icon-link {
    display: flex;
    align-items: center;
    color: #222;
}

.cart-icon-link:hover {
    color: #0077ff;
}

.hamburger {
    display: none; 
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    z-index: 1100;
}

.bar {
    display: block;
    width: 100%;
    height: 3px;
    background: #222;
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
}

/* --- HERO SECTION STYLES --- */
.hero {
    text-align: center;
    padding: 100px 20px;
    background: linear-gradient(135deg, #0077ff, #00bbff);
    color: white;
    animation: fadeIn 1.5s ease;
}

.hero h2 {
    font-size: 48px;
    margin-bottom: 15px;
    font-weight: 700;
}

.hero p {
    margin-bottom: 30px;
    font-size: 18px;
    opacity: 0.95;
}

/* --- BUTTON STYLES --- */
.btn {
    display: inline-block;
    background: #000;
    color: #fff;
    padding: 12px 28px;
    margin-top: 10px;
    transition: 0.3s;
    text-decoration: none;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
}

.btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.buy-btn {
    display: inline-block;
    background: #3815ff;
    color: #fff;
    padding: 12px 28px;
    margin-top: 10px;
    transition: 0.3s;
    text-decoration: none;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
}

.buy-btn:hover {
    background: #2a0fb3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 21, 255, 0.3);
}

/* --- PRODUCT/SEARCH STYLES --- */
.section-title {
    text-align: center;
    font-size: 36px;
    margin: 50px 0 30px;
    font-weight: 700;
}

.search-container {
    text-align: center;
    padding: 0 40px 30px;
}

#product-search {
    width: 100%;
    max-width: 600px;
    padding: 14px 18px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#product-search:focus {
    border-color: #0077ff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 119, 255, 0.1);
}

.products {
    padding: 40px 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    padding: 0 40px 50px;
}

.product-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    border: 1px solid #f0f0f0;
}

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.product-card h3 {
    font-size: 16px;
    margin-bottom: 10px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.price {
    font-weight: 700;
    margin: 12px 0;
    color: #0077ff;
    font-size: 18px;
}

.product-card .btn,
.product-card .buy-btn {
    width: 100%;
    margin-top: 8px;
    padding: 10px;
}

/* --- CONTACT STYLES --- */
.contact {
    padding: 60px 40px;
    background: #fff;
    margin: 40px 0;
}

.contact form {
    max-width: 500px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact input, 
.contact textarea {
    padding: 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.contact input:focus,
.contact textarea:focus {
    border-color: #0077ff;
    outline: none;
}

.contact textarea {
    height: 140px;
    resize: vertical;
}

.contact .btn {
    width: 100%;
}

/* --- FOOTER STYLES --- */
footer {
    text-align: center;
    padding: 30px 20px;
    background: #1a1a1a;
    color: #fff;
}

footer p {
    margin-bottom: 15px;
}

footer a {
    color: #00bbff;
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s;
}

footer a:hover {
    color: #fff;
}

/* --- AUTH PAGE STYLES --- */
.auth-container {
    padding: 60px 20px;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-box {
    max-width: 420px;
    width: 100%;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.tab-buttons {
    display: flex;
    margin-bottom: 30px;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 4px;
}

.tab-btn {
    flex-grow: 1;
    padding: 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s;
    color: #666;
    border-radius: 6px;
}

.tab-btn.active {
    background: #0077ff;
    color: white;
}

.auth-form {
    display: none;
    flex-direction: column;
    gap: 16px;
}

.auth-form.active {
    display: flex;
}

.auth-form h3 {
    margin-bottom: 5px;
    color: #222;
    font-size: 18px;
}

.auth-form input {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.auth-form input:focus {
    border-color: #0077ff;
    outline: none;
}

.auth-form .btn {
    width: 100%;
    margin-top: 8px;
}

.auth-form a {
    text-align: center;
    color: #0077ff;
    text-decoration: none;
    font-size: 14px;
    margin-top: 10px;
    transition: color 0.3s;
}

.auth-form a:hover {
    color: #005fa3;
}

/* --- PROFILE PAGE STYLES --- */
.profile-container {
    padding: 60px 20px;
    min-height: 70vh;
}

.profile-box {
    max-width: 700px;
    margin: 30px auto;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #0077ff;
    object-fit: cover;
}

.profile-info {
    flex: 1;
}

.profile-info h2 {
    font-size: 26px;
    margin-bottom: 8px;
}

.profile-info p {
    color: #666;
    margin: 6px 0;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-link {
    display: block;
    padding: 14px;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    color: #0077ff;
    text-decoration: none;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s;
}

.profile-link:hover {
    background: #f0f7ff;
    border-color: #0077ff;
}

.logout-btn {
    background: #d9534f;
    color: white;
    border: none;
}

.logout-btn:hover {
    background: #c9302c;
}

/* --- CART PAGE STYLES --- */
.cart-container {
    padding: 60px 20px;
    min-height: 70vh;
    max-width: 1000px;
    margin: 0 auto;
}

.cart-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin-top: 30px;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cart-item {
    display: flex;
    align-items: center;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
    gap: 20px;
}

.cart-item-img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

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

.item-details h4 {
    margin-bottom: 8px;
    font-size: 16px;
}

.item-price {
    font-weight: 700;
    color: #0077ff;
    font-size: 16px;
}

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

.item-quantity input {
    width: 60px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
}

.remove-btn {
    background: none;
    border: none;
    color: #d9534f;
    cursor: pointer;
    font-weight: 600;
    transition: color 0.3s;
    flex-shrink: 0;
}

.remove-btn:hover {
    color: #c9302c;
}

.cart-summary {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
    height: fit-content;
    position: sticky;
    top: 80px;
}

.cart-summary h3 {
    margin-bottom: 20px;
    font-size: 18px;
}

.cart-summary p {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 15px;
}

.cart-total {
    font-size: 20px;
    font-weight: 700;
    border-top: 2px solid #f0f0f0;
    padding-top: 15px;
    margin-top: 15px;
}

.checkout-btn {
    width: 100%;
    margin-top: 20px;
    padding: 14px;
    background: #28a745;
    color: white;
}

.checkout-btn:hover {
    background: #218838;
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

/* --- MEDIA QUERIES (RESPONSIVENESS) --- */
@media (max-width: 900px) {
    header {
        padding: 15px 25px;
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        padding: 0 25px 50px;
    }

    .hamburger {
        display: flex; 
    }

    .nav-list {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 65px;
        right: 0;
        width: 100%;
        background: #fff;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        padding: 15px 25px;
        border-top: 1px solid #eee;
        gap: 0;
    }

    .nav-list.active {
        display: flex;
    }

    .nav-list li {
        padding: 12px 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .auth-box {
        padding: 30px;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .cart-content {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }
}

@media (max-width: 600px) {
    header {
        padding: 12px 15px;
    }
    
    .logo {
        font-size: 22px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 15px 40px;
    }

    .product-card {
        padding: 15px;
    }

    .product-card img {
        height: 140px;
    }

    .hero h2 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
    }

    .section-title {
        font-size: 28px;
        margin: 30px 0 20px;
    }

    .search-container {
        padding: 0 15px 20px;
    }

    .contact {
        padding: 40px 20px;
    }

    .auth-box {
        padding: 25px;
    }

    .cart-item {
        flex-wrap: wrap;
        padding: 15px;
    }

    .cart-item-img {
        width: 80px;
        height: 80px;
    }

    .item-details {
        flex-basis: 100%;
    }

    .remove-btn {
        margin-left: auto;
    }
}

@media (max-width: 400px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .hero h2 {
        font-size: 26px;
    }

    .tab-buttons {
        flex-direction: column;
    }

    .cart-item {
        padding: 12px;
    }
}