/**
 * Healthcare24 CMS Homepage Styles
 * Base styling for the GrapesJS-editable homepage CMS content.
 * These styles support the <cataloglist> tag sections and all homepage sections
 * rendered via the Aimeos CMS page component.
 */

/* Remove container-fluid constraints on homepage CMS wrapper */
body.page-catalog-home .aimeos.cms-page.container-fluid {
    max-width: 100%;
    padding: 0;
}

/* Cataloglist placeholders - only visible in GrapesJS editor (tag is replaced on frontend) */
cataloglist, .cataloglist {
    display: none; /* Hidden on frontend - only visible in GrapesJS editor via component styles */
}

/* ===== Layout ===== */
.hp-container { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.hp-title { font-family: 'Manrope', sans-serif; font-size: 1.5rem; font-weight: 800; color: #1a2332; margin: 0; }

/* ===== Hero ===== */
.hp-hero { background: #f7f9fb; padding: 16px 0; }
.hp-hero-grid { max-width: 1280px; margin: 0 auto; padding: 0 16px; display: grid; grid-template-columns: 1fr 320px; gap: 12px; }
.hp-hero-main { min-width: 0; }
.hp-carousel { position: relative; border-radius: 16px; overflow: hidden; background: #eee; }
.hp-carousel-slides { position: relative; aspect-ratio: 1380/780; }
.hp-carousel-slide { position: absolute; inset: 0; display: block; opacity: 0; transition: opacity .45s; }
.hp-carousel-slide--active { opacity: 1; z-index: 1; }
.hp-carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hp-carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 40px; height: 40px; border-radius: 50%; border: none; background: rgba(255,255,255,.92); box-shadow: 0 2px 8px rgba(0,0,0,.12); cursor: pointer; font-size: 1.5rem; color: #333; line-height: 1; }
.hp-carousel-arrow--prev { left: 12px; }
.hp-carousel-arrow--next { right: 12px; }
.hp-carousel-dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; gap: 6px; }
.hp-carousel-dot { width: 28px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.5); cursor: pointer; transition: all .3s; display: inline-block; }
.hp-carousel-dot--active { background: #fff; width: 40px; }
.hp-hero-side { display: flex; flex-direction: column; gap: 12px; }
.hp-side-banner { flex: 1; border-radius: 16px; overflow: hidden; display: block; }
.hp-side-banner img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.hp-side-banner:hover img { transform: scale(1.03); }

/* ===== Top Categories ===== */
.hp-topcats { background: #fff; border-bottom: 1px solid #e5eaef; }
.hp-topcats .hp-container { display: flex; overflow-x: auto; gap: 0; scrollbar-width: none; }
.hp-topcats .hp-container::-webkit-scrollbar { display: none; }
.hp-topcat-link { flex-shrink: 0; padding: 14px 24px; text-decoration: none; white-space: nowrap; font-family: 'Manrope', sans-serif; font-size: .88rem; font-weight: 600; color: #5a6776; border-bottom: 2px solid transparent; transition: all .2s; }
.hp-topcat-link:hover { color: #5BB5C5; border-bottom-color: #5BB5C5; }

/* ===== Featured Brands ===== */
.hp-fbrands { padding: 32px 0; background: #fff; }
.hp-fbrands-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.hp-fbrand-card { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 24px; border-radius: 16px; border: 2px solid #e5eaef; text-decoration: none; transition: all .25s; text-align: center; min-height: 120px; }
.hp-fbrand-card:hover { border-color: #5BB5C5; box-shadow: 0 4px 16px rgba(26,35,50,.08); transform: translateY(-2px); }
.hp-fbrand-name { font-family: 'Manrope', sans-serif; font-size: 1.35rem; font-weight: 800; color: #1a2332; }
.hp-fbrand-cta { margin-top: 8px; font-family: 'Manrope', sans-serif; font-size: .8rem; font-weight: 600; color: #5BB5C5; }

/* ===== Products Section ===== */
.hp-products-section { padding: 40px 0; background: #fff; }
.hp-products-section--alt { background: #f7f9fb; }
.hp-products-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.hp-viewall { font-family: 'Manrope', sans-serif; font-size: .85rem; font-weight: 600; color: #5BB5C5; text-decoration: none; }

/* Aimeos catalog-list inside CMS homepage product sections */
.hp-products-section .catalog-list.swiffy-slider { overflow: visible; }
.hp-products-section .catalog-list .slider-container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    grid-template-columns: none !important;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 0;
}
.hp-products-section .catalog-list .slider-container::-webkit-scrollbar { display: none; }

/* Override Bootstrap .row on product cards */
.hp-products-section .catalog-list .product.row {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    margin: 0 !important;
    scroll-snap-align: start;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    overflow: hidden;
    min-width: calc(20% - 13px);
    max-width: calc(20% - 13px);
    flex-shrink: 0;
    transition: box-shadow .2s, transform .2s;
}
.hp-products-section .catalog-list .product.row:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
    transform: translateY(-2px);
}
/* Override Bootstrap .col-12 inside product cards */
.hp-products-section .catalog-list .product.row > .list-column.col-12 {
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
}

/* Product image */
.hp-products-section .catalog-list .product .media-list {
    display: block !important;
    width: 100%;
    aspect-ratio: 1 !important;
    overflow: hidden;
    background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
    position: relative;
}
.hp-products-section .catalog-list .product .media-list .media-item {
    width: 100%;
    height: 100%;
}
.hp-products-section .catalog-list .product .media-list img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    padding: 12px;
}
/* Hide noscript duplicate images */
.hp-products-section .catalog-list .product .media-list noscript { display: none; }

/* Badges */
.hp-products-section .catalog-list .product .badges {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    display: flex;
    gap: 4px;
}
.hp-products-section .catalog-list .product .badge-item {
    padding: 2px 8px;
    font-size: .65rem;
    font-weight: 700;
    border-radius: 4px;
    color: #fff;
}
.hp-products-section .catalog-list .product .badge-item.sale { background: #e88b2e; }
.hp-products-section .catalog-list .product .badge-item.new { background: #4CAF50; }

/* Product info & rating - hide */
.hp-products-section .catalog-list .product .product-info { display: none; }

/* Product name */
.hp-products-section .catalog-list .product .text-list {
    padding: 8px 12px 0;
}
.hp-products-section .catalog-list .product .text-list h2.name {
    font-family: 'Manrope', sans-serif;
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    color: #1a2332;
    text-transform: none !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Price */
.hp-products-section .catalog-list .product .offer { padding: 0; }
.hp-products-section .catalog-list .product .price-list {
    padding: 4px 12px 12px;
    text-align: left !important;
}
.hp-products-section .catalog-list .product .price-list .value {
    color: #e88b2e;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: .95rem;
    text-align: left !important;
    display: block;
}
/* Hide tax rate, quantity text */
.hp-products-section .catalog-list .product .price-list .taxrate,
.hp-products-section .catalog-list .product .price-list .quantity { display: none; }
.hp-products-section .catalog-list .product .price-list .articleitem { text-align: left !important; }

/* Hide stock text */
.hp-products-section .catalog-list .product .stock-list { display: none; }
/* Fix price alignment - override section flex space-between */
.hp-products-section .catalog-list .product .offer .section {
    display: block !important;
}

/* Navigation arrows */
.hp-products-section .catalog-list .slider-nav { display: flex; }
.hp-products-section .catalog-list .slider-nav button {
    width: 36px; height: 36px; border-radius: 50%;
    background: #fff; border: 1px solid #e5eaef;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
    cursor: pointer; font-size: 1.1rem; color: #333;
}

@media (max-width: 768px) {
    .hp-products-section .catalog-list .product.row {
        min-width: calc(50% - 8px);
        max-width: calc(50% - 8px);
    }
}
@media (max-width: 480px) {
    .hp-products-section .catalog-list .product.row {
        min-width: 100%;
        max-width: 100%;
    }
}

/* ===== Brands Marquee ===== */
.hp-brands-section { padding: 32px 0; background: #fff; overflow: hidden; }
.hp-brands-marquee { overflow: hidden; mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent); -webkit-mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent); }
.hp-brands-track { display: flex; gap: 12px; animation: hpMarquee 40s linear infinite; width: max-content; }
.hp-brands-track:hover { animation-play-state: paused; }
@keyframes hpMarquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.hp-brand-pill { flex-shrink: 0; padding: 10px 28px; font-family: 'Manrope', sans-serif; font-size: .9rem; font-weight: 700; color: #5a6776; text-decoration: none; border: 1px solid #e5eaef; border-radius: 100px; white-space: nowrap; transition: all .2s; }
.hp-brand-pill:hover { color: #5BB5C5; border-color: #5BB5C5; background: #f0fafb; }

/* ===== Duo Banners ===== */
.hp-duo-banners { padding: 8px 0; background: #fff; }
.hp-duo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hp-duo-item { border-radius: 16px; overflow: hidden; display: block; aspect-ratio: 16/9; }
.hp-duo-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.hp-duo-item:hover img { transform: scale(1.03); }

/* ===== Newsletter ===== */
.hp-newsletter { padding: 40px 0; background: #5BB5C5; }
.hp-newsletter-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.hp-newsletter-text h3 { font-family: 'Manrope', sans-serif; font-size: 1.3rem; font-weight: 800; color: #fff; margin: 0 0 6px; }
.hp-newsletter-text p { font-family: 'Manrope', sans-serif; font-size: .9rem; color: rgba(255,255,255,.85); margin: 0; }
.hp-newsletter-form { display: flex; flex-shrink: 0; }
.hp-newsletter-form input { width: 300px; padding: 12px 16px; border: 2px solid rgba(255,255,255,.3); border-right: none; border-radius: 8px 0 0 8px; background: rgba(255,255,255,.15); color: #fff; font-family: 'Manrope', sans-serif; font-size: .9rem; outline: none; }
.hp-newsletter-form input::placeholder { color: rgba(255,255,255,.6); }
.hp-newsletter-form button { padding: 12px 24px; background: #fff; color: #5BB5C5; border: none; border-radius: 0 8px 8px 0; font-family: 'Manrope', sans-serif; font-size: .85rem; font-weight: 700; cursor: pointer; }

/* ===== Sub Categories ===== */
.hp-subcats { padding: 32px 0; background: #fff; }
.hp-subcats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.hp-subcat-card { display: flex; align-items: center; justify-content: space-between; padding: 24px 20px; border-radius: 12px; background: #f7f9fb; border: 1px solid #e5eaef; text-decoration: none; font-family: 'Manrope', sans-serif; font-size: .9rem; font-weight: 700; color: #1a2332; transition: all .2s; }
.hp-subcat-card:hover { border-color: #5BB5C5; box-shadow: 0 4px 16px rgba(26,35,50,.08); }
.hp-subcat-arrow { color: #5BB5C5; font-size: 1.2rem; }

/* ===== Trust Strip ===== */
.hp-trust { background: #f7f9fb; border-top: 1px solid #e5eaef; }
.hp-trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 24px 16px; }
.hp-trust-item { display: flex; align-items: center; gap: 12px; }
.hp-trust-icon { width: 44px; height: 44px; border-radius: 10px; background: #e8f6f8; display: flex; align-items: center; justify-content: center; color: #5BB5C5; flex-shrink: 0; }
.hp-trust-item strong { font-family: 'Manrope', sans-serif; font-size: .82rem; font-weight: 700; color: #1a2332; }
.hp-trust-item small { font-family: 'Manrope', sans-serif; font-size: .75rem; color: #8f9baa; }

/* ===== Baby Care Hero ===== */
.hp-baby { position: relative; overflow: hidden; padding: 0 0 48px; background: #f0f9fa; background-size: cover; background-position: right center; background-repeat: no-repeat; }
.hp-baby-overlay { position: absolute; inset: 0; z-index: 1; background: linear-gradient(135deg, rgba(240,249,250,.97) 0%, rgba(240,249,250,.92) 40%, rgba(91,181,197,.12) 100%); }
.hp-baby-inner { position: relative; z-index: 2; padding: 56px 0 40px; }
.hp-baby-text { max-width: 560px; }
.hp-baby-badge { display: inline-block; padding: 6px 18px; background: #5BB5C5; color: #fff; font-family: 'Manrope', sans-serif; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; border-radius: 100px; margin-bottom: 16px; }
.hp-baby-heading { font-family: 'Manrope', sans-serif; font-size: 2.2rem; font-weight: 800; color: #1a2332; line-height: 1.2; margin: 0 0 12px; }
.hp-baby-heading br { display: block; }
.hp-baby-sub { font-family: 'Manrope', sans-serif; font-size: 1rem; color: #5a6776; margin: 0 0 24px; line-height: 1.5; }
.hp-baby-cta { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; background: #5BB5C5; color: #fff; text-decoration: none; font-family: 'Manrope', sans-serif; font-size: .88rem; font-weight: 700; border-radius: 10px; transition: all .25s; box-shadow: 0 4px 14px rgba(91,181,197,.25); }
.hp-baby-cta:hover { background: #4aa3b3; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(91,181,197,.35); }
.hp-baby-products { position: relative; z-index: 2; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hp-hero-grid { grid-template-columns: 1fr; }
    .hp-hero-side { flex-direction: row; }
    .hp-side-banner { max-height: 200px; }
    .hp-carousel-slides { aspect-ratio: 16/9; }
    .hp-fbrands-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .hp-fbrand-card { padding: 20px 12px; min-height: 80px; }
    .hp-fbrand-name { font-size: 1rem; }
    .hp-duo-grid { grid-template-columns: 1fr; }
    .hp-newsletter-inner { flex-direction: column; text-align: center; gap: 20px; }
    .hp-newsletter-form { width: 100%; }
    .hp-newsletter-form input { width: 100%; flex: 1; }
    .hp-subcats-grid { grid-template-columns: repeat(2, 1fr); }
    .hp-trust-grid { grid-template-columns: repeat(2, 1fr); }
    .hp-baby-bg { width: 100%; }
    .hp-baby-inner { padding: 40px 0 32px; }
    .hp-baby-heading { font-size: 1.6rem; }
}

@media (max-width: 480px) {
    .hp-hero { padding: 8px 0; }
    .hp-hero-side { gap: 8px; }
    .hp-side-banner { max-height: 160px; }
    .hp-fbrands-grid { gap: 8px; }
    .hp-fbrand-card { padding: 16px 8px; min-height: 60px; }
    .hp-fbrand-name { font-size: .85rem; }
    .hp-fbrand-cta { font-size: .7rem; }
    .hp-subcats-grid { gap: 8px; }
}
