.km-media-panel {
    padding: 16px 12px 18px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.km-media-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 4px 16px;
}

.km-media-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    color: #1D1D1B;
}

.km-media-all {
    display: inline-block;
    background: #F47F2F;
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
    border-radius: 999px;
    padding: 7px 12px;
}

.km-media-all:hover,
.km-media-all:focus {
    color: #fff;
    background: #e06e1f;
    text-decoration: none;
}

.km-shorts-section {
    overflow: visible;
    max-width: 100%;
}

.km-shorts-track {
    position: relative;
    margin: 0;
    padding: 0;
    max-width: 100%;
}

.km-shorts-track .js-shorts-slick,
.km-shorts-track .slick-list {
    overflow: hidden;
    max-width: 100%;
}

.km-shorts-track .slick-slide,
.km-shorts-track .slick-slide > div {
    min-width: 0;
    height: auto;
}

.km-shorts-section .slick-dots {
    display: none !important;
}

.km-shorts-arrow {
    position: absolute;
    top: 38%;
    transform: translateY(-50%);
    z-index: 6;
    width: 44px;
    height: 44px;
    border: 2px solid #F47F2F;
    border-radius: 50%;
    background: #1D1D1B;
    color: #fff;
    box-shadow: 0 8px 22px rgba(29, 29, 27, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.km-shorts-arrow.prev { left: 6px; }
.km-shorts-arrow.next { right: 6px; }

.km-shorts-arrow:hover,
.km-shorts-arrow:focus {
    background: linear-gradient(135deg, #F2A857, #F47F2F);
    color: #fff;
    border-color: #F47F2F;
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 10px 24px rgba(244, 127, 47, 0.45);
}

.km-shorts-track .slick-prev,
.km-shorts-track .slick-next {
    display: none !important;
}

.km-short-slide {
    min-width: 0;
    height: auto;
    padding: 0;
}

.km-shorts-track .km-short-card {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 12px;
    box-sizing: border-box;
}

.km-shorts-track .km-short-thumb {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: 9 / 16;
}

.km-short-card {
    display: block;
    color: inherit;
    text-decoration: none;
    padding: 0 4px;
    max-width: 222px;
    margin: 0 auto;
    box-sizing: border-box;
}

.km-short-card:hover,
.km-short-card:focus {
    color: inherit;
    text-decoration: none;
}

.km-short-thumb {
    position: relative;
    width: 100%;
    max-width: 214px;
    aspect-ratio: 9 / 16;
    height: 380px;
    max-height: 380px;
    min-height: 0;
    margin: 0 auto;
    border-radius: 18px;
    overflow: hidden;
    background: #1D1D1B center/cover no-repeat;
    box-shadow: 0 10px 24px rgba(29, 29, 27, 0.16);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.km-short-card:hover .km-short-thumb {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(244, 127, 47, 0.22);
}

.km-short-thumb::after {
    content: "";
    position: absolute;
    inset: 45% 0 0;
    background: linear-gradient(180deg, rgba(29, 29, 27, 0) 0%, rgba(29, 29, 27, 0.72) 55%, rgba(29, 29, 27, 0.94) 100%);
    z-index: 2;
    pointer-events: none;
}

.km-short-badge {
    position: absolute;
    top: 12px;
    right: 10px;
    z-index: 3;
    padding: 4px 9px;
    border-radius: 999px;
    background: #F47F2F;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 10px rgba(244, 127, 47, 0.4);
}

.km-short-thumb .km-short-meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    padding: 12px 12px 14px;
}

.km-short-thumb .km-short-product {
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
    max-height: 1.25em;
    -webkit-line-clamp: 1;
}

.km-short-shop {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.km-short-thumb .km-short-price {
    margin-top: 3px;
    color: #F2A857;
    font-size: 15px;
    font-weight: 800;
}

.km-short-thumb .km-short-play {
    left: auto;
    top: auto;
    right: 12px;
    bottom: 14px;
    width: 30px;
    height: 30px;
    margin: 0;
    font-size: 11px;
    z-index: 4;
}

.km-short-thumb-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.km-short-shop-logo {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #F47F2F;
    background: #fff;
    z-index: 3;
    display: block;
}

.km-short-share-chip {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    font-size: 12px;
}

.km-short-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 42px;
    height: 42px;
    margin: -21px 0 0 -21px;
    border: 0;
    padding: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #F2A857, #F47F2F);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(244, 127, 47, 0.4);
    z-index: 3;
    opacity: 0.96;
    pointer-events: none;
}

.km-short-play i {
    margin-left: 3px;
}

.km-short-meta {
    padding: 10px 2px 2px;
}

.km-short-product {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: #1D1D1B;
    max-height: 2.7em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.km-short-price {
    margin-top: 4px;
    color: #F47F2F;
    font-weight: 700;
    font-size: 15px;
}

.km-shorts-empty {
    padding: 32px 16px;
    text-align: center;
    color: #888;
}

.km-shorts-viewer {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(8, 8, 10, 0.94);
    display: none;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: none;
}

.km-shorts-viewer.is-open {
    display: flex;
}

html.km-shorts-locked,
html.km-shorts-locked body,
html.km-shorts-locked .body-wrap {
    overflow: hidden !important;
    height: 100% !important;
    overscroll-behavior: none;
}

html.km-shorts-locked #navbar1,
html.km-shorts-locked .footer,
html.km-shorts-locked .km-app-tabbar,
html.km-shorts-locked .footer-top-bar {
    display: none !important;
}

.km-shorts-stage {
    position: relative;
    width: min(420px, 100vw);
    height: min(86vh, 760px);
    max-height: 100vh;
}

.km-shorts-video-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
}

.km-shorts-video-wrap video,
.km-shorts-video-wrap iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
    border: 0;
}

.km-shorts-video-wrap iframe[hidden],
.km-shorts-video-wrap video[hidden] {
    display: none !important;
}

.km-shorts-external {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
}

.km-shorts-external[hidden] {
    display: none !important;
}

.km-shorts-external-poster {
    position: absolute;
    inset: 0;
    background: #111 center/cover no-repeat;
    filter: brightness(0.55);
}

.km-shorts-external-play {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.km-shorts-external-play:hover,
.km-shorts-external-play:focus {
    color: #fff;
    text-decoration: none;
}

.km-shorts-external-btn {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: #1877f2;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.km-shorts-external-btn i {
    margin-left: 4px;
}

.km-shorts-caption {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 92px;
    z-index: 3;
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    max-height: 4.2em;
    overflow: hidden;
}

.km-shorts-share {
    position: absolute;
    top: 58px;
    right: 12px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(0, 0, 0, 0.72);
    border-radius: 10px;
    padding: 8px;
}

.km-shorts-share[hidden] {
    display: none !important;
}

.km-shorts-share a,
.km-shorts-share button {
    color: #fff;
    background: transparent;
    border: 0;
    text-align: left;
    font-size: 13px;
    padding: 4px 6px;
}

.km-shorts-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 3;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent);
}

.km-shorts-vendor {
    display: flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
}

.km-shorts-vendor img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
    border: 2px solid #fff;
}

.km-shorts-vendor span {
    font-weight: 600;
    color: #fff;
}

.km-shorts-controls button {
    border: 0;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-left: 8px;
}

.km-shorts-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #333;
}

.km-shorts-nav.prev { left: -56px; }
.km-shorts-nav.next { right: -56px; }

.km-shorts-cta {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 14px;
    z-index: 3;
    background: #fff;
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.km-shorts-cta h4 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}

.km-shorts-cta .price {
    margin: 0;
    color: #F47F2F;
    font-weight: 700;
}

.km-shorts-cta .btn-shop-now {
    background: #F47F2F;
    border-color: #F47F2F;
    color: #fff;
    border-radius: 20px;
    padding: 8px 16px;
    white-space: nowrap;
    font-weight: 600;
}

.km-shorts-cta .btn-shop-now.disabled,
.km-shorts-cta .btn-shop-now[disabled] {
    background: #bbb;
    border-color: #bbb;
}

.km-product-short-player {
    position: relative;
    width: min(360px, 100%);
    aspect-ratio: 9 / 16;
    border-radius: 18px;
    overflow: hidden;
    background: #111;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.km-product-short-player video,
.km-product-short-player iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
    border: 0;
}

.km-product-short-open {
    position: absolute;
    right: 12px;
    bottom: 12px;
    background: #F47F2F;
    color: #fff;
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
}

.km-product-short-open:hover {
    color: #fff;
}

.km-product-short-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
}

.km-product-short-thumb {
    width: 56px;
    height: 96px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    background: #111;
}

.km-product-short-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.km-product-short-thumb.is-active {
    border-color: #F47F2F;
}

.km-product-videos-section {
    overflow: hidden;
}

.km-product-videos-wrap {
    width: 100%;
    max-width: 100%;
}

.km-product-videos-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px 18px;
}

.km-product-videos-grid .km-product-video-card:nth-child(n+7) {
    display: none;
}

.km-product-video-card {
    min-width: 0;
    max-width: 100%;
}

.km-product-video-thumb {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    background: #111 center/cover no-repeat;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
}

.km-product-video-thumb iframe,
.km-product-video-thumb video.km-product-video-player {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    border: 0;
    object-fit: cover;
    background: #000;
}

.km-product-video-thumb video.km-product-video-player {
    opacity: 0;
    pointer-events: none;
}

.km-product-video-card.is-playing video.km-product-video-player {
    opacity: 1;
    pointer-events: auto;
}

.km-pv-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    margin: -27px 0 0 -27px;
    border: 0;
    border-radius: 50%;
    background: rgba(244, 127, 47, 0.94);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
    z-index: 2;
    cursor: pointer;
}

.km-pv-play i {
    margin-left: 3px;
}

.km-product-video-card.is-playing .km-pv-play {
    display: none;
}

.km-pv-meta {
    padding: 10px 2px 0;
}

.km-pv-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    max-height: 2.7em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #1d1d1b;
}

.km-pv-price {
    margin-top: 4px;
    color: #F47F2F;
    font-weight: 700;
    font-size: 14px;
}

.km-product-video-buy {
    display: none;
    margin-top: 8px;
}

.km-product-video-card.is-playing .km-product-video-buy {
    display: block;
}

.km-product-video-buy .btn-shop-now {
    display: inline-block;
    background: #F47F2F;
    border: 1px solid #F47F2F;
    color: #fff;
    border-radius: 20px;
    padding: 8px 16px;
    white-space: nowrap;
    font-weight: 600;
    font-size: 13px;
}

.km-product-video-buy .btn-shop-now:hover,
.km-product-video-buy .btn-shop-now:focus {
    color: #fff;
    background: #e06e1f;
    border-color: #e06e1f;
    text-decoration: none;
}

.km-shorts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(214px, 1fr));
    gap: 22px 18px;
}

.km-shorts-grid .km-short-card {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    min-width: 0;
    overflow: hidden;
}

.km-shorts-grid .km-short-thumb {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: 9 / 16;
}

.km-shorts-grid .km-short-product {
    overflow-wrap: anywhere;
}

@media (max-width: 1199px) {
    .km-product-videos-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .km-shorts-nav.prev { left: 8px; }
    .km-shorts-nav.next { right: 8px; }
}

@media (max-width: 991px) {
    .km-product-videos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .km-product-videos-grid .km-product-video-card:nth-child(n+5) { display: none; }
}

@media (max-width: 767px) {
    .km-media-panel {
        padding: 12px 8px 14px;
        border-radius: 14px;
    }
    .km-shorts-track { margin: 0; padding: 0; }
    .km-shorts-arrow { width: 40px; height: 40px; font-size: 15px; }
    .km-shorts-arrow.prev { left: 4px; }
    .km-shorts-arrow.next { right: 4px; }
    .km-short-card { padding: 0 4px; max-width: 222px; }
    .km-short-thumb { width: 100%; max-width: 214px; height: 380px; max-height: 380px; min-height: 0; border-radius: 16px; }
    .km-short-thumb .km-short-product { font-size: 13px; }
    .km-shorts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .km-product-videos-grid { grid-template-columns: minmax(0, 1fr); }
    .km-product-videos-grid .km-product-video-card:nth-child(n+3) { display: none; }
    .km-shorts-stage {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
    }
    .km-shorts-video-wrap { border-radius: 0; }
    .km-shorts-nav.prev { left: 8px; }
    .km-shorts-nav.next { right: 8px; }
}

html[data-theme="dark"] .km-media-panel {
    background: #1b1b1b;
    box-shadow: none;
}

html[data-theme="dark"] .km-media-title,
html[data-theme="dark"] .km-pv-title,
html[data-theme="dark"] .km-short-product {
    color: #f3f3f3;
}

html[data-theme="dark"] .km-short-price,
html[data-theme="dark"] .km-pv-price {
    color: #F47F2F;
}
