/* CSS VARIABLES FOR EASY TWEAKING */
:root {
    --primary-color: #2563eb;
    --text-color: #1f2937;
    --bg-light: #f3f4f6;
    --white: #ffffff;
    --border-color: #e5e7eb;
}

/* RESET & BASIC SETUP */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body { color: var(--text-color); background-color: var(--bg-light); }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.btn { background: var(--primary-color); color: var(--white); padding: 10px 20px; border: none; cursor: pointer; border-radius: 4px; font-weight: bold; display: inline-block; }
.btn:hover { background: #1d4ed8; }

/* 1. GLOBAL HEADER */
header { background: var(--white); border-bottom: 1px solid var(--border-color); padding: 20px 0; }
.header-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.logo { font-size: 24px; font-weight: bold; color: var(--primary-color); }
.search-bar input { padding: 10px; width: 300px; border: 1px solid var(--border-color); border-radius: 4px; }
.search-bar button { padding: 10px; background: var(--primary-color); color: var(--white); border: none; border-radius: 4px; cursor: pointer; }
.user-actions span { margin-left: 15px; cursor: pointer; }
.main-nav { display: flex; gap: 20px; font-weight: 500; }
.main-nav a:hover { color: var(--primary-color); }

/* 2. HERO SECTION */
.hero { background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://placehold.co/1200x400/2563eb/white?text=Hero+Banner+Placeholder') center/cover; color: var(--white); text-align: center; padding: 100px 20px; }
.hero h1 { font-size: 48px; margin-bottom: 20px; }
.hero p { font-size: 18px; margin-bottom: 30px; }

/* 3. TRUST BAR */
.trust-bar { background: var(--white); padding: 20px 0; border-bottom: 1px solid var(--border-color); }
.trust-items { display: flex; justify-content: space-around; text-align: center; }
.trust-items div { font-weight: 500; }

/* 4. FEATURED CATEGORIES */
.section-title { text-align: center; margin: 50px 0 30px; font-size: 32px; }
.categories-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 50px; }
.category-card { background: var(--white); padding: 40px 20px; text-align: center; border-radius: 8px; border: 1px solid var(--border-color); cursor: pointer; transition: transform 0.2s; }
.category-card:hover { transform: translateY(-5px); }

/* 5. PRODUCT GRID */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 50px; }
.product-card { background: var(--white); border: 1px solid var(--border-color); border-radius: 8px; padding: 15px; text-align: center; }
.product-card img { max-width: 100%; border-radius: 4px; margin-bottom: 15px; }
.product-card h3 { font-size: 16px; margin-bottom: 10px; }
.product-card .rating { color: #fbbf24; margin-bottom: 10px; }
.product-card .price { font-size: 20px; font-weight: bold; margin-bottom: 15px; }
.product-card .btn { width: 100%; }

/* 6. GLOBAL FOOTER */
footer { background: #1f2937; color: var(--white); padding: 50px 0 20px; }
.footer-content { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-bottom: 30px; }
.footer-col h3 { margin-bottom: 20px; color: var(--primary-color); }
.footer-col ul li { margin-bottom: 10px; }
.newsletter input { padding: 10px; width: 70%; border: none; border-radius: 4px 0 0 4px; }
.newsletter button { padding: 10px; border-radius: 0 4px 4px 0; margin-left: -5px; }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid #374151; font-size: 14px; }

/* RESPONSIVE DESIGN FOR MOBILE */
@media (max-width: 768px) {
    .header-top { flex-direction: column; gap: 15px; }
    .categories-grid { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-content { grid-template-columns: 1fr; }
}

/* --- CART & CHECKOUT PAGES STYLES --- */
.page-container { display: flex; gap: 30px; margin: 40px auto; padding-bottom: 50px; }
.main-content { flex: 2; background: var(--white); padding: 30px; border-radius: 8px; border: 1px solid var(--border-color); }
.sidebar-summary { flex: 1; background: var(--white); padding: 30px; border-radius: 8px; border: 1px solid var(--border-color); height: fit-content; }
.cart-item { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); padding: 15px 0; }
.cart-item:last-child { border-bottom: none; }
.cart-item img { width: 60px; height: 60px; border-radius: 4px; margin-right: 15px; }
.item-details { flex: 1; display: flex; align-items: center; }
.summary-line { display: flex; justify-content: space-between; margin-bottom: 15px; font-size: 16px; }
.summary-total { border-top: 1px solid var(--border-color); padding-top: 15px; font-size: 20px; font-weight: bold; }
.form-group { display: flex; flex-direction: column; margin-bottom: 15px; }
.form-group label { margin-bottom: 5px; font-weight: 500; font-size: 14px; }
.form-group input, .form-group select { padding: 10px; border: 1px solid var(--border-color); border-radius: 4px; font-size: 14px; }
.full-width-btn { width: 100%; margin-top: 20px; padding: 15px; font-size: 16px; }