/* V4.6.0 — Halaman produk gaya marketplace (TikTok Shop + Shopee), identitas hitam-emas Ahlinya Parfum. */
.ap-has-pdp { background: #f2f1ee; }
.ap-has-pdp .ap-site-main { background: #f2f1ee; }
.ap-has-pdp .ap-mobile-bottom-nav { display: none; }
.ap-has-pdp { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }

.ap-pdp { --pdp-ink: #16140f; --pdp-muted: #77705f; --pdp-line: #ebe7de; --pdp-gold: #c9a227; --pdp-gold-ink: #8a6d10; --pdp-red: #d0312d;
	max-width: 1180px; margin: 0 auto; padding: 0 0 24px; color: var(--pdp-ink); font-size: 14px; }
.ap-pdp a { color: inherit; }
.ap-pdp .woocommerce-notices-wrapper:not(:empty) { margin: 10px 12px; }
.ap-pdp-layout { display: block; }

/* Kartu */
.ap-pdp-card { margin: 0 0 8px; padding: 14px 14px; background: #fff; }
.ap-pdp-section h2, .ap-pdp-related h2, .ap-pdp-reviews .woocommerce-Reviews-title, .ap-pdp-reviews #reply-title { margin: 0 0 10px; color: var(--pdp-ink); font-size: 16px; font-weight: 800; }

/* Galeri */
.ap-pdp-gallery { position: relative; background: #fff; margin-bottom: 8px; }
.ap-pdp-slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.ap-pdp-slides::-webkit-scrollbar { display: none; }
.ap-pdp-slide { flex: 0 0 100%; margin: 0; scroll-snap-align: center; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; background: #faf8f4; }
.ap-pdp-image { width: 100%; height: 100%; object-fit: contain; }
.ap-pdp-counter { position: absolute; right: 12px; top: calc(100vw - 40px); max-width: none; padding: 3px 10px; border-radius: 99px; background: rgba(22,20,15,.6); color: #fff; font-size: 12px; font-weight: 700; }
.ap-pdp-thumbs { display: flex; gap: 6px; padding: 8px 12px 10px; overflow-x: auto; }
.ap-pdp-thumb { flex: 0 0 56px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 6px; background: #faf8f4; overflow: hidden; cursor: pointer; }
.ap-pdp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ap-pdp-thumb.is-active { border-color: var(--pdp-gold); }

/* Harga & judul */
.ap-pdp-head { padding-top: 12px; }
.ap-pdp-price-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ap-pdp-price, .ap-pdp-price .amount { color: var(--pdp-ink); font-size: 26px; font-weight: 900; letter-spacing: -.3px; }
.ap-pdp-price del, .ap-pdp-price del .amount { color: #a8a194; font-size: 14px; font-weight: 500; }
.ap-pdp-price ins { text-decoration: none; }
.ap-pdp-price .price, .ap-pdp-price { display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ap-pdp-price ins { order: -1; }
.ap-pdp-discount { padding: 2px 6px; border-radius: 4px; background: #fde9e8; color: var(--pdp-red); font-size: 12px; font-weight: 800; }
.ap-pdp-title { margin: 6px 0 8px; color: var(--pdp-ink); font-size: 17px; font-weight: 600; line-height: 1.35; }
.ap-pdp-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; color: var(--pdp-muted); font-size: 12px; }
.ap-pdp-rating { color: var(--pdp-gold-ink); font-weight: 800; }
.ap-pdp-badge { padding: 2px 7px; border-radius: 4px; background: #16140f; color: #f3d46a; font-weight: 800; font-size: 11px; }
.ap-pdp-lowstock { color: var(--pdp-red); font-weight: 700; }

/* Baris info */
.ap-pdp-rows { padding-top: 4px; padding-bottom: 4px; }
.ap-pdp-row { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--pdp-line); background: none; color: var(--pdp-ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
div.ap-pdp-row { cursor: default; }
.ap-pdp-row:last-child { border-bottom: 0; }
.ap-pdp-row-label { flex: 0 0 96px; color: var(--pdp-muted); }
.ap-pdp-row-value { flex: 1; min-width: 0; }
.ap-pdp-row-value small { color: var(--pdp-muted); font-size: 12px; }
.ap-pdp-chevron { color: #b9b2a3; font-size: 20px; line-height: 1; }

/* Kartu toko */
.ap-pdp-store { display: flex; align-items: center; gap: 12px; }
.ap-pdp-store-logo { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: #16140f; }
.ap-pdp-store-info { display: grid; flex: 1; min-width: 0; }
.ap-pdp-store-info small { color: var(--pdp-muted); font-size: 12px; }
.ap-pdp-store-chat { padding: 7px 16px; border: 1px solid var(--pdp-ink); border-radius: 6px; font-weight: 700; text-decoration: none; }

/* Detail */
.ap-pdp-specs table { width: 100%; border-collapse: collapse; margin: 0 0 10px; }
.ap-pdp-specs th, .ap-pdp-specs td { padding: 8px 0; border-bottom: 1px solid var(--pdp-line); text-align: left; vertical-align: top; font-size: 13px; }
.ap-pdp-specs th { width: 40%; color: var(--pdp-muted); font-weight: 500; }
.ap-pdp-specs td p { margin: 0; }
.ap-pdp-text { color: #3b372e; line-height: 1.7; }
.ap-pdp-text p { margin: 0 0 8px; }
.ap-pdp-collapsible.is-collapsed { max-height: 170px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.ap-pdp-more { display: block; width: 100%; margin-top: 6px; padding: 8px; border: 0; background: none; color: var(--pdp-gold-ink); font-weight: 700; cursor: pointer; }
.ap-pdp-marketplaces div { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-pdp-marketplaces a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--pdp-line); border-radius: 99px; font-size: 13px; font-weight: 600; text-decoration: none; }
.ap-pdp-marketplaces img { width: 18px; height: 18px; }

/* Ulasan (template WooCommerce) */
.ap-pdp-reviews, .ap-pdp-reviews * { color: var(--pdp-ink); }
.ap-pdp-reviews .commentlist { margin: 0; padding: 0; list-style: none; }
.ap-pdp-reviews .star-rating span::before, .ap-pdp-reviews .stars a { color: var(--pdp-gold); }
.ap-pdp-reviews input[type=text], .ap-pdp-reviews input[type=email], .ap-pdp-reviews textarea { width: 100%; border: 1px solid #d8d0bf; border-radius: 8px; background: #fff; color: var(--pdp-ink); padding: 9px; }
.ap-pdp-reviews #respond input#submit, .ap-pdp-reviews .submit { border: 0; border-radius: 8px; background: var(--pdp-ink); color: #fff !important; padding: 10px 16px; font-weight: 700; }

/* Produk terkait — kartu versi terang */
.ap-pdp-related { padding: 14px 8px 0; }
.ap-pdp-related h2 { padding: 0 6px; }
.ap-pdp-related .ap-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ap-pdp-related .ap-product-card { border: 0; border-radius: 8px; background: #fff; }
.ap-pdp-related .ap-product-card:hover { transform: none; }
.ap-pdp-related .ap-product-image-wrap { background: #faf8f4; aspect-ratio: 1 / 1; }
.ap-pdp-related .ap-product-name { color: var(--pdp-ink); }
.ap-pdp-related .ap-product-price, .ap-pdp-related .ap-product-price ins { color: var(--pdp-ink); }
.ap-pdp-related .ap-product-meta, .ap-pdp-related .ap-product-meta span:first-child { color: var(--pdp-muted); }
.ap-pdp-related .ap-marketplace-actions { display: none; }

/* Bottom sheet varian (HP) */
.ap-pdp-sheet-backdrop { position: fixed; inset: 0; z-index: 120; background: rgba(0,0,0,.45); }
.ap-pdp-sheet { position: fixed; z-index: 130; inset: auto 0 0; max-height: 82vh; overflow-y: auto; padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); border-radius: 16px 16px 0 0; background: #fff; color: var(--pdp-ink); transform: translateY(105%); transition: transform .22s ease; }
.ap-pdp-sheet:not(.is-open) { visibility: hidden; transition: transform .22s ease, visibility 0s linear .22s; }
.ap-pdp-sheet.is-open { transform: translateY(0); visibility: visible; }
.ap-pdp-sheet-head { display: flex; align-items: flex-end; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--pdp-line); }
.ap-pdp-sheet-thumb { width: 84px; height: 84px; border-radius: 8px; object-fit: cover; background: #faf8f4; }
.ap-pdp-sheet-head > div { flex: 1; min-width: 0; }
.ap-pdp-sheet-price, .ap-pdp-sheet-price .amount { font-size: 20px; font-weight: 900; color: var(--pdp-ink); }
.ap-pdp-sheet-price del, .ap-pdp-sheet-price del .amount { font-size: 12px; font-weight: 500; color: #a8a194; }
.ap-pdp-sheet-price ins { text-decoration: none; }
.ap-pdp-sheet-head small { color: var(--pdp-muted); }
.ap-pdp-sheet-x { align-self: flex-start; border: 0; background: none; color: var(--pdp-muted); font-size: 28px; line-height: 1; cursor: pointer; }
.ap-pdp-sheet-body { padding-top: 12px; }

/* Form WooCommerce di dalam sheet */
.ap-pdp form.cart { display: block; margin: 0; }
.ap-pdp table.variations { width: 100%; border: 0; margin: 0 0 6px; }
.ap-pdp table.variations tr { display: block; margin-bottom: 12px; }
.ap-pdp table.variations th, .ap-pdp table.variations td { display: block; padding: 0; border: 0; text-align: left; }
.ap-pdp table.variations th label { display: block; margin-bottom: 8px; color: var(--pdp-ink); font-weight: 700; }
.ap-pdp table.variations select.ap-chip-source { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; }
.ap-pdp .reset_variations { display: inline-block; margin-top: 6px; color: var(--pdp-muted); font-size: 12px; }
.ap-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-chip { min-height: 36px; padding: 6px 14px; border: 1px solid #ddd6c7; border-radius: 6px; background: #faf8f4; color: var(--pdp-ink); font: inherit; font-size: 13px; cursor: pointer; }
.ap-chip.is-selected { border-color: var(--pdp-gold); background: #fff8e1; color: #6b5409; font-weight: 700; }
.ap-chip:disabled { opacity: .4; text-decoration: line-through; cursor: not-allowed; }
.ap-pdp .single_variation_wrap .woocommerce-variation-price, .ap-pdp .single_variation_wrap .woocommerce-variation-availability { display: none; }
.ap-pdp .woocommerce-variation-add-to-cart, .ap-pdp form.cart:not(.variations_form) { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ap-pdp-qty-row { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 6px 0 12px; }
.ap-pdp-qty-row > span { font-weight: 700; }
.ap-pdp .quantity { display: inline-flex; align-items: center; border: 1px solid #ddd6c7; border-radius: 6px; overflow: hidden; }
.ap-pdp .quantity .qty { width: 48px; min-height: 36px; border: 0; border-inline: 1px solid #ddd6c7; background: #fff; color: var(--pdp-ink); text-align: center; font-weight: 700; -moz-appearance: textfield; }
.ap-pdp .quantity .qty::-webkit-inner-spin-button, .ap-pdp .quantity .qty::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ap-qty-btn { width: 36px; min-height: 36px; border: 0; background: #faf8f4; color: var(--pdp-ink); font-size: 18px; cursor: pointer; }
.ap-pdp .single_add_to_cart_button { flex: 1 1 0; min-height: 46px; margin: 0 !important; border: 1px solid var(--pdp-ink) !important; border-radius: 8px !important; background: #fff !important; color: var(--pdp-ink) !important; font-size: 14px !important; font-weight: 800 !important; }
.ap-pdp .single_add_to_cart_button.ap-buy-now { border-color: var(--pdp-gold) !important; background: var(--pdp-gold) !important; color: #16140f !important; }
.ap-pdp .single_add_to_cart_button.disabled { opacity: .45; }
.ap-pdp-sheet[data-mode="buy"] .single_add_to_cart_button:not(.ap-buy-now),
.ap-pdp-sheet[data-mode="cart"] .single_add_to_cart_button.ap-buy-now { display: none; }
.ap-pdp .stock.out-of-stock { color: var(--pdp-red); }

/* Bar beli menempel */
.ap-pdp-bar { position: fixed; z-index: 110; inset: auto 0 0; display: flex; align-items: center; gap: 6px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--pdp-line, #ebe7de); background: #fff; box-shadow: 0 -6px 18px rgba(0,0,0,.06); }
.ap-pdp-bar-icon { position: relative; display: grid; justify-items: center; flex: 0 0 52px; color: #16140f; font-size: 18px; text-decoration: none; }
.ap-pdp-bar-icon svg { display: block; }
.ap-pdp-bar-icon small { font-size: 10px; color: #77705f; }
.ap-pdp-bar-count { position: absolute; top: -4px; right: 6px; min-width: 16px; padding: 0 4px; border-radius: 99px; background: #d0312d; color: #fff; font-size: 10px; line-height: 16px; text-align: center; }
.ap-pdp-bar-cart, .ap-pdp-bar-buy { flex: 1; min-height: 46px; border-radius: 8px; font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.ap-pdp-bar-cart { border: 1px solid #16140f; background: #fff; color: #16140f; }
.ap-pdp-bar-buy { border: 1px solid #c9a227; background: #c9a227; color: #16140f; }
.ap-pdp-bar-soldout { flex: 1; padding: 13px; border-radius: 8px; background: #e7e3da; color: #77705f; font-weight: 800; text-align: center; }

/* Desktop: dua kolom, form tampil langsung (bukan sheet), bar disembunyikan */
@media (min-width: 900px) {
	.ap-has-pdp { padding-bottom: 0; }
	.ap-pdp { padding: 20px 16px 40px; }
	.ap-pdp-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
	.ap-pdp-gallery { position: sticky; top: 90px; border-radius: 12px; overflow: hidden; margin: 0; }
	.ap-pdp-counter { top: auto; bottom: 84px; }
	.ap-pdp-card { border-radius: 12px; margin-bottom: 12px; padding: 18px 20px; }
	.ap-pdp-title { font-size: 22px; }
	.ap-pdp-price, .ap-pdp-price .amount { font-size: 30px; }
	.ap-pdp-sheet-backdrop, .ap-pdp-sheet-x, .ap-pdp-bar, [data-ap-open-sheet] { display: none !important; }
	.ap-pdp-sheet, .ap-pdp-sheet:not(.is-open) { position: static; transform: none; visibility: visible; max-height: none; overflow: visible; margin-bottom: 12px; border-radius: 12px; padding: 18px 20px; }
	.ap-pdp-sheet-head { display: none; }
	.ap-pdp-sheet-body { padding-top: 0; }
	.ap-pdp-sheet[data-mode] .single_add_to_cart_button { display: inline-flex !important; align-items: center; justify-content: center; }
	.ap-pdp-related { padding: 8px 0 0; }
	.ap-pdp-related .ap-product-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
