/*
 * Product page (template-parts/product/single.php). Mobile first; two columns from 1000px.
 */
.anp { background: var(--an-bg); }
.anp-crumbs { padding: 14px 0 10px; }
.anp-crumbs .an-crumbs { flex-wrap: nowrap; white-space: nowrap; }
.anp-crumbs .an-crumbs li:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.anp-top { display: grid; gap: 18px; padding-bottom: 32px; }
@media (min-width: 1000px) { .anp-top { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 40px; align-items: start; padding-bottom: 48px; } }
@media (min-width: 1280px) { .anp-top { grid-template-columns: minmax(0, 740px) minmax(0, 1fr); gap: 56px; } }

/* ========== Gallery ========== */
.anp-gallery { min-width: 0; }
@media (min-width: 1000px) {
	.anp-gallery { position: sticky; top: calc(var(--an-header-h) + 16px); display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; align-items: start; }
	.admin-bar .anp-gallery { top: calc(var(--an-header-h) + 48px); }
	.anp-gallery__stage { grid-column: 2; grid-row: 1; }
	.anp-gallery__thumbs { grid-column: 1; grid-row: 1; flex-direction: column; max-height: 560px; overflow-y: auto; }
	/* One image, no thumb column: the stage starts at the page edge, in line with the header and breadcrumb. */
	.anp-gallery--single { grid-template-columns: minmax(0, 1fr); }
	.anp-gallery--single .anp-gallery__stage { grid-column: 1; }
}
.anp-gallery__stage { position: relative; overflow: hidden; border: 1px solid var(--an-line); border-radius: var(--an-r-lg); background: #fff; }
.anp-gallery__track { display: flex; margin: 0; padding: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; list-style: none; overscroll-behavior-x: contain; }
.anp-gallery__track::-webkit-scrollbar { display: none; }
.anp-gallery__slide { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 1; }
.anp-gallery__zoom { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: #fff; cursor: zoom-in; }
.anp-gallery__img, .anp-gallery__slide img { width: 100%; height: 100%; object-fit: contain; }
.anp-gallery__off { position: absolute; top: 14px; left: 14px; height: 28px; font-size: 13px; }
.anp-gallery__arrow { position: absolute; top: 50%; display: none; align-items: center; justify-content: center; width: 44px; height: 44px; margin-top: -22px; border: 1px solid var(--an-line); border-radius: 10px; background: rgba(255, 255, 255, .94); color: var(--an-ink); box-shadow: 0 4px 14px rgba(29, 43, 36, .1); }
.anp-gallery__arrow--prev { left: 12px; }
.anp-gallery__arrow--next { right: 12px; }
.anp-gallery__count { position: absolute; right: 12px; bottom: 12px; margin: 0; padding: 4px 10px; border-radius: var(--an-r-tag); background: rgba(29, 43, 36, .72); color: #fff; font-size: 12.5px; font-weight: 700; }
@media (hover: hover) and (min-width: 768px) { .anp-gallery__stage:hover .anp-gallery__arrow { display: inline-flex; } }
.anp-gallery__thumbs { display: flex; gap: 8px; margin: 10px 0 0; padding: 2px; overflow-x: auto; scrollbar-width: none; list-style: none; }
.anp-gallery__thumbs::-webkit-scrollbar { display: none; }
@media (min-width: 1000px) { .anp-gallery__thumbs { margin: 0; } }
.anp-gallery__thumb { display: block; width: 68px; height: 68px; padding: 3px; border: 1.5px solid var(--an-line); border-radius: 12px; background: #fff; }
.anp-gallery__thumb img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.anp-gallery__thumb.is-on { border-color: var(--an-brand); box-shadow: 0 0 0 2px var(--an-accent); }
@media (min-width: 1000px) { .anp-gallery__thumb { width: 72px; height: 72px; } }

/* ========== Buy box ========== */
.anp-info { min-width: 0; }
.anp-info__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.anp-info__cat { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: var(--an-r-tag); background: var(--an-brand-soft); color: var(--an-brand-deep); font: 700 12.5px/1 var(--an-sans); letter-spacing: .03em; text-transform: uppercase; text-decoration: none; }
.anp-info__tools { display: flex; gap: 6px; }
.anp-tool { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 1.5px solid var(--an-line); border-radius: 10px; background: var(--an-surface); color: var(--an-ink); }
.anp-tool:hover { border-color: var(--an-brand); }
.anp-tool[aria-pressed="true"] { color: var(--an-err); border-color: #f3c9b4; }
.anp-tool[aria-pressed="true"] .an-icon path { fill: currentColor; }
.anp-title { margin: 0 0 6px; font-size: clamp(24px, 3vw, 34px); line-height: 1.12; }
.anp-sub { margin: 0 0 10px; font-size: 16px; color: var(--an-muted); }
.anp-rating { margin: 0 0 14px; }
.anp-rating__link { display: inline-flex; align-items: center; gap: 8px; color: var(--an-ink); font-size: 14px; text-decoration: none; }
.anp-rating__link--none { color: var(--an-muted); font-weight: 600; }
.anp-rating__link--none:hover { color: var(--an-ink); text-decoration: underline; }
.anp-stars { position: relative; display: inline-block; width: 88px; height: 16px; background: linear-gradient(90deg, var(--an-accent) var(--r), var(--an-line-2) var(--r)); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='16' viewBox='0 0 88 16'%3E%3Cg fill='%23000'%3E%3Cpath id='s' d='M8 1l2.2 4.6 5 .7-3.6 3.5.9 5L8 12.4 3.5 14.8l.9-5L.8 6.3l5-.7z'/%3E%3Cuse href='%23s' x='18'/%3E%3Cuse href='%23s' x='36'/%3E%3Cuse href='%23s' x='54'/%3E%3Cuse href='%23s' x='72'/%3E%3C/g%3E%3C/svg%3E") no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='16' viewBox='0 0 88 16'%3E%3Cg fill='%23000'%3E%3Cpath id='s' d='M8 1l2.2 4.6 5 .7-3.6 3.5.9 5L8 12.4 3.5 14.8l.9-5L.8 6.3l5-.7z'/%3E%3Cuse href='%23s' x='18'/%3E%3Cuse href='%23s' x='36'/%3E%3Cuse href='%23s' x='54'/%3E%3Cuse href='%23s' x='72'/%3E%3C/g%3E%3C/svg%3E") no-repeat; }

.anp-price { padding: 16px 0; border-top: 1px solid var(--an-line); border-bottom: 1px solid var(--an-line); }
.anp-price__row { display: flex; align-items: baseline; gap: 12px; margin: 0; }
.anp-price__off { font: 800 26px/1 var(--an-sans); color: var(--an-save); }
.anp-price__now { color: var(--an-brand-deep); font: 800 clamp(32px, 4vw, 40px)/1 var(--an-sans); font-variant-numeric: tabular-nums; }
.anp-price__mrp { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 8px 0 0; font-size: 14.5px; color: var(--an-muted); }
.anp-price__mrp del { color: var(--an-muted); }
.anp-price__save { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: var(--an-r-tag); background: var(--an-save-soft); color: var(--an-save); font-size: 13px; font-weight: 700; }
.anp-price__tax { margin: 6px 0 0; font-size: 13px; color: var(--an-muted); }

.anp-highlights { margin: 16px 0 0; }
.anp-highlights ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.anp-highlights li { position: relative; padding-left: 28px; font-size: 15px; font-weight: 600; line-height: 1.4; }
.anp-highlights li::before { content: ""; position: absolute; left: 0; top: 1px; width: 19px; height: 19px; border-radius: 50%; background: var(--an-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23064e3b' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") no-repeat center; }

.anp-form { margin: 20px 0 0; }
/* Quantity, Add to cart and Buy now share one row and one height (56px, 12px corners).
   Phones and the narrow two-column width: quantity + Add to cart, then Buy now full width. */
.anp-form__btns { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 10px; }
.anp-form__now { grid-column: 1 / -1; }
@media (min-width: 560px) and (max-width: 999px), (min-width: 1280px) {
	.anp-form__btns { grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1fr); }
	.anp-form__now { grid-column: auto; }
}
.anp-form__btns .an-btn { min-height: 56px; font-size: 16.5px; }
.anp-form__qty { display: flex; min-width: 0; }
.anp-form__qty .quantity.an-qty { display: flex; align-items: stretch; justify-content: space-between; width: 100%; height: 56px; border: 1.5px solid var(--an-brand); border-radius: var(--an-r-btn); background: var(--an-surface); overflow: hidden; }
.anp-form__qty .an-qty__btn { flex: none; width: 44px; height: auto; border-radius: 0; color: var(--an-ink); transition: background-color .15s; }
.anp-form__qty .an-qty__btn:hover:not(:disabled) { background: var(--an-accent-soft); }
.anp-form__qty .an-qty__btn:disabled { opacity: .3; }
.woocommerce .anp-form__qty .an-qty input.qty.an-qty__input { flex: 1; width: auto; min-width: 0; height: auto; font: 800 19px/1 var(--an-sans); }
.anp-form__qty .an-qty:focus-within { box-shadow: 0 0 0 4px rgba(242, 176, 30, .35); }
.anp-form__add { box-shadow: 0 8px 20px rgba(217, 154, 11, .3); }
.anp-oos { margin: 20px 0 0; padding: 14px 16px; border-radius: var(--an-r-md); background: var(--an-err-soft); color: var(--an-err); font-weight: 700; }
.anp-free { margin-top: 14px; }

.anp-promises { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 16px 0 0; padding: 0; border: 1px solid var(--an-line); border-radius: var(--an-r-lg); background: var(--an-surface); list-style: none; overflow: hidden; }
.anp-promises li { display: flex; align-items: flex-start; gap: 10px; padding: 14px; font-size: 13px; line-height: 1.35; color: var(--an-muted); }
.anp-promises li:nth-child(odd) { border-right: 1px solid var(--an-line); }
.anp-promises li:nth-child(n+3) { border-top: 1px solid var(--an-line); }
.anp-promises li > .an-icon { color: var(--an-ink); margin-top: 1px; }
.anp-promises strong { display: block; color: var(--an-ink); font-size: 14px; margin-bottom: 2px; }
.anp-promises a { color: var(--an-ink); font-weight: 600; }

.anp-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 0; }
.anp-quick div { padding: 10px 12px; border-radius: var(--an-r-md); background: var(--an-surface); border: 1px solid var(--an-line); }
.anp-quick dt { font-size: 12px; font-weight: 700; color: var(--an-muted); text-transform: uppercase; letter-spacing: .04em; }
.anp-quick dd { margin: 2px 0 0; font-size: 14.5px; font-weight: 600; }

/* ========== Sections ========== */
.anp-sec { padding-block: 40px; }
.anp-h2 { margin: 0 0 20px; font-size: clamp(24px, 3vw, 34px); }
.anp-h3 { margin: 0 0 12px; font-size: 20px; }
@media (min-width: 1000px) { .anp-sec { padding-block: 56px; } }

.anp-feats { background: var(--an-surface); }
.anp-feats__list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 768px) { .anp-feats__list { grid-template-columns: 1fr 1fr; gap: 16px; } }
.anp-feat { display: flex; gap: 14px; padding: 18px; border: 1px solid var(--an-line); border-radius: var(--an-r-lg); background: var(--an-bg); }
.anp-feat__n { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--an-accent); color: var(--an-brand-deep); font: 800 15px/1 var(--an-sans); }
.anp-feat__title { margin: 2px 0 4px; font: 700 17px/1.25 var(--an-display); }
.anp-feat__text { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--an-ink-2); }

.anp-details { background: var(--an-bg); }
.anp-details__grid { display: grid; gap: 28px; }
@media (min-width: 1000px) { .anp-details__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; } }
.anp-desc { font-size: 16px; }
.anp-box { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 14px 16px; border: 1px dashed var(--an-line-2); border-radius: var(--an-r-md); background: var(--an-surface); font-size: 14.5px; }
.anp-box strong { display: block; }
.anp-box span { color: var(--an-muted); }
.anp-details__specs { align-self: start; padding: 20px; border: 1px solid var(--an-line); border-radius: var(--an-r-lg); background: var(--an-surface); }
.anp-specs { width: 100%; font-size: 14.5px; }
.anp-specs th, .anp-specs td { padding: 10px 0; border-bottom: 1px solid var(--an-line); text-align: left; vertical-align: top; }
.anp-specs tr:last-child th, .anp-specs tr:last-child td { border-bottom: 0; }
.anp-specs th { width: 42%; padding-right: 14px; color: var(--an-muted); font-weight: 600; }
.anp-specs td { font-weight: 600; overflow-wrap: anywhere; }

.anp-help { background: var(--an-surface); }
.anp-help__grid { display: grid; gap: 36px; }
@media (min-width: 1000px) { .anp-help__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; } }
.anp-faq { display: grid; gap: 10px; }
.anp-faq__item { border: 1px solid var(--an-line); border-radius: var(--an-r-md); background: var(--an-bg); }
.anp-faq__item summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; font-weight: 700; font-size: 15.5px; cursor: pointer; list-style: none; }
.anp-faq__item summary::-webkit-details-marker { display: none; }
.anp-faq__item summary .an-icon { transition: transform .2s; }
.anp-faq__item[open] summary .an-icon { transform: rotate(45deg); }
.anp-faq__item p { margin: 0; padding: 0 18px 16px; color: var(--an-ink-2); font-size: 15px; line-height: 1.6; }

/* Reviews (WooCommerce's template) */
.anp-reviews #reviews h2, .anp-reviews .woocommerce-Reviews-title { margin: 0 0 14px; font: 700 clamp(22px, 2.6vw, 28px)/1.15 var(--an-display); }
.anp-reviews .woocommerce-noreviews { color: var(--an-muted); }
.anp-reviews .commentlist { margin: 0 0 20px; padding: 0; list-style: none; }
.anp-reviews .commentlist li { margin: 0 0 12px; padding: 16px; border: 1px solid var(--an-line); border-radius: var(--an-r-md); }
.anp-reviews .commentlist img.avatar { display: none; }
.anp-reviews .comment-text .meta { margin: 4px 0 6px; font-size: 13.5px; color: var(--an-muted); }
.anp-reviews .star-rating { position: relative; display: inline-block; width: 88px; height: 16px; overflow: hidden; font-size: 0; }
.anp-reviews .star-rating::before { content: "★★★★★"; position: absolute; inset: 0; font-size: 16px; letter-spacing: 2px; color: var(--an-line-2); }
.anp-reviews .star-rating span { position: absolute; top: 0; left: 0; height: 100%; overflow: hidden; }
.anp-reviews .star-rating span::before { content: "★★★★★"; font-size: 16px; letter-spacing: 2px; color: var(--an-accent); }
.anp-reviews #review_form_wrapper { padding: 20px; border: 1px solid var(--an-line); border-radius: var(--an-r-lg); background: var(--an-bg); }
.anp-reviews .comment-reply-title { display: block; margin-bottom: 10px; font: 700 18px/1.2 var(--an-display); }
.anp-reviews .comment-form p { margin: 0 0 12px; }
.anp-reviews .comment-form label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; }
.anp-reviews .comment-form input[type="text"], .anp-reviews .comment-form input[type="email"], .anp-reviews .comment-form textarea { width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--an-line-2); border-radius: var(--an-r-md); background: #fff; font-size: 16px; }
.anp-reviews .comment-form textarea { min-height: 110px; }
.anp-reviews p.stars { margin: 0 0 12px; }
.anp-reviews p.stars a { position: relative; display: inline-block; width: 28px; height: 28px; overflow: hidden; text-indent: -999em; }
.anp-reviews p.stars a::before { content: "☆"; position: absolute; top: 0; left: 0; width: 28px; height: 28px; text-indent: 0; font-size: 26px; line-height: 28px; color: var(--an-accent); }
.anp-reviews p.stars:hover a::before, .anp-reviews p.stars.selected a::before { content: "★"; }
.anp-reviews p.stars.selected a.active ~ a::before, .anp-reviews p.stars a:hover ~ a::before { content: "☆"; }
.anp-reviews .comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; }
.anp-reviews .comment-form-cookies-consent label { display: inline; font-weight: 500; }

.anp-related { background: var(--an-bg); }

/* ========== Sticky buy bar ========== */
.anp-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 85; padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--an-line); background: rgba(255, 255, 255, .97); box-shadow: 0 -10px 30px rgba(29, 43, 36, .08); transform: translateY(110%); visibility: hidden; transition: transform .25s var(--an-ease), visibility 0s linear .25s; }
.anp-sticky.is-on { transform: none; visibility: visible; transition: transform .25s var(--an-ease), visibility 0s; }
.anp-sticky__in { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.anp-sticky__product { display: flex; align-items: center; gap: 12px; min-width: 0; }
.anp-sticky__product img { width: 48px; height: 48px; object-fit: contain; border: 1px solid var(--an-line); border-radius: 10px; background: #fff; }
.anp-sticky__name { display: none; margin: 0; font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.anp-sticky__price { margin: 0; font-size: 13px; color: var(--an-muted); }
.anp-sticky__price strong { color: var(--an-ink); font-size: 18px; }
.anp-sticky__price span { color: var(--an-save); font-weight: 700; }
.anp-sticky__btn { min-height: 50px; padding-inline: 22px; }
@media (min-width: 768px) { .anp-sticky__name { display: block; max-width: 48ch; } }

/* ========== Lightbox ========== */
.anp-lightbox { position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .98); }
.anp-lightbox[hidden] { display: none; }
.anp-lightbox__img { max-width: min(92vw, 1100px); max-height: 86vh; object-fit: contain; }
.anp-lightbox__close { position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 0; border-radius: 10px; background: var(--an-bg); color: var(--an-ink); }
.anp-lightbox__nav { position: absolute; top: 50%; display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin-top: -26px; border: 1px solid var(--an-line); border-radius: 10px; background: #fff; color: var(--an-ink); }
.anp-lightbox__nav--prev { left: 14px; }
.anp-lightbox__nav--next { right: 14px; }
.anp-lightbox__count { position: absolute; bottom: 16px; left: 50%; margin: 0; transform: translateX(-50%); font-weight: 700; color: var(--an-muted); }
.anp-specs__more { margin-top: 2px; }
.anp-specs__more summary { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 8px 0; font-weight: 700; font-size: 14.5px; cursor: pointer; list-style: none; }
.anp-specs__more summary::-webkit-details-marker { display: none; }
.anp-specs__more summary .an-icon { transition: transform .2s; }
.anp-specs__more[open] summary { order: 2; }
.anp-specs__more[open] summary .an-icon { transform: rotate(180deg); }
.anp-specs__hide, .anp-specs__more[open] .anp-specs__show { display: none; }
.anp-specs__more[open] .anp-specs__hide { display: inline; }
.anp-specs__more .anp-specs tr:first-child th, .anp-specs__more .anp-specs tr:first-child td { border-top: 1px solid var(--an-line); }
.anp-details__specs .anp-specs + .anp-specs__more:not([open]) summary { margin-top: 6px; }
.an-free--idle { background: var(--an-surface); border-color: var(--an-line); }
