/* ==========================================================================
   STYLESPRODUCTLIST.CSS — Product Cards, Flash Sale, Sheets & Detail Deck
   ========================================================================== */

/* ---------- 1. FLASH SALE SECTION ---------- */
.flash-sale-section {
    background-image: url("https://img.sukahemat.com/ilustrasi/bg-flashsale.avif"); /*#ff6b6b*/
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    margin: 0 0 1rem;
    padding: 0.25rem 0.5rem 0.75rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.flash-sale-section .section-title {
    color: #fff;
    margin: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 1.4rem;
    white-space: nowrap;
}

.flash-sale-section .section-title i {
    font-size: 1.4rem;
}

.countdown-timer {
    font-size: 1rem;
    color: #fff;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin-right: 0.25rem;
}

.countdown-timer span {
    background-color: #c0392b;
    padding: 0.25rem;
    border-radius: 0.5rem;
    width: 2rem;
    text-align: center;
}

.flash-sale-wrap {
    position: relative;
}

.fs-nav-btn {
    display: none;
}

#flash-sale-list {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 1px;
    margin: -2rem -0.25rem 0.25rem;
    padding: 0 5px 5px;
}

#flash-sale-list::-webkit-scrollbar {
    height: 2px;
}

#flash-sale-list::-webkit-scrollbar-track {
    background: #ff6b6b;
}

#flash-sale-list::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 1px;
}

#flash-sale-list .col-4 {
    flex: 0 0 auto;
}

#flash-sale-list .card-body {
    padding: 0.25rem;
}

#flash-sale-list .card-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;             /* Standar W3C modern */
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
    word-break: break-word;    /* Mencegah kata panjang merusak lebar kartu */
}

#flash-sale-list .price-wrapper {
    width: 100%;
    text-align: center;
}

#flash-sale-list .price-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    flex-wrap: nowrap;
    margin-bottom: 0.25rem;
}

#flash-sale-list .original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.8rem;
    text-align: left;
}

#flash-sale-list .discount-label {
    background: #e74c3c;
    color: white;
    padding: 0.05rem 0.2rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
}

#flash-sale-list .highlighted-price {
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

#flash-sale-list .add-to-cart-btn {
    width: 100%;
    height: 1.6rem;
    font-size: 0.9rem;
    display: none;
    transition: all 0.3s ease;
    line-height: 1.5rem;
    text-align: center;
    padding: 0;
    margin-left: 0;
}

#flash-sale-list .add-to-cart-btn .btn-checkmark {
    display: none;
}

#flash-sale-list .add-to-cart-btn i {
    font-size: 0.9rem;
}

#flash-sale-list .product-card.active .highlighted-price {
    display: none;
}

#flash-sale-list .product-card.active .add-to-cart-btn {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ---------- 2. PRODUCT CARDS (KATALOG UTAMA) ---------- */
.product-card {
    border: 0.5px solid #c0392b;
    border-radius: 0.5rem;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.product-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-bottom: 1px solid #eee;
    display: block;
}

.product-img-error {
    object-fit: contain !important;
    background-color: #f8f9fa;
    padding: 8%;
}

.card-body {
    padding: 0.3rem;
}

.card-title {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    word-wrap: break-word;
}

.product-badges-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    margin: 0 0 0.15rem;
    width: 100%;
}

.variant-count-badge,
.stock-count-badge {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 500;
    border: 2px solid #d1f2e4;
    padding: 0 0.25rem;
    margin: 0;
    white-space: nowrap;
}

.variant-count-badge {
    color: #3498db;
    background: #ebf5fb;
}

.stock-count-badge {
    color: #27ae60;
    background: #eafaf1;
}

.price-wrapper {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.product-price-container {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.3rem;
}

.highlighted-price {
    background-color: #d1f2e4;
    color: #0f5132;
    padding: 0.125rem;
    border-radius: 0.25rem;
    font-weight: bold;
    font-size: 1rem;
    white-space: nowrap;
    text-align: center;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.add-to-cart-btn,
.add-to-cart-btn.btn-primary {
    background-color: #3498db;
    border-color: #3498db;
    color: #fff;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
}

.add-to-cart-btn:hover,
.add-to-cart-btn:active,
.add-to-cart-btn:focus {
    background-color: #2980b9 !important;
    border-color: #2980b9 !important;
    color: #fff !important;
}

.add-to-cart-btn .btn-checkmark {
    display: none;
    font-size: 0.9rem;
    line-height: 1;
}

.add-to-cart-btn i {
    font-size: 0.9rem;
}

/* Penyesuaian grid katalog utama */
#product-list .price-wrapper {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 0.3rem;
    align-items: stretch;
    align-content: end;
}

#product-list .product-price-container {
    display: contents;
}

#product-list .list-price-container,
#product-list .voucher-increase-badge {
    grid-column: 1;
    grid-row: 1;
}

#product-list .highlighted-price {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

#product-list .add-to-cart-btn {
    grid-column: 2;
    grid-row: 1 / 3;
    width: 2.6rem;
    height: auto;
    align-self: stretch;
}

#product-list .add-to-cart-btn i,
#product-list .add-to-cart-btn .btn-checkmark {
    font-size: 1.25rem;
}

#product-list .sold-info {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: center;
}

#product-list .list-price-container {
    display: flex;
    border: 1px solid #e74c3c;
    border-radius: 0.25rem;
    margin: 0 0 0.25rem;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: nowrap;
    width: 100%;
    background: linear-gradient(to right, white 70%, #e74c3c 30%);
}

#product-list .original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.65rem;
    text-align: left;
    padding: 0 0.25rem;
}

#product-list .discount-label {
    background-color: #e74c3c;
    color: white;
    padding: 0 0.25rem;
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
    font-size: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    white-space: nowrap;
}

.voucher-increase-badge {
    display: flex;
    background: #28a745;
    color: white;
    padding: 0.05rem 0.25rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    margin-bottom: 0.25rem;
    min-width: 100%;
    justify-content: center;
    white-space: nowrap;
}

.sold-info {
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: #555;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.sold-icon {
    width: 0.75rem;
    height: 0.75rem;
    flex-shrink: 0;
}

/* ---------- 3. CAROUSEL GAMBAR VARIAN (DI KARTU PRODUK) ---------- */
.product-img-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #f8f9fa;
    touch-action: pan-y;
}

.product-img-carousel .pd-swipe-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.32s ease;
}

.product-img-carousel .product-img {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.product-img-carousel .carousel-dots {
    position: absolute;
    bottom: 0.4rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 0.28rem;
    z-index: 2;
    pointer-events: auto;
}

.product-img-carousel .carousel-dot {
    width: 0.35rem;
    height: 0.35rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.35);
    transition: background 0.2s ease, transform 0.2s ease;
}

.product-img-carousel .carousel-dot.active {
    background: #fff;
    transform: scale(1.25);
}

/* ---------- 4. DETAIL PRODUK PANEL & CAROUSEL DECK ---------- */
.product-detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.product-detail-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.product-detail-panel {
    position: fixed;
    top: -1.25rem;
    left: 0;
    right: 0;
    height: calc(100dvh + 1.25rem);
    background: var(--bs-body-bg, #fff);
    z-index: 1060;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    padding: 1.25rem 1.25rem 0;
    padding-top: max(1.25rem, env(safe-area-inset-top));
    overscroll-behavior: contain;
    border-radius: 0;
    overflow-x: hidden;
    overflow-y: visible;
}

.product-detail-panel.active {
    transform: translateY(0);
}

.product-detail-container {
    font-family: 'Inter', sans-serif;
    background: #fff;
    padding: 0;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.product-image-container {
    position: relative;
    margin: 0 0 0 -1.25rem;
}

.product-image {
    width: 100vw;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3436;
    margin: 0 0 0.25rem;
    line-height: 1.3;
}

.stock-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: -0.5rem 0 1rem;
}

.stock-info i {
    color: #636e72;
    font-size: 0.9rem;
}

.stock-info p {
    font-size: 0.9rem;
    color: #636e72;
    margin: 0;
}

.price-container {
    margin: 0 -1rem 1rem;
}

.discounted-price-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-box {
    display: flex;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    padding: 0;
    margin: 0 -0.25rem;
    background-color: #d1f2e4;
    justify-content: center;
}

.discounted-price {
    font-size: 2.5rem;
    font-weight: 1000;
    color: #2d3436;
    margin: 0;
    white-space: nowrap;
}

.normal-price {
    font-size: 2.5rem;
    font-weight: 1000;
    color: #2d3436;
    margin: 0;
}

.original-price {
    font-size: 0.9rem;
    color: #636e72;
    text-decoration: line-through;
    margin: 0;
}

.original-price-with-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin: -0.25rem 0 0;
}

.discount-badge {
    background: #e74c3c;
    color: white;
    padding: 0 0.5rem;
    margin: 0;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    margin: -0.25rem 0 1rem;
}

.add-to-cart-btn-popup {
    background: #3498db;
    color: #fff;
    flex: 2;
    padding: 0.25rem;
    border: 2px solid #ccc;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    height: 2.5rem;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.variant-pill-wrapper {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.5rem;
    margin: 0.5rem -1rem;
    padding: 0.1rem 0.75rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.variant-pill-wrapper::-webkit-scrollbar {
    height: 0;
    background: transparent;
}

.variant-pill-wrapper:hover {
    scrollbar-width: thin;
}

.variant-pill-wrapper:hover::-webkit-scrollbar {
    height: 6px;
}

.variant-pill-wrapper:hover::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.25);
    border-radius: 3px;
}

.variant-pill {
    border: 1.5px solid #dee2e6;
    background: #fff;
    color: #2c3e50;
    border-radius: 1rem;
    padding: 0.25rem 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.variant-pill.active {
    border-color: #3498db;
    background: #ebf5fb;
}

.variant-pill:disabled,
.variant-pill.out-of-stock {
    opacity: 0.45;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* ---------- 5. BOTTOM SHEET: PILIH VARIAN ---------- */
#variant-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 2100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#variant-sheet-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

#variant-sheet-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-radius: 1rem 1rem 0 0;
    z-index: 2101;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.32s ease;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

#variant-sheet-panel.active {
    transform: translateY(0);
}

.variant-sheet-header {
    position: relative;
    padding: 1rem 2.75rem 0.5rem 1.25rem;
    border-bottom: 1px solid #f1f3f5;
}

.vs-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 1.8rem;
    height: 1.8rem;
    border: none;
    background: #f1f3f5;
    color: #495057;
    border-radius: 50%;
    font-size: 1.1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
}

.vs-close-btn:active {
    background: #dee2e6;
}

.variant-sheet-header .vs-title {
    font-weight: 700;
    font-size: 1rem;
    margin: 0;
}

.variant-sheet-header .vs-subtitle {
    font-size: 1rem;
    color: #868e96;
    margin: 0.15rem 0 0;
}

.variant-sheet-list {
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.variant-sheet-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1.5px solid #dee2e6;
    border-radius: 0.75rem;
    padding: 0;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.variant-sheet-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.variant-sheet-item:not(.disabled):active {
    background: #f8f9fa;
}

.variant-sheet-item img {
    width: 4rem;
    height: 4rem;
    object-fit: cover;
    border-radius: 0.5rem 0 0 0.5rem;
    flex-shrink: 0;
    background: #f1f3f5;
}

.variant-sheet-item .vs-item-info {
    flex: 1;
    min-width: 0;
}

.variant-sheet-item .vs-item-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.variant-sheet-item .vs-item-price {
    font-size: 1.1rem;
    color: #3498db;
    font-weight: 600;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.1rem 0.25rem;
    margin: -0.2rem 0;
}

.variant-sheet-item .vs-item-price .vs-price-original {
    color: #adb5bd;
    font-weight: 500;
    text-decoration: line-through;
    font-size: 0.8rem;
}

.variant-sheet-item .vs-item-price .vs-discount-badge {
    background: #e74c3c;
    color: white;
    font-size: 0.65rem;
    font-weight: 500;
    padding: 0.1rem 0.35rem;
    border-radius: 0.3rem;
    line-height: 1.3;
}

.variant-sheet-item .vs-item-price .vs-voucher-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #28a745;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 500;
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    line-height: 1.3;
    white-space: nowrap;
}

.variant-sheet-item .vs-item-price .vs-voucher-badge i {
    font-size: 0.65rem;
}

.variant-sheet-item .vs-item-stok {
    font-size: 0.8rem;
    color: #868e96;
}

/* ---------- 6. BOTTOM SHEET: JUMLAH KUANTITAS (QTY STEPPER) ---------- */
#qty-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 2100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#qty-sheet-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

#qty-sheet-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-radius: 1rem 1rem 0 0;
    z-index: 2101;
    transform: translateY(100%);
    transition: transform 0.32s ease;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    padding-bottom: env(safe-area-inset-bottom);
}

#qty-sheet-panel.active {
    transform: translateY(0);
}

.qty-sheet-body {
    padding: 0.9rem 1.25rem 1.25rem;
}

.qty-sheet-total-big {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: #27ae60;
    margin-bottom: 0.75rem;
    line-height: 1.1;
}

.qty-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.qty-stepper button {
    width: 2.6rem;
    height: 2.6rem;
    border: 1.5px solid #dee2e6;
    background: #fff;
    color: #2c3e50;
    border-radius: 0.6rem;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1;
}

.qty-stepper button:active {
    background: #f1f3f5;
}

.qty-stepper input {
    width: 5rem;
    height: 2.6rem;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    border: 2px solid #3498db;
    border-radius: 0.6rem;
    outline: none;
    
    /* Hilangkan panah up/down di semua browser (Chrome, Safari, Edge, Firefox) */
    appearance: textfield;        /* Standar modern */
    -moz-appearance: textfield;   /* Fallback Firefox versi lama */
    -webkit-appearance: none;     /* Fallback WebKit */
    margin: 0;
}

/* Hilangkan panah spinner bawaan di WebKit/Blink */
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-confirm-btn {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.6rem;
    border: none;
    border-radius: 0.6rem;
    background: #3498db;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
}

.qty-confirm-btn:active {
    opacity: 0.9;
}

/* ---------- 7. PAGINASI KATALOG ---------- */
.product-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 1.5rem;
}

.product-pagination .page-numbers-scroll {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.35rem;
    padding: 0.25rem 0.1rem;
    white-space: nowrap;
    scrollbar-width: thin;
    scroll-behavior: smooth;
    max-width: calc(5 * 2.25rem + 4 * 0.35rem + 0.2rem);
}

.product-pagination .page-numbers-scroll::-webkit-scrollbar {
    height: 2px;
}

.product-pagination .page-numbers-scroll::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.product-pagination .page-numbers-scroll::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 1px;
}

.product-pagination .page-btn {
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    margin-bottom: 0.5rem;
    border: 1.5px solid #dee2e6;
    background: #fff;
    color: #2c3e50;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.product-pagination .page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.product-pagination .page-btn.active {
    border-color: #3498db;
    background: #3498db;
    color: #fff;
}

/* Badge Most Wanted */
.most-wanted-badge {
    position: absolute;
    top: 0.75rem;
    left: 0;
    background-color: rgba(255, 255, 0, 0.75);
    color: black;
    padding: 0.1rem 0.25rem;
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 500;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    white-space: nowrap;
}

/* State Tombol Tambah ke Keranjang saat sukses */
.add-to-cart-btn.is-checked .btn-icon {
    display: none !important;
}
.add-to-cart-btn.is-checked .btn-checkmark {
    display: inline !important;
}

/* Deck Slide Carousel Produk Detail (Memindahkan inject script JS) */
.pd-deck {
    position: relative;
    width: calc(100% + 2.5rem);
    margin: 0 -1.25rem;
    height: 100%;
    overflow-x: hidden;
    overflow-y: visible;
}
.pd-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 0 1.25rem;
    box-sizing: border-box;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 -2px 18px rgba(0, 0, 0, 0.1);
    transform-origin: center center;
    will-change: transform, opacity;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.pd-card.pd-current { z-index: 3; }
.pd-card.pd-behind { z-index: 2; overflow: hidden; pointer-events: none; }
.pd-card.pd-prev { z-index: 4; overflow: hidden; pointer-events: none; }
.pd-card.pd-animating { transition: transform 1s cubic-bezier(.22,.61,.36,1), opacity 0.85s ease; }
.pd-card.pd-animating-exit-noopacity { transition: transform 1s cubic-bezier(.22,.61,.36,1); }
.pd-card.pd-ghost { pointer-events: none; overflow: hidden; }

.ask-ai-btn-popup {
    flex: 1;
    height: 2.5rem;
    padding: 0.25rem;
    border: 2px solid #3498db;
    border-radius: 0.5rem;
    background: #fff;
    color: #3498db;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    white-space: nowrap;
}
.ask-ai-btn-popup:active { background: #ebf5fb; }