/* WineHub card accents (mu-plugin wh-cards, owner 2026-11-08: "a bit of colours, bold, placeholders").
   Colour comes from the wine itself: each type has a chip (dot + name) tinted from its colour in the glass; the winery
   line is wine red, the name and the price are heavier, Add to cart is a red tint that fills on hover, the one-click
   link is red with a bolt. Loaded after winehub.css, so equal selectors win by order. */

.wh-card {
  --whk-ink: #7A1626; --whk-dot: #9B1B30; --whk-bg: #F9E8EA; /* red, the default */
}
.wh-card.product_cat-white-wine { --whk-ink: #5C5416; --whk-dot: #D2BF52; --whk-bg: #F6F3DC; }
.wh-card.product_cat-rose-wine { --whk-ink: #9A2F4E; --whk-dot: #EE8FA8; --whk-bg: #FCEAF0; }
.wh-card.product_cat-sparkling { --whk-ink: #6A5420; --whk-dot: #C9A54A; --whk-bg: #F5EFDF; }
.wh-card.product_cat-dessert { --whk-ink: #7A400E; --whk-dot: #C9731F; --whk-bg: #FBEEDF; }
.wh-card.product_cat-divin, .wh-card.wh-divin { --whk-ink: #5B3519; --whk-dot: #8A5426; --whk-bg: #F3EAE1; }
.wh-card.wh-card--visit { --whk-ink: #2F5530; --whk-dot: #4E8A4B; --whk-bg: #E9F2E6; }

/* the chip carries its own type, so a wine typed by meta (no category class) is still right */
.whk-type--red { --whk-ink: #7A1626; --whk-dot: #9B1B30; --whk-bg: #F9E8EA; }
.whk-type--white { --whk-ink: #5C5416; --whk-dot: #D2BF52; --whk-bg: #F6F3DC; }
.whk-type--rose { --whk-ink: #9A2F4E; --whk-dot: #EE8FA8; --whk-bg: #FCEAF0; }
.whk-type--sparkling { --whk-ink: #6A5420; --whk-dot: #C9A54A; --whk-bg: #F5EFDF; }
.whk-type--dessert { --whk-ink: #7A400E; --whk-dot: #C9731F; --whk-bg: #FBEEDF; }
.whk-type--divin { --whk-ink: #5B3519; --whk-dot: #8A5426; --whk-bg: #F3EAE1; }
.whk-type--visit { --whk-ink: #2F5530; --whk-dot: #4E8A4B; --whk-bg: #E9F2E6; }

/* winery · region: the winery in wine red, the region stays grey */
.wh-card .wh-card__producer { font-weight: 500; }
.wh-card .wh-card__producer a { color: #8E1B2E; font-weight: 700; }
.wh-card .wh-card__producer a:hover { color: #6E1423; }

/* the name: one weight step up */
.woocommerce ul.products li.product .wh-card__title, .wh-card .wh-card__title { font-weight: 700; letter-spacing: -.005em; }

/* type chip and Vivino on one row, in the space the two-line name used to leave empty */
.wh-card .whk-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 0 0; min-height: 24px; }
.whk-type { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--whk-bg); color: var(--whk-ink); font: 600 .75rem/1.25 var(--font-text); white-space: nowrap; }
.whk-type span { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--whk-dot); box-shadow: inset 0 0 0 1px rgb(24 24 27 / .1); }
.wh-card .whk-row .wh-score { margin: 0; }
.wh-card .whk-row .wh-score--link a { color: var(--muted); font-weight: 600; text-decoration: none; }
.wh-card .whk-row .wh-score--link a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* the price: heavier and a touch larger */
.wh-card .wh-card__price { margin-top: 10px; font-size: 1.375rem; font-weight: 800; letter-spacing: -.015em; color: var(--ink); }

/* Add to cart: a red tint with a bag that fills red on hover (Divin cards included) */
.woocommerce ul.products li.product .wh-card__buy .button, .wh-card__buy .button, .wh-card.wh-divin .wh-card__buy .button {
  gap: 8px; background: #FCEBEC; color: #A11B28; border: 1px solid #F3C6CB; font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease);
}
.woocommerce ul.products li.product .wh-card__buy .button::before, .wh-card__buy .button::before {
  content: ""; flex: none; width: 17px; height: 17px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z'/%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z'/%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E") center / contain no-repeat;
}
.woocommerce ul.products li.product .wh-card__buy .button:hover, .wh-card__buy .button:hover, .wh-card.wh-divin .wh-card__buy .button:hover,
.woocommerce ul.products li.product .wh-card__buy .button:focus-visible, .wh-card__buy .button:focus-visible {
  background: #BE2130; border-color: #BE2130; color: #fff;
}
.wh-card__buy .button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.wh-card__buy .button.added { background: #fff; border-color: #F3C6CB; color: #A11B28; }

/* one click: red, with a bolt */
.wh-card .wh-card__quick { display: flex; align-items: center; justify-content: center; gap: 6px; color: #BE2130; font-weight: 700; text-decoration: none; }
.wh-card .wh-card__quick::before {
  content: ""; flex: none; width: 15px; height: 15px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.wh-card .wh-card__quick:hover { color: #8E1B2E; text-decoration: underline; text-decoration-color: currentColor; text-underline-offset: 3px; }

/* a wine without a photo: a drawn bottle on its type's tint instead of WooCommerce's grey placeholder */
.wh-card__img:has(> img[src*="woocommerce-placeholder"]) { position: relative; background: var(--whk-bg); }
.wh-card__img > img[src*="woocommerce-placeholder"] { opacity: 0; }
.wh-card__img:has(> img[src*="woocommerce-placeholder"])::after {
  content: ""; position: absolute; inset: 16% 30%; background: var(--whk-dot); opacity: .55;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 48'%3E%3Cpath d='M9.4 1h5.2v11.2c0 2.1 4.4 4.3 4.4 10.4V45a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V22.6c0-6.1 4.4-8.3 4.4-10.4z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 48'%3E%3Cpath d='M9.4 1h5.2v11.2c0 2.1 4.4 4.3 4.4 10.4V45a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V22.6c0-6.1 4.4-8.3 4.4-10.4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (max-width: 480px) {
  .wh-card .whk-row { gap: 4px 8px; margin-top: 6px; }
  .whk-type { padding: 2px 8px 2px 6px; font-size: .6875rem; gap: 5px; }
  .whk-type span { width: 7px; height: 7px; }
  .wh-card .wh-card__price { font-size: 1.1875rem; }
  .woocommerce ul.products li.product .wh-card__buy .button, .wh-card__buy .button { gap: 5px; padding: 0 6px; font-size: .8125rem; }
  .woocommerce ul.products li.product .wh-card__buy .button::before, .wh-card__buy .button::before { width: 15px; height: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .woocommerce ul.products li.product .wh-card__buy .button, .wh-card__buy .button { transition: none; }
}

/* Landing page, elastic to the screen (owner 2026-11-09: "prices and the bottom of the cards don't fit the landing page; elastic for all
   screens and mobile"): on shorter screens a compact hero and tighter shelf spacing, and the bottle frames of the home shelves sized by
   the small script in wh-cards.php (--whk-fit, class whk-fitted on <html>) so the first row of cards - bottle, name, price, Add to cart -
   ends inside the first screen. Wide or tall screens keep the normal 2:3 frame. */
html.whk-fitted body.wh-home .wh-shelf .wh-card__img { aspect-ratio: auto !important; width: 100%; height: var(--whk-fit); }
html.whk-fitted body.wh-home .wh-shelf .wh-card__img { background: #F6F6F6; } /* the studio photos' own grey, so the shorter frame has no visible photo edge */
html.whk-fitted body.wh-home .wh-shelf .wh-card__img img { width: 100% !important; height: var(--whk-fit) !important; object-fit: contain !important; mix-blend-mode: normal !important; } /* % heights do not resolve in the grid frame */
@media (max-height: 1000px) {
  body.wh-home .wh-shelf { margin-top: 8px; padding-top: 10px; }
  body.wh-home .wh-shelf__head { margin-bottom: 6px; }
  body.wh-home .wh-shelf .whk-row { margin-top: 4px; }
  body.wh-home .wh-shelf .wh-card__price { margin-top: 6px; }
  body.wh-home .wh-shelf .wh-card__buy { padding-top: 8px; }
}
@media (max-height: 1000px) and (min-width: 700px) {
  body.wh-home .wh-hero1 .wh-slide { min-height: 0; }
  body.wh-home .wh-hero1 .wh-slide__body { gap: 8px; padding: 22px 28px 24px max(36px, 3.5vw); }
  body.wh-home .wh-hero1 .wh-slide h1 { font-size: clamp(1.5rem, 1rem + 1.4vw, 2.125rem); }
  body.wh-home .wh-hero1 .wh-slide p { font-size: .9375rem; }
}
@media (max-height: 800px) and (min-width: 700px) { body.wh-home .wh-hero1 .wh-slide p, body.wh-home .wh-hero1__offer { display: none; } }
@media (max-width: 699px) {
  body.wh-home .wh-hero1 .wh-slide { min-height: 0; }
  body.wh-home .wh-hero1 .wh-slide__body { gap: 8px; padding: 18px 16px 18px; }
  body.wh-home .wh-hero1 .wh-slide h1 { font-size: 1.5rem; }
  body.wh-home .wh-hero1 .wh-slide p { font-size: .875rem; line-height: 1.4; }
}
@media (max-width: 699px) and (max-height: 900px) { body.wh-home .wh-hero1__offer { display: none; } }
@media (max-width: 699px) and (max-height: 900px) { body.wh-home .wh-hero1 .wh-slide p { display: none; } }

/* OWNER DECISION, keep at the END of this file (said twice: 08.11 "too reddish", 09.11 "why redish again? this is bad"):
   calm cards. The winery line, the type chip, Add to cart and one-click are ink and grey; the type keeps only its
   coloured dot; Add to cart fills ink on hover, never red. Red stays for the page's one main action. */
.wh-card .wh-card__producer a { color: var(--ink-2, #3F3F46); font-weight: 600; }
.wh-card .wh-card__producer a:hover { color: var(--ink); }
.whk-type { background: #F4F4F5; color: #3F3F46; }
.woocommerce ul.products li.product .wh-card__buy .button, .wh-card__buy .button, .wh-card.wh-divin .wh-card__buy .button { background: #fff; color: var(--ink); border-color: #D4D4D8; }
.woocommerce ul.products li.product .wh-card__buy .button:hover, .wh-card__buy .button:hover, .wh-card.wh-divin .wh-card__buy .button:hover,
.woocommerce ul.products li.product .wh-card__buy .button:focus-visible, .wh-card__buy .button:focus-visible { background: var(--ink); border-color: var(--ink); color: #fff; }
.wh-card__buy .button.added { background: #fff; border-color: #D4D4D8; color: var(--ink); }
.wh-card .wh-card__quick { color: var(--ink); }
.wh-card .wh-card__quick:hover { color: var(--ink); }
