/* Basic Reset & Box Sizing */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #444; /* Darker gray for better contrast */
    background-color: #f4f7f6; /* Light greenish-gray */
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background-color: #ffffff; /* White */
    padding: 1rem 0;
    border-bottom: 1px solid #e0e0e0; /* Slightly darker border */
    position: sticky; /* Keep header visible */
    top: 0;
    z-index: 10;
}

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

.site-logo {
    font-size: 1.5rem;
    color: #2a9d8f; /* Teal color */
    font-weight: 600;
}

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

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

.main-nav a {
    text-decoration: none;
    color: #555;
    transition: color 0.3s ease;
}

.main-nav a:hover,
.main-nav a.cart-icon:hover {
    color: #e76f51; /* Coral color on hover */
}

.main-nav .cart-icon {
    font-weight: 500;
    border: 1px solid #ddd;
    padding: 5px 10px;
    border-radius: 4px;
    color: #2a9d8f; /* Teal */
    border-color: #2a9d8f; /* Teal */
}

.main-nav .cart-icon:hover {
    background-color: #2a9d8f; /* Teal background on hover */
    color: #fff; /* White text on hover */
}


/* Hero Section */
.hero {
    background-color: #264653; /* Dark cyan */
    color: #fff; /* White text */
    padding: 5rem 0; /* Increased padding */
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 300; /* Lighter font weight */
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #e9c46a; /* Yellowish accent */
}

.btn {
    display: inline-block;
    padding: 10px 25px;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: #e76f51; /* Coral */
    color: #fff;
    border: 1px solid #e76f51; /* Coral */
}

.btn-primary:hover {
    background-color: #f4a261; /* Lighter orange */
    border-color: #f4a261; /* Lighter orange */
    color: #fff;
}

/* Featured Products */
.featured-products {
    padding: 3rem 0;
    text-align: center;
}

.featured-products h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    font-weight: 400;
    color: #2a9d8f; /* Teal */
}

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

.product-item {
    background-color: #fff;
    padding: 0; /* Remove padding for image */
    border: 1px solid #eee;
    border-radius: 8px; /* Slightly more rounded */
    text-align: center;
    overflow: hidden; /* Hide overflowing parts of image */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; /* Use flexbox for layout */
    flex-direction: column; /* Stack image and info vertically */
    justify-content: space-between; /* Push info to bottom */
    color: #555; /* Reset text color */
}

.product-item:hover {
    transform: translateY(-5px); /* Lift effect on hover */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* Add shadow */
}

.product-item img {
    max-width: 100%;
    height: 200px; /* Fixed height for images */
    object-fit: cover; /* Cover the area, might crop */
    display: block; /* Remove extra space below image */
}

.product-info {
    padding: 1rem; /* Add padding back for text content */
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.product-price {
    font-size: 1rem;
    color: #e76f51; /* Coral */
    font-weight: 500;
    margin-bottom: 0.8rem;
}

/* Example: Specific style for a shoe product */
.product-item.product-shoe .product-title::after {
    content: '👟'; /* Add shoe emoji */
    margin-left: 5px;
    font-size: 0.9em;
}


/* Footer */
.site-footer {
    background-color: #333; /* Darker footer */
    color: #bbb; /* Lighter gray text */
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
}

/* Basic Responsiveness */
@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
        align-items: center;
    }
    .main-nav ul {
       margin-top: 1rem;
       flex-wrap: wrap; /* Allow nav items to wrap */
       justify-content: center;
    }
    .main-nav ul li {
        margin: 5px 10px; /* Adjust spacing for smaller screens */
    }
    .hero h2 {
        font-size: 2rem;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Adjust min size */
    }

    .product-item img {
        height: 150px; /* Smaller image height on mobile */
    }
}

/* --- Chat Popup Styles --- */

.chat-toggle-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000; /* Ensure it's above other content */
}

.chat-toggle-button:hover {
    background-color: #0056b3;
}

.chat-popup {
    display: none; /* Initially hidden */
    position: fixed;
    bottom: 80px; /* Above the toggle button */
    right: 20px;
    width: 350px;
    max-width: 90%;
    height: 450px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 999; /* Below toggle button when open? or higher? lets go higher */
    z-index: 1001;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.chat-popup.show {
    display: flex; /* Use flex when shown */
    opacity: 1;
    transform: translateY(0);
}

.chat-header {
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 18px;
}

.chat-close-button {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    line-height: 1; /* Prevent extra spacing */
}

.chat-messages {
    flex-grow: 1; /* Takes available space */
    padding: 15px;
    overflow-y: auto; /* Enable scrolling for messages */
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
    gap: 10px; /* Spacing between messages */
}

.message {
    padding: 8px 12px;
    border-radius: 15px;
    max-width: 80%;
    word-wrap: break-word; /* Prevent long words from overflowing */
}

.message-user {
    background-color: #007bff;
    color: white;
    border-bottom-right-radius: 0; /* Bubble tail */
    align-self: flex-end; /* Align user messages to the right */
}

.message-ai {
    background-color: #e9e9eb;
    color: #333;
    border-bottom-left-radius: 0; /* Bubble tail */
    align-self: flex-start; /* Align AI messages to the left */
}

.chat-input-area {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ddd;
    background-color: #fff;
}

#chatInput {
    flex-grow: 1;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-right: 10px;
    font-size: 14px;
}

#chatSendButton {
    padding: 8px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

#chatSendButton:hover {
    background-color: #0056b3;
}