/* static/css/styles.css - Main stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

ul {
    list-style: none;
}

/* Header styles */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #3498db;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    font-weight: 500;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #3498db;
}

.user-actions {
    display: flex;
    align-items: center;
}

.cart-icon {
    position: relative;
    margin-right: 20px;
    font-size: 1.2rem;
}

#cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #e74c3c;
    color: #fff;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

.login-btn, .register-btn {
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: 500;
    margin-left: 10px;
}

.login-btn {
    background-color: transparent;
    border: 1px solid #3498db;
    color: #3498db;
}

.register-btn {
    background-color: #3498db;
    color: #fff;
}

/* Button styles */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.primary-btn {
    background-color: #3498db;
    color: #fff;
}

.primary-btn:hover {
    background-color: #2980b9;
}

.secondary-btn {
    background-color: transparent;
    border: 1px solid #3498db;
    color: #3498db;
}

.secondary-btn:hover {
    background-color: #3498db;
    color: #fff;
}

/* Hero section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/static/images/hero-bg.jpg') no-repeat center center/cover;
    height: 500px;
    display: flex;
    align-items: center;
    color: #fff;
    text-align: center;
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* Section styles */
section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: #333;
}

/* Categories grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.category-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-img {
    height: 200px;
    overflow: hidden;
}

.category-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-info {
    padding: 20px;
    text-align: center;
}

.category-info h3 {
    margin-bottom: 10px;
}

/* Products grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-img {
    height: 200px;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    margin-bottom: 10px;
}

.product-price {
    font-weight: 600;
    color: #3498db;
    margin-bottom: 15px;
}

.add-to-cart {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.add-to-cart:hover {
    background-color: #2980b9;
}

/* Offers grid */
.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.offer {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/static/images/offer-bg.jpg') no-repeat center center/cover;
    border-radius: 8px;
    overflow: hidden;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
}

.offer-content {
    padding: 20px;
}

.offer-content h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.offer-content p {
    margin-bottom: 20px;
}

/* Footer styles */
footer {
    background-color: #333;
    color: #fff;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a:hover {
    color: #3498db;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.social-icons a:hover {
    background-color: #3498db;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Login/Register Forms */
.auth-container {
    max-width: 400px;
    margin: 60px auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
}

.form-submit {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.form-submit:hover {
    background-color: #2980b9;
}

.auth-links {
    margin-top: 20px;
    text-align: center;
}

.auth-links a {
    color: #3498db;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Product details page */
.product-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.product-details-img {
    border-radius: 8px;
    overflow: hidden;
}

.product-details-img img {
    width: 100%;
    height: auto;
}

.product-details-info h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.product-details-price {
    font-size: 1.5rem;
    color: #3498db;
    margin-bottom: 20px;
}

.product-details-desc {
    margin-bottom: 30px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.quantity-selector button {
    width: 40px;
    height: 40px;
    background-color: #f1f1f1;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
}

.quantity-selector input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 1px solid #ddd;
    margin: 0 10px;
}

/* Cart page */
.cart-container {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 2fr 1fr 1fr 50px;
    align-items: center;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #ddd;
}

.cart-item-img img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
}

.cart-item-quantity button {
    width: 30px;
    height: 30px;
    background-color: #f1f1f1;
    border: none;
    font-size: 1rem;
    cursor: pointer;
}

.cart-item-quantity input {
    width: 40px;
    height: 30px;
    text-align: center;
    border: 1px solid #ddd;
    margin: 0 5px;
}

.cart-item-remove {
    color: #e74c3c;
    cursor: pointer;
}

.cart-summary {
    margin-top: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

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

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.summary-total {
    font-weight: 700;
    font-size: 1.2rem;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.checkout-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    margin-top: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.checkout-btn:hover {
    background-color: #2980b9;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    nav ul {
        margin-bottom: 15px;
    }
    
    nav ul li {
        margin-left: 10px;
        margin-right: 10px;
    }
    
    .product-details {
        grid-template-columns: 1fr;
    }
    
    .cart-item {
        grid-template-columns: 80px 1fr;
        row-gap: 10px;
    }
    
    .cart-item-name, .cart-item-price, .cart-item-quantity, .cart-item-remove {
        grid-column: 2;
    }
}

@media screen and (max-width: 480px) {
    .hero-content h2 {
        font-size: 2rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .user-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .login-btn, .register-btn {
        margin-top: 10px;
    }
}