/* ==================== HOMEPAGE SECTIONS ==================== */

/* --- Section shared styles --- */
.home-section {
    padding: 40px 0;
}
.home-section .container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}
.home-section-title {
    text-align: center;
    font-size: 1.2rem;
    color: #5BB5C5;
    margin-bottom: 28px;
    font-weight: 600;
    letter-spacing: 1px;
}
.home-section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: #5BB5C5;
    margin: 10px auto 0;
    border-radius: 2px;
}
.home-section-title span {
    color: var(--hc24-primary, #5BB5C5);
}

/* ==================== 2. TOP CATEGORIES BAR ==================== */
.top-categories {
    background: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}
.top-categories-list {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 4px 0;
}
.top-categories-list::-webkit-scrollbar { display: none; }
.top-cat-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: #f5f7f8;
    border-radius: 50px;
    text-decoration: none;
    color: #333;
    font-size: 1.05rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.top-cat-link:hover {
    background: #e8f6f9;
    border-color: var(--hc24-primary, #5BB5C5);
    color: var(--hc24-primary, #5BB5C5);
}
.top-cat-link svg {
    flex-shrink: 0;
    opacity: 0.85;
    color: #5BB5C5;
}
.top-cat-link:hover svg {
    opacity: 1;
    color: #4a9fae;
}

/* ==================== Trust bar below hero ==================== */
section.trust-bar-top.home-trust-bar {
    background: linear-gradient(135deg, #1a8a9a 0%, #5BB5C5 50%, #3da3b5 100%) !important;
    border: none !important;
    padding: 0;
    position: relative;
    overflow: visible;
}
section.trust-bar-top::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
section.trust-bar-top .container {
    max-width: 100%;
    padding: 0 !important;
    overflow: visible;
}
section.trust-bar-top .trust-strip-items {
    display: flex;
    justify-content: center;
    gap: 0;
    flex-wrap: nowrap;
}
section.trust-bar-top .trust-item[aria-hidden="true"] {
    display: none;
}
section.trust-bar-top .trust-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 16px 20px;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    border-right: 1px solid rgba(255,255,255,0.15) !important;
    transition: background 0.2s;
}
section.trust-bar-top .trust-item:last-child {
    border-right: none !important;
}
section.trust-bar-top .trust-item:hover {
    background: rgba(255,255,255,0.1) !important;
    box-shadow: none;
}
section.trust-bar-top .trust-icon {
    stroke: #fff !important;
    color: #fff !important;
    opacity: 0.9;
}
section.trust-bar-top .trust-title {
    color: #fff !important;
    font-weight: 700;
    font-size: 0.95rem;
}
section.trust-bar-top .trust-sub {
    color: rgba(255,255,255,0.75) !important;
    font-size: 0.8rem;
}

/* ==================== Category cards inside brands section ==================== */
.home-categories-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.home-cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 16px 16px;
    background: #fff;
    border-radius: 14px;
    text-decoration: none;
    width: 140px;
    transition: all 0.25s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.home-cat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(91,181,197,0.18);
}
.home-cat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #eef8fa 0%, #ddf0f4 100%);
    color: #5BB5C5;
}
.home-cat-icon svg {
    width: 28px;
    height: 28px;
}
.home-cat-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #2a3a4a;
    text-align: center;
    line-height: 1.3;
}
.home-cat-card:hover .home-cat-name {
    color: #5BB5C5;
}

/* ==================== 3. FEATURED BRANDS (3 cards) ==================== */
.featured-brands {
    background: #f6f8fa;
    padding: 40px 0 48px;
    position: relative;
}
.featured-brands::before {
    display: none;
}
.featured-brands .container {
    max-width: 1400px;
    padding: 0 24px;
}
.featured-brands-title {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    color: #5BB5C5;
    margin-bottom: 8px;
    letter-spacing: 1px;
}
.featured-brands-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: #5BB5C5;
    margin: 12px auto 28px;
    border-radius: 2px;
}
.featured-brands-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.featured-brand-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid #eef2f4;
    position: relative;
}
.featured-brand-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #5BB5C5, #82d0dc);
    opacity: 0;
    transition: opacity 0.3s;
}
.featured-brand-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(91,181,197,0.18);
    border-color: rgba(91,181,197,0.3);
}
.featured-brand-card:hover::after {
    opacity: 1;
}
.fb-logo-area {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px 24px;
    background: linear-gradient(180deg, #f7fafc 0%, #eef4f7 100%);
    min-height: 120px;
}
.fb-logo {
    height: 80px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}
.fb-products-img {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}
.fb-products-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(180deg, rgba(238,244,247,0.8) 0%, transparent 100%);
    z-index: 1;
}
.fb-products-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.featured-brand-card:hover .fb-products-img img {
    transform: scale(1.06);
}
.fb-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 24px 24px;
}
.fb-tagline {
    font-size: 0.95rem;
    font-weight: 600;
    color: #3a4a5a;
    letter-spacing: 0.2px;
}
.fb-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 24px;
    border-radius: 50px;
    background: #e8f4f7;
    color: #3a8a9a;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    transition: all 0.3s;
}
.featured-brand-card:hover .fb-cta {
    background: #5BB5C5;
    color: #fff;
}

/* ==================== 4. PRODUCTS SECTION (shared carousel) ==================== */
.products-section {
    padding: 48px 20px;
    background: white;
    position: relative;
}
.products-section .container {
    max-width: 1320px;
    margin: 0 auto;
}
.products-section.bg-light {
    background: #f6f8fa;
}

/* ==================== 5. BRANDS CAROUSEL ==================== */
.brands-section {
    background: linear-gradient(180deg, #ffffff 0%, #f4f8f9 100%);
    padding: 10px 0;
    border-top: 1px solid #eef0f2;
    border-bottom: 1px solid #eef0f2;
    overflow: hidden;
}
.brands-marquee-track {
    position: relative;
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}
.brands-marquee-inner {
    display: flex;
    align-items: center;
    gap: 56px;
    width: max-content;
    animation: brands-scroll 30s linear infinite;
    -ms-overflow-style: none;
    padding: 10px 0;
    align-items: center;
}
.brands-marquee-inner:hover,
.brands-marquee-inner:active {
    animation-play-state: paused;
}
@keyframes brands-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.brand-logo-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 0;
    height: 56px;
    transition: opacity 0.3s;
}
.brand-logo-item img {
    height: 50px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.45;
    transition: all 0.35s;
}
.brand-logo-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.08);
}
/* Per-brand size tuning: square logos with whitespace need more height, tight logos need less */
.brand-cerave img { height: 72px !important; }
.brand-la-roche-posay img { height: 72px !important; }
.brand-vichy img { height: 72px !important; }
.brand-apivita img { height: 64px !important; }
.brand-nuxe img { height: 48px !important; }
.brand-korres img { height: 42px !important; }
.brand-clinea img { height: 40px !important; }
.brand-terranova img { height: 42px !important; }
.brand-mustela img { height: 36px !important; }
.brand-frezyderm img { height: 36px !important; }

.brand-logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: #aaa;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.3s;
}
.brand-logo-item:hover .brand-logo-text {
    color: #5BB5C5;
}
.brand-logo-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}
.brand-logo-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #888;
    letter-spacing: 0.5px;
}
.brand-logo-item:hover .brand-logo-text {
    color: var(--hc24-primary, #5BB5C5);
}

/* ==================== 6. PROMOTIONAL BANNERS (2 side by side) ==================== */
.promo-banners {
    background: transparent;
    padding: 2.5rem 0;
}
.promo-banners-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}
.promo-card {
    display: block;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    text-decoration: none;
    color: #fff;
}
.promo-card:hover {
    text-decoration: none;
    color: #fff;
}
.promo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.promo-card:hover img {
    transform: scale(1.05);
}
.promo-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.15) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    transition: background 0.3s;
}
.promo-card:hover .promo-card-overlay {
    background: linear-gradient(0deg, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.2) 55%, transparent 100%);
}
.promo-card-badge {
    display: inline-block;
    width: fit-content;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 0.75rem;
}
.promo-card-overlay h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 0.3rem;
    line-height: 1.2;
    letter-spacing: -0.01em;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.promo-card-overlay p {
    font-size: 0.9rem;
    margin: 0 0 0.75rem;
    opacity: 0.85;
    line-height: 1.4;
    max-width: 280px;
}
.promo-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    background: var(--hc24-primary, #5BB5C5);
    padding: 8px 20px;
    border-radius: 25px;
    width: fit-content;
    transition: background 0.2s, transform 0.2s;
}
.promo-card:hover .promo-card-cta {
    background: #4aa3b3;
    transform: translateX(4px);
}
/* Fallback when no banner image */
.promo-banner-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    text-align: center;
}
.promo-banner-fallback-inner {
    color: white;
}
.promo-banner-fallback-inner h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 8px;
}
.promo-banner-fallback-inner p {
    font-size: 0.95rem;
    opacity: 0.9;
    margin: 0 0 16px;
}
.promo-banner-cta {
    display: inline-block;
    background: white;
    color: var(--hc24-primary, #5BB5C5);
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
}
.promo-banner-cta:hover {
    background: #f0f0f0;
}

/* ==================== 8. BEST SELLERS ==================== */
/* Uses .products-section.bg-light */

/* ==================== 9. SUBCATEGORY CARDS (4 columns) ==================== */
.subcategory-cards {
    background: #fff;
    padding: 40px 0;
}
.subcategory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.subcat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eee;
    transition: all 0.3s;
}
.subcat-card:hover {
    border-color: var(--hc24-primary, #5BB5C5);
    box-shadow: 0 4px 16px rgba(91, 181, 197, 0.15);
    transform: translateY(-3px);
}
.subcat-card-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    background: #eee;
}
.subcat-card-body {
    padding: 16px;
    text-align: center;
    width: 100%;
}
.subcat-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 4px;
    color: #333;
}
.subcat-card-count {
    font-size: 0.8rem;
    color: #888;
}
/* Fallback when no category image */
.subcat-card-placeholder {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, #e8f6f9 0%, #d4eef3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.subcat-card-placeholder svg {
    color: var(--hc24-primary, #5BB5C5);
    opacity: 0.4;
}

/* ==================== 10. TRUST BAR (bottom of homepage) ==================== */
.home-trust-bar {
    background: #f5f7f8;
    padding: 32px 0;
    border-top: 1px solid #eee;
}
.home-trust-bar .trust-strip-items {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}
.home-trust-bar .trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}
.home-trust-bar .trust-icon {
    color: var(--hc24-primary, #5BB5C5);
    flex-shrink: 0;
}
.home-trust-bar .trust-text {
    display: flex;
    flex-direction: column;
}
.home-trust-bar .trust-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}
.home-trust-bar .trust-sub {
    font-size: 0.8rem;
    color: #888;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 992px) {
    .featured-brands-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    .fb-logo-area { padding: 20px 16px 16px; }
    .fb-logo { height: 44px; }
    .fb-products-img { height: 140px; }
    .promo-banners-grid {
        grid-template-columns: 1fr 1fr;
    }
    .subcategory-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .trust-bar-top .trust-strip-items {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .trust-bar-top .trust-strip-items::-webkit-scrollbar { display: none; }
    .trust-bar-top .trust-item {
        min-width: 200px;
        flex: 0 0 auto;
    }
}

@media (max-width: 768px) {
    .home-section {
        padding: 28px 0;
    }
    .home-section-title {
        font-size: 1.05rem;
        margin-bottom: 20px;
    }
    .featured-brands { padding: 32px 0 36px; }
    .featured-brands-title { font-size: 1.1rem; letter-spacing: 2px; }
    .featured-brands-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 400px;
        margin: 0 auto;
    }
    .fb-logo-area { padding: 14px 16px 12px; min-height: 60px; }
    .fb-logo { height: 32px; max-width: 140px; }
    .fb-products-img { height: 180px; }
    .fb-info { padding: 16px 20px 20px; }
    .promo-banners-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .promo-card {
        aspect-ratio: 16 / 10;
    }
    .promo-card-overlay {
        padding: 1.5rem;
    }
    .promo-card-overlay h3 {
        font-size: 1.2rem;
    }
    .subcategory-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .subcat-card-image,
    .subcat-card-placeholder {
        height: 120px;
    }
    /* Trust bar mobile marquee: styles in healthcare24.min.css */
}

@media (max-width: 480px) {
    .featured-brands { padding: 28px 0 32px; }
    .featured-brands-title { font-size: 1.3rem; margin-bottom: 20px; }
    .featured-brands-grid { max-width: 340px; gap: 16px; }
    .fb-products-img { height: 150px; }
    .subcat-card-body {
        padding: 12px;
    }
    .subcat-card-title {
        font-size: 0.9rem;
    }
}
