/* This component represents the internal scrollable part of the carousel.
   It no longer has the outer box styling (border, background, padding, shadow)
   as that is handled by .item-carousel-section in ai-search-page.css,
   matching the original design. */
.generic-carousel-section {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* The outer wrapper for the entire meal plan carousel section on the page.
   Its visual styling now comes from ai-search-page.css, matching the original. */
.item-carousel-section {
    /* This rule block should ideally be removed from carousel.css entirely,
       as it's a page-specific layout wrapper, not a generic carousel component style. */
    /* Keeping it empty here for clarity, but its styles are in ai-search-page.css */
}

/* Style for the region selector within the meal plan section - NOW MATCHES ORIGINAL */
.item-carousel-section .region-selector {
    margin-bottom: 20px;
    display: flex;
    gap: 10px; /* Original: 10px */
    align-items: center;
    color: var(--dark-text-primary);
}

.item-visit-link {
    text-align: center;
    display: block; /* Ensures the link takes up its own line and can be centered */
    text-decoration: none;
    color: #2ecc71;
    font-weight: bold;
    padding: 0 1rem 1rem;
}

.item-visit-link:hover {
    text-decoration: underline;
}

.item-carousel-section .region-selector label {
    cursor: pointer;
    font-size: 0.9rem; /* Original: 0.9rem */
    font-weight: 500;
}

.item-carousel-section .region-selector input[type="radio"] {
    display: none;
}

.item-carousel-section .region-selector input[type="radio"] + label {
    padding: 0.4rem 0.8rem; /* Original: 0.4rem 0.8rem */
    border: 1px solid var(--border-color);
    border-radius: 6px; /* Original: 6px */
    transition: background-color 0.3s, border-color 0.3s;
}

.item-carousel-section .region-selector input[type="radio"]:checked + label {
    background-color: var(--primary-button-bg); /* Using primary-button-bg for consistency */
    color: var(--primary-button-text);         /* Using primary-button-text for consistency */
    border-color: var(--primary-button-bg);
    font-weight: 600;
    transform: translateY(0);
}

.item-carousel-section .region-selector label:hover {
    background-color: var(--primary-button-hover-bg); /* Using primary-button-hover-bg for consistency */
    border-color: var(--border-color); /* Using consistent border color */
    color: var(--dark-text-primary);
    transform: translateY(-1px);
}

/* Wrapper for the scrollable track - MATCHES ORIGINAL */
.manual-scroll-wrapper {
    overflow: hidden;
    width: 100%;
    padding: 10px 0; /* Original: Vertical padding on the wrapper */
}

/* The actual scrollable track containing the cards - MATCHES ORIGINAL */
.manual-scroll-track {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    align-items: flex-start; /* Original: Vertical alignment (top alignment) */
    gap: 20px; /* Original: Spacing between individual cards */
    padding: 0 10px; /* Original: Horizontal padding on the track */

    /* Hide scrollbar for various browsers */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.manual-scroll-track::-webkit-scrollbar {
    display: none;
}

/* --- Styling for the Product Comparison Checkbox --- */
.item-compare-checkbox {
    /* Reset default browser appearance */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    /* Sizing & Spacing */
    width: 22px;
    height: 22px;
    margin: 0 0 10px 0;
    cursor: pointer;

    /* Custom Look: Unchecked State */
    background-color: var(--card-bg);
    border: 5px solid var(--border-color); /* <-- CHANGED FROM 2px to 3px */
    border-radius: 4px;
    transition: background-color 0.2s, border-color 0.2s;
}

/* Style the checkmark color */
.item-compare-checkbox {
    accent-color: var(--primary-button-bg);
}

/* Custom Look: Hover State */
.item-compare-checkbox:hover {
    border-color: #555;
}

/* Custom Look: Checked State */
.item-compare-checkbox:checked {
    background-color: var(--primary-button-bg);
    border-color: var(--primary-button-hover-bg);
}

/* Individual carousel card styling - ADD POSITION: RELATIVE */
.scroll-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 200px;
    min-width: 200px;
    margin: 0;
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

/* Image styling within each carousel card - MATCHES ORIGINAL EXACTLY */
.hero-image {
    width: 200px;
    height: 200px;
    object-fit: contain;
    border-radius: 8px;
    background-color: #f0f0f0; /* Original: Background color (explains white around logos) */
    flex-shrink: 0;
}

.card-text {
    text-align: center;
    margin-top: 10px;
}

.card-text .image-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 6px;
    color: var(--dark-text-primary);
}

.card-text a {
    font-size: 13px;
    color: var(--link-color);
    text-decoration: none;
}

.card-text a:hover {
    text-decoration: underline;
}

/* --- Placeholder for your existing style.css variables --- */
/* Ensure these variables are correctly defined and match your theme. */
:root {
    --dark-text-primary: #f0f0f0;
    --dark-text-secondary: #a0a0a0;
    --card-bg: #282828;
    --border-color: #333;
    --primary-button-bg: #28a745;
    --primary-button-hover-bg: #218838;
    --primary-button-text: white;
    --link-color: #28a745;
}

/* If you have a light mode, you'd define similar variables in a light mode class */
body.light-mode {
    --dark-text-primary: #333;
    --dark-text-secondary: #666;
    --card-bg: white;
    --border-color: #e0e0e0;
    /* ... other light mode variables */
}
