@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-color: #f7f9fa;
    --card-bg: #ffffff;
    --accent-primary: #333333; /* Dark Grey CTA */
    --accent-secondary: #e6b800; /* Mustard/Gold */
    --text-main: #222222;
    --text-muted: #666666;
    --border: #e0e0e0;
    --transition: all 0.2s ease-in-out;
    --container-width: 1200px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.05);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    color: #111;
    letter-spacing: -0.01em;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--accent-primary);
    color: white;
}

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

.btn-secondary {
    background-color: #f5f5f5;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

/* --- Header Layout --- */
.main-header {
    background: #fff;
    width: 100%;
}

/* 1. Top Bar (Promo & Support) */
.top-bar {
    background: #f8f8f8;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
}

.top-bar-links {
    display: flex;
    gap: 20px;
}

.top-bar-links a:hover {
    color: var(--accent-primary);
}

/* 2. Main Header */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08); /* Drop shadow to separate from content */
}

/* Middle Header (Logo & Search) */
.header-middle {
    padding: 25px 0;
}

.header-middle .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo-large img {
    height: 90px;
    display: block;
}

.search-container {
    flex: 1;
    max-width: 500px;
    display: flex;
    border: 2px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.search-container input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    outline: none;
    font-size: 0.95rem;
}

.search-container button {
    background: #fff;
    border: none;
    padding: 0 15px;
    cursor: pointer;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 25px;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-main);
    cursor: pointer;
    position: relative; /* Added for badge positioning */
    text-decoration: none;
}

.action-item i {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

#cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-secondary);
    color: #000;
    font-size: 0.7rem;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    line-height: 1;
}

/* 3. Navigation Bar (Black) */
.nav-bar {
    background: #222222;
    color: white;
}

.nav-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li a {
    display: block;
    padding: 16px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
}

.nav-links li a:hover, .nav-links li a.active {
    background: #333;
    color: var(--accent-secondary);
}

.nav-total {
    font-weight: 700;
    color: var(--accent-secondary);
}

/* 4. Promo Bar (Yellow) */
.promo-bar {
    background: var(--accent-secondary);
    color: #000;
    text-align: center;
    padding: 10px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* --- Hero Section --- */
.hero {
    background: #eef2f5;
    padding: 60px 0;
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    color: #111;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    max-width: 450px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
}

/* --- Product Grid --- */
.section-title {
    text-align: center;
    margin: 60px 0 40px;
    font-size: 2rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent-secondary);
    margin: 15px auto 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 80px;
}

.product-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 15px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #d0d0d0;
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent-secondary);
    color: #000;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 2px;
    z-index: 2;
}

.product-img {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* Square aspect ratio */
    margin-bottom: 15px;
    overflow: hidden;
}

.product-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

.gallery-dots {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.2s;
}

.product-card:hover .gallery-dots {
    opacity: 1;
}

.dot {
    width: 8px;
    height: 8px;
    background: #ccc;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.dot.active, .dot:hover {
    background: var(--accent-primary);
}

.product-category {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 5px;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
    flex-grow: 1; /* Pushes price to bottom */
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 15px;
}

.add-to-cart-btn {
    width: 100%;
    background-color: var(--accent-primary);
    color: white;
    border: none;
    padding: 10px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.add-to-cart-btn:hover {
    background-color: #111111;
}

/* --- Why Smart4 Section --- */
.section-padded {
    padding: 80px 0;
}

.section-white {
    background: #fff;
}

.section-contact {
    background: #fdfdfd;
    border-top: 1px solid var(--border);
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    max-width: 800px;
    margin: 15px auto 50px;
    font-size: 1.05rem;
    line-height: 1.6;
}

.section-subtitle--narrow {
    max-width: 600px;
    margin: 15px auto 40px;
}

.why-icon {
    font-size: 3rem;
    color: #333;
    margin-bottom: 20px;
}

.loading-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 1rem;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: center;
}

.why-item {
    padding: 20px;
}

.why-item h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-main);
    font-weight: 700;
}

.why-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

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

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.footer-col ul {
    list-style: none;
}

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

.footer-col ul li a {
    color: #aaa;
    font-size: 0.9rem;
}

.footer-col ul li a:hover {
    color: var(--accent-secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    font-size: 0.85rem;
    color: #aaa;
}

/* --- Cart Sidebar --- */
.cart-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    justify-content: flex-end;
}

.cart-sidebar {
    background: #fff;
    width: 400px;
    height: 100%;
    padding: 40px;
    color: #333;
    display: flex;
    flex-direction: column;
}

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

.cart-header h3 {
    font-size: 1.5rem;
}

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

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    flex: 1;
}

.cart-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

/* --- Checkout Page --- */
.checkout-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    padding: 60px 0;
}

.checkout-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
}

.checkout-card h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-grid.full {
    grid-template-columns: 1fr;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
}

.form-group input:focus {
    border-color: var(--accent-primary);
}

.order-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.summary-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 4px;
}

.summary-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    margin-top: 10px;
}

.summary-total-row.grand-total {
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 20px;
    border-top: 2px solid #eee;
    padding-top: 20px;
}

/* Responsive */
@media (max-width: 992px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .hero .container { flex-direction: column; text-align: center; gap: 30px; }
    .hero-content h1 { font-size: 3rem; }
    .hero-image img { max-width: 80%; }
    .why-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
    .section-title h2 { font-size: 1.7rem; }
    .section-subtitle { font-size: 0.98rem; }
}

@media (max-width: 768px) {
    .top-bar { display: none; }
    
    .main-header {
        padding: 5px 0;
    }

    .header-middle {
        padding: 10px 0;
    }

    .header-middle .container {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .logo-large {
        order: 1;
        flex: 0 0 auto;
    }

    .logo-large img {
        height: 45px; /* Significantly smaller on mobile */
    }

    .header-actions {
        order: 2;
        flex: 0 0 auto;
        gap: 20px;
        margin-top: 0;
    }

    .action-item {
        position: relative;
        flex-direction: row;
        gap: 5px;
    }

    .action-item .action-text {
        display: none; /* Hide labels on mobile */
    }

    .action-item i {
        font-size: 1.4rem;
        margin-bottom: 0;
    }

    /* Cart Count as Badge */
    #cart-count {
        position: absolute;
        top: -8px;
        right: -10px;
        background: var(--accent-secondary);
        color: #000;
        font-size: 0.7rem;
        font-weight: 800;
        min-width: 18px;
        height: 18px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 2px;
        border: 2px solid #fff;
        line-height: 1;
    }

    .search-container {
        order: 3;
        flex: 0 0 100%;
        margin-top: 0;
        max-width: 100%;
    }
    
    .nav-bar .container { flex-direction: column; padding: 10px; }
    .nav-links { width: 100%; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
    .nav-links li a { padding: 8px 12px; font-size: 0.85rem; }
    
    .hero { padding: 40px 0; }
    .hero-content h1 { font-size: 1.9rem; }
    .hero-content p { font-size: 0.95rem; margin: 0 auto 30px; }
    .hero-image img { max-width: 100%; }
    
    .section-padded { padding: 50px 0; }
    .section-title { margin: 30px 0 20px; }
    .section-title h2 { font-size: 1.5rem; }
    .section-subtitle { font-size: 0.9rem; margin-bottom: 30px; }
    .why-icon { font-size: 2.2rem; }
    .why-item h4 { font-size: 1.1rem; }
    
    .why-grid { grid-template-columns: 1fr; gap: 30px; }
    .product-grid { grid-template-columns: 1fr; }
    .checkout-layout { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    
    .footer-content { grid-template-columns: 1fr; text-align: center; gap: 30px; }
    
    #cart-overlay > div { width: 100% !important; padding: 20px !important; }
}

@media (max-width: 480px) {
    .hero-content h1 { font-size: 1.6rem; }
    .logo-large img { height: 70px; } /* Slightly smaller logo on tiny screens */
    .section-title h2 { font-size: 1.3rem; }
    .section-subtitle { font-size: 0.85rem; }
    .why-icon { font-size: 1.8rem; }
    .why-item h4 { font-size: 1rem; }
    .section-padded { padding: 40px 0; }
}

