/* CSS Variables for theming */
:root {
    --primary-color: #007bff;
    --success-color: #28a745;
    --text-color: #333;
    --background-color: #f4f4f9;
    --surface-color: #fff;
    --border-color: #ddd;
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Basic Reset & Body Style */
body {
    font-family: var(--font-stack);
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

/* Header & Navigation */
header {
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
}

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

header .logo a {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--text-color);
    text-decoration: none;
}

header .logo img {
    /* Match the search input height: 1em (font) + 20px (padding) + 2px (border) */
    height: calc(1em + 22px);
    vertical-align: middle;
}

header .search-bar {
    flex-grow: 1;
    margin: 0 20px; /* Reduced margin slightly */
    /* The form is now the only direct child */
}

header .search-bar form {
    display: flex;
    flex-grow: 1; /* Make form take available space */
    position: relative; /* For positioning the autocomplete suggestions */
}

/* New wrapper for input and mic button */
.search-input-wrapper {
    position: relative;
    display: flex;
    flex-grow: 1;
}

header .search-bar input[type="search"] {
    width: 100%;
    padding: 10px;
    padding-right: 45px; /* Make space for the mic icon */
    border: 1px solid var(--border-color);
    /* The search button will have the right border now */
    border-right: none;
    border-radius: 5px 0 0 5px;
    font-size: 1em;
}

header .search-bar button {
    padding: 10px 20px;
    border: 1px solid var(--primary-color);
    background-color: var(--primary-color);
    color: var(--surface-color);
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 1em;
}
header .search-bar button:hover {
    opacity: 0.9;
}

/* Style for the mic button specifically inside the header search bar */
header .search-bar .mic-button {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    width: 40px;
    height: 40px;
    padding: 0;
    z-index: 2; /* Ensure it's above the input field */
    color: #555; /* Set the default icon color to gray */
}
 
header nav a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: bold;
}

header nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Generic button style, used for Login */
.button {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: var(--surface-color) !important; /* Override link color if on an <a> tag */
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    font-family: inherit;
    font-size: 1em;
}

.button:hover {
    opacity: 0.9;
}

/* Main Content */
main {
    min-height: 70vh;
}

/* Search Results Page with Facets */
.search-results-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.facet-sidebar {
    flex: 1;
    min-width: 250px;
    max-width: 300px;
}

.search-results-grid {
    flex: 3;
}

.search-summary {
    margin-bottom: 1rem;
    color: #555;
    font-size: 1.1em;
}

/* Facet Sidebar Styling */
.facet-sidebar h4 {
    margin-top: 0;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.facet-sidebar h5 {
    margin-bottom: 0.5rem;
}

.facet-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.facet-sidebar a {
    text-decoration: none;
    color: var(--text-color);
}

.facet-sidebar a:hover {
    color: var(--primary-color);
}

.facet-group .facet-item {
    padding: 4px 0;
}

/* Applied Filters Styling */
.applied-filters ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.applied-filter-tag {
    background-color: var(--primary-color);
    color: var(--surface-color);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 5px;
}

.remove-facet-link {
    color: var(--surface-color) !important;
    font-weight: bold;
    font-size: 1.2em;
    line-height: 1;
}

.remove-facet-link:hover {
    opacity: 0.8;
}

.clear-all-filters {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.9em;
    color: var(--primary-color);
}

.facet-group.collapsible {
    border-bottom: 1px solid var(--border-color);
}
.facet-group.collapsible:last-of-type {
    border-bottom: none;
}

.facet-toggle {
    background: none;
    border: none;
    padding: 0.75rem 0;
    width: 100%;
    text-align: left;
    font-size: 1em; /* Match h5 style */
    font-weight: bold; /* Match h5 style */
    font-family: inherit;
    color: inherit;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.facet-toggle-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease-in-out;
    stroke: currentColor;
}

.facet-toggle[aria-expanded="true"] .facet-toggle-icon {
    transform: rotate(180deg);
}

.facet-values-container {
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.facet-values-container.is-collapsed {
    max-height: 0;
}

/* Pagination */
.pagination {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-summary {
    color: #666;
    font-size: 0.9em;
}

.pagination-links a,
.pagination-links span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-decoration: none;
    color: var(--primary-color);
}

.pagination-links a:hover {
    background-color: var(--background-color);
    border-color: var(--primary-color);
}

.pagination-links span.disabled {
    color: #aaa;
    border-color: #eee;
    cursor: not-allowed;
}

.pagination-links span.active {
    background-color: var(--primary-color);
    color: var(--surface-color);
    border-color: var(--primary-color);
    font-weight: bold;
}

/* Product Grid for Search Results */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    text-align: center;
    padding: 10px;
    transition: box-shadow 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.product-card a {
    text-decoration: none;
    color: var(--text-color);
}

.product-card img {
    max-width: 100%;
    height: 200px;
    object-fit: contain;
    margin-bottom: 10px;
}

.product-card .product-title {
    font-size: 1.1em;
    margin: 10px 0;
    /* Allow title to wrap */
    white-space: normal;
}

.product-card .price {
    font-weight: bold;
    color: var(--success-color);
    font-size: 1.2em;
}

/* Debugging style for showing product ID */
.product-card .product-id-debug {
    font-size: 0.8em;
    color: #888;
    margin: -5px 0 10px 0;
    font-family: monospace;
}

/* Product Detail Page */
.product-detail-container {
    display: flex;
    gap: 40px;
    background: var(--surface-color);
    padding: 20px;
    border-radius: 5px;
}

.product-image {
    flex: 1;
}

.product-image img {
    max-width: 100%;
    border-radius: 5px;
}

.product-info {
    flex: 1;
}

.price-and-cart-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.product-info .product-price {
    font-size: 2em;
    color: var(--success-color);
    margin: 0; /* Reset margin as it's now handled by the container */
}

.add-to-cart-form button {
    padding: 12px 25px;
    font-size: 1.1em;
    background-color: var(--success-color);
    color: var(--surface-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* Style for when price is not available */
.price.price-unavailable,
.product-price.price-unavailable {
    color: #777;
    font-weight: normal;
    font-style: italic;
    font-size: 1em;
}

/* Autocomplete Suggestions */
.autocomplete-suggestions {
    display: none; /* Hidden by default */
    position: absolute;
    top: 100%; /* Position it right below the input */
    left: 0;
    right: 0;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-top: none;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    border-radius: 0 0 5px 5px;
}

.suggestion-item {
    padding: 10px;
    cursor: pointer;
}

.suggestion-item:hover {
    background-color: var(--background-color);}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 1rem;
    margin-bottom: 2rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

/* Product Carousel */
.product-carousel {
    overflow-x: auto;
    padding-bottom: 1rem; /* Add some space for the scrollbar */
}

.product-carousel .product-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    width: max-content; /* Allow the grid to expand horizontally */
}

.product-carousel .product-card {
    flex-shrink: 0; /* Prevent cards from shrinking */
    width: 220px;
}

/* Cart Page Styles */
.cart-container {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.cart-items {
    flex: 3;
    min-width: 300px;
}

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

.cart-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

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

.cart-item-info h3 {
    margin: 0 0 0.5rem;
}

.cart-item-actions {
    margin-left: auto;
}

.remove-button {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.cart-summary {
    flex: 1;
    min-width: 250px;
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    height: fit-content;
}

.checkout-button {
    width: 100%;
    padding: 0.75rem;
    font-size: 1.1rem;
    background-color: var(--success-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    background-color: var(--text-color);
    color: var(--surface-color);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.debug-info {
    font-size: 0.8em;
    font-family: monospace;
    color: #ccc;
}

.debug-info code {
    background-color: #555;
    padding: 2px 4px;
    border-radius: 3px;
}

/* --- Chat Page Styles --- */

.chat-container {
    max-width: 100%;
    margin: 0;
    background-color: var(--surface-color);
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    height: 80vh; /* Make it take up most of the viewport height */
    overflow: hidden;
}

.chat-history {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 75%;
    border-radius: 18px;
    line-height: 1.5;
}

.chat-message p {
    margin: 0;
}

.user-message {
    background-color: var(--primary-color);
    color: var(--surface-color);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    padding: 12px 18px;
    word-wrap: break-word; /* Prevent long text from overflowing */
    /* Add word-break to handle long strings without spaces */
    word-break: break-all;
}

.bot-message {
    color: var(--text-color);
    align-self: flex-start;
    /* New styles for icon layout */
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
}

.bot-icon-wrapper {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 3px; /* Align with first line of text */
}

.bot-icon-wrapper svg {
    width: 24px;
    height: 24px;
}

.bot-message .product-carousel {
    background: transparent;
    padding: 1rem 0 0 0;
}

.bot-message .product-carousel .product-grid {
    gap: 10px;
}

/* Make product cards in chat smaller */
.bot-message .product-card {
    width: 140px;
}

.bot-message .product-card img {
    height: 100px;
}

.bot-message .product-card .product-title {
    font-size: 0.9em;
    margin: 8px 0; /* Reduce vertical margin */
}

.bot-message .product-card .price {
    font-size: 1em; /* Reduce price font size from inherited 1.2em */
    margin-bottom: 0; /* Remove bottom margin for compactness */
}

.bot-message .product-carousel .product-card {
    border: 1px solid #e0e0e0;
}

.bot-message-content {
    flex-grow: 1;
    background-color: var(--background-color);
    padding: 12px 18px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    word-wrap: break-word; /* Prevent long text from overflowing */
    min-width: 0; /* Prevents the content from overflowing its flex container */
}

.refined-queries {
    margin-top: .5rem;
    margin-bottom: .5rem; /* Add space below the suggestion buttons */
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.refined-queries p {
    width: 100%;
    font-size: 0.9em;
    color: #555;
    margin-bottom: 0;
}

.refined-query-button {
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s;
}

.refined-query-button:hover {
    background-color: #dde2e6;
}

.page-links {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.page-link-button {
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s;
    text-decoration: none;
}

.page-link-button:hover {
    background-color: #dde2e6;
}

.followup-question {
    margin-top: 1rem;
    padding: 12px 16px;
    background-color: #e9ecef;
    border-radius: 12px;
    font-style: normal;
    color: #333;
    border-left: 4px solid var(--primary-color);
}

.chat-input-area {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    background-color: #f8f9fa;
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-form {
    flex-grow: 1;
    display: flex;
    align-items: center;
    background-color: var(--surface-color);
    border-radius: 25px;
    padding: 5px;
    border: 1px solid var(--border-color);
}

.chat-form:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.chat-form textarea {
    flex-grow: 1;
    border: none;
    outline: none;
    padding: 8px 15px;
    font-size: 1em;
    background: transparent;
    resize: none; /* Disable manual resizing */
    overflow-y: hidden; /* Hide scrollbar until max-height is reached */
    font-family: inherit; /* Ensure font matches the rest of the site */
    line-height: 1.5; /* Improve readability for multi-line text */
}

.chat-form button {
    background-color: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

.chat-form button svg {
    width: 20px;
    height: 20px;
    fill: var(--surface-color);
}

.clear-chat-form button {
    background: none;
    border: 1px solid #ccc;
    color: #555;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
}
.clear-chat-form button:hover {
    background-color: #e9ecef;
}

.mic-button {
    background: none;
    border: 1px solid #ccc;
    border-radius: 50%; /* This is for the circular buttons on the chat page */
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #555;
    transition: all 0.2s ease-in-out;
    flex-shrink: 0; /* Prevent button from shrinking */
}

.mic-button:hover {
    background-color: #e9ecef;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.mic-button.is-listening {
    background-color: var(--primary-color);
    color: var(--surface-color);
    border-color: var(--primary-color);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(0, 123, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 123, 255, 0); }
}

/* Typing indicator animation */
.typing-indicator p {
    display: flex;
    align-items: center;
}
.typing-indicator span {
    height: 8px;
    width: 8px;
    background-color: #999;
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
    animation: typing-bounce 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing-bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1.0);
    }
}

/* --- About Page Styles --- */

.about-container {
    background-color: var(--surface-color);
    padding: 2rem 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    max-width: 900px;
    margin: 2rem auto;
}

.architecture-diagram {
    margin: 2rem 0;
    text-align: center;
}

.architecture-diagram img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.about-container h1, .about-container h2 {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.about-container .lead {
    font-size: 1.2em;
    color: #555;
    margin-bottom: 2rem;
}

.about-container ul {
    padding-left: 20px;
}

.inspiration-section {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.inspiration-text {
    flex: 2;
    min-width: 300px;
}

.inspiration-image {
    flex: 1;
    min-width: 250px;
}

.inspiration-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* --- Technology Stack Table Styles --- */
.tech-stack-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.tech-stack-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.tech-stack-table tr:last-child td {
    border-bottom: none;
}

.tech-stack-table .tech-icon {
    width: 48px;
}

.tech-stack-table .tech-icon svg {
    width: 32px;
    height: 32px;
    display: block;
}

.tech-stack-table a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
}

.tech-stack-table a:hover {
    color: var(--primary-color);
}

/* --- Hamburger Menu Styles --- */
.hamburger-container {
    position: relative;
    margin-right: 1rem;
}

.hamburger-menu {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 40px;
    height: 40px;
}

.hamburger-menu span {
    display: block;
    width: 24px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

.hamburger-menu[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-menu[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.hamburger-dropdown {
    display: none; /* Hidden by default */
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background-color: var(--surface-color);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    padding: 0.5rem 0;
    min-width: 180px;
    z-index: 1001;
    overflow: hidden;
}

.hamburger-dropdown.is-open {
    display: block;
}

.hamburger-dropdown a {
    display: block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: background-color 0.2s;
}

.hamburger-dropdown a:hover {
    background-color: var(--background-color);
    color: var(--primary-color);
}

.nav-link-with-icon {
    display: flex !important; /* Override default block display */
    align-items: center;
    gap: 0.75rem;
}

.nav-link-with-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor; /* Inherit color from the parent link */
}

/* Divider in hamburger menu */
.hamburger-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 0.5rem 1.5rem;
}

.mobile-nav-item {
    display: none !important; /* Hide by default on desktop */
}

/* Cart Icon in Header */
.nav-cart-link {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    text-decoration: none;
    color: var(--text-color);
}

.nav-cart-link:hover {
    color: var(--primary-color);
}

.nav-cart-link svg {
    width: 26px;
    height: 26px;
}

.nav-cart-link .cart-item-count {
    font-weight: 500;
    font-size: 1.1em;
    line-height: 1;
}

/* --- Responsive Design --- */
@media (max-width: 820px) { /* A bit wider breakpoint for tablets */
    .container {
        width: 95%;
    }

    /* Header */
    header .container {
        flex-wrap: wrap;
        row-gap: 1rem; /* Add gap between rows when wrapping */
    }

    header .search-bar {
        order: 99; /* Force search bar to the last visual line */
        width: 100%;
        margin: 0;
    }

    header .logo {
        /* On mobile, don't grow the logo; keep it left-aligned next to the hamburger menu. */
        flex-grow: 0;
    }

    header nav {
        /* Hide the main nav on mobile, as its items are now in the hamburger menu */
        display: none;
    }

    /* Search Results Page */
    .search-results-container {
        flex-direction: column;
    }

    .facet-sidebar {
        max-width: 100%;
        width: 100%;
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 1rem;
        margin-bottom: 1rem;
        order: 1; /* Move facets below results on mobile */
    }

    /* Product Detail Page */
    .product-detail-container {
        flex-direction: column;
    }

    /* Chat Page */
    .chat-container {
        height: calc(100vh - 70px); /* Adjust for potential header height */
        margin: 0;
        border-radius: 0;
        max-width: 100%;
        box-shadow: none;
    }

    /* Hide footer on mobile chat page to maximize screen space */
    body.on-chat-page footer {
        display: none;
    }

    /* About Page */
    .about-container {
        padding: 1.5rem;
    }

    /* Show mobile-only nav items inside the hamburger dropdown */
    .hamburger-dropdown .mobile-nav-item {
        display: flex !important;
    }
}

@media (max-width: 480px) {
    .product-grid {
        /* Go to 2 columns on small phones */
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .chat-message {
        max-width: 90%;
    }
}

/* --- Flash Message Banner --- */
.flash-messages {
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.flash-message {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 1px solid transparent;
    font-weight: 500;
}

.flash-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}
