:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --gray: #7f8c8d;
    --success: #27ae60;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

html, body {
    font-family: 'Montserrat', Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', Arial, sans-serif;
}

body {
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 28px;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--secondary);
}

header {
    background-color: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-header {
    padding: 15px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 16px;
}

.logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.logo-img {
    width: 40px;
    height: 40px;
    margin-right: 0;
    object-fit: contain;
    display: block;
}

.search-bar {
    flex: 1 1 auto;
    max-width: none;
    min-width: 0;
    margin: 0;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 12px 48px 12px 20px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 16px;
    outline: none;
    transition: var(--transition);
}

.search-bar button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    border: 0;
    background-color: unset;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-actions a {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    transition: var(--transition);
    text-decoration: none;
    color: var(--dark);
    position: relative;
}

.user-actions a:hover {
    color: var(--secondary);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--accent);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.cart-icon {
    position: relative;
}

nav {
    background-color: var(--light);
    border-top: 1px solid #ddd;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    list-style: none;
    gap: 25px;
    margin: 0;
}

.nav-links li {
    flex-shrink: 0;
}

.nav-links a {
    font-weight: 600;
    color: var(--dark);
    transition: var(--transition);
    position: relative;
    text-decoration: none;
}

.nav-links a:hover {
    color: var(--secondary);
}

.nav-links a.active {
    color: var(--secondary);
}

.featured-products {
    padding: 50px 0;
    background-color: white;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-image {
    height: 200px;
    overflow: hidden;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 14px;
    text-align: center;
    padding: 12px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    display: block;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 18px;
    margin-bottom: 10px;
    min-height: 45px;
    overflow: hidden;
}

.product-store {
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 10px;
}

.product-desc {
    font-size: 14px;
    color: #555;
    margin-bottom: 12px;
    min-height: 44px;
    overflow: hidden;
}

.product-price {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.current-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
    margin-right: 10px;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.product-actions button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.add-to-cart {
    background-color: var(--secondary);
    color: white;
}

.add-to-cart:hover {
    background-color: #2980b9;
}

.buy-now {
    background-color: var(--light);
    color: var(--dark);
}

.buy-now:hover {
    background-color: #ddd;
}

.empty-products {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 24px;
    color: #666;
}

footer {
    background-color: var(--dark);
    color: white;
    padding: 60px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--secondary);
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ddd;
    transition: var(--transition);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--secondary);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #ddd;
    font-size: 14px;
}

.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.cart-modal-content {
    background-color: white;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    animation: modalFade 0.3s;
}

@keyframes modalFade {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cart-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
}

.close-cart-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray);
    transition: var(--transition);
}

.close-cart-modal:hover {
    color: var(--accent);
}

.cart-modal-body {
    padding: 25px;
    flex: 1;
    overflow-y: auto;
}

.cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    transition: var(--transition);
}

.cart-item:hover {
    background-color: #f0f0f0;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
    background-color: #f1f1f1;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary);
}

.cart-item-price {
    color: var(--accent);
    font-weight: 700;
    font-size: 18px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--light);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.quantity-btn:hover {
    background-color: #ddd;
}

.quantity {
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.remove-item {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition);
    padding: 5px;
}

.remove-item:hover {
    color: #c0392b;
    transform: scale(1.1);
}

.cart-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #eee;
    background-color: #f9f9f9;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.total-label {
    font-size: 18px;
    color: var(--dark);
}

.total-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
}

.cart-buttons {
    display: flex;
    gap: 15px;
}

.cart-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.continue-shopping {
    background-color: var(--light);
    color: var(--dark);
}

.continue-shopping:hover {
    background-color: #ddd;
}

.checkout-btn {
    background-color: var(--secondary);
    color: white;
}

.checkout-btn:hover {
    background-color: #2980b9;
}

.checkout-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    align-items: center;
    justify-content: center;
}

.checkout-modal-content {
    background-color: white;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    animation: modalFade 0.3s;
}

.checkout-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
}

.checkout-modal-header h3 {
    color: var(--primary);
}

.close-checkout-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray);
    transition: var(--transition);
}

.close-checkout-modal:hover {
    color: var(--accent);
}

.checkout-modal-body {
    padding: 25px;
}

.checkout-step {
    margin-bottom: 25px;
}

.step-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary);
}

.login-required {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
    text-align: center;
}

.item-added-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--success);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1002;
    animation: slideInRight 0.3s, fadeOut 0.3s 2.7s;
    animation-fill-mode: forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@media (max-width: 992px) {
    .header-content {
        flex-wrap: nowrap;
        gap: 12px;
    }

    .search-bar {
        order: 0;
        max-width: none;
        margin: 0;
    }

    .nav-links {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 10px;
    }

    .nav-links li {
        margin-right: 20px;
    }

    .cart-modal-content {
        width: 95%;
        height: 90vh;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 24px;
    }

    .user-actions {
        gap: 14px;
    }

    .cart-item {
        flex-direction: column;
        text-align: center;
    }

    .cart-item-image {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .cart-item-actions {
        justify-content: center;
    }

    .cart-buttons {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 12px;
    }

    .main-header {
        padding: 10px 0;
    }

    .header-content {
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
    }

    .logo {
        flex: 0 0 auto;
        font-size: 22px;
    }

    .logo-img {
        width: 32px;
        height: 32px;
    }

    .search-bar {
        flex: 1 1 auto;
        min-width: 0;
        margin: 0;
    }

    .search-bar input {
        font-size: 14px;
        padding: 10px 40px 10px 12px;
    }

    .search-bar button {
        right: 8px;
    }

    .user-actions {
        flex: 0 0 auto;
        gap: 10px;
    }

    .nav-links {
        gap: 18px;
        padding: 10px 0;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .product-image {
        height: 160px;
    }

    .product-title {
        height: auto;
    }

    .product-actions {
        flex-direction: column;
    }

    .cart-modal-content {
        width: 100%;
        height: 95vh;
        border-radius: 0;
        max-width: none;
    }
}