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

:root {
    --primary-green: #4CAF50;
    --primary-dark-green: #388E3C;
    --background-white: #FFFFFF;
    --background-gray: #F5F5F5;
    --text-dark: #333333;
    --text-muted: #757575;
    --accent-orange: #FF9800;
    --error-red: #F44336;
    --success-green: #4CAF50;
    --transition: all 0.3s ease-in-out;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.15);
    --border-radius: 8px;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-white);
    color: var(--text-dark);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

/* Header */
.header {
    background-color: var(--background-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-green);
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-bar {
    flex: 0 1 400px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 10px 15px;
    border-radius: 20px;
    border: 1px solid #ddd;
    outline: none;
    transition: var(--transition);
}

.search-bar input:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

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

.icon-btn {
    font-size: 1.2rem;
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--accent-orange);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
}

/* Hero Section */
.hero {
    margin-top: 20px;
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.hero-slider {
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.5s ease;
}

.hero-item {
    min-width: 100%;
    height: 100%;
    position: relative;
}

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

.hero-content {
    position: absolute;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    color: white;
    max-width: 500px;
    background: rgba(0,0,0,0.4);
    padding: 30px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.btn-primary {
    background-color: var(--primary-green);
    color: white;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 600;
    display: inline-block;
}

.btn-primary:hover {
    background-color: var(--primary-dark-green);
    transform: translateY(-2px);
}

/* Categories Section */
.section-title {
    text-align: center;
    margin: 50px 0 30px;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--text-dark);
}

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

.category-card {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    height: 300px;
    box-shadow: var(--shadow-md);
    cursor: pointer;
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card:hover img {
    transform: scale(1.1);
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.product-card {
    background: var(--background-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 16px;
    text-align: center;
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    margin-bottom: 15px;
}

.product-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.product-price {
    color: var(--primary-green);
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.product-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-outline {
    border: 1px solid var(--primary-green);
    color: var(--primary-green);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.btn-outline:hover {
    background: var(--primary-green);
    color: white;
}

/* Footer */
.footer {
    background-color: #222;
    color: white;
    padding: 50px 0 20px;
    margin-top: 100px;
}

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

.footer-section h3 {
    margin-bottom: 20px;
}

.footer-section ul li {
    margin-bottom: 10px;
    color: #ccc;
    cursor: pointer;
}

.footer-section ul li:hover {
    color: var(--primary-green);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #444;
    padding-top: 20px;
    font-size: 0.9rem;
    color: #888;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }

    .search-bar {
        order: 3;
        flex: 1 1 100%;
        width: 100%;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 0.9rem;
    }
}

/* Cart & Checkout Specific Styles (Ph 2) */
.cart-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    margin-top: 50px;
}
.cart-items { background: var(--background-white); padding: 25px; border-radius: 12px; box-shadow: var(--shadow-sm); }
.cart-summary { background: #f9f9f9; padding: 25px; border-radius: 12px; position: sticky; top: 100px; height: fit-content; border: 1px solid #eee; }
.cart-item { display: flex; align-items: center; gap: 20px; padding: 20px 0; border-bottom: 1px solid #eee; }
.cart-item img { width: 100px; height: 100px; object-fit: cover; border-radius: 8px; }
.item-info { flex: 1; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 15px; }
.summary-total { border-top: 1px solid #ddd; padding-top: 15px; font-size: 1.3rem; font-weight: 700; }
.remove-btn { color: var(--error-red); cursor: pointer; font-size: 1.1rem; }

/* Phase 4: Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;
}
.chat-bubble {
    width: 60px;
    height: 60px;
    background: var(--primary-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}
.chat-bubble:hover { transform: scale(1.1); background: var(--primary-dark-green); }
.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    height: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    overflow: hidden;
}
.chat-header { background: var(--primary-green); color: white; padding: 15px; font-weight: 600; display: flex; justify-content: space-between; }
.chat-body { flex: 1; padding: 15px; overflow-y: auto; background: #f9f9f9; font-size: 0.9rem; }
.chat-input-area { padding: 10px; border-top: 1px solid #eee; display: flex; }
.chat-input-area input { flex: 1; border: none; padding: 8px; outline: none; }
.msg-bot { background: #eee; padding: 10px; border-radius: 12px 12px 12px 0; margin-bottom: 15px; max-width: 80%; }
.msg-user { background: var(--primary-green); color: white; padding: 10px; border-radius: 12px 12px 0 12px; margin-left: auto; margin-bottom: 15px; max-width: 80%; }
