/* ============================================================
   HNNP – Review Section
   File: /wp-content/themes/electron-child/assets/css/review-section.css

   Layout: iframe inline + card trắng có shadow (bắt chước CellphoneS)
   ============================================================ */

/* ── Wrapper ── */
.hnnp-review-section {
    margin: 24px 0;
    width: 100%;
}

/* ============================================================
   TRACK — Desktop: grid 4 cột | Mobile: flex scroll ngang
   ============================================================ */

.hnnp-rs-track {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
}

/* ============================================================
   CARD — white wrapper với shadow + border radius 16px
   ============================================================ */

.hnnp-rs-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06),
                0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.18s, transform 0.18s;
    min-width: 0;
}

.hnnp-rs-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1),
                0 2px 6px rgba(0, 0, 0, 0.06);
}

/* ── Iframe video container (aspect 9:16) ── */
.hnnp-rs-video {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    background: #000;
    overflow: hidden;
}

.hnnp-rs-video iframe {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    display: block;
}

/* ── Product info ── */
.hnnp-rs-product {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 14px 12px;
    text-decoration: none !important;
    color: inherit !important;
    transition: background 0.15s;
}

.hnnp-rs-product:hover {
    background: #fafafa;
    text-decoration: none !important;
}

.hnnp-rs-product:hover .hnnp-rs-product-name {
    text-decoration: underline;
}

.hnnp-rs-product-img {
    width: 64px !important;
    height: 64px !important;
    min-width: 64px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    margin: 0 !important;
    padding: 0 !important;
}

.hnnp-rs-product-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hnnp-rs-product-name {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    color: #111827;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(14px * 1.35 * 2);
}

.hnnp-rs-prices {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.hnnp-rs-price {
    font-size: 14px;
    font-weight: 700;
    color: #e30019;
    line-height: 1.2;
}

.hnnp-rs-price-orig {
    font-size: 11px;
    font-weight: 400;
    color: #9ca3af;
    text-decoration: line-through;
    line-height: 1.2;
}

/* ============================================================
   TABLET — 2 cột
   ============================================================ */
@media (max-width: 1023px) {
    .hnnp-rs-track {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}

/* ============================================================
   MOBILE <768px — scroll ngang, peek card tiếp
   ============================================================ */
@media (max-width: 767px) {
    .hnnp-review-section {
        margin: 16px 0;
    }

    /* Override grid → flex scroll ngang tự do (giống CellphoneS) */
    .hnnp-rs-track {
        display: flex !important;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        gap: 12px;
        padding: 4px 16px 12px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .hnnp-rs-track::-webkit-scrollbar {
        display: none;
    }

    .hnnp-rs-card {
        flex: 0 0 calc(75vw - 12px);   /* ~75% viewport, peek card kế ~15% */
        min-width: 220px;
        max-width: 290px;
    }

    .hnnp-rs-product {
        padding: 12px 10px;
        gap: 6px;
    }

    .hnnp-rs-product-img {
        width: 54px !important;
        height: 54px !important;
        min-width: 54px;
    }

    .hnnp-rs-product-name {
        font-size: 13px !important;
        min-height: calc(13px * 1.35 * 2);
    }

    .hnnp-rs-price {
        font-size: 13px;
    }
}