/**
 * Home content sections — aligned with storefront template (Top Selling / New Products)
 */

/* ─── Shared section header extras ─── */
.sf-content-section-head {
    position: relative;
}

.sf-section-kicker {
    font-family: 'Plus Jakarta Sans', Montserrat, sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--sf-accent, #d10024);
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sf-section-kicker::before {
    content: '';
    width: 20px;
    height: 1px;
    background: var(--sf-accent, #d10024);
}

.sf-section-subtitle {
    font-family: 'Plus Jakarta Sans', Montserrat, sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #94a3b8;
    margin: 8px 0 0;
    line-height: 1.55;
    max-width: 520px;
}

body.storefront-home .sf-content-section-head .title {
    margin-bottom: 0;
}

body.storefront-home .sf-content-section-head:has(.sf-section-subtitle) .title {
    padding-bottom: 0;
}

body.storefront-home .sf-content-section-head:has(.sf-section-subtitle) .title-first::after {
    display: none;
}

body.storefront-home .sf-content-section-head:has(.sf-section-subtitle) .title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: auto;
    top: calc(100% + 4px);
    width: 48px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--sf-accent, #d10024), #ff4d5e);
}

body.storefront-home .sf-home-content {
    background: #fff;
}

body.storefront-home .sf-home-content--blog {
    background: var(--sf-bg-page, #f4f6f9);
}

body.storefront-home .sf-home-content--videos {
    background: #fff;
}

/* ─── Must Watch Videos (horizontal slick slider) ─── */
.sf-home-videos-widget {
    position: relative;
    margin-top: 8px;
    padding: 0 12px;
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

/* Before slick loads: 2-column grid fallback */
.sf-home-videos-slider:not(.slick-initialized) {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.sf-home-videos-slider:not(.slick-initialized) .sf-video-slide {
    min-width: 0;
}

.sf-home-videos-slider.slick-initialized {
    display: block;
}

.sf-home-videos-slider .slick-list {
    overflow: hidden;
    margin: 0 -16px;
    padding: 6px 0 16px;
}

.sf-home-videos-slider .slick-track {
    display: flex !important;
    align-items: stretch;
}

.sf-home-videos-slider .sf-video-slide.slick-slide {
    margin: 0 16px;
    height: auto;
    float: none;
    box-sizing: border-box;
}

.sf-home-videos-slider .slick-dots {
    position: static;
    display: flex !important;
    justify-content: center;
    gap: 8px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    bottom: auto;
}

.sf-home-videos-slider .slick-dots li {
    margin: 0;
    width: auto;
    height: auto;
}

.sf-home-videos-slider .slick-dots li button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #cbd5e1;
    font-size: 0;
}

.sf-home-videos-slider .slick-dots li button:before {
    display: none;
}

.sf-home-videos-slider .slick-dots li.slick-active button {
    width: 24px;
    border-radius: 999px;
    background: #d10024;
}

body.storefront-home #home-videos .products-slick-nav {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 36px;
    left: 0;
    z-index: 14;
    pointer-events: none;
}

body.storefront-home #home-videos .products-slick-nav .slick-prev,
body.storefront-home #home-videos .products-slick-nav .slick-next {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    margin: 0;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #fff;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
    pointer-events: auto;
}

body.storefront-home #home-videos .products-slick-nav .slick-prev {
    left: -10px;
}

body.storefront-home #home-videos .products-slick-nav .slick-next {
    right: -10px;
}

body.storefront-home #home-videos .products-slick-nav .slick-prev:before,
body.storefront-home #home-videos .products-slick-nav .slick-next:before {
    color: #334155;
    opacity: 1;
}

.sf-video-slide {
    outline: none;
}

.sf-video-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sf-video-card__hit {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.sf-video-card__hit:focus-visible .sf-video-card__thumb {
    outline: 2px solid #d10024;
    outline-offset: 3px;
}

.sf-video-card__thumb {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    max-height: 360px;
    border-radius: 18px;
    overflow: hidden;
    background: #1a1d24;
    border: 1px solid var(--sf-border, #e2e8f0);
    box-shadow: var(--sf-shadow-sm, 0 2px 12px rgba(15, 23, 42, 0.08));
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.sf-video-card__hit:hover .sf-video-card__thumb {
    transform: translateY(-4px);
    box-shadow: var(--sf-shadow-hover, 0 12px 28px rgba(15, 23, 42, 0.12));
}

.sf-video-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    vertical-align: top;
}

.sf-video-card__thumb.is-placeholder {
    background: linear-gradient(145deg, #2a2f3a 0%, #1a1d24 100%);
}

.sf-video-card__thumb.is-placeholder img {
    display: none;
}

.sf-video-card__play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #fff;
    color: #d10024;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    padding-left: 3px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
    pointer-events: none;
}

.sf-video-card__title {
    margin: 14px 4px 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--sf-text, #1e293b);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.sf-video-card__hit:hover + .sf-video-card__title {
    color: #d10024;
}

/* ─── Blog grid (template cards) ─── */
.sf-home-blog-grid {
    margin-top: 4px;
}

.sf-home-blog-grid > [class*='col-'] {
    margin-bottom: 28px;
}

.sf-home-blog-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: var(--sf-radius, 12px);
    border: 1px solid var(--sf-border, #e2e8f0);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--sf-shadow-sm, 0 2px 12px rgba(15, 23, 42, 0.06));
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.sf-home-blog-card:hover {
    transform: translateY(-5px);
    border-color: rgba(209, 0, 36, 0.22);
    box-shadow: var(--sf-shadow-hover, 0 12px 28px rgba(15, 23, 42, 0.1));
    text-decoration: none;
    color: inherit;
}

.sf-home-blog-card__hero {
    position: relative;
    min-height: 200px;
    padding: 24px 20px 0;
    background: linear-gradient(135deg, #d10024 0%, #a8001c 48%, #7a0014 100%);
    overflow: hidden;
}

.sf-home-blog-card__hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.12), transparent 45%),
        radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.08), transparent 40%);
    pointer-events: none;
}

.sf-home-blog-card__stat {
    position: relative;
    z-index: 2;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2.5rem, 5vw, 3.25rem);
    font-weight: 700;
    line-height: 1;
    color: rgba(255, 255, 255, 0.98);
    letter-spacing: -0.03em;
}

.sf-home-blog-card__thumb {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 52%;
    height: 88%;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.sf-home-blog-card__thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: bottom right;
    filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.28));
    transition: transform 0.4s ease;
}

.sf-home-blog-card:hover .sf-home-blog-card__thumb img {
    transform: scale(1.05) translateY(-4px);
}

.sf-home-blog-card__body {
    flex: 1;
    padding: 20px 22px 24px;
    text-align: left;
}

.sf-home-blog-card__body .product-category {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8d99ae;
    margin-bottom: 6px;
}

.sf-home-blog-card__body .product-name {
    font-size: 15px;
    font-weight: 700;
    text-transform: none;
    line-height: 1.35;
    margin: 0 0 8px;
    color: var(--sf-text, #1e293b);
}

.sf-home-blog-card:hover .sf-home-blog-card__body .product-name {
    color: #d10024;
}

.sf-home-blog-card__excerpt {
    font-size: 13px;
    line-height: 1.6;
    color: #64748b;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── FAQ (template accordion) ─── */
.sf-home-faq-panel {
    max-width: 900px;
    margin: 8px auto 0;
}

.sf-home-faq-list {
    background: #fff;
    border-radius: var(--sf-radius, 12px);
    border: 1px solid var(--sf-border, #e2e8f0);
    box-shadow: var(--sf-shadow-sm, 0 2px 12px rgba(15, 23, 42, 0.06));
    overflow: hidden;
}

.sf-home-faq-item {
    border-bottom: 1px solid var(--sf-border, #e2e8f0);
}

.sf-home-faq-item:last-child {
    border-bottom: none;
}

.sf-home-faq-item[open] {
    background: linear-gradient(180deg, rgba(209, 0, 36, 0.04) 0%, transparent 100%);
}

.sf-home-faq-item summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    cursor: pointer;
}

.sf-home-faq-item summary::-webkit-details-marker {
    display: none;
}

.sf-home-faq-item__mark {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #d10024;
    box-shadow: 0 4px 12px rgba(209, 0, 36, 0.28);
    position: relative;
}

.sf-home-faq-item__mark::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-40%, -50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 0 5px 8px;
    border-color: transparent transparent transparent #fff;
}

.sf-home-faq-item__q {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: var(--sf-text, #1e293b);
    line-height: 1.4;
}

.sf-home-faq-item[open] .sf-home-faq-item__q {
    color: #d10024;
}

.sf-home-faq-item__toggle {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--sf-border, #e2e8f0);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #64748b;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.sf-home-faq-item[open] .sf-home-faq-item__toggle {
    transform: rotate(45deg);
    background: #d10024;
    border-color: #d10024;
    color: #fff;
}

.sf-home-faq-item__answer {
    padding: 0 24px 22px 72px;
    font-size: 14px;
    line-height: 1.7;
    color: #64748b;
}

/* ─── Video modal (cinema) ─── */
.sf-video-modal .modal-backdrop.in {
    opacity: 0.82;
}

.sf-video-modal__dialog {
    max-width: 960px;
    width: calc(100% - 32px);
    margin: 1.5rem auto;
}

.sf-video-modal__content {
    position: relative;
    border: none;
    border-radius: 16px;
    overflow: hidden;
    background: #0c0e12;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.45);
}

.sf-video-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
}

.sf-video-modal__close:hover {
    background: #d10024;
    transform: scale(1.05);
}

.sf-video-modal__player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.sf-video-modal__player iframe,
.sf-video-modal__player video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.sf-video-modal__footer {
    padding: 18px 24px 22px;
    background: linear-gradient(180deg, #12151c 0%, #0c0e12 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sf-video-modal__title {
    margin: 0;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

/* Blog listing page */
body.storefront-blogs .sf-home-blog-grid--page {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 8px;
}

@media (max-width: 1199px) {
    body.storefront-blogs .sf-home-blog-grid--page {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .sf-home-faq-item summary {
        padding: 16px 18px;
        gap: 12px;
    }

    .sf-home-faq-item__answer {
        padding: 0 18px 18px 18px;
    }

    .sf-home-faq-item__mark {
        display: none;
    }

    body.storefront-blogs .sf-home-blog-grid--page {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .sf-home-videos-widget {
        max-width: none;
        padding: 0 4px;
    }

    .sf-home-videos-slider:not(.slick-initialized) {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .sf-video-card__thumb {
        max-height: 340px;
    }
}

@media (max-width: 575px) {
    .sf-home-videos-slider:not(.slick-initialized) {
        gap: 20px;
    }

    .sf-video-card__thumb {
        max-height: 320px;
        border-radius: 14px;
    }

    body.storefront-home #home-videos .products-slick-nav .slick-prev,
    body.storefront-home #home-videos .products-slick-nav .slick-next {
        width: 36px;
        height: 36px;
    }
}
