/* One product card for the whole site (owner approved 01.12.2026), built by shared/product-card.js.
   The field (180 / phone 160), the product frame (148 / 120) and the rows come from the home card rules in styles.css
   (.best-seller-*); this file only adds the parts the other places need. Nothing here resizes the photo. */

/* Oil scenes fill the field without a grey plate, wherever the card stands (homepage-scene-trial.js measures them). */
.ng-card .best-seller-visual.full-scene-trial { background: transparent; --full-scene-side: 269.35px; }
.ng-card .full-scene-trial .best-seller-product-link { padding: 0; }
.ng-card .best-seller-visual.full-scene-trial img { width: var(--full-scene-side); height: var(--full-scene-side); min-width: var(--full-scene-side); min-height: var(--full-scene-side); max-width: none; max-height: none; flex: 0 0 auto; object-fit: contain; mix-blend-mode: normal; filter: none; }
html[data-device="phone"] .ng-card .best-seller-visual.full-scene-trial { --full-scene-side: 218.39px; }

/* The name keeps its three lines on phones too (16/24), so the rows of neighbouring cards stay level. */
html[data-device="phone"] .ng-card .best-seller-name { min-height: 72px; max-height: 72px; -webkit-line-clamp: 3; }

/* The corner flag, as in the catalog. */
.ng-card-flag { position: absolute; top: 0; left: 0; z-index: 1; padding: 0 8px; border-radius: 8px 0 8px 0; font-size: 12px; font-weight: 700; line-height: 20px; pointer-events: none; }
.ng-card-flag--best { background: var(--ng-accent,#e25903); color: var(--ng-on-accent,#000000); }
.ng-card-flag--deal { background: var(--ng-primary-deep,#0b6d40); color: var(--ng-on-primary-deep,#FFFFFF); }

/* Deal rows: "Daily deal", the red price with the old one, "N% off". */
.ng-card-deal { margin: 4px 0 0 8px; color: var(--ng-muted,#666); font-size: 12px; line-height: 16px; }
.ng-card-price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 4px; margin: 8px 0 0 8px; }
.ng-card-deal + .ng-card-price-row { margin-top: 4px; }
.ng-card .best-seller-price.is-sale { color: #ca2222; }
.ng-card-price-row .best-seller-price { margin: 0; }
.ng-card-old { color: var(--ng-muted,#666); font-size: 13px; line-height: 18px; text-decoration: line-through; }
.ng-card-off { margin: 4px 0 0 8px; color: var(--ng-text-strong,#181b1f); font-size: 13px; font-weight: 700; line-height: 20px; }

/* The bonus line: its place is kept from the start, so the row does not jump when the rate arrives. */
.ng-card-bonus { display: flex; align-items: center; gap: 5px; min-height: 20px; margin: 4px 0 0 8px; color: var(--ng-primary-text,#2c7500); font-size: 13px; font-weight: 700; line-height: 20px; }
.ng-card-bonus .club-coin { width: 16px; height: 16px; }
.ng-card-bonus .club-coin svg { width: 10px; height: 10px; }

/* "In cart: N" stays on the photo, green; pressing it adds one more. */
.ng-card .best-seller-add-to-cart.is-in-cart { border-color: #277014; background: #277014; color: #fff; opacity: 1; pointer-events: auto; transform: translateX(-50%); }
.ng-card .best-seller-add-to-cart.is-in-cart:hover { border-color: #1f5a10; background: #1f5a10; }

/* Phones: the button stands under the price (home rows, empty cart). */
/* inset: auto — the leaf animation makes the button relative for a moment (cart-feedback.js); the photo button's left: 50% must not push it aside then. */
html[data-device="phone"] .ng-card .best-seller-add-to-cart.is-under { inset: auto; position: static; display: inline-flex; align-self: flex-start; min-height: 36px; margin: 8px 0 0; padding: 6px 16px; border-radius: 6px; font-size: 14px; font-weight: 700; line-height: 20px; opacity: 1; pointer-events: auto; transform: none; }
html[data-device="phone"] .ng-card .best-seller-add-to-cart.is-under::before { content: none; }
html[data-device="phone"] .ng-card > :is(.ng-card-deal,.ng-card-price-row,.ng-card-off,.ng-card-bonus) { margin-inline-start: 0; }

/* Out of stock: "Notify me" on the photo, as drawn. */
.ng-card-notify { position: absolute; right: 0; bottom: 0; left: 0; z-index: 1; display: flex; align-items: center; justify-content: center; min-height: 36px; padding: 6px 8px; border: 1px solid var(--ng-primary,#458500); border-radius: 0 0 8px 8px; background: var(--ng-surface-white,#fff); color: var(--ng-primary-text,#2c7500); font-size: 14px; font-weight: 700; line-height: 20px; text-align: center; text-decoration: none; }
.ng-card-notify:hover { background: var(--ng-surface,#f3f8ec); }
.ng-card-notify:focus-visible { outline: 2px solid var(--ng-focus,#458500); outline-offset: 2px; }

/* "Daily deals" (owner, 01.12.2026, after approval): the card stays a white tile holding the photo and the text, as on
   the site before — white background, radius 8, inner padding — with the grey field inside. The field is the tile's
   inner width, 180 high (phone 160), the product frame 148 (phone 120); the number per row is the site's 3 / 4 / 5. */
[data-daily-deals] .daily-deal-card.ng-card { flex: 0 0 calc((100% - 32px) / 3); padding: 16px; border-radius: 8px; background: var(--ng-surface-white,#fff); color: var(--ng-text,#292d32); }
[data-daily-deals] .ng-card .best-seller-visual { width: 100%; margin-left: 0; }
[data-daily-deals] .ng-card .best-seller-product-link { padding-inline: 0; }
@media (max-width: 1000px) { [data-daily-deals] .daily-deal-card.ng-card { padding: 12px; } }
[data-daily-deals] .ng-card > :is(.best-seller-name,.best-seller-kind,.best-seller-meta,.best-seller-badge,.best-seller-price,.ng-card-deal,.ng-card-price-row,.ng-card-off,.ng-card-bonus) { margin-inline-start: 0; }
@media (min-width: 1001px) { [data-daily-deals] .daily-deal-card.ng-card { flex-basis: calc((100% - 48px) / 4); } }
@media (min-width: 1200px) { [data-daily-deals] .daily-deal-card.ng-card { flex-basis: calc((100% - 64px) / 5); } }
html[data-device="phone"] [data-daily-deals] .daily-deal-card.ng-card { flex: 0 0 184px; width: 184px; padding: 12px; border-radius: 8px; }
/* The arrows stand at the middle of the photo field (tile padding + half of the 180 field), as in the rows below. */
[data-daily-deals] .daily-deals-arrow { top: 106px; }
@media (max-width: 1000px) { [data-daily-deals] .daily-deals-arrow { top: 102px; } }

/* Long words in a name break by syllables, not at the edge (as in the row under a product). */
.ng-card .best-seller-name { -webkit-hyphens: auto; hyphens: auto; }

/* The one round cart of the site: orange, 36, white picture, lower right corner of the photo, always shown. */
.ng-card .best-seller-add-to-cart.is-circle { position: absolute; top: auto; right: 8px; bottom: 8px; left: auto; z-index: 1; display: block; width: 36px; height: 36px; min-width: 36px; min-height: 36px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: var(--ng-accent,#f38a00) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3h2l2 12h11l3-9H9'/%3E%3Ccircle cx='9.5' cy='19.5' r='1.2'/%3E%3Ccircle cx='17.5' cy='19.5' r='1.2'/%3E%3C/svg%3E") center / 20px no-repeat; color: transparent; font-size: 0; line-height: 0; opacity: 1; pointer-events: auto; transform: none; }
.ng-card .best-seller-add-to-cart.is-circle::before { content: none; }
.ng-card .best-seller-add-to-cart.is-circle:hover { background-color: var(--ng-accent-hover,#d96f00); }
.ng-card .best-seller-add-to-cart.is-circle.is-in-cart { background-color: #277014; }
.ng-card .best-seller-add-to-cart.is-circle .ng-atc-loader { width: 20px; height: 20px; }

/* A frame around the cards on phones only (owner 01.12.2026: "it was all about the phone, so the cards are more compact"),
   switched on by one class on the list: 1 px #dfe5d8, radius 12, padding 10. The field and the product frame inside keep
   their sizes; the field takes the inner width. Computers and tablets get no frame. */
html[data-device="phone"] .ng-cards-framed .ng-card { padding: 10px; border: 1px solid #dfe5d8; border-radius: 12px; background: var(--ng-surface-white,#fff); }
html[data-device="phone"] .ng-cards-framed .ng-card .best-seller-visual { width: 100%; margin-left: 0; }
html[data-device="phone"] .ng-cards-framed .ng-card > :not(.best-seller-visual) { margin-inline-start: 0; }

/* The "Added to cart" window (shared/cart-feedback.js): the window itself stays as it was — the rail shows two cards
   (computer: a row of 194-wide cards as drawn, the third peeking; phones: two columns, framed); only the cards inside are the site's one card, the round cart on the photo. */
.ng-atc-rail .ng-card { min-width: 0; padding: 0; align-self: start; scroll-snap-align: start; }
.ng-atc-dialog:not(.is-mobile) .ng-atc-rail { grid-auto-columns: 194px; gap: 18px; }
/* The window's own background is the same grey (#f7f8f7): the field is white there, as the window's photos were. */
.ng-atc-dialog:not(.is-mobile) .ng-atc-rail .ng-card .best-seller-visual { background: var(--ng-surface-white,#fff); }
.ng-atc-rail .ng-card .best-seller-visual { width: 100%; margin-left: 0; }
.ng-atc-dialog.is-mobile .ng-atc-rail .ng-card { padding: 0; }
.ng-atc-dialog.is-mobile .ng-atc-rail .ng-card .best-seller-product-link { padding-inline: 0; }
html[data-device="phone"] .ng-atc-rail .ng-card { width: auto; flex: none; }
html[data-device="phone"] .ng-atc-rail.ng-cards-framed .ng-card { padding: 10px; }
.ng-atc-carousel .ng-atc-arrow { top: 72px; }

/* The empty cart's best sellers: a row of 194-wide cards (phones 180, framed), "Add to cart" on the photo when pointed
   at, under the price on phones; never wider than the narrowest oil scene. */
.ng-empty-products .ng-card { flex: 0 0 194px; width: 194px; scroll-snap-align: start; }
html[data-device="phone"] .ng-empty-products .ng-card { flex: 0 0 180px; width: 180px; }

/* The round cart while the leaf turns (owner 02.12.2026): the cart picture steps aside, so the leaf is not drawn over it;
   on touch screens the darker "pointed at" colour does not stick after a tap. */
.ng-card .best-seller-add-to-cart.is-circle.ng-atc-busy { background-image: none; background-color: var(--ng-accent,#f38a00); }
@media (hover: none) { .ng-card .best-seller-add-to-cart.is-circle:hover:not(.is-in-cart) { background-color: var(--ng-accent,#f38a00); } }
