/* ========================================
   SKELETON LOADER
   ======================================== */
.skeleton-loader {
    display: none;
    width: 100%;
}

.skeleton-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
}

@media (min-width: 768px) {
    .skeleton-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) {
    .skeleton-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.skeleton-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.skeleton-image {
    height: 220px;
    background: #e0e0e0;
    position: relative;
    overflow: hidden;
}

.skeleton-info {
    padding: 1.25rem;
}

.skeleton-title {
    height: 20px;
    background: #e0e0e0;
    margin-bottom: 10px;
    border-radius: 4px;
    width: 80%;
    position: relative;
    overflow: hidden;
}

.skeleton-title-short {
    height: 20px;
    background: #e0e0e0;
    margin-bottom: 15px;
    border-radius: 4px;
    width: 60%;
    position: relative;
    overflow: hidden;
}

.skeleton-price {
    height: 24px;
    background: #e0e0e0;
    margin-bottom: 15px;
    border-radius: 4px;
    width: 40%;
    position: relative;
    overflow: hidden;
}

.skeleton-button {
    height: 42px;
    background: #e0e0e0;
    border-radius: 12px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Animation Shimmer */
.skeleton-image::after,
.skeleton-title::after,
.skeleton-title-short::after,
.skeleton-price::after,
.skeleton-button::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.2) 20%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* ========================================
   PAGE SKELETON LOADER
   ======================================== */
.page-skeleton {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    z-index: 9999;
    padding: 1rem;
    overflow-y: auto;
    padding-bottom: 80px; /* Pour la bottom nav */
}

.skeleton-header {
    margin-bottom: 1.5rem;
}

.skeleton-search {
    height: 50px;
    background: white;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.skeleton-carousel {
    height: 200px;
    background: #e0e0e0;
    border-radius: 16px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.skeleton-categories-row {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
}

.skeleton-category-card {
    min-width: 120px;
    height: 140px;
    background: white;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.skeleton-section-title {
    height: 30px;
    width: 50%;
    background: #e0e0e0;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

/* Appliquer l'animation shimmer aux nouveaux éléments */
.skeleton-search::after,
.skeleton-carousel::after,
.skeleton-category-card::after,
.skeleton-section-title::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.2) 20%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: shimmer 1.5s infinite;
}

/* ========================================
   HOME PAGE STYLES
   ======================================== */

:root {
    --deep-green: #054A29;
    --green-darker: #077963;
    --red: #A65A53;
    --green-light: #10BC9C;
    --green-lighter: #15AB8E;
    --primary-background: #F5F5F5;
    --secondary-background: #FFFFFF;
    --card-background: #FFFFFF;
    --card-border: #E0E0E0;
    --card-shadow: rgba(0, 0, 0, 0.1);
    --primary-text: #333333;
    --secondary-text: #777777;
    --muted-text: #A65A53;
    --yellow: #ffb733;
    --main-green-dark: #12BB9C;
    --main-purple: #B491CA;
    --light-purple: #F8EFEF;
    --white: #FFFFFF;
    --dark-blue: #080759;
    --light-blue: #53A2EB;
    --red-light: #F8EFEF;
    --red-dark: #BD3112;
    --gray: #818181;
}

/* Header Search */
.header-search-container {
    flex: 1;
    max-width: 100%;
}

.search-bar-custom {
    background: white;
    color: #718096;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.search-bar-custom:focus-within,
.search-bar:hover {
    border-color: #38a169 !important;
    box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.2);
}

.search-input-custom {
    width: 100%;
    border: none;
    outline: none;
    padding: 12px 20px;
    font-size: 15px;
    background: transparent;
    border-radius: 12px;
}

.search-input:focus {
    outline: none;
    box-shadow: none;
}

.search-button-custom {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.search-button-custom:hover {
    background-color: #38a169;
    transform: scale(1.05);
}

.search-button-custom i {
    color: #4a5568;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-button-custom:hover i {
    color: white;
}

.search-button:hover i {
    transform: scale(1.1);
}

.search-results-custom {
    position: absolute;
    width: 100%;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 5px;
    border: 1px solid #e2e8f0;
}

.search-result-item {
    display: block;
    transition: all 0.2s ease;
    border-bottom: 1px solid #edf2f7;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #f0fff4 !important;
}

.search-result-item h6 {
    margin-bottom: 4px;
}

.search-result-item .badge {
    font-size: 11px;
    padding: 3px 6px;
}

.search-result-item .text-primary {
    color: #054A29 !important;
    font-weight: 500;
}

.search-result-item .text-success {
    color: #38a169 !important;
    font-weight: 500;
}

.search-result-item small {
    font-size: 11px;
}

.search-result-item .fa-store,
.search-result-item .fa-location-arrow {
    font-size: 10px;
    margin-right: 3px;
}

/* Language Modal */
.language-modal-title {
    color: #054A29;
}

.btn-language-custom {
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.btn-language-custom:hover,
.btn-language:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 74, 41, 0.2);
    background: #054A29 !important;
}

.btn-language-custom:hover span,
.btn-language:hover span {
    color: white !important;
}

.language-text {
    color: #054A29;
}

/* Categories Section */
.categories-section-bg {
    background-color: #F8EFEF;
}

.section-heading-title {
    color: #080759;
}

.section-divider {
    background-color: #054A29;
    height: 3px;
    width: 50px;
}

.category-card-custom {
    border-radius: 12px;
}

.category-name-title {
    color: #080759;
}

.btn-explore-custom,
.btn-explore {
    background: var(--deep-green) !important;
    color: white !important;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
}

.btn-explore-custom:hover,
.btn-explore:hover {
    background: var(--red-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(189, 49, 18, 0.3);
    color: white;
}

.btn-see-more-custom {
    border-color: #054A29;
    color: #054A29;
}

.btn-see-more-custom:hover {
    background-color: #054A29;
    color: white;
}

.category-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: white;
    border: 1px solid #e2e8f0;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.section-heading h6,
.section-heading h2,
.section-heading h4 {
    color: var(--dark-blue);
}

.btn-link {
    color: var(--light-blue);
    text-decoration: none;
}

.single-hero-slide {
    border-radius: 16px;
    overflow: hidden;
}

.lazy {
    background-color: #f8f9fa;
    background-image: linear-gradient(90deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
}

.responsive-logo {
    max-width: 50px;
    min-width: 40px;
}

/* Media Queries */
@media (max-width: 767px) {
    .hero-slides .single-hero-slide {
        min-height: 250px;
    }
    .slide-text h4 {
        font-size: 18px;
    }
    .slide-text p {
        font-size: 14px;
    }
    .search-result-item {
        padding: 10px !important;
    }
    .search-result-item .flex-grow-1 h6 {
        font-size: 13px !important;
    }
    .search-result-item .d-flex.flex-wrap {
        flex-direction: column;
        gap: 2px !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .header-search-container {
        max-width: 450px !important;
    }
}
