/* Shared data-pill density and translucent fill. Text opacity remains full. */
.tag.dynamic-pill.dynamic-pill{padding-inline:.65em!important;background:linear-gradient(180deg,color-mix(in srgb,var(--pill-bg,#67452f) 70%,transparent),color-mix(in srgb,var(--pill-bg,#67452f) 60%,transparent))!important}
.wine-card.silver-oak-ornate :is(.so-tags,.so-appellation-row) .tag.dynamic-pill{
  padding:.65cqw .65em .6cqw!important;font-size:clamp(8px,1.8cqw,14px)!important;line-height:1.15!important;letter-spacing:.12cqw;
  background:linear-gradient(180deg,color-mix(in srgb,var(--pill-bg,#67452f) 70%,transparent),color-mix(in srgb,var(--pill-bg,#67452f) 60%,transparent))!important;
  border-radius:5cqw!important;white-space:normal;max-width:100%;overflow-wrap:anywhere;
}

/* Generic cards use the same dominant/blend row hierarchy as the ornate batch. */
.wine-card:not(.silver-oak-ornate) .tags>.wine-grape-heading,
.wine-card:not(.silver-oak-ornate) .tags>.wine-grape-list,
.wine-card:not(.silver-oak-ornate) .tags>.wine-grape-extra{display:flex;flex-wrap:wrap;gap:6px;width:100%;min-width:0}

/* Draft32: assigned hue belongs to both the ordinary pill fill and its outline. */
.wine-card .tag.dynamic-pill.dynamic-pill{border-color:var(--pill-bg,#40383a)!important}
.wine-card.silver-oak-ornate .tag.dynamic-pill.dynamic-pill::before{background:var(--pill-bg,#40383a)}
.wine-card.silver-oak-ornate :is(.so-appellation-row,.wine-leading-row) .tag.dynamic-pill::before{background:linear-gradient(135deg,#dfc695 0%,#a96722 24%,#d6b276 47%,#865019 69%,#e9b46c 88%,#ddc69e)}
.wine-card.silver-oak-ornate :is(.so-appellation-row,.wine-leading-row) .tag.dynamic-pill{border-color:transparent!important}

/* The first data row starts flush left; its longer divider tapers at both ends. */
.wine-card.silver-oak-ornate .so-tags .wine-leading-row{clear:none;position:relative;display:flow-root;width:auto;max-width:100%;box-sizing:border-box;padding-left:0;margin-bottom:.75cqw;overflow:visible}
.wine-card.silver-oak-ornate .wine-leading-row::before{content:none}
.wine-card.silver-oak-ornate .wine-leading-pills{position:relative;display:flex;flex-wrap:wrap;align-items:flex-start;gap:.65cqw;width:100%;max-width:100%;padding-bottom:1cqw}
.wine-card.silver-oak-ornate .wine-leading-pills::after{content:"";position:absolute;left:0;right:0;bottom:0;height:.16cqw;min-height:.5px;background:linear-gradient(90deg,transparent 0%,#dbb16dbb 18%,#dbb16d 50%,#dbb16dbb 82%,transparent 100%);clip-path:polygon(0 50%,18% 0,82% 0,100% 50%,82% 100%,18% 100%)}
.wine-card.silver-oak-ornate .so-tags .wine-leading-pills>.tag.dynamic-pill{display:inline-flex;font-size:clamp(8.6px,1.94cqw,15px)!important;margin:0;padding:.68cqw .65em!important}
.wine-card.silver-oak-ornate .so-tags .wine-grape-list.has-grape-heading{clear:both}

/* The leaf now leads the details hint; the label asset points right after rotation. */
.wine-card.silver-oak-ornate .so-details{padding-left:3cqw;min-height:2.8cqw;box-sizing:border-box}
.wine-card.silver-oak-ornate .so-details::before{content:"";position:absolute;left:0;top:50%;width:2.5cqw;height:2.8cqw;background:url('../assets/wine-card/gold-leaf-bullet.png') center/contain no-repeat;transform:translateY(-50%) rotate(115deg);transform-origin:center;pointer-events:none}

/* The title must paint above the positioned, opaque scene, including its floated price. */
.wine-card.silver-oak-ornate .so-title-block{position:relative;z-index:1}

/* Price reserves its actual width; subsequent title lines regain the whole row. */
.silver-oak-ornate .so-title-block{display:contents}
.wine-card.silver-oak-ornate.california-cabernet-card{grid-template-columns:25% minmax(0,1fr) auto}
.wine-card.silver-oak-ornate.california-cabernet-card .so-title-block{display:block;grid-column:2 / 4;grid-row:2;min-width:0;margin-top:1.3cqw}
.wine-card.silver-oak-ornate.california-cabernet-card .so-title-block::after{content:"";display:block;clear:both}
.wine-card.silver-oak-ornate.california-cabernet-card .so-title-block .so-price-stack{display:block;position:static;float:right;width:max-content;max-width:100%;margin:0 .35cqw .15cqw .6cqw}
.wine-card.silver-oak-ornate.california-cabernet-card .so-title-block .so-price{position:static;display:block;margin:0}
.wine-card.silver-oak-ornate.california-cabernet-card .so-title-block .so-name-row{display:block;position:static;max-width:none;margin:0;white-space:normal}
.wine-card.silver-oak-ornate.california-cabernet-card .so-title-block .so-name{display:block;position:static;max-width:none;margin:0}
.wine-card.silver-oak-ornate.california-cabernet-card .so-title-block .wine-name-primary{display:inline}
.wine-card.silver-oak-ornate.california-cabernet-card .so-title-block .wine-name-secondary{display:inline-block;vertical-align:baseline;max-width:100%}
.wine-card.silver-oak-ornate:not(.california-cabernet-card) .so-price-stack{right:1.95%}

/* Full-height hairlines preserve the header's existing boxes and number positions. */
.wine-card.silver-oak-ornate .so-fact::after{top:0;bottom:0;height:auto;width:1px;transform:scaleX(.5);transform-origin:center;background:#cfad73}
.wine-card.silver-oak-ornate .so-header{padding-bottom:0}
.wine-card.silver-oak-ornate:not(.california-cabernet-card) .so-header{height:calc(26% - .5cqw)}
.wine-card.silver-oak-ornate .so-fact{padding-bottom:.5cqw}
.wine-card.silver-oak-ornate .so-scene::after{background:linear-gradient(90deg,#0d0906f2 0%,#0d0906cf 56%,#0d090680 84%,#0d090633 100%)}

.wine-card:not(.silver-oak-ornate) .wine-leading-pills{display:flex;flex-wrap:wrap;gap:6px;min-width:0}
.wine-card:not(.silver-oak-ornate) .tag.dynamic-pill:is(.subregion-classification,.region-classification,.state-classification){border-color:#a97d50!important}
.wine-card:not(.silver-oak-ornate) .tag.dynamic-pill.burgundy-classification{border-color:#a15a70!important}
/* The original reference gets the same actual-price-width title flow. */
.wine-card.silver-oak-ornate:not(.california-cabernet-card) .so-title-block{position:absolute;display:block;left:25%;right:1.6%;top:30%}
.wine-card.silver-oak-ornate:not(.california-cabernet-card) .so-title-block .so-price-stack{position:static;display:block;float:right;width:max-content;margin:0 .35cqw 0 .6cqw}
.wine-card.silver-oak-ornate:not(.california-cabernet-card) .so-title-block .so-name-row{position:static;display:block;max-width:none;white-space:normal}
.wine-card.silver-oak-ornate:not(.california-cabernet-card) .so-title-block .so-name{display:block;white-space:normal}

/* The original Silver Oak template now has multiple companion-grape rows.
   Grow only its body/footer; retain the original 1240:410 header/title coordinates. */
.wine-card.silver-oak-ornate:not(.california-cabernet-card){aspect-ratio:auto;min-height:0;padding:21.491935% 0 1.4%!important;display:block}
.wine-card.silver-oak-ornate:not(.california-cabernet-card) .so-header{height:8.096774cqw}
.wine-card.silver-oak-ornate:not(.california-cabernet-card) .so-title-block{top:9.919355cqw}
.wine-card.silver-oak-ornate:not(.california-cabernet-card) .so-appellation-row{top:15.639516cqw}
.wine-card.silver-oak-ornate:not(.california-cabernet-card) .so-divider{top:20.268548cqw}
.wine-card.silver-oak-ornate:not(.california-cabernet-card) .so-label-window{width:25%;aspect-ratio:auto}
.wine-card.silver-oak-ornate:not(.california-cabernet-card) .so-tags{position:relative;top:auto!important;left:auto;right:auto;width:auto;max-width:none;margin:0 1.6% 0 25%}
.wine-card.silver-oak-ornate:not(.california-cabernet-card) .so-extra{position:relative;top:auto;left:auto;right:auto;margin:.8cqw 7.6% 0 25%}
.wine-card.silver-oak-ornate:not(.california-cabernet-card) .so-details{position:relative!important;top:auto;bottom:auto!important;left:auto!important;right:auto!important;width:max-content;white-space:nowrap;margin:1cqw 7.6% 0 25%}

/* Companion grapes retain their typography, arranged as two equal text columns. */
.wine-card .wine-grape-list.has-grape-heading{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:1.2cqw;row-gap:.65cqw;width:100%;min-width:0}
.wine-card .wine-grape-list.has-grape-heading>.tag.dynamic-pill.dynamic-pill{display:flex;align-items:baseline;justify-content:flex-start;min-width:0;margin:0;padding:0!important;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important;white-space:normal;overflow-wrap:normal}
.wine-card .wine-grape-list.has-grape-heading>.tag.dynamic-pill::before{all:unset;content:"";display:inline-block;width:.78em;height:.58em;align-self:center;margin-right:.45em;flex:0 0 .78em;background:url('../assets/wine-card/grape-arrow-gold.svg') center/contain no-repeat;filter:drop-shadow(0 .5px .3px #160b0799)}
.wine-card .wine-grape-list.has-grape-heading>.tag.dynamic-pill::after{content:none!important;display:none!important}
.wine-card.silver-oak-ornate .wine-leading-pills::after{left:-1.3cqw;right:40%;min-height:.75px;background:linear-gradient(90deg,#dbb16d99,#dbb16ddd 6%,#dbb16d 50%,#dbb16ddd 94%,#dbb16d99);clip-path:polygon(0 25%,6% 0,94% 0,100% 25%,100% 75%,94% 100%,6% 100%,0 75%)}

.wine-card .wine-grape-list.has-grape-heading>.tag.dynamic-pill.dynamic-pill{color:#e5c99f!important;-webkit-text-stroke:.15px #f3dfbd;paint-order:stroke fill}

/* Absolute placement adds format information without changing any surrounding flow. */
.wine-card .so-price-stack:has(.magnum-pill){position:relative!important;inset:auto!important}
.wine-card .magnum-pill{position:absolute;top:calc(100% + .25cqw);right:auto;left:50%;transform:translateX(-50%);display:block;width:max-content;border:1px solid transparent;border-radius:999px;padding:.12em .35em;color:#f6ebd7;background:linear-gradient(#431d2b,#32151f) padding-box,linear-gradient(135deg,#dfc695 0%,#a96722 24%,#d6b276 47%,#865019 69%,#e9b46c 88%,#ddc69e) border-box;font:700 clamp(8px,1.55cqw,13px)/1.1 Georgia,serif;letter-spacing:.06em;white-space:nowrap;text-shadow:0 1px 1px #0008}

/* Prefix is decorative and does not shift the centered BIN digits. */
.wine-card :is([data-so-field="BIN"],.bin-value){position:relative}
.wine-card .bin-prefix{position:absolute;right:100%;bottom:.08em;font-size:.75em;line-height:1;margin-right:.15em}

/* Compact region bodies without reducing their text. */
.wine-card .tag.dynamic-pill:is(.subregion-classification,.region-classification,.state-classification),.wine-card.silver-oak-ornate .so-appellation-row .tag.dynamic-pill{padding:.3cqw .4em!important}

.wine-card.silver-oak-ornate .wine-leading-pills::after{left:0;right:38.7%}

/* Leading classification is a distinct tier for every wine, including one grape. */
.wine-card.silver-oak-ornate .so-tags .wine-leading-pills>.tag.dynamic-pill.dynamic-pill{
 font-size:clamp(9px,2.08cqw,17px)!important;
 padding:.62cqw .68em!important;
 box-shadow:inset 0 1px 2px #f3d6a533,0 1px 2px #160b0770!important;
}
.wine-card.silver-oak-ornate .so-tags .wine-leading-pills>.tag.dynamic-pill.dynamic-pill::before{
 padding:.8px;
 background:linear-gradient(135deg,#ecd8af 0%,#987245 24%,#e2c38d 47%,#80603a 69%,#dec08c 88%,#efdeba)!important;
}
/* All data pills stay above the lower divider; their softer fills expose the scene. */
.wine-card.silver-oak-ornate .so-tags .wine-leading-pills>.tag.dynamic-pill.dynamic-pill{
 background:linear-gradient(180deg,color-mix(in srgb,var(--pill-bg,#67452f) 58%,transparent),color-mix(in srgb,var(--pill-bg,#67452f) 48%,transparent))!important;
}
