/* ═══════════════════════════════════════════════════════════════════════════
   Прозорец на продукта + малки етикети (грамаж/бройки/мл, алергени, описание) — подреден, в стила на сайта (24.10.2026).
   Зарежда се ПОСЛЕДЕН в menu.php. Правила: радиуси 6/8/10 px (БЕЗ „хапчета“), тъмна и светла тема чрез променливи --pm-*, без сенки, цели за докосване ≥ 44 px.
   ═══════════════════════════════════════════════════════════════════════════ */
#product-modal {
    --pm-s1: #1b1b20; --pm-s2: #25252b; --pm-line: rgba(255, 255, 255, .11); --pm-tx: #f3f3f6; --pm-mu: #a6a6b0; --pm-ac: #e15829; --pm-ac-tx: #ff8a5c; --pm-ok: #2ecc71; --pm-bg: #151515;
}
html[data-theme="light"] #product-modal {
    --pm-s1: #f5f6f8; --pm-s2: #eceef2; --pm-line: rgba(0, 0, 0, .11); --pm-tx: #17181c; --pm-mu: #60636b; --pm-ac: #e15829; --pm-ac-tx: #c4451a; --pm-ok: #15803d; --pm-bg: #ffffff;
}

/* ── малките етикети с грамаж / бройки / мл — навсякъде (карти, прозорец, предложения): 6 px, не „хапче“ ── */
.product-weight, .product-detail-weight, .product-detail-weight-inline, .product-card .product-pricing .product-weight, .upsell-mini-card .product-weight {
    border-radius: 6px !important;
}
.product-weight { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); color: #b9b9c2; font-weight: 600; }
html[data-theme="light"] .product-weight { background: #f1f2f5; border-color: rgba(23, 24, 28, .14); color: #4b4e55; }

/* ── прозорецът ── */
#product-modal .product-detail { gap: 28px; }
#product-modal .product-detail-image { border-radius: 12px; overflow: hidden; }
#product-modal .product-detail-info { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
#product-modal .product-detail-name { margin: 0; font-family: 'Zaglaviq', Arial, sans-serif; font-weight: 400; font-size: 26px; line-height: 1.15; letter-spacing: .02em; color: var(--pm-tx); }

/* цена: без рамка и без надпис „Крайна цена“ — нова цена (оранжев етикет) · стара зачертана · спестяване; грамажът вдясно */
#product-modal .product-detail-pricing, html[data-theme="light"] #product-modal .product-detail-pricing { margin: 0; padding: 0; background: none !important; border: 0 !important; border-radius: 0; box-shadow: none; }
#product-modal .product-detail-pricing .price-label { display: none; }
#product-modal .product-detail-pricing .price-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start !important; gap: 8px 12px; }
#product-modal .product-detail-pricing .discount-pricing .price-main, #product-modal .product-detail-pricing .normal-pricing { display: inline-flex; align-items: center; gap: 8px; order: 1; }
#product-modal .product-detail-pricing .discount-pricing { display: contents; }
#product-modal .product-detail-pricing .current-price { padding: 3px 10px; font-size: 20px; line-height: 1.25; border-radius: 6px; }
#product-modal .product-detail-pricing .eur-price { padding: 3px 10px; font-size: 16px; border-radius: 8px; }
#product-modal .product-detail-pricing .discount-pricing .original-price { order: 2; font-size: 15px; white-space: nowrap; }
#product-modal .product-detail-pricing .discount-pricing .original-price * { white-space: nowrap; }
#product-modal .product-detail-pricing .product-detail-weight-inline { order: 4; margin-left: auto; padding: 5px 11px; font-size: 13px; font-weight: 600; background: var(--pm-s1); border: 1px solid var(--pm-line); color: var(--pm-mu); }
#product-modal .product-detail-pricing .product-detail-weight-inline i { color: var(--pm-ac); }
#product-modal .product-detail-pricing .pp-save { order: 3; flex: 0 0 auto; width: auto; }
#product-modal .hh-price { margin-top: 10px; }

/* действия: брояч + „Добави“ на един ред; в количката — брояч, статус и малка кошче-иконка */
#product-modal .product-detail-actions, html[data-theme="light"] #product-modal .product-detail-actions { display: flex; align-items: stretch; gap: 10px; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--pm-line); min-height: 0; }
#product-modal .quantity-selector { display: flex; align-items: center; flex: 0 0 auto; border: 1px solid var(--pm-line); border-radius: 10px; background: var(--pm-s1); overflow: hidden; }
#product-modal .quantity-btn { width: 38px; height: 44px; border: 0; padding: 0; background: transparent; color: var(--pm-ac-tx); font-size: 0; cursor: pointer; }
#product-modal .quantity-btn:hover { background: rgba(225, 88, 41, .12); }
#product-modal .quantity-display { min-width: 30px; text-align: center; font-family: Arial, Helvetica, sans-serif; font-size: 16px; font-weight: 800; color: var(--pm-tx); }
#product-modal .add-to-cart-detail { flex: 1 1 auto; width: auto; min-height: 44px; padding: 0 16px; border-radius: 10px; font-size: 14.5px; }
#product-modal .detail-incart-controls, html[data-theme="light"] #product-modal .detail-incart-controls { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; align-items: center; gap: 10px; width: 100%; margin: 0; padding: 0 !important; background: none !important; border: 0 !important; border-radius: 0; box-shadow: none; }
#product-modal .detail-qty-row { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; flex: 1 1 auto; min-width: 0; margin: 0; padding: 0; background: none; border: 0; }
#product-modal .detail-incart-label { display: inline-flex; align-items: center; gap: 7px; margin: 0; color: var(--pm-ok); font-family: Arial, Helvetica, sans-serif; font-weight: 800; font-size: 13.5px; white-space: nowrap; }
#product-modal .detail-qty-ctrl { display: flex; align-items: center; border: 1px solid var(--pm-line); border-radius: 10px; background: var(--pm-s1); overflow: hidden; }
#product-modal .detail-qty-btn { width: 38px; height: 42px; border: 0; padding: 0; background: transparent; color: var(--pm-ac-tx); font-size: 0; cursor: pointer; }
#product-modal .detail-qty-num { min-width: 30px; text-align: center; font-family: Arial, Helvetica, sans-serif; font-size: 15px; font-weight: 800; color: var(--pm-tx); }
#product-modal .detail-remove-all { flex: 0 0 auto; width: 42px; height: 42px; padding: 0; margin: 0; display: flex; align-items: center; justify-content: center; gap: 0; font-size: 0; border-radius: 10px; border: 1px solid rgba(239, 68, 68, .45); background: rgba(239, 68, 68, .08); color: #f87171; cursor: pointer; }
#product-modal .detail-remove-all i { display: block; font-size: 14px; line-height: 1; margin: 0; }
#product-modal .detail-remove-all:hover { background: rgba(239, 68, 68, .16); }
html[data-theme="light"] #product-modal .detail-remove-all { color: #b42318; border-color: rgba(180, 35, 24, .4); background: rgba(180, 35, 24, .07); }

/* алергени и описание: тънки заглавия (без „хапчета“), етикети 6 px, текстът — без тежка рамка */
#product-modal .product-detail-allergens, #product-modal .product-detail-description { margin: 0; padding: 0; background: none; border: 0; border-radius: 0; }
#product-modal .product-detail-allergens h4, #product-modal .product-detail-description h4 {
    display: flex; align-items: center; gap: 8px; margin: 0 0 9px; padding: 0 0 7px; width: auto; border: 0; border-bottom: 1px solid var(--pm-line); border-radius: 0; background: none;
    font-family: Arial, Helvetica, sans-serif; font-size: 11.5px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; color: var(--pm-mu);
}
#product-modal .product-detail-allergens h4 i, #product-modal .product-detail-description h4 i { color: var(--pm-ac); font-size: 12px; }
#product-modal .allergens-grid { display: flex; flex-wrap: wrap; gap: 6px; }
#product-modal .allergen-tag-detail { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 6px; background: var(--pm-s1); border: 1px solid var(--pm-line); color: var(--pm-tx); font-size: 13px; font-weight: 600; }
#product-modal .allergen-tag-detail img { width: 18px; height: 18px; border-radius: 4px; object-fit: contain; }
#product-modal .allergen-tag-detail.has-description { cursor: pointer; }
#product-modal .allergen-tag-detail.has-description:hover, #product-modal .allergen-tag-detail.active { border-color: var(--pm-ac); }
#product-modal .allergen-description-box, html[data-theme="light"] #product-modal .allergen-description-box { margin-top: 8px; padding: 0; border-radius: 0; background: none !important; border: 0 !important; box-shadow: none; }
#product-modal .allergen-description-title { display: block; margin-bottom: 3px; font-size: 13px; color: var(--pm-tx); }
#product-modal .allergen-description-text { margin: 0; font-size: 13px; line-height: 1.5; color: var(--pm-mu); }
#product-modal .product-detail-description p { margin: 0; padding: 0; background: none; border: 0; border-radius: 0; font-size: 14.5px; line-height: 1.65; color: var(--pm-tx); opacity: .92; }

/* компютър: снимката остава на място, докато се чете дясната колона */
@media (min-width: 900px) {
    #product-modal .product-detail-left { position: sticky; top: 0; align-self: start; }
}
@media (max-width: 768px) {
    #product-modal .product-detail { gap: 16px; }
    #product-modal .product-detail-name { font-size: 20px; }
    #product-modal .product-detail-actions, html[data-theme="light"] #product-modal .product-detail-actions { position: sticky; bottom: 0; z-index: 3; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--pm-bg) !important; border-top: 1px solid var(--pm-line); margin: 0 -16px; }
    /* цена и стара цена на първия ред; „Спестявате“ и грамаж — на втория */
    #product-modal .product-detail-pricing .pp-save { order: 3; }
    #product-modal .product-detail-pricing .discount-pricing .original-price { font-size: 14px; }
    #product-modal .product-detail-pricing .pp-save { font-size: 12px; }
    #product-modal .product-detail-pricing .product-detail-weight-inline { margin-left: 0; }
}

/* + и − се рисуват с линии (в шрифта на сайта няма „−“ и знаците излизаха криви и огромни) */
#product-modal .quantity-btn, #product-modal .detail-qty-btn { position: relative; }
#product-modal .quantity-btn::before, #product-modal .detail-qty-btn::before,
#product-modal .quantity-btn.increase::after, #product-modal .detail-qty-btn.detail-increase::after {
    content: ""; position: absolute; left: 50%; top: 50%; background: currentColor; border-radius: 1px; transform: translate(-50%, -50%);
}
#product-modal .quantity-btn::before, #product-modal .detail-qty-btn::before { width: 12px; height: 2px; }
#product-modal .quantity-btn.increase::after, #product-modal .detail-qty-btn.detail-increase::after { width: 2px; height: 12px; }
