
:root {
    --primary-color: #6c5ce7;
    --secondary-color: #fdcb6e;
    --text-dark: #2d3436;
    --text-light: #636e72;
    --bg-light: #f9f9f9;
    --white: #ffffff;
    --radius: 12px;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    font-family: 'Nunito', sans-serif;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 1.1rem;
}

.btn-primary:hover {
    background-color: #5649c0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.4);
}

.btn-sm {
    background-color: var(--secondary-color);
    color: var(--text-dark);
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-sm:hover {
    background-color: #eebb4d;
}


.header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-weight: 600;
    color: var(--text-dark);
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--primary-color);
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.login-btn {
    border: 2px solid var(--primary-color);
    padding: 6px 16px;
    border-radius: 20px;
    color: var(--primary-color);
    font-weight: 700;
    transition: all 0.3s;
}

.login-btn:hover {
    background: var(--primary-color);
    color: white;
}


.cart-icon {
    position: relative;
    cursor: pointer;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s;
    user-select: none;
}

.cart-icon:hover {
    background: rgba(108, 92, 231, 0.1);
}

.badge {
    background: #ff7675;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    position: absolute;
    top: -5px;
    right: -5px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}


.hero {
    background: linear-gradient(135deg, #a29bfe 0%, #74b9ff 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    margin-bottom: 50px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}


.categories {
    margin-bottom: 60px;
}

.categories h2,
.products h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
    color: var(--text-dark);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.category-card {
    padding: 30px;
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-card span {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}


.products {
    margin-bottom: 80px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tag {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
}

.tag.hit {
    background-color: #ff7675;
}

.tag.new {
    background-color: #00b894;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.description {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
    height: 40px;
    overflow: hidden;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary-color);
}

.old-price {
    text-decoration: line-through;
    color: #b2bec3;
    font-size: 0.9rem;
    margin-right: 5px;
}


.footer {
    background: #2d3436;
    color: #dfe6e9;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col a {
    display: block;
    margin-bottom: 10px;
    color: #b2bec3;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--secondary-color);
}

.copyright {
    text-align: center;
    border-top: 1px solid #636e72;
    padding-top: 20px;
    font-size: 0.9rem;
    color: #636e72;
}


.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    max-width: 100%;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-drawer.active {
    right: 0;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
}

.close-cart:hover {
    color: #000;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.empty-cart {
    text-align: center;
    color: #999;
    margin-top: 50px;
}

.empty-cart .hint {
    font-size: 0.9rem;
    margin-top: 10px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: all 0.2s;
}

.cart-item:hover {
    border-color: var(--primary-color);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
}

.cart-item-info .price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.quantity-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s;
    font-family: 'Nunito', sans-serif;
}

.quantity-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.quantity {
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.remove-item {
    background: none;
    border: none;
    color: #ff7675;
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: auto;
    transition: transform 0.2s;
}

.remove-item:hover {
    transform: scale(1.2);
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    background: #f9f9f9;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 700;
}

.total-price {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.checkout-btn {
    width: 100%;
}


@keyframes cartBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
}

.cart-icon.added {
    animation: cartBounce 0.4s ease;
}

.cart-icon.added .badge {
    background: #00b894;
}


.login-page {
    background: #fafafa;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Inter', sans-serif;
}

.login-wrapper {
    width: 100%;
    max-width: 400px;
    position: relative;
}

.back-link {
    display: inline-block;
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
    transition: color 0.2s;
}

.back-link:hover {
    color: #000;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.login-header {
    margin-bottom: 32px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #000;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 14px;
    color: #666;
}

.subtitle a {
    color: #000;
    font-weight: 500;
    text-decoration: underline;
}

.subtitle a:hover {
    text-decoration: none;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.input-group {
    margin-bottom: 16px;
}

.input-group input {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    background: transparent;
    transition: border-color 0.2s;
}

.input-group input:focus {
    outline: none;
    border-bottom-color: #000;
}

.input-group input::placeholder {
    color: #999;
}

.btn-primary-login {
    width: 100%;
    padding: 14px;
    background: #000;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s;
    font-family: 'Inter', sans-serif;
}

.btn-primary-login:hover {
    background: #333;
}


@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }

    .nav {
        gap: 15px;
        font-size: 0.9rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .cart-drawer {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }
}

.product-image {
    display: none;
}

.product-info {
    padding-top: 30px;
}

.product-card {
    min-height: 250px;
}