.apu-reel-wrapper {
    width: 100%;
    margin: 20px 0;
    box-sizing: border-box;
}
.apu-reel-wrapper * { box-sizing: border-box; }

.apu-reel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 10px 4px 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.apu-reel::-webkit-scrollbar { height: 8px; }
.apu-reel::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
.apu-reel::-webkit-scrollbar-track { background: transparent; }

.apu-card {
    flex: 0 0 160px;
    scroll-snap-align: start;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.apu-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.apu-card-media {
    width: 100%;
    height: 190px;
    background: #f2f2f2;
    position: relative;
}
.apu-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.apu-card-noimg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 13px;
}
.apu-ribbon-unggulan {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    background: #f59e0b;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    line-height: 1.4;
}
.apu-badge-diskon {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    background: #e63946;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 6px;
    line-height: 1.4;
}
.apu-overlay-habis {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
}
.apu-overlay-habis span {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.apu-card-habis .apu-card-media img { opacity: 0.7; }

.apu-card-info {
    padding: 9px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.apu-umkm-info {
    display: flex;
    align-items: center;
    gap: 5px;
}
.apu-umkm-logo {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.apu-umkm-nama {
    font-size: 11px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.apu-card-rating {
    font-size: 10.5px;
    color: #f59e0b;
    font-weight: 600;
}
.apu-card-rating span {
    color: #999;
    font-weight: 400;
}
.apu-produk-nama {
    font-weight: 600;
    font-size: 12.5px;
    color: #222;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.apu-produk-harga-baris {
    display: flex;
    align-items: baseline;
    gap: 5px;
    flex-wrap: wrap;
}
.apu-produk-harga-coret {
    font-size: 10.5px;
    color: #999;
    text-decoration: line-through;
}
.apu-produk-harga {
    font-weight: 700;
    color: #e63946;
    font-size: 12.5px;
}

.apu-btn-order {
    margin-top: 4px;
    background: #25D366;
    color: #fff;
    border: none;
    padding: 7px 10px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    width: 100%;
}
.apu-btn-order:hover { background: #1ebe5b; }
.apu-btn-order:disabled {
    background: #ccc;
    color: #777;
    cursor: not-allowed;
}
.apu-btn-order:disabled:hover { background: #ccc; }

.apu-empty { color: #888; }

/* Modal */
.apu-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}
.apu-modal-overlay.apu-modal-open { display: flex; }

.apu-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 380px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px;
    position: relative;
    box-sizing: border-box;
}
.apu-modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 6px;
}
.apu-modal-umkm {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.apu-modal-umkm img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}
.apu-modal-umkm span {
    font-weight: 600;
    font-size: 14px;
}
.apu-modal-galeri {
    position: relative;
    width: 100%;
    height: 220px;
    border-radius: 12px;
    overflow: hidden;
    background: #f2f2f2;
    margin-bottom: 12px;
}
.apu-modal-galeri img#apu-modal-foto {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.apu-galeri-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}
.apu-galeri-nav:hover { background: rgba(0, 0, 0, 0.65); }
.apu-galeri-prev { left: 8px; }
.apu-galeri-next { right: 8px; }
.apu-galeri-dots {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 5px;
}
.apu-galeri-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
}
.apu-galeri-dot.active { background: #fff; }

.apu-galeri-thumbs {
    display: none;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    margin-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}
.apu-galeri-thumbs::-webkit-scrollbar { height: 6px; }
.apu-galeri-thumbs::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }
.apu-galeri-thumb {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.55;
    border: 2px solid transparent;
    transition: opacity 0.15s ease, border-color 0.15s ease;
}
.apu-galeri-thumb:hover { opacity: 0.85; }
.apu-galeri-thumb.active {
    opacity: 1;
    border-color: #25D366;
}

.apu-modal h3#apu-modal-produk-nama {
    margin: 0 0 6px;
    font-size: 18px;
}
.apu-modal-harga-baris {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 10px;
}
.apu-modal-harga-coret {
    font-size: 12.5px;
    color: #999;
    text-decoration: line-through;
    display: none;
}
.apu-modal-harga {
    font-weight: 700;
    color: #e63946;
    font-size: 15px;
}
.apu-modal-satuan {
    font-size: 12px;
    color: #888;
}
.apu-modal-deskripsi {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 16px;
    white-space: pre-line;
}
.apu-btn-checkout {
    display: block;
    text-align: center;
    background: #25D366;
    color: #fff;
    text-decoration: none;
    padding: 12px;
    border-radius: 10px;
    font-weight: 700;
}
.apu-btn-checkout:hover { background: #1ebe5b; color: #fff; }

.apu-modal-rating-section {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #eee;
}
.apu-modal-rating-summary {
    font-size: 13px;
    color: #555;
    margin-bottom: 10px;
}
.apu-modal-rating-bintang {
    color: #f59e0b;
    letter-spacing: 1px;
}
.apu-modal-rating-count {
    color: #999;
}
.apu-modal-rating-kosong {
    color: #888;
    font-style: italic;
}

.apu-modal-testimoni-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}
.apu-testimoni-item {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 8px 10px;
}
.apu-testimoni-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12.5px;
}
.apu-testimoni-bintang {
    color: #f59e0b;
    font-size: 11px;
    letter-spacing: 1px;
    white-space: nowrap;
}
.apu-testimoni-item p {
    margin: 4px 0 0;
    font-size: 12.5px;
    color: #555;
    line-height: 1.4;
}

.apu-btn-tulis-ulasan {
    width: 100%;
    background: #fff;
    color: #25D366;
    border: 1.5px solid #25D366;
    padding: 9px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}
.apu-btn-tulis-ulasan:hover { background: #f0fbf4; }

.apu-form-ulasan {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.apu-form-ulasan-bintang {
    font-size: 22px;
    letter-spacing: 4px;
    color: #ddd;
}
.apu-form-ulasan-bintang .apu-star {
    cursor: pointer;
    transition: color 0.1s ease;
}
.apu-form-ulasan-bintang .apu-star.active { color: #f59e0b; }
.apu-form-ulasan input[type="text"],
.apu-form-ulasan textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}
.apu-btn-kirim-ulasan {
    background: #25D366;
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}
.apu-btn-kirim-ulasan:hover { background: #1ebe5b; }
.apu-btn-kirim-ulasan:disabled {
    background: #ccc;
    cursor: not-allowed;
}
.apu-ulasan-notice {
    font-size: 12.5px;
    margin: 0;
}
.apu-ulasan-notice.apu-ulasan-sukses { color: #1a7a1a; }
.apu-ulasan-notice.apu-ulasan-error { color: #b32d2e; }
