/* Approved A cards. Homepage markup and styles are independent. */
:is(.pharmacy-shop,.pharmacy-single) .pharmacy-catalog-card { position:relative; display:flex; flex-direction:column; min-inline-size:0; block-size:100%; padding:0; border:1px solid var(--border); border-radius:12px; background:var(--white); color:var(--navy); transition:border-color .2s ease-out; }
body.pharmacy-modern .pharmacy-catalog-card .pharmacy-card-status { position:absolute; inset-block-start:10px; inset-inline:10px; display:flex; justify-content:space-between; gap:6px; pointer-events:none; z-index:2; font-size:10px; }
body.pharmacy-modern .pharmacy-catalog-card .pharmacy-card-status span { padding:3px 6px; border-radius:5px; background:var(--mint); color:var(--primary-deep); }
body.pharmacy-modern .pharmacy-catalog-card .pharmacy-card-media { display:flex; align-items:center; justify-content:center; block-size:178px; padding:28px 20px 12px; margin:0; border-radius:12px 12px 0 0; background:var(--white); color:var(--primary); }
body.pharmacy-modern .pharmacy-catalog-card .pharmacy-card-media img { inline-size:100%; block-size:100%; object-fit:contain; mix-blend-mode:normal; }
body.pharmacy-modern .pharmacy-catalog-card .pharmacy-card-copy { display:flex; flex-direction:column; flex:1; min-inline-size:0; padding:14px 12px 12px; }
body.pharmacy-modern .pharmacy-catalog-card .pharmacy-card-brand { min-block-size:20px; margin:0 0 4px; color:var(--muted); font-size:11px; }
body.pharmacy-modern .pharmacy-catalog-card h2 { font-size:14px; font-weight:650; line-height:1.9; min-block-size:3.8em; margin:0 0 12px; overflow-wrap:anywhere; }
body.pharmacy-modern .pharmacy-catalog-card h2 a { color:var(--navy); }
body.pharmacy-modern .pharmacy-catalog-card h2 a:hover { color:var(--primary); text-decoration:underline; text-underline-offset:4px; }
body.pharmacy-modern .pharmacy-catalog-card .pharmacy-card-price { margin-block:auto 12px; padding-block-start:4px; min-block-size:58px; display:flex; align-items:flex-end; font-size:20px; font-weight:800; color:var(--primary); font-variant-numeric:tabular-nums; }
body.pharmacy-modern .pharmacy-catalog-card .price,body.pharmacy-modern .pharmacy-catalog-card .sale-price { display:flex; flex-direction:column; align-items:flex-start; gap:3px; font:inherit; color:inherit; }
body.pharmacy-modern .pharmacy-catalog-card .price del { font-size:11px; font-weight:400; color:var(--muted); opacity:1; }
body.pharmacy-modern .pharmacy-catalog-card .price ins { font:inherit; text-decoration:none; color:inherit; background:none; }
body.pharmacy-modern .pharmacy-catalog-card .woocommerce-Price-currencySymbol { font-size:10px; font-weight:400; }
body.pharmacy-modern .pharmacy-catalog-card .pharmacy-card-action .button { display:flex; align-items:center; justify-content:center; inline-size:100%; min-block-size:46px; padding:9px 6px; border:1px solid var(--primary); border-radius:7px; color:var(--white); background:var(--primary); font-size:12px; line-height:1.8; transition:background-color .2s ease-out,color .2s ease-out; }
body.pharmacy-modern .pharmacy-catalog-card .pharmacy-card-action .button:hover { background:var(--primary-deep); }
body.pharmacy-modern .pharmacy-catalog-card :is(a,button):focus-visible { outline:3px solid var(--primary); outline-offset:3px; }
/* After an AJAX add, WooCommerce appends "view cart" next to the button; show one
   control only: the added link replaces the add button. */
body.pharmacy-modern .pharmacy-catalog-card .pharmacy-card-action:has(.added_to_cart) > .button { display:none; }
body.pharmacy-modern .pharmacy-catalog-card .added_to_cart { display:flex; align-items:center; justify-content:center; inline-size:100%; min-block-size:46px; padding:9px 6px; border:1px solid var(--primary-deep); border-radius:7px; background:var(--primary-deep); color:var(--white); font-size:12px; font-weight:600; line-height:1.8; }
body.pharmacy-modern .pharmacy-catalog-card .added_to_cart:hover { background:var(--primary); border-color:var(--primary); color:var(--white); }
body.pharmacy-modern .pharmacy-catalog-card.is-unavailable .pharmacy-card-media img { filter:grayscale(1); }
body.pharmacy-modern .pharmacy-catalog-card.is-unavailable .pharmacy-card-status span { background:var(--neutral-soft); color:var(--neutral-text); }
body.pharmacy-modern .pharmacy-catalog-card.is-unavailable .pharmacy-card-price { color:var(--neutral-text); }
body.pharmacy-modern .pharmacy-catalog-card.is-unavailable .pharmacy-card-action .button { background:var(--soft); border-color:var(--border-strong); color:var(--neutral-text); }
body.pharmacy-modern .pharmacy-catalog-card.is-unpictured .pharmacy-card-media { gap:8px; font-size:11px; }
body.pharmacy-modern .pharmacy-catalog-card.is-unpictured .pharmacy-card-media svg { inline-size:32px; block-size:32px; }
body.pharmacy-modern .pharmacy-shop-item { min-inline-size:0; }
@media(max-width:700px) {
 body.pharmacy-shop .pharmacy-catalog-card { display:grid; grid-template-columns:122px minmax(0,1fr); border:0; border-block-end:1px solid var(--border); border-radius:0; padding-block:10px; background:transparent; }
 body.pharmacy-shop .pharmacy-catalog-card .pharmacy-card-status { inset-inline:4px auto; inline-size:114px; inset-block-start:14px; flex-wrap:wrap; justify-content:flex-start; font-size:9px; }
 body.pharmacy-shop .pharmacy-catalog-card .pharmacy-card-media { block-size:100%; min-block-size:180px; padding:34px 10px 16px; border-radius:10px; }
 body.pharmacy-shop .pharmacy-catalog-card .pharmacy-card-media img { max-block-size:142px; }
 body.pharmacy-shop .pharmacy-catalog-card .pharmacy-card-copy { padding:4px 12px 8px 0; }
 body.pharmacy-shop .pharmacy-catalog-card h2 { min-block-size:0; margin-block:2px 10px; font-size:14px; line-height:1.85; }
 body.pharmacy-shop .pharmacy-catalog-card .pharmacy-card-price { min-block-size:44px; margin-block-end:10px; font-size:20px; }
 body.pharmacy-single .pharmacy-catalog-card h2 { font-size:13px; }
}
@media(max-width:370px) { body.pharmacy-shop .pharmacy-catalog-card { grid-template-columns:110px minmax(0,1fr); } body.pharmacy-shop .pharmacy-catalog-card .pharmacy-card-status { inline-size:102px; } }

/* WooCommerce/Blocksy may emit current price before del: order visually, never rewrite money. */
body.pharmacy-modern .pharmacy-catalog-card .price del { order:-1; }

/* Compatible PR8 behavior retained; Concept A remains the layout authority. */
body.pharmacy-modern .pharmacy-catalog-card:hover { border-color:var(--primary); }
body.pharmacy-modern .pharmacy-catalog-card .screen-reader-text { position:absolute; inline-size:1px; block-size:1px; overflow:hidden; clip-path:inset(50%); }
body.pharmacy-modern .pharmacy-catalog-card.is-unavailable .pharmacy-card-price del { display:none; }
body.pharmacy-modern .pharmacy-catalog-card.is-unavailable .pharmacy-card-action .button:hover { background:var(--neutral-soft); }
:is(.pharmacy-shop,.pharmacy-single) ul.products:has(.pharmacy-catalog-card) { align-items:stretch; }
:is(.pharmacy-shop,.pharmacy-single) li.pharmacy-shop-item { display:block; min-inline-size:0; margin:0; padding:0; border:0; background:transparent; }
:is(.pharmacy-shop,.pharmacy-single) #main ::selection { background:var(--mint); color:var(--primary-deep); }
@media(prefers-reduced-motion:reduce) { body.pharmacy-modern .pharmacy-catalog-card,body.pharmacy-modern .pharmacy-catalog-card .button { transition:none; } }
