/* Root Variables */
:root {
    --primary-color: #2874f0;
    --secondary-color: #fb641b;
    --accent-color: #ff9f00;
    --text-color: #212121;
    --light-text: #878787;
    --white: #ffffff;
    --gray-bg: #f1f3f6;
    --border-color: #e0e0e0;
    --success-color: #388e3c;
    --error-color: #ff6161;
}

/* Add this to your styles.css */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid var(--primary-color);
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: var(--gray-bg);
    color: var(--text-color);
}

/* Navbar */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--primary-color);
    padding: 10px 20px;
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: flex-end;
}

.logo img {
    height: 24px;
}

.explore-plus {
    font-size: 11px;
    font-style: italic;
    margin-left: 5px;
    display: flex;
    align-items: center;
}

.explore-plus .plus {
    color: var(--accent-color);
    font-weight: 500;
    margin-right: 2px;
}

.explore-plus img {
    margin-left: 2px;
}

.search-container {
    display: flex;
    align-items: center;
    background-color: var(--white);
    border-radius: 2px;
    width: 50%;
    height: 36px;
}

.search-input {
    width: 100%;
    border: none;
    outline: none;
    padding: 8px 15px;
    font-size: 14px;
}

.search-btn {
    background-color: var(--white);
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    color: var(--primary-color);
    height: 100%;
    border-left: 1px solid var(--border-color);
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    margin-left: 20px;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.nav-links a i {
    margin-right: 5px;
}

.login-btn {
    background-color: var(--white);
    color: var(--primary-color);
    padding: 5px 40px;
    border-radius: 2px;
    font-weight: 500;
}

.cart-link {
    position: relative;
}

/* Categories Bar */
.categories-bar {
    display: flex;
    justify-content: space-around;
    background-color: var(--white);
    padding: 15px 0;
    box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
}

.category {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.category img {
    width: 64px;
    height: 64px;
    margin-bottom: 8px;
}

.category span {
    font-size: 14px;
    font-weight: 500;
}

/* Slider */
.slider-container {
    width: 100%;
    margin: 10px auto;
    overflow: hidden;
    position: relative;
}

.slider {
    width: 100%;
    overflow: hidden;
}

.slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
    /* width: 400%; */
}

.slides img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    flex: 0 0 100%;
}

/* Deals Container */
.deals-container {
    width: 100%;
    padding: 20px;
    background-color: var(--gray-bg);
}

.deal-card {
    background-color: var(--white);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 2px;
    box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
}

.deal-card h3 {
    margin-bottom: 15px;
    font-size: 22px;
    color: var(--text-color);
}

.deal-products {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.product {
    width: 23%;
    background: var(--white);
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    transition: transform 0.3s;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1);
    cursor: pointer;
}

.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 2px 4px 0 rgba(0,0,0,0.1);
}

.product img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin-bottom: 10px;
    transition: transform 0.3s;
}

.product:hover img {
    transform: scale(1.05);
}

.product .title {
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product .price {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 10px;
}

.buy-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 2px;
    transition: background 0.3s, transform 0.2s;
    width: 100%;
}

.buy-btn:hover {
    background: #1a66d6;
    transform: scale(1.02);
}

.view-all-btn {
    display: block;
    margin: 20px auto 0;
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.3s;
}

.view-all-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Cart Page Styling */
.cart-container {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    max-width: 1200px;
    margin: 20px auto;
    gap: 20px;
}

.cart-items-section {
    width: 65%;
    background: var(--white);
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
}

.cart-items-section h2 {
    margin-bottom: 20px;
    font-size: 18px;
    color: var(--text-color);
}

.price-details {
    width: 32%;
    background: var(--white);
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 80px;
}

.price-details h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: var(--text-color);
    text-transform: uppercase;
    font-weight: 500;
}

.price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
}

.price-row span {
    color: var(--text-color);
}

.total-amount {
    font-weight: 500;
    font-size: 18px;
    margin: 15px 0;
}

.price-row.total-amount span {
    font-weight: 500;
    color: var(--text-color);
}

hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 15px 0;
}

.savings-text {
    color: var(--success-color);
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
}

.place-order-btn {
    width: 100%;
    padding: 12px;
    background: var(--accent-color);
    border: none;
    font-weight: bold;
    cursor: pointer;
    color: var(--white);
    font-size: 16px;
    border-radius: 2px;
    transition: background 0.3s;
}

.place-order-btn:hover {
    background: #e59400;
}

.cart-item {
    display: flex;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
}

.cart-item img {
    width: 80px;
    height: 80px;
    margin-right: 15px;
    object-fit: contain;
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-name {
    font-weight: 500;
    margin-bottom: 5px;
    font-size: 14px;
}

.cart-item-price {
    color: var(--success-color);
    font-weight: 500;
    margin-bottom: 10px;
    font-size: 16px;
}

.cart-item-price s {
    color: var(--light-text);
    margin-right: 5px;
    font-size: 14px;
}

.remove-btn {
    background-color: var(--error-color);
    color: var(--white);
    border: none;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 2px;
    transition: background 0.3s, transform 0.2s;
    margin-top: 10px;
}

.remove-btn:hover {
    background-color: #d32f2f;
    transform: scale(1.02);
}

button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 5px 10px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 2px;
    margin: 0 5px;
}

button:hover {
    background-color: #1a66d6;
}

.discount {
    color: var(--success-color);
    font-weight: 500;
}

.shop-now-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 2px;
    margin-top: 15px;
    transition: background 0.3s;
}

.shop-now-btn:hover {
    background: #1a66d6;
}

/* Checkout Page */
.checkout-container {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    max-width: 1200px;
    margin: 20px auto;
    gap: 20px;
}

.checkout-form-container {
    width: 65%;
    background: var(--white);
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
}

.checkout-form-container h2 {
    margin-bottom: 20px;
    font-size: 22px;
    color: var(--text-color);
}

.checkout-form h3 {
    margin: 20px 0 15px;
    font-size: 18px;
    color: var(--text-color);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 500;
}

.form-group input, 
.form-group textarea, 
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.payment-methods {
    margin: 20px 0;
}

.payment-method {
    display: block;
    margin-bottom: 10px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s;
}

.payment-method:hover {
    border-color: var(--primary-color);
}

.payment-method input {
    margin-right: 10px;
}

.payment-content {
    display: flex;
    align-items: center;
}

.payment-content i {
    margin-right: 10px;
    font-size: 20px;
}

.confirm-order-btn {
    width: 100%;
    padding: 12px;
    background: var(--accent-color);
    border: none;
    font-weight: bold;
    cursor: pointer;
    color: var(--white);
    font-size: 16px;
    border-radius: 2px;
    transition: background 0.3s;
    margin-top: 20px;
}

.confirm-order-btn:hover {
    background: #e59400;
}

.order-summary {
    width: 32%;
    background: var(--white);
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 80px;
}

.order-summary h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: var(--text-color);
    text-transform: uppercase;
    font-weight: 500;
}

.order-items {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.order-item {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.order-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-right: 10px;
}

.order-item-details {
    flex-grow: 1;
}

.order-item-details p:first-child {
    font-size: 14px;
    margin-bottom: 5px;
}

.order-item-details p {
    font-size: 13px;
    color: var(--light-text);
}

/* Footer */
footer {
    background-color: var(--white);
    padding: 30px 0 10px;
    margin-top: 30px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

.footer-section {
    width: 23%;
}

.footer-section h4 {
    font-size: 14px;
    color: var(--light-text);
    margin-bottom: 15px;
    text-transform: uppercase;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.copyright {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
    font-size: 12px;
    color: var(--light-text);
}

/* Responsive Design */
@media (max-width: 768px) {
    .cart-container, .checkout-container {
        flex-direction: column;
    }
    
    .cart-items-section, .price-details,
    .checkout-form-container, .order-summary {
        width: 100%;
    }
    
    .product {
        width: 48%;
    }
    
    .search-container {
        width: 60%;
    }
    
    .nav-links {
        display: none;
    }
}

@media (max-width: 480px) {
    .product {
        width: 100%;
    }
    
    .search-container {
        width: 70%;
    }
    
    .categories-bar {
        flex-wrap: wrap;
        padding: 10px 5px;
    }
    
    .category {
        width: 25%;
        margin-bottom: 10px;
    }
    
    .category img {
        width: 48px;
        height: 48px;
    }
    
    .category span {
        font-size: 12px;
    }
}


/* Mobile Navigation */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    margin-left: 10px;
}

.mobile-nav-links {
    display: none;
    flex-direction: column;
    background-color: var(--primary-color);
    position: absolute;
    top: 56px;
    left: 0;
    width: 100%;
    padding: 10px 20px;
    z-index: 99;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.mobile-nav-links.show {
    display: flex;
}

.mobile-nav-links a {
    color: white;
    text-decoration: none;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 16px;
    display: flex;
    align-items: center;
}

.mobile-nav-links a i {
    margin-right: 10px;
    font-size: 18px;
}

.mobile-nav-links .login-btn {
    background-color: var(--white);
    color: var(--primary-color);
    padding: 8px 15px;
    border-radius: 2px;
    text-align: center;
    margin: 5px 0;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        display: none;
    }
    
    .search-container {
        width: 60%;
        margin: 0 10px;
    }
    
    .navbar {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .search-container {
        width: 50%;
    }
    
    .logo .explore-plus {
        display: none;
    }
    
    .mobile-nav-links {
        top: 52px;
    }
}