/* W8: the product page as the app shows it (shop_product_page.dart). The old page stays in the markup for the app's
   reader and is hidden only when the app's page is there. Flat white cards radius 16; the app's own gradients only
   where it has them: the cart button (42A5F5 → 1E88E5, top to bottom) and «Shop with confidence» (E3F0FD → D2E6FB). */
body:has([data-product-app]) .product-details-wrapper { display: none !important; }

.pa { background: #F3F8FE; padding: 16px 16px 32px; margin-top: 70px; }
.pa__inner { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.pa-bar { display: flex; align-items: center; gap: 10px; }
.pa-bar__title { flex: 1; margin: 0; text-align: center; font-size: 1.2rem; font-weight: 900; color: #1565C0; }
.pa-bar__actions { display: flex; gap: 6px; }
.pa-bar__icon { width: 42px; height: 42px; flex: none; border-radius: 12px; border: 1px solid #E2E8F0; background: #FFFFFF; color: #1565C0; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.pa-bar__icon:hover { border-color: #1E88E5; color: #1E88E5; }
[dir="rtl"] .pa-bar__icon .fa-arrow-left { transform: scaleX(-1); }
.pa-heart.is-on i { color: #E53935; }
.pa-flash { padding: 10px 14px; border-radius: 12px; font-size: .9rem; }
.pa-flash--ok { background: #DCFCE7; color: #166534; }
.pa-flash--error { background: #FEF2F2; color: #B91C1C; }

.pa-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.pa-card { background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 16px; padding: 16px; }
.pa-card__title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 1rem; font-weight: 900; color: #1565C0; }

.pa-gallery__frame { position: relative; aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden; background: #FFFFFF; border: 1px solid #E2E8F0; }
.pa-gallery__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: none; }
.pa-gallery__img.is-on { display: block; }
.pa-gallery__empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #BFD8F3; font-size: 3rem; }
.pa-gallery__off { position: absolute; top: 12px; inset-inline-start: 12px; padding: 4px 10px; border-radius: 10px; background: #E53935; color: #FFFFFF; font-weight: 800; font-size: .8rem; }
.pa-gallery__dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.pa-gallery__dot { width: 7px; height: 7px; border-radius: 4px; border: 0; padding: 0; background: #BFD8F3; transition: height .2s; }
.pa-gallery__dot.is-on { height: 18px; background: #1E88E5; }

.pa-info { display: flex; flex-direction: column; gap: 12px; }
.pa-info__name { margin: 0; font-size: 1.35rem; font-weight: 900; color: #1B2437; }
.pa-info__meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; }
.pa-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 10px; background: #E3F2FD; color: #1E88E5; font-size: .75rem; font-weight: 700; }
.pa-rating { display: inline-flex; align-items: center; gap: 4px; }
.pa-rating strong { color: #1B2437; }
.pa-rating small { color: #6B7A90; font-size: .8rem; }
.pa-stars { color: #FFB300; font-size: .85rem; white-space: nowrap; }
.pa-stars--lg { font-size: 1.1rem; }
.pa-price { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.pa-price__now { font-size: 1.6rem; font-weight: 900; color: #1E88E5; }
.pa-price__was { color: #6B7A90; text-decoration: line-through; }
.pa-price__off { padding: 3px 8px; border-radius: 8px; background: #FDECEA; color: #E53935; font-weight: 800; font-size: .78rem; }
.pa-sale { display: flex; align-items: center; gap: 6px; color: #E53935; font-weight: 700; font-size: .85rem; }
.pa-info__summary { margin: 0; color: #6B7A90; line-height: 1.6; }
.pa-buy { display: flex; gap: 10px; align-items: stretch; }
.pa-qty { display: inline-flex; align-items: center; border: 1px solid #E2E8F0; border-radius: 12px; background: #FFFFFF; }
.pa-qty button { width: 40px; height: 48px; border: 0; background: none; color: #1565C0; }
.pa-qty span { min-width: 28px; text-align: center; font-weight: 800; color: #1B2437; }
.pa-cart { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border: 0; border-radius: 12px; color: #FFFFFF; font-weight: 800;
    background: linear-gradient(to bottom, #42A5F5, #1E88E5); }
.pa-cart:disabled { background: #CBD5E1; }

.pa-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pa-trust span { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 16px; text-align: center; font-size: .8rem; font-weight: 700; color: #1B2437; }
.pa-trust i { width: 40px; height: 40px; border-radius: 50%; background: #E0F7F3; color: #1FA89A; display: inline-flex; align-items: center; justify-content: center; }

.pa-tabs { display: flex; gap: 6px; padding: 4px; background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 14px; }
.pa-tab { flex: 1; padding: 10px 8px; border: 0; border-radius: 10px; background: none; color: #6B7A90; font-weight: 800; font-size: .9rem; }
.pa-tab.is-on { background: #E3F2FD; color: #1565C0; }
.pa-pane { display: none; }
.pa-pane.is-on { display: block; }
.pa-text { color: #1B2437; line-height: 1.8; white-space: pre-line; }
.pa-muted { color: #6B7A90; padding: 12px 0; }
.pa-specs__row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 4px; border-top: 1px solid #E2E8F0; font-size: .9rem; }
.pa-specs__row:first-child { border-top: 0; }
.pa-specs__row span { color: #6B7A90; }
.pa-specs__row strong { color: #1B2437; text-align: end; }

.pa-score { display: flex; align-items: center; gap: 14px; }
.pa-score > strong { font-size: 2.2rem; font-weight: 900; color: #1B2437; }
.pa-score small { display: block; color: #6B7A90; }
.pa-write { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin: 14px 0; padding: 11px; border-radius: 12px; border: 1px solid #1E88E5; background: #FFFFFF; color: #1E88E5; font-weight: 800; text-decoration: none; }
.pa-write:hover { background: #E3F2FD; color: #1E88E5; }
.pa-bars { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.pa-bars__row { display: grid; grid-template-columns: 14px 14px 1fr 28px; align-items: center; gap: 6px; font-size: .82rem; color: #6B7A90; }
.pa-bars__row i { color: #FFB300; font-size: .75rem; }
.pa-bars__track { height: 8px; border-radius: 4px; background: #E2E8F0; overflow: hidden; }
.pa-bars__track span { display: block; height: 100%; background: #FFB300; }
.pa-review { padding: 12px 0; border-top: 1px solid #E2E8F0; }
.pa-review__head { display: flex; align-items: center; gap: 10px; }
.pa-review__head > div { flex: 1; display: flex; flex-direction: column; }
.pa-review__head small { color: #6B7A90; font-size: .75rem; }
.pa-review__avatar { width: 36px; height: 36px; border-radius: 50%; background: #E3F2FD; color: #1E88E5; display: inline-flex; align-items: center; justify-content: center; }
.pa-review__verified { margin-top: 6px; color: #15803D; font-size: .8rem; font-weight: 700; display: flex; gap: 4px; align-items: center; }
.pa-review__title { margin-top: 6px; font-weight: 800; color: #1B2437; }
.pa-review__comment { margin-top: 4px; line-height: 1.6; color: #1B2437; }
.pa-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 0; color: #6B7A90; }
.pa-empty i { font-size: 1.8rem; color: #BFD8F3; }
.pa-empty strong { color: #1B2437; }

.pa-similar.shop-home { padding: 0; min-height: 0; background: none; }
.pa-similar__title { margin: 6px 0 0; font-size: 1.1rem; font-weight: 900; color: #1565C0; }
.pa-similar__row { display: grid; grid-auto-flow: column; grid-auto-columns: 180px; gap: 10px; overflow-x: auto; padding-bottom: 6px; }

.pa-safe { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: 20px; background: linear-gradient(to right, #E3F0FD, #D2E6FB); }
.pa-safe div { display: flex; flex-direction: column; gap: 2px; }
.pa-safe strong { color: #1565C0; font-weight: 900; }
.pa-safe span { color: #6B7A90; font-size: .85rem; }
.pa-safe > i { font-size: 2rem; color: #1E88E5; }

.pa-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); padding: 12px 18px; border-radius: 12px; background: #0F172A; color: #FFFFFF; font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 1080; }
.pa-toast.is-visible { opacity: 1; }

/* W8-R: the review sheet (shop_review_sheet.dart) as a centred dialog on a computer screen. */
.pa-sheet { width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid #E2E8F0; border-radius: 16px; background: #FFFFFF; color: #0F172A; }
.pa-sheet::backdrop { background: rgba(15, 23, 42, .45); }
.pa-sheet__body { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px 20px 20px; margin: 0; }
.pa-sheet__close { position: absolute; top: 10px; inset-inline-end: 10px; width: 34px; height: 34px; border: 0; border-radius: 12px; background: transparent; color: #1565C0; }
.pa-sheet__close:hover { background: #E3F2FD; }
.pa-sheet__title { margin: 0; text-align: center; font-size: 1.15rem; font-weight: 900; color: #1565C0; }
.pa-sheet__sub { margin: 0; text-align: center; color: #475569; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pa-sheet__label { margin: 6px 0 0; text-align: center; font-weight: 700; }
.pa-sheet__stars { display: flex; justify-content: center; gap: 4px; }
.pa-sheet__stars button { border: 0; background: transparent; padding: 4px; font-size: 2rem; line-height: 1; color: #FFB300; }
.pa-sheet__comment { width: 100%; resize: vertical; min-height: 96px; padding: 12px; border: 1px solid #E2E8F0; border-radius: 16px; background: #F3F8FE; color: #0F172A; font: inherit; }
.pa-sheet__comment:focus { outline: none; border-color: #1E88E5; }
.pa-sheet__check { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: #0F172A; cursor: pointer; }
.pa-sheet__check input { accent-color: #1E88E5; width: 18px; height: 18px; }
.pa-sheet__error { margin: 0; text-align: center; color: #E53935; font-size: .9rem; }
.pa-sheet__submit { display: block; width: 100%; padding: 13px; border: 0; border-radius: 12px; background: #1E88E5; color: #FFFFFF; font-weight: 800; text-align: center; text-decoration: none; }
.pa-sheet__submit:hover { background: #1565C0; color: #FFFFFF; }
.pa-sheet__submit:disabled { opacity: .6; }

@media (max-width: 767.98px) {
    .pa-top { grid-template-columns: 1fr; }
}

/* N1: category and condition next to the price; «Similar products» empty state. */
.pa-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.pa-fact { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 12px; background: #F3F8FE; border: 1px solid #E2E8F0; font-size: .85rem; }
.pa-fact small { color: #475569; }
.pa-fact a, .pa-fact strong { color: #1565C0; font-weight: 800; text-decoration: none; }
.pa-fact a:hover { color: #1E88E5; text-decoration: underline; }
.pa-fact em { font-style: normal; color: #94A3B8; }
.pa-similar__empty { flex-direction: row; justify-content: center; gap: 10px; padding: 18px 16px; }
.pa-similar__empty i { font-size: 1.3rem; }

/* N7: the seller's shop name and photo; opens their public page. */
.pa-seller { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #E2E8F0; border-radius: 16px; background: #FFFFFF; color: #0F172A; text-decoration: none; }
.pa-seller:hover { border-color: #1E88E5; background: #F3F8FE; color: #0F172A; }
.pa-seller__photo { width: 44px; height: 44px; flex: none; border-radius: 50%; object-fit: cover; }
.pa-seller__photo--empty { display: inline-flex; align-items: center; justify-content: center; background: #E3F2FD; color: #1E88E5; }
.pa-seller__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pa-seller__text small { color: #475569; font-size: .78rem; }
.pa-seller__text strong { color: #0F172A; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pa-seller__go { color: #1E88E5; }
[dir="rtl"] .pa-seller__go { transform: scaleX(-1); }

/* N9: «Technical Specifications» shows only the category and the condition; an empty one reads «Not specified». */
.pa-specs__none { font-style: normal; color: #94A3B8; text-align: end; }
