:root {
    --primary-red-color: #CC0000;
    --primary-red-light: #ffeaea;
    --primary-red-dark: #990000;
}

/* ===========================
   HERO SECTION - ORGANIZED VERSION
   =========================== */

/* Base Hero Styles */
.hero-section {
    /*
    background: none;
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    color: var(--secondary-color);
    text-align: center;
    min-height: 64vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 2rem;
    padding-bottom: 2rem;
    */
    position: relative;
    overflow: hidden;
    min-height: 50vh;
    padding:0;
    background-color: transparent;
}

.hero-section .container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
    padding-top: 2rem;
    padding-bottom: 2rem;
    animation: fadeInUp 1s ease-out;
    position: relative;
    z-index: 2;
}

/* Background Overlays */
.hero-section::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.15));
    z-index: 1;
    pointer-events: none;
}

.hero-section::after {
    display: none;
}

/* Typography */
.hero-section h1 {
    font-family: 'Poppins', ui-sans-serif, system-ui;
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 12px rgba(0,0,0,0.7);
    line-height: 1.15;
    letter-spacing: -0.5px;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUpFade 1s ease 0.3s forwards;
}

.hero-section .lead {
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 400;
    max-width: 650px;
    margin: 0 auto 2rem;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
    line-height: 1.6;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUpFade 1s ease 0.6s forwards;
}

/* Buttons */
.hero-section .btn {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 2px solid transparent;
    font-weight: 600;
    letter-spacing: 0.5px;
    min-width: 160px;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin: 0 0.5rem;
}

.hero-section .btn-danger {
    background: linear-gradient(45deg, #CC0000, #c82333);
    border-color: #CC0000;
}

.hero-section .btn-light {
    background: linear-gradient(45deg, #ffffff, #f8f9fa);
    border-color: #ffffff;
    color: #333;
}

.hero-section .btn-light:hover {
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    border-color: #f8f9fa;
    color: #333;
}

.hero-section .btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.hero-section .container .d-flex .btn {
    line-height: 1 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.hero-section .btn * {
    line-height: 1;
}

.hero-section .btn-lg {
    padding: 0.8rem 2rem;
    height: auto;
}

/* Button Container */
.hero-section .d-flex.justify-content-center {
    margin-left: auto !important;
    margin-right: auto !important;
    display: flex !important;
    justify-content: center !important;
    margin-top: 2rem;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUpFade 1s ease 1.2s forwards;
}

/* ===========================
   SEARCH BAR STYLES
   =========================== */

/* Search Container */
.search-container {
    z-index: 10;
    position: relative !important;
    display: block !important;
    width: 100% !important;
    max-width: 600px !important;
    margin: 0 auto !important;
    margin-top: 1.5rem !important;
    margin-bottom: 2rem !important;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUpFade 1s ease 0.9s forwards;
    z-index: 2000;
}

#hero-search-form {
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

/* Input Group */
.hero-input-group {
    display: flex !important;
    width: 100% !important;
    border: none !important;
    border-radius: 50px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
    margin: 0 auto !important;
    transition: all 0.3s ease !important;
    background: transparent !important;
}

.hero-input-group:focus-within {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3) !important;
}

.hero-input-group:focus-within .hero-search-input {
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.hero-input-group:focus-within .hero-search-btn {
    border-color: rgba(255, 255, 255, 0.5) !important;
}

.hero-input-group > * {
    margin: 0 !important;
    padding: 0 !important;
}

/* Search Input */
.form-control.hero-search-input {
    flex: 1;
    border: 2px solid rgba(255, 255, 255, 0.6) !important;
    border-right: none !important;
    border-radius: 50px 0 0 50px !important;
    background: rgba(255, 255, 255, 0.92) !important;
    color: #222 !important;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease !important;
    padding: 0.875rem 1.25rem !important;
    padding-left: 30px !important;
    font-size: 1rem !important;
    height: 56px !important;
    outline: none !important;
    margin: 0 !important;
    display: block !important;
    min-width: 0 !important;
    transform: translateY(0) !important;
}

.form-control.hero-search-input::placeholder {
    color: #888 !important;
    opacity: 1;
    padding-left: 10px;
    letter-spacing: 0.3px;
}

.form-control.hero-search-input:focus {
    background: #fff !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
    box-shadow: none !important;
    outline: none !important;
    transform: translateY(0) !important;
}

/* Search Button */
.btn.hero-search-btn {
    border: 2px solid var(--primary-red-color) !important;
    border-left: none !important;
    border-radius: 0 50px 50px 0 !important;
    background: linear-gradient(45deg, var(--primary-red-color), var(--primary-red-dark)) !important;
    color: white !important;
    padding: 0 1rem !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    height: 56px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
    min-width: auto !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    transform: translateY(0) !important;
}

.btn.hero-search-btn i {
    font-size: 1.1rem !important;
    line-height: 1 !important;
    margin: 0 !important;
}

.btn.hero-search-btn .btn-text {
    font-size: 1rem !important;
    line-height: 1 !important;
}

.btn.hero-search-btn:hover {
    background: linear-gradient(45deg, #c82333, #bd2130) !important;
    border-color: #c82333 !important;
    transform: translateY(0) scale(1.05) !important;
}

/* Connect input and button borders */
.form-control.hero-search-input {
    margin-right: -1px !important;
}

.btn.hero-search-btn {
    margin-left: -1px !important;
}

/* Search Suggestions */
#search-suggestions {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    z-index: 9999 !important;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 5px !important;
}

#search-suggestions .dropdown-item {
    padding: 10px 15px;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s;
    color: #333;
    text-decoration: none;
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    white-space: normal;
}

#search-suggestions .dropdown-item:hover {
    background-color: #f8f9fa;
}

#search-suggestions .dropdown-item:last-child {
    border-bottom: none;
}

/* ===========================
   ANIMATIONS
   =========================== */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUpFade {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes overlayFade {
    to { opacity: 1; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* ===========================
   RESPONSIVE STYLES
   =========================== */

/* Desktop (min-width: 769px) */
@media (min-width: 769px) {
    .hero-search-btn {
        padding: 0 1.5rem !important;
        min-width: 100px !important;
    }
    
    .hero-search-btn .btn-text.ms-2 {
        display: inline !important;
        font-size: 1rem !important;
    }
}

/* Tablet (577px - 768px) */
@media (min-width: 577px) and (max-width: 768px) {
    .hero-search-btn {
        padding: 0 1rem !important;
        min-width: 80px !important;
        max-width: 100px !important;
    }
    
    .hero-search-btn .btn-text.ms-2 {
        display: inline !important;
        font-size: 0.9rem !important;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    .hero-section {
        background-position: center 20%;
        background-attachment: scroll;
        min-height: 60vh;
        padding-bottom: 2rem;
    }
    
    .hero-section .container {
        padding-bottom: 2rem;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    .hero-section h1 {
        font-size: 2.2rem !important;
    }
    
    .hero-section .lead {
        font-size: 1.05rem !important;
    }
    
    .hero-section::before {
        height: 100px;
    }
    
    .search-container {
        max-width: 95% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding: 0 10px !important;
    }
    
    .hero-section .search-container {
        width: calc(100% - 20px) !important;
        margin-left: 10px !important;
        margin-right: 10px !important;
        left: 0;
        transform: none;
    }
    
    .hero-input-group {
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        border-radius: 30px !important;
        overflow: hidden !important;
    }
    
    .form-control.hero-search-input {
        font-size: 0.95rem !important;
        padding: 0.75rem 1rem !important;
        padding-left: 15px !important;
        height: 50px !important;
        border-radius: 30px 0 0 30px !important;
        border: 2px solid rgba(255, 255, 255, 0.3) !important;
        border-right: 1px solid rgba(255, 255, 255, 0.2) !important;
    }
    
    .form-control.hero-search-input:focus {
        border-color: #86b7fe !important;
        box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
    }
    
    .form-control.hero-search-input::placeholder {
        font-size: 0.9rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .btn.hero-search-btn {
        padding: 0 0.75rem !important;
        height: 50px !important;
        min-width: 50px !important;
        max-width: 60px !important;
        width: auto !important;
        border-radius: 0 30px 30px 0 !important;
    }
    
    .btn.hero-search-btn i {
        font-size: 1rem !important;
        margin: 0 !important;
    }
    
    .btn.hero-search-btn .btn-text.ms-2 {
        display: none !important;
    }
    
    .btn.hero-search-btn .me-2 {
        margin-right: 0 !important;
    }
    
    .btn.hero-search-btn span,
    .btn.hero-search-btn .btn-text {
        display: none !important;
    }
    
    #search-suggestions {
        position: fixed !important;
        width: 90% !important;
        left: 5% !important;
        right: 5% !important;
    }
}

/* Extra Small Mobile (max-width: 576px) */
@media (max-width: 576px) {
    .hero-section {
        min-height: 60vh;
        padding-bottom: 2rem;
    }
    
    .hero-section .container {
        padding-bottom: 1.5rem;
    }
    
    .hero-section h1 {
        font-size: 1.8rem !important;
        margin-bottom: 1rem;
    }
    
    .hero-section .lead {
        font-size: 1rem !important;
        margin: 0 auto 1.5rem;
    }
    
    .hero-section .btn {
        min-width: 140px;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .hero-section .d-flex {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .hero-section .search-container {
        margin-top: 1rem !important;
        margin-bottom: 1.5rem !important;
        margin-left: auto !important;
        margin-right: auto !important;
        width: 90% !important;
    }
    
    .search-container {
        max-width: 100% !important;
        padding: 0 5px !important;
        width: calc(100% - 20px) !important;
        margin-left: 10px !important;
        margin-right: 10px !important;
    }
    
    .form-control.hero-search-input {
        padding-left: 12px !important;
        font-size: 0.9rem !important;
        height: 48px !important;
        padding: 0.7rem 0.9rem !important;
    }
    
    .form-control.hero-search-input::placeholder {
        font-size: 0.9rem;
    }
    
    .btn.hero-search-btn {
        padding: 0 0.6rem !important;
        height: 48px !important;
        min-width: 48px !important;
        max-width: 55px !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    
    .btn.hero-search-btn i {
        font-size: 0.95rem !important;
    }
}

/* Fix Bootstrap conflicts */
.input-group > .form-control:not(:first-child),
.input-group > .custom-select:not(:first-child),
.input-group > .custom-file:not(:first-child) {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.input-group > .form-control:not(:last-child),
.input-group > .custom-select:not(:last-child),
.input-group > .custom-file:not(:last-child) {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* Container alignment fix */
.hero-content {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}
/* ===========================
   SEARCH SUGGESTIONS - MOBILE
   =========================== */

.search-container {
    position: relative !important;
}

@media (max-width: 768px) {
    #search-suggestions {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        bottom: auto !important;
        width: 100% !important;
        margin-top: 5px !important;
        max-height: 50vh !important;
        overflow-y: auto !important;
        border-radius: 0.375rem !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18) !important;
        z-index: 10000 !important;
        padding: 0.25rem 0 !important;
    }
}

/* ===========================
   SEARCH SUGGESTION ITEMS - MOBILE COMPACT
   =========================== */

/* Search suggestion items - compact mobile version */
@media (max-width: 768px) {
    #search-suggestions .dropdown-item {
        padding: 0.625rem 0.875rem !important;
        border-bottom: 1px solid #f5f5f5;
        font-size: 0.9rem;
        line-height: 1.2;
    }
    
    /* Title styling for mobile */
    #search-suggestions .dropdown-item strong {
        font-size: 0.9rem !important;
        font-weight: 600;
        color: #333;
        display: block;
        margin-bottom: 0.125rem;
        line-height: 1.1;
    }
    
    /* Subtitle/description styling for mobile */
    #search-suggestions .dropdown-item small {
        font-size: 0.8rem !important;
        color: #666 !important;
        display: block;
        line-height: 1.1;
        margin-top: 0.125rem;
    }
    
    /* Type label - make it subtle */
    #search-suggestions .dropdown-item .text-muted.ms-2 {
        font-size: 0.7rem !important;
        padding: 0.0625rem 0.25rem;
        background: #f0f0f0;
        border-radius: 0.125rem;
        margin-left: 0.5rem !important;
    }
    
    /* Flex container adjustments */
    #search-suggestions .dropdown-item .d-flex.align-items-center {
        align-items: flex-start !important;
    }
    
    /* Remove image/icon margin on mobile if too crowded */
    #search-suggestions .dropdown-item img,
    #search-suggestions .dropdown-item .me-3 {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        margin-right: 0.75rem !important;
    }
    
    /* View all results link */
    #search-suggestions .dropdown-item.text-center {
        padding: 0.75rem !important;
        font-size: 0.9rem !important;
        background: #f8f9fa;
        border-top: 1px solid #e0e0e0;
    }
}

/* Ultra small screens - even more compact */
@media (max-width: 400px) {
    #search-suggestions .dropdown-item {
        padding: 0.5rem 0.75rem !important;
    }
    
    #search-suggestions .dropdown-item strong {
        font-size: 0.85rem !important;
    }
    
    #search-suggestions .dropdown-item small {
        font-size: 0.75rem !important;
    }
    
    /* Hide description on very small screens */
    #search-suggestions .dropdown-item small.text-truncate {
        display: none !important;
    }
    
    /* Hide category on very small screens */
    #search-suggestions .dropdown-item small.d-block:not(.text-truncate) {
        display: none !important;
    }
    
    /* Make type label inline with title */
    #search-suggestions .dropdown-item .d-flex.justify-content-between {
        flex-direction: row !important;
        align-items: center !important;
    }
    
    #search-suggestions .dropdown-item .text-muted.ms-2 {
        margin-left: 0.5rem !important;
        margin-top: 0 !important;
    }
}

/* ===========================
   ANIMATION FOR MOBILE
   =========================== */

@keyframes slideUpMobile {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   FIX FOR SEARCH CONTAINER POSITIONING
   =========================== */

/* Ensure search container has proper context */
.search-container {
    position: relative !important;
    z-index: 2000; /* Higher than other elements */
}

/* Make sure the form inside has proper positioning */
#hero-search-form {
    position: relative !important;
}

/* For mobile, ensure the suggestions are positioned relative to the search input */
@media (max-width: 768px) {
    .search-container {
        position: relative !important;
    }
    
    #search-suggestions {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        margin-top: 5px !important;
        z-index: 9999 !important;
        transform: none !important;
        animation: fadeInUp 0.3s ease !important;
    }
    
    /* If you want it to appear from the bottom on mobile (like a sheet) */
    #search-suggestions.bottom-sheet {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-height: 60vh !important;
        border-radius: 1rem 1rem 0 0 !important;
        margin-top: 0 !important;
        animation: slideUpMobile 0.3s ease !important;
    }
}

/* Fade in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   MOBILE SEARCH SUGGESTIONS - RIGHT ALIGNED DROPDOWN
   =========================== */

   @media (max-width: 768px) {
    /* Search container positioning */
    .search-container {
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 15px !important;
        margin: 1.5rem auto 2rem !important;
    }
    
    /* Search input group */
    .hero-input-group {
        position: relative !important;
        width: 100% !important;
        margin: 0 auto !important;
    }
    
    /* Search suggestions - RIGHT ALIGNED DROPDOWN */
    #search-suggestions {
        position: absolute !important;
        top: calc(100% + 5px) !important; /* Just below the search input */
        left: auto !important;
        right: 0 !important; /* Align to right edge of search input */
        width: 85vw !important; /* 85% of viewport width */
        max-width: 350px !important;
        min-width: 280px !important;
        max-height: 60vh !important;
        overflow-y: auto !important;
        background: white !important;
        border: 1px solid #dee2e6 !important;
        border-radius: 0.5rem !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
        padding: 0.5rem 0 !important;
        margin: 0 !important;
        z-index: 9999 !important;
        animation: slideInRight 0.3s ease !important;
        transform-origin: top right !important;
    }
    
    /* Animation for right-aligned dropdown */
    @keyframes slideInRight {
        from {
            opacity: 0;
            transform: translateY(-10px) scale(0.95);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }
    
    /* Make sure the search container has proper z-index context */
    .search-container {
        z-index: 100 !important;
    }
    
    /* For very small screens, adjust positioning */
    @media (max-width: 400px) {
        #search-suggestions {
            width: 90vw !important;
            max-width: 300px !important;
            min-width: 250px !important;
            right: 5px !important; /* Slight offset from edge */
        }
    }
    
    /* If search input is near right edge, adjust */
    @media (max-width: 350px) {
        #search-suggestions {
            width: 95vw !important;
            max-width: 280px !important;
            right: 2.5vw !important; /* Center slightly */
            left: 2.5vw !important;
        }
    }
}

/* ===========================
   COMPACT SUGGESTION ITEMS FOR MOBILE
   =========================== */

@media (max-width: 768px) {
    #search-suggestions .dropdown-item {
        padding: 0.75rem 1rem !important;
        border-bottom: 1px solid #f0f0f0;
        font-size: 0.9rem;
        line-height: 1.3;
        display: block !important;
        text-decoration: none !important;
        color: #333 !important;
        transition: background-color 0.2s;
    }
    
    #search-suggestions .dropdown-item:last-child {
        border-bottom: none !important;
    }
    
    #search-suggestions .dropdown-item:hover {
        background-color: #f8f9fa !important;
    }
    
    /* Compact layout for suggestion items */
    .search-suggestion-item .d-flex.align-items-center {
        align-items: flex-start !important;
        min-height: auto !important;
    }
    
    /* Title - compact */
    .search-suggestion-item strong {
        font-size: 0.9rem !important;
        font-weight: 600;
        color: #333;
        display: block;
        margin-bottom: 0.125rem;
        line-height: 1.2;
        word-break: break-word;
    }
    
    /* Subtitle/description - compact */
    .search-suggestion-item small {
        font-size: 0.8rem !important;
        color: #666 !important;
        display: block;
        line-height: 1.1;
        margin-top: 0.125rem;
        word-break: break-word;
    }
    
    /* Type label - subtle */
    .search-suggestion-item .text-muted.ms-2 {
        font-size: 0.7rem !important;
        padding: 0.125rem 0.375rem;
        background: #f0f0f0;
        border-radius: 0.25rem;
        margin-left: 0.5rem !important;
        white-space: nowrap;
    }
    
    /* Smaller images/icons */
    .search-suggestion-item img,
    .search-suggestion-item .me-3 {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        margin-right: 0.75rem !important;
        flex-shrink: 0 !important;
    }
    
    /* View all results */
    .search-suggestion-item.text-center {
        padding: 0.875rem 1rem !important;
        font-size: 0.9rem !important;
        background: #f8f9fa !important;
        border-top: 1px solid #e0e0e0 !important;
        color: #CC0000 !important;
        font-weight: 600;
    }
}
/* ===========================
   COMPACT SEARCH SUGGESTIONS LAYOUT FOR MOBILE
   =========================== */

   @media (max-width: 768px) {
    /* Compact suggestion items */
    .search-suggestion-item {
        padding: 0.75rem 1rem !important;
        border-bottom: 1px solid #f0f0f0;
    }
    
    /* Remove the max-width constraints on mobile */
    .search-suggestion-item strong.text-truncate {
        max-width: none !important;
        white-space: normal !important;
    }
    
    /* Reorganize the flex layout for mobile */
    .search-suggestion-item .d-flex.align-items-center {
        display: flex !important;
        align-items: flex-start !important;
        width: 100% !important;
    }
    
    /* Image/icon container - fixed width */
    .search-suggestion-item img,
    .search-suggestion-item .me-3 {
        width: 50px !important;
        height: 50px !important;
        min-width: 50px !important;
        max-width: 50px !important;
        margin-right: 0.75rem !important;
        flex-shrink: 0 !important;
    }
    
    /* Text container - takes remaining space */
    .search-suggestion-item .flex-grow-1 {
        flex: 1 !important;
        min-width: 0 !important; /* Allows text to wrap */
    }
    
    /* Title and type label in one line */
    .search-suggestion-item .d-flex.justify-content-between.align-items-start {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        margin-bottom: 0.25rem !important;
    }
    
    /* Title - takes most space */
    .search-suggestion-item strong {
        font-size: 0.95rem !important;
        font-weight: 600;
        color: #333;
        flex: 1 !important;
        min-width: 0 !important;
        margin-right: 0.5rem !important;
        margin-bottom: 0 !important;
        line-height: 1.2;
        word-break: break-word;
    }
    
    /* Type label (Producto, Novedad, Consejo) - move to right of image */
    .search-suggestion-item .text-muted.ms-2 {
        font-size: 0.75rem !important;
        padding: 0.125rem 0.375rem !important;
        background: #f0f0f0 !important;
        border-radius: 0.25rem !important;
        color: #666 !important;
        margin-left: 0 !important;
        margin-top: 0 !important;
        white-space: nowrap;
        flex-shrink: 0;
        order: 2; /* Move to right side */
    }
    
    /* Category (Pinturas, Impermeabilizantes) - place under title */
    .search-suggestion-item small.text-muted.d-block:first-of-type {
        font-size: 0.8rem !important;
        color: #666 !important;
        margin-top: 0.125rem !important;
        margin-bottom: 0.25rem !important;
        line-height: 1.1;
    }
    
    /* Description - compact */
    .search-suggestion-item small.text-muted.d-block.text-truncate {
        font-size: 0.8rem !important;
        color: #888 !important;
        line-height: 1.2;
        margin-top: 0.125rem !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important; /* Limit to 2 lines */
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-height: 2.4em !important;
    }
    
    /* Remove text truncation on mobile */
    .search-suggestion-item small.text-truncate {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: unset !important;
    }
    
    /* For icon items (no image) */
    .search-suggestion-item .me-3.text-center {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 50px !important;
        height: 50px !important;
        min-width: 50px !important;
        background: #f8f9fa !important;
        border-radius: 0.25rem !important;
    }
    
    .search-suggestion-item .me-3.text-center i {
        font-size: 1.25rem !important;
        color: #CC0000 !important;
    }
    
    /* View all results link */
    .search-suggestion-item.text-center {
        padding: 0.875rem 1rem !important;
        font-size: 0.9rem !important;
        background: #f8f9fa !important;
        border-top: 1px solid #e0e0e0 !important;
        color: #CC0000 !important;
        font-weight: 600;
    }
}

/* Extra small screens - even more compact */
@media (max-width: 576px) {
    .search-suggestion-item {
        padding: 0.625rem 0.875rem !important;
    }
    
    .search-suggestion-item strong {
        font-size: 0.9rem !important;
    }
    
    .search-suggestion-item .text-muted.ms-2 {
        font-size: 0.7rem !important;
        padding: 0.125rem 0.25rem !important;
    }
    
    .search-suggestion-item img,
    .search-suggestion-item .me-3 {
        width: 45px !important;
        height: 45px !important;
        min-width: 45px !important;
        max-width: 45px !important;
    }
    
    /* Hide description on very small screens */
    @media (max-width: 400px) {
        .search-suggestion-item small.text-muted.d-block.text-truncate {
            display: none !important;
        }
    }
}

/* ===========================
   SPECIFIC LAYOUT FOR DIFFERENT TYPES
   =========================== */

/* For Product items */
.search-suggestion-item[href*="/productos/"] .text-muted.ms-2 {
    background: #e3f2fd !important;
    color: #1976d2 !important;
}

/* For News items */
.search-suggestion-item[href*="/novedades/"] .text-muted.ms-2 {
    background: #e8f5e9 !important;
    color: #388e3c !important;
}

/* For Tips items */
.search-suggestion-item[href*="/consejos-utiles/"] .text-muted.ms-2 {
    background: #fff3e0 !important;
    color: #f57c00 !important;
}

/* For Contact items */
.search-suggestion-item[href*="/contacto"] .text-muted.ms-2 {
    background: #f3e5f5 !important;
    color: #7b1fa2 !important;
}


/* ===========================
   MOBILE RESPONSIVE FIXES - EQUALIZED SIZES
   =========================== */

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0.5rem !important;
    }
    
    .hero-section .container {
        padding: 1rem 0.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Button container - equal distribution */
    .hero-section .d-flex.justify-content-center.flex-wrap {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 12px !important;
        width: 100% !important;
        max-width: 600px !important;
        margin: 0 auto !important;
    }
    
    /* Make all action buttons equal size */
    .hero-section .btn.btn-lg {
        flex: 1 !important;
        min-width: 0 !important;
        max-width: none !important;
        text-align: center !important;
        padding: 12px 20px !important;
        font-size: 0.95rem !important;
        height: 50px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    /* Search container - make it visually match button sizes */
    .search-container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 0.5rem !important;
        margin: 1.5rem auto !important;
    }
    
    /* Input group - should look like a big button */
    .hero-input-group {
        width: 100% !important;
        display: flex !important;
        height: 50px !important; /* Match button height */
        border-radius: 30px !important;
        overflow: hidden !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    }
    
    /* Search input - takes most of the space */
    .form-control.hero-search-input {
        flex: 1 !important;
        min-width: 0 !important;
        width: auto !important;
        font-size: 0.95rem !important;
        padding: 0 20px !important;
        height: 100% !important;
        border: none !important;
        border-radius: 0 !important;
        background: rgba(255, 255, 255, 0.2) !important;
        backdrop-filter: blur(5px) !important;
    }
    
    .form-control.hero-search-input::placeholder {
        color: #888 !important;
        font-size: 0.9rem !important;
    }
    
    /* Search button - make it prominent and equal to other buttons */
    .btn.hero-search-btn {
        width: 80px !important; /* Wider button */
        min-width: 80px !important;
        max-width: 80px !important;
        height: 100% !important;
        padding: 0 !important;
        border-radius: 0 30px 30px 0 !important;
        flex-shrink: 0 !important;
        background: linear-gradient(45deg, #CC0000, #c82333) !important;
        border: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .btn.hero-search-btn i {
        font-size: 1.2rem !important;
        margin: 0 !important;
        color: white !important;
    }
    
    /* Make search button look more substantial */
    .btn.hero-search-btn:before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        transform: translateY(-50%);
        width: 1px;
        height: 70%;
        background: rgba(255, 255, 255, 0.3);
    }
    
    /* Increase touch target for mobile */
    .btn.hero-search-btn:active {
        background: linear-gradient(45deg, #c82333, #bd2130) !important;
        transform: scale(0.98) !important;
    }
    
    /* Hide text on mobile */
    .btn.hero-search-btn .btn-text {
        display: none !important;
    }
}

/* Tablet (577px - 768px) */
@media (min-width: 577px) and (max-width: 768px) {
    .hero-section .btn.btn-lg {
        padding: 12px 25px !important;
        font-size: 1rem !important;
        height: 52px !important;
    }
    
    .hero-input-group {
        height: 52px !important;
    }
    
    .btn.hero-search-btn {
        width: 90px !important;
        min-width: 90px !important;
        max-width: 90px !important;
    }
    
    .form-control.hero-search-input {
        font-size: 1rem !important;
        padding: 0 25px !important;
    }
}

/* Small Mobile (max-width: 576px) */
@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 1.8rem !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-section .lead {
        font-size: 0.95rem !important;
        margin-bottom: 1.5rem !important;
        padding: 0 0.5rem !important;
    }
    
    /* Stack buttons vertically */
    .hero-section .d-flex.justify-content-center.flex-wrap {
        flex-direction: column !important;
        gap: 15px !important;
        max-width: 95% !important;
        padding: 0 1rem !important;
    }
    
    .hero-section .btn {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        height: 48px !important;
        padding: 12px 15px !important;
    }
    
    /* Search bar - full width with visual balance */
    .hero-input-group {
        height: 48px !important;
    }
    
    .form-control.hero-search-input {
        font-size: 0.9rem !important;
        padding: 0 15px !important;
    }
    
    .btn.hero-search-btn {
        width: 70px !important;
        min-width: 70px !important;
        max-width: 70px !important;
    }
    
    .btn.hero-search-btn i {
        font-size: 1.1rem !important;
    }
}

/* Extra Small (max-width: 400px) */
@media (max-width: 400px) {
    .hero-section h1 {
        font-size: 1.6rem !important;
    }
    
    .hero-section .lead {
        font-size: 0.9rem !important;
    }
    
    .hero-section .btn {
        font-size: 0.9rem !important;
        height: 46px !important;
        padding: 10px 12px !important;
    }
    
    .hero-input-group {
        height: 46px !important;
    }
    
    .form-control.hero-search-input {
        font-size: 0.85rem !important;
        padding: 0 12px !important;
    }
    
    .btn.hero-search-btn {
        width: 65px !important;
        min-width: 65px !important;
        max-width: 65px !important;
    }
    
    .btn.hero-search-btn i {
        font-size: 1rem !important;
    }
}

/* ===========================
   VISUAL CONSISTENCY FIXES
   =========================== */

/* Ensure all interactive elements have same visual weight */
@media (max-width: 768px) {
    /* Make sure all buttons have same shadows */
    .hero-section .btn,
    .hero-input-group {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    }
    
    /* Consistent hover/active states */
    .hero-section .btn:hover,
    .hero-input-group:focus-within {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2) !important;
        transform: translateY(-2px) !important;
    }
    
    .hero-section .btn:active,
    .btn.hero-search-btn:active {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
        transform: translateY(0) !important;
    }
}

/* ===========================
   SEARCH SUGGESTIONS ALIGNMENT FIX
   =========================== */

@media (max-width: 768px) {
    #search-suggestions {
        position: absolute !important;
        top: calc(100% + 8px) !important;
        left: 0.5rem !important;
        right: 0.5rem !important;
        width: calc(100% - 1rem) !important;
        max-height: 50vh !important;
        overflow-y: auto !important;
        z-index: 9999 !important;
        margin-top: 0 !important;
        border-radius: 12px !important;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2) !important;
    }
}

/* ===========================
   FIX FOR SEARCH BUTTON VISUAL BALANCE
   =========================== */

/* Optional: Add "Search" text on wider mobile screens */
@media (min-width: 430px) and (max-width: 768px) {
    .btn.hero-search-btn {
        width: 100px !important;
        min-width: 100px !important;
        max-width: 100px !important;
        justify-content: space-around !important;
        padding: 0 15px !important;
    }
    
    .btn.hero-search-btn .btn-text {
        display: inline !important;
        font-size: 0.85rem !important;
        font-weight: 600;
        margin-left: 5px !important;
    }
    
    .btn.hero-search-btn i {
        font-size: 1rem !important;
    }
}

/* ==============================================
   ULTIMATE FIX: BUTTON LEFT SIDE ALWAYS STRAIGHT
   ============================================== */

/* Target the button in all possible states, on all screen sizes */
.hero-search-btn,
.hero-search-btn:hover,
.hero-search-btn:focus,
.hero-search-btn:active,
.hero-search-btn:focus-within,
.hero-search-btn:focus-visible,
.hero-input-group .hero-search-btn,
.hero-input-group:focus-within .hero-search-btn,
.hero-search-input:focus + .hero-search-btn {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 999px !important;
    border-bottom-right-radius: 999px !important;
    background: linear-gradient(45deg, #CC0000, #c82333) !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Input: keep right side straight, left side round */
.hero-search-input,
.hero-search-input:focus,
.hero-search-input:hover,
.hero-search-input:active {
    border-top-left-radius: 999px !important;
    border-bottom-left-radius: 999px !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
}

/* The parent group must preserve the pill shape */
.hero-input-group,
.hero-input-group:focus-within {
    border-radius: 999px !important;
    overflow: hidden !important;
}

/* On mobile (<=576px) enforce same, overriding any earlier media queries */
@media (max-width: 576px) {
    .hero-search-btn,
    .hero-search-btn:hover,
    .hero-search-btn:focus,
    .hero-search-btn:active,
    .hero-search-btn:focus-within,
    .hero-input-group:focus-within .hero-search-btn {
        border-top-left-radius: 0 !important;
        border-bottom-left-radius: 0 !important;
        border-top-right-radius: 999px !important;
        border-bottom-right-radius: 999px !important;
    }

    .hero-search-input,
    .hero-search-input:focus {
        border-top-left-radius: 999px !important;
        border-bottom-left-radius: 999px !important;
        border-top-right-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
    }
}

/* ── Equal-width hero CTA wrapper ──────────────────────── */
/* Use .hero-section prefix to win all specificity battles */
@media (max-width: 768px) {
    .hero-section .hero-cta-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
    }

    .hero-section .hero-cta-wrapper .search-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    .hero-section .hero-cta-wrapper .d-flex {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        flex-direction: row !important;
        box-sizing: border-box !important;
    }

    .hero-section .hero-cta-wrapper .btn.btn-lg {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        max-width: none !important;
    }
}

/* ── Structural equal-width fix (beats all old padding/margin rules) ── */
/* flex column + stretch means children ALWAYS match wrapper width,
   no matter what padding/margin the old rules try to apply.           */
.hero-section .hero-cta-wrapper {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
}
.hero-section .hero-cta-wrapper > .search-container {
    width: auto !important;
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    flex-shrink: 0 !important;
}
/* Match all 4 classes so specificity (0,5,0) beats the old (0,4,0) rule */
.hero-section .hero-cta-wrapper > .d-flex.justify-content-center.flex-wrap {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
    flex-direction: row !important;
}


/* ===========================
   ROTATING BACKGROUND SLIDESHOW
   =========================== */
/* ===========================
   ROTATING BACKGROUND SLIDESHOW
   =========================== */
   .hero-section {
    position: relative;
    overflow: hidden;
    background: none; /* Remove fixed background */
}

.hero-bg-slideshow {
    position: absolute;
    inset: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* CHANGE THIS - Remove background-attachment: fixed which causes cropping */
.hero-bg-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;  /* This will cover the area */
    background-position: center;  /* Center the image */
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

/* If you want to STRETCH the image (may distort): */
.hero-bg-slide.stretch {
    background-size: 100% 100%;  /* This stretches to fill exactly */
}

/* If you want to show the ENTIRE image without cropping: */
.hero-bg-slide.contain {
    background-size: contain;
    background-color: transparent!important;
}

.hero-bg-slide.active {
    opacity: 1;
    z-index: 2;
}

/* Ensure content stays above background */
.hero-section .container,
.hero-slider-btn,
.hero-slider-markers,
.scroll-down-arrow {
    z-index: 10;
    position: relative;
}

/* ===========================
   SLIDER CONTROLS (arrows)
   =========================== */
.hero-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 20;
    backdrop-filter: blur(4px);
}

.hero-slider-btn:hover {
    background: rgba(204, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.hero-slider-prev {
    left: 20px;
}

.hero-slider-next {
    right: 20px;
}

/* ===========================
   MARKERS (dots)
   =========================== */
.hero-slider-markers {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 20;
}

.hero-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-slider-markers .hero-marker,
.hero-slider-markers .hero-marker.active {
    opacity: 0 !important;
    pointer-events: none;
}

.hero-section {
    margin-bottom: 0 !important;
}

.next-section { /* replace with your actual section */
    margin-top: 0 !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .hero-slider-btn {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }
    .hero-slider-prev { left: 10px; }
    .hero-slider-next { right: 10px; }
    .hero-marker {
        width: 10px;
        height: 10px;
    }
    .hero-slider-markers {
        bottom: 20px;
        gap: 8px;
    }
    .hero-slider-btn {
        display: none !important;
    }
}
