/* TrendCart Shop Demo Styles */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #ffffff;
}

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

/* Navigation */
.navbar {
    background: #ffffff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    height: 70px;
    gap: 2rem;
}

.nav-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #4caf50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 2rem;
}

.nav-search {
    display: flex;
    max-width: 500px;
    background: #f5f5f5;
    border-radius: 25px;
    overflow: hidden;
}

.nav-search input {
    flex: 1;
    padding: 0.8rem 1.5rem;
    border: none;
    background: transparent;
    font-size: 1rem;
}

.nav-search input:focus {
    outline: none;
}

.nav-search button {
    padding: 0.8rem 1rem;
    background: #4caf50;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.nav-search button:hover {
    background: #45a049;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #4caf50;
}

.cart-icon {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    background: #4caf50;
    color: white;
    border-radius: 20px;
    transition: background 0.3s ease;
}

.cart-icon:hover {
    background: #45a049;
}

#cartCount {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    font-weight: bold;
}

.back-link {
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #4caf50 0%, #81c784 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.3rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.cta-primary, .cta-secondary {
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.cta-primary {
    background: white;
    color: #4caf50;
}

.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

.cta-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.cta-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.hero-benefits {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.benefit-icon {
    font-size: 1.5rem;
}

/* Categories Section */
.categories {
    padding: 80px 0;
    background: #f8f9fa;
}

.categories h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.category-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: #4caf50;
}

.category-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.category-card p {
    color: #666;
    font-size: 0.9rem;
}

/* Featured Products */
.featured-products {
    padding: 80px 0;
    background: white;
}

.featured-products h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: #4caf50;
}

.product-image {
    height: 200px;
    background: linear-gradient(135deg, #e8f5e8, #c8e6c9);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-placeholder {
    font-size: 4rem;
    opacity: 0.7;
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff5722;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.product-badge.new {
    background: #2196f3;
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.product-rating {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.8rem;
}

.product-price {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-current {
    font-size: 1.3rem;
    font-weight: bold;
    color: #4caf50;
}

.price-original {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
}

.add-to-cart {
    width: 100%;
    padding: 0.8rem;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-to-cart:hover {
    background: #45a049;
    transform: translateY(-1px);
}

/* Deals Section */
.deals {
    padding: 80px 0;
    background: #f8f9fa;
}

.deals-header {
    text-align: center;
    margin-bottom: 3rem;
}

.deals-header h2 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.countdown {
    font-size: 1.2rem;
    color: #ff5722;
    font-weight: 600;
}

.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.deal-card {
    background: linear-gradient(135deg, #ff5722, #ff8a65);
    color: white;
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease;
    position: relative;
}

.deal-card:hover {
    transform: scale(1.05);
}

.deal-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #ff5722;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.deal-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.deal-card p {
    margin-bottom: 1rem;
    opacity: 0.9;
}

.deal-price {
    margin-bottom: 1.5rem;
}

.deal-cta {
    background: white;
    color: #ff5722;
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.deal-cta:hover {
    transform: scale(1.05);
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    margin: 0;
    color: #333;
}

.close-cart {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
}

.close-cart:hover {
    color: #333;
}

.cart-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

#cartItems {
    flex: 1;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    background: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.cart-item-price {
    color: #4caf50;
    font-weight: bold;
}

.cart-total {
    border-top: 1px solid #eee;
    padding-top: 1rem;
    margin-top: 1rem;
}

.total-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.total-line.total {
    font-weight: bold;
    font-size: 1.1rem;
    border-top: 1px solid #eee;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

.checkout-btn {
    width: 100%;
    padding: 1rem;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 1rem;
}

.checkout-btn:hover {
    background: #45a049;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

.modal h3 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: #333;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section h4 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.1rem;
}

.modal input,
.modal select {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.modal input:focus,
.modal select:focus {
    outline: none;
    border-color: #4caf50;
}

.checkout-summary {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.summary-line.total {
    font-weight: bold;
    border-top: 1px solid #ddd;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

.place-order-btn {
    width: 100%;
    padding: 1rem;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.place-order-btn:hover {
    background: #45a049;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        grid-template-columns: auto 1fr;
        gap: 1rem;
    }
    
    .nav-search {
        display: none;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-benefits {
        flex-direction: column;
        gap: 1rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .deals-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-sidebar {
        width: 100vw;
        right: -100vw;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}