/* ==================== RESET & BASE ==================== */
*, *::before, *::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
:root {
--font-ecommerce:  "Inter ",  "SF Pro Display ",  "SF Pro Text ", -apple-system, BlinkMacSystemFont,  "Segoe UI ", Roboto,  "Helvetica Neue ", Arial, sans-serif;
--font-price:  "Inter ",  "SF Pro Display ",  "SF Pro Text ", -apple-system, BlinkMacSystemFont,  "Segoe UI ", Roboto,  "Helvetica Neue ", Arial, sans-serif;
--primary: #1358ff;
--primary-light: #1f67ff;
--primary-very-light: #4880fb;
--primary-dark: #0f4ee8;
--primary-bg: #edf3ff;
--text-dark: #0b1430;
--text-mid:  #263044;
--text-light: #66758d;
--text-muted: #96a0b2;
--border: #e2e8f2;
--border-strong: #d8e0ec;
--bg-white: #ffffff;
--bg-page: #f5f6fa;
--radius: 14px;
--radius-sm: 10px;
--radius-xs: 8px;
--shadow-nav: 0 1px 0 rgba(15, 23, 42, 0.02), 0 10px 24px rgba(15, 23, 42, 0.04);
--success: #10943B;
--success-bg: #EAF8EF;
--danger: #FF334B;
--search-bg: hsl(0, 0 %, 95%);
--shadow-sm: 0 2px 8px rgba(12, 24, 64, 0.05);
--shadow-md: 0 12px 30px rgba(12, 24, 64, 0.08);
--radius-lg: 18px;
--primary-soft: #edf3ff;
--primary-soft-border: #d8e4ff; 
--image-panel: #f1f2f6;
}
html,
body {
max-width: 100%;
overflow-x: hidden;
overflow-x: clip;
}
body {
font-family: var(--font-ecommerce);
color: var(--text-dark);
background: var(--bg-page);
line-height: 1.5;
font-weight: 500;
letter-spacing: -0.01em;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
}
a {
color: inherit;
text-decoration: none;
}
button,
input {
font: inherit;
}
h1, h2, h3, h4, h5, h6,
p, a, span, button, input, label, dt, dd, th, td {
font-family: var(--font-ecommerce);
}
button {
cursor: pointer;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
/* ==================== PRODUCT DASHBOARD ==================== */
.product-page {
width: 100%;
max-width: 1440px;
margin: 0 auto;
padding: 8px 32px 36px;
}
.card {
border: 1px solid var(--border);
border-radius: var(--radius-lg);
background: var(--bg-white);
box-shadow: var(--shadow-sm);
}
.product-dashboard {
display: grid;
/* Single column: the summary card spans the full content width; the
golden-ratio split (gallery 1 : content) applies to the columns below. */
gap: 16px;
align-items: start;
}
.dashboard-columns {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, 1.618fr);
gap: 16px;
align-items: start;
}
.listing-media-card {
display: flex;
flex-direction: column;
justify-content: space-between;
min-height: 442px;
padding: 16px;
}
.listing-image-wrap {
position: relative;
display: grid;
place-items: center;
flex: 1;
min-height: 300px;
overflow: hidden;
border-radius: 16px;
background: radial-gradient(circle at center, var(--bg-white, #ffffff) 0%, var(--bg-white, #ffffff) 45%, var(--surface-alt, #F6F7FA) 100%);
}
.product-main-img {
position: absolute;
top: 0;
left: 0;
display: block;
width: 100%;
height: 100%;
object-fit: contain;
mix-blend-mode: multiply;
}
/* v55: single-line thumbnail strip with paging arrows */
.thumb-strip {
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
width: 100%;
min-width: 0;
margin: 12px 0 16px;
}
.thumb-strip-arrow {
flex: 0 0 auto;
width: 26px;
height: 26px;
border-radius: 50%;
border: 1px solid var(--border-strong, #D6DCE9);
background: var(--bg-white, #fff);
color: var(--text-mid, #4a5568);
display: grid;
place-items: center;
cursor: pointer;
padding: 0;
}
.thumb-strip-arrow:hover { border-color: var(--primary); color: var(--primary); }
.image-dots {
display: flex;
gap: 8px;
min-width: 0;
flex-wrap: nowrap;
overflow-x: auto;
scrollbar-width: none;
-ms-overflow-style: none;
}
.image-dots::-webkit-scrollbar { display: none; }
.image-thumb {
flex: 0 0 auto;
width: 64px;
height: 48px;
border-radius: 8px;
overflow: hidden;
border: 2px solid var(--border-strong, #D6DCE9);
padding: 0;
cursor: pointer;
background: var(--surface-alt, #F3F5F9);
transition: border-color .15s ease;
}
.image-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-thumb.active {
border-color: var(--primary);
}
.image-thumb:hover { border-color: var(--primary); }
.quick-listing-link {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
min-height: 44px;
margin-top: 10px;
padding: 10px 20px;
border: 1.5px solid var(--primary);
border-radius: 10px;
background: linear-gradient(180deg, var(--primary, #1b63ff) 0%, var(--primary) 100%);
color: var(--bg-white);
font-size: 15px;
font-weight: 650;
transition: background 0.2s, transform 0.2s;
}
.quick-listing-link:hover {
transform: translateY(-1px);
background: linear-gradient(180deg, var(--primary, #2b72ff) 0%, var(--primary-dark) 100%);
box-shadow: 0 16px 30px rgba(19, 88, 255, 0.26);
}
.tag-icon {
display: inline-flex;
flex-shrink: 0;
}
.quick-listing-link span:nth-child(2) {
flex: 1;
text-align: center;
}
.product-summary-stack {
display: grid;
grid-template-columns: 1fr;
gap: 12px;
}
.product-summary-card {
grid-column: 1 / -1;
}
.product-summary-card,
.marketplace-card,
.specs-card {
padding: 18px 20px;
}
.summary-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 16px;
}
.summary-header h1 {
color: var(--text-dark);
font-size: clamp(22px, 1.8vw, 26px);
font-weight: 600;
line-height: 1.25;
letter-spacing: -0.012em;
}
.status-row {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-top: 14px;
}
.pill {
display: inline-flex;
align-items: center;
min-height: 26px;
padding: 5px 12px;
border-radius: 7px;
background: var(--surface-alt, #F3F5F9);
color: var(--text-mid);
font-size: 12px;
font-weight: 600;
}
.pill-success {
background: var(--success-bg);
color: var(--success, #08792E);
}
.summary-actions {
display: flex;
align-items: center;
gap: 10px;
flex-shrink: 0;
}
.update-btn,
.icon-btn {
border: 1px solid var(--primary-soft-border, #C8D4FF);
background: var(--bg-white);
color: var(--primary);
box-shadow: 0 1px 2px rgba(0, 68, 255, 0.08);
}
.update-btn {
display: inline-flex;
align-items: center;
gap: 9px;
min-height: 42px;
padding: 0 18px;
border-radius: 8px;
font-size: 13px;
font-weight: 600;
}
.icon-btn {
display: inline-flex;
align-items: center;
justify-content: center;
width: 42px;
height: 42px;
border-radius: 9px;
color: var(--text-dark);
}
.update-btn:hover,
.icon-btn:hover {
background: var(--primary-bg);
}
.update-btn:disabled {
opacity: 0.4;
cursor: wait;
pointer-events: none;
}
/* ==================== CARD MENU DROPDOWN ==================== */
.card-menu {
position: relative;
}
.card-menu-dropdown {
position: absolute;
top: calc(100% + 6px);
right: 0;
min-width: 160px;
padding: 6px;
border: 1px solid var(--border, #e2e8f0);
border-radius: 12px;
background: var(--bg-white);
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
z-index: 50;
}
.card-menu-item {
display: block;
width: 100%;
padding: 10px 14px;
border: 0;
border-radius: 8px;
background: transparent;
color: var(--text-mid, #475569);
font-size: 14px;
font-weight: 600;
text-align: left;
cursor: pointer;
transition: background 0.12s ease;
font-family: inherit;
}
.card-menu-item:hover {
background: var(--surface-alt, #f1f5f9);
color: var(--text-dark);
}
.card-menu-item[disabled] {
opacity: 0.4;
cursor: wait;
pointer-events: none;
}
.updated-text {
margin-top: 10px;
color: var(--text-light);
font-size: 12px;
text-align: right;
}
.specs-card h2,
.lower-grid h2 {
color: var(--text-dark);
font-size: 15px;
font-weight: 700;
letter-spacing: -0.01em;
}
.info-dot {
color: var(--text-muted);
font-size: 13px;
font-weight: 600;
}
.specifics-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 12px 40px;
margin-top: 16px;
position: relative;
}
.specifics-grid div {
display: grid;
grid-template-columns: minmax(92px, 0.65fr) minmax(0, 1fr);
align-items: baseline;
gap: 16px;
}
.specifics-grid dt {
color: var(--text-light);
font-size: 12px;
font-weight: 600;
}
.specifics-grid dd {
color: var(--text-dark);
font-size: 13px;
font-weight: 600;
}
/* ==================== DESCRIPTION CARD ==================== */
.description-card {
padding: 22px 26px;
position: relative;
}
.description-card h2 {
color: var(--text-dark);
font-size: 15px;
font-weight: 700;
letter-spacing: -0.01em;
}
.description-content {
margin-top: 14px;
color: var(--text-mid, #475569);
font-size: 14px;
line-height: 1.7;
display: -webkit-box;
-webkit-line-clamp: 5;
-webkit-box-orient: vertical;
overflow: hidden;
position: relative;
}
.description-content:has(.description-loading) {
display: block;
-webkit-line-clamp: unset;
overflow: visible;
}
.description-content p {
margin: 0 0 10px 0;
color: var(--text-mid, #475569);
}
.description-content p:last-child {
margin-bottom: 0;
}
.description-loading {
display: flex;
align-items: center;
gap: 10px;
padding: 16px 0;
color: var(--text-muted);
font-size: 13px;
font-weight: 600;
}
.specifics-loading {
display: flex;
align-items: center;
gap: 10px;
padding: 16px 0;
color: var(--text-muted);
font-size: 13px;
font-weight: 600;
}
.specifics-empty {
text-align: center;
padding: 16px 0;
color: var(--auth-muted);
font-size: 13px;
}
.spinner {
width: 16px;
height: 16px;
border: 2px solid var(--border, #e2e8f0);
border-top-color: var(--premium-blue);
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* v30: descriptions are generated short enough to fit the card in full -
   the clamping fade was removed. */
/* v33: the 'View all information' / 'Read full blog' links sit level with
   their section titles instead of being pushed down by the description
   card's 12px link margin. */
.card-title-row .view-link,
.section-heading-row .view-link { margin-top: 0 !important; align-self: center; }
/* v32: gallery video slide - on-site YouTube player with native controls
   (including fullscreen) rendered inside the portrait media area. */
.listing-image-wrap { position: relative; }
.gallery-video-frame {
    position: absolute;
    inset: 0;
    display: block;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    z-index: 1;
}
.gallery-video-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.gallery-video-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: #000;
    cursor: pointer;
}
.gallery-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gallery-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: rgba(11, 20, 48, 0.82);
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transition: background 0.15s ease;
}
.gallery-video-thumb:hover .gallery-video-play { background: var(--primary, #1358ff); }
.gallery-video-player { position: absolute; inset: 0; background: #000; }
.description-card .view-link {
display: inline-flex;
margin-top: 12px;
padding: 0;
border: 0;
background: none;
cursor: pointer;
}
/* Remove white line - eliminate all borders from specifics section */
.specifics-card {
border: none;
box-shadow: none;
background: transparent;
}
.specifics-card::before,
.specifics-card::after {
content: none;
}
.specifics-grid {
border: none;
position: relative;
}
.specifics-grid::before,
.specifics-grid::after {
content: none;
}
.specifics-grid div {
border: none;
border-bottom: none;
background: transparent;
}
.view-link {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
margin-top: 12px;
color: var(--primary);
font-size: 13px;
font-weight: 600;
}
.specs-card .view-link {
display: flex;
margin-top: 12px;
}
/* ==================== LOWER ANALYTICS CARDS ==================== */
.lower-grid {
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: 16px;
margin-top: 14px;
}
.distribution-card {
min-height: 230px;
padding: 18px 20px;
}
.card-title-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}
.marketplace-filter {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 6px;
margin-top: 10px;
}
.filter-label {
font-size: 12px;
font-weight: 600;
color: var(--text-muted);
margin-right: 4px;
}
.filter-chip {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 5px 12px;
border: 1.5px solid var(--border);
border-radius: 20px;
background: var(--bg-white);
color: var(--text-light);
font-size: 12px;
font-weight: 600;
font-family: inherit;
cursor: pointer;
transition: all 0.15s ease;
white-space: nowrap;
}
.filter-chip:hover {
border-color: var(--primary);
color: var(--primary);
}
.filter-chip.active {
background: var(--primary);
border-color: var(--primary);
color: #fff;
}
.filter-chip-label {
line-height: 1;
}
.filter-chip-logo-wrap {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 1px 4px;
border-radius: 4px;
background: rgba(255, 255, 255, 0.9);
line-height: 1;
}
.filter-chip.active .filter-chip-logo-wrap {
background: var(--overlay, rgba(255, 255, 255, 0.95));
}
.filter-logo-img {
height: 14px;
width: auto;
max-width: 50px;
object-fit: contain;
flex-shrink: 0;
}
.market-logo-img {
height: 16px;
width: auto;
max-width: 50px;
object-fit: contain;
vertical-align: middle;
}
.deal-badge {
padding: 5px 11px;
border-radius: 7px;
background: var(--success-bg);
color: var(--success, #08792E);
font-size: 12px;
font-weight: 600;
}
.mini-histogram {
display: flex;
align-items: end;
gap: 6px;
height: 106px;
margin: 22px 12px 0;
padding: 0 0 8px;
border-bottom: 1px solid var(--border);
}
.mini-histogram span {
flex: 1;
height: var(--h);
min-height: 5px;
border-radius: 4px 4px 0 0;
background: #D7E2FF;
}
.distribution-scale {
display: flex;
justify-content: space-between;
margin-top: 12px;
}
.distribution-scale div {
display: flex;
flex-direction: column;
gap: 4px;
}
.distribution-scale div:nth-child(2) {
align-items: center;
}
.distribution-scale div:nth-child(3) {
align-items: flex-end;
}
.distribution-scale strong {
color: var(--text-dark);
font-size: 15px;
font-weight: 700;
}
.distribution-scale span {
font-size: 12px;
font-weight: 600;
}
.distribution-scale div:nth-child(1) span {
color: var(--success);
}
.distribution-scale div:nth-child(2) span {
color: var(--primary);
}
.distribution-scale div:nth-child(3) span {
color: var(--danger);
}
.marketplace-card .view-link {
display: flex;
margin-top: 12px;
}
/* Breakdown filter toggle: sits under the card's "View all listings" link. */
.card-filters-toggle-row {
display: flex;
justify-content: flex-end;
margin: 2px 0 0;
}
/* Marketplace breakdown: more than 10 marketplaces scroll inside the card
   (the max-height is set from JS to exactly 10 measured rows). Horizontal
   overflow is impossible - overflow-y:auto alone makes browsers compute
   overflow-x:auto too, which showed a sideways scrollbar on phones. */
.marketplace-table-scroll {
margin-top: 12px;
overflow-y: auto;
overflow-x: hidden;
}
.marketplace-table-scroll .market-table {
margin-top: 0;
}
.market-table {
width: 100%;
margin-top: 12px;
border-collapse: collapse;
}
.market-table th {
padding: 0 0 8px;
color: var(--text-muted);
font-size: 11px;
font-weight: 600;
text-align: left;
}
.market-table th:nth-child(2),
.market-table td:nth-child(2) {
text-align: left;
}
.market-table th:nth-child(3),
.market-table td:nth-child(3),
.market-table th:nth-child(4),
.market-table td:nth-child(4) {
text-align: right;
}
.market-table td {
padding: 7px 0;
color: var(--text-dark);
font-size: 13px;
font-weight: 650;
border-top: 1px solid #F0F2F7;
}
.market-table td:first-child {
display: flex;
align-items: center;
gap: 10px;
}
.market-table td:nth-child(2),
.market-table td:nth-child(3) {
color: var(--text-mid);
font-weight: 650;
}
.market-table td:last-child {
color: var(--text-muted);
font-size: 20px;
line-height: 1;
}
/* Clickable marketplace rows */
.marketplace-row-clickable {
cursor: pointer;
transition: background 0.15s ease;
}
.marketplace-row-clickable:hover {
background: var(--primary-bg);
}
.marketplace-row-clickable:hover td:last-child {
color: var(--primary);
}
.market-logo {
display: inline-flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
width: 20px;
height: 20px;
font-size: 10px;
font-weight: 900;
line-height: 1;
}
.market-logo.amazon {
color: #111;
font-size: 23px;
font-family: var(--font-ecommerce);
}
.market-logo.ebay {
color: #E53238;
font-size: 9px;
letter-spacing: -0.08em;
}
.market-logo.backmarket {
border-radius: 3px;
background: #111;
color: #fff;
font-size: 8px;
text-transform: lowercase;
}
.market-logo.walmart {
color: #FFB000;
font-size: 18px;
}
/* ==================== RESPONSIVE ==================== */
@media (max-width: 1180px) {
.product-dashboard,
.dashboard-columns,
.lower-grid {
grid-template-columns: 1fr;
}
.listing-media-card {
    min-height: auto;
}
.listing-image-wrap {
    min-height: 260px;
}
.product-summary-stack {
    grid-template-rows: auto;
    grid-template-columns: 1fr;
}
}
@media (max-width: 900px) {
.product-page {
padding: 16px;
}
.summary-header {
    flex-direction: column;
}
.updated-text {
    text-align: left;
}
}
@media (max-width: 620px) {
.listing-media-card,
.product-summary-card,
.specs-card,
.distribution-card,
.marketplace-card {
padding: 14px;
border-radius: 14px;
}
.summary-actions {
     width: 100%;
 }
 .update-btn {
     flex: 1;
     justify-content: center;
 }
 .specifics-grid {
     grid-template-columns: 1fr;
     gap: 10px;
 }
 .market-table {
     min-width: 0;
     width: 100%;
 }
 .marketplace-card {
     overflow-x: auto;
 }
 /* Fit the marketplace table into the viewport on phones: drop the trailing
    chevron column and tighten padding so the page never scrolls sideways. */
 .market-table th:nth-child(4),
 .market-table td:nth-child(4) {
     display: none;
 }
 .market-table th,
 .market-table td {
     padding: 9px 6px;
     font-size: 12px;
 }
 .quick-listing-link {
     padding: 10px 12px;
     font-size: 13px;
 }
}
/* ==================== ECOMMERCE TYPOGRAPHY REFINEMENT ==================== */
body {
font-family: var(--font-ecommerce);
font-weight: 500;
letter-spacing: -0.01em;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
}
.product-page {
font-size: 14px;
}
.summary-header h1 {
font-family: var(--font-ecommerce);
font-weight: 600;
letter-spacing: -0.01em;
}
.distribution-scale strong,
.market-table td:nth-child(2),
.market-table td:nth-child(3) {
font-family: var(--font-price);
}
.pill,
.specifics-grid dt,
.market-table th,
.updated-text {
letter-spacing: 0;
}
.pill {
font-weight: 600;
}
.listing-name,
.saved-name,
.market-table td,
.specifics-grid dd {
font-weight: 600;
}
/* ==================== PREMIUM PRODUCT PAGE UPDATE ==================== */
:root {
--premium-bg: #f6f8fc;
--premium-card: #ffffff;
--premium-border: #e6ebf4;
--premium-border-soft: #eef2f7;
--premium-blue: #1358ff;
--premium-blue-soft: #eef4ff;
--premium-green: #159447;
--premium-green-soft: #eaf8ef;
--premium-red: #f03d57;
--premium-shadow: 0 16px 42px rgba(15, 23, 42, 0.065);
--premium-shadow-soft: 0 8px 22px rgba(15, 23, 42, 0.045);
}
body {
background:
radial-gradient(circle at 18% 0%, rgba(19, 88, 255, 0.045), transparent 28%),
linear-gradient(180deg, var(--bg-page, #fbfcff) 0%, var(--premium-bg) 58%, var(--bg-page, #f7f8fb) 100%);
}
.product-page {
max-width: 1470px;
padding: 46px 36px 42px;
}
.card {
border: 1px solid var(--premium-border);
border-radius: 18px;
background: var(--premium-card, #ffffff);
box-shadow: var(--card-shadow, var(--premium-shadow-soft)), var(--card-edge, none);
}
.product-dashboard {
gap: 22px;
}
.dashboard-columns {
/* Golden ratio: gallery (1) : content on its right. */
grid-template-columns: minmax(0, 1fr) minmax(0, 1.618fr);
gap: 22px;
align-items: stretch;
}
.listing-media-card {
min-height: 532px;
padding: 20px;
box-shadow: var(--card-shadow, var(--premium-shadow)), var(--card-edge, none);
}
.listing-image-wrap {
position: relative;
min-height: 0;
border: 1px solid var(--premium-border-soft);
border-radius: 17px;
background: var(--bg-white);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
display: grid;
place-items: center;
overflow: hidden;
}
.product-main-img {
position: absolute;
top: 0;
left: 0;
display: block;
width: 100%;
height: 100%;
max-height: none;
object-fit: contain;
mix-blend-mode: normal;
border-radius: 16px;
}
.gallery-arrow {
position: absolute;
top: 50%;
z-index: 2;
display: inline-flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
border: 0;
border-radius: 50%;
background: var(--overlay, rgba(255, 255, 255, 0.95));
color: var(--text-dark, #0f172a);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
transform: translateY(-50%);
cursor: pointer;
opacity: 1;
transition: background 0.18s ease, box-shadow 0.18s ease;
}
.gallery-arrow:hover {
background: var(--bg-white);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}
.gallery-arrow-left {
left: 16px;
}
.gallery-arrow-right {
right: 16px;
}
.thumb-strip {
margin: 16px 0 20px;
}
.dot {
width: 9px;
height: 9px;
background: #cfd7e6;
}
.dot.active {
width: 10px;
height: 10px;
background: var(--premium-blue);
box-shadow: 0 0 0 4px rgba(19, 88, 255, 0.11);
}
.product-summary-stack {
gap: 18px;
}
.listing-condition {
margin: 2px 0 6px;
display: inline-flex;
align-items: center;
width: fit-content;
max-width: fit-content;
padding: 2px 10px;
font-size: 12px;
line-height: 1.5;
font-weight: 650;
letter-spacing: -0.01em;
color: var(--primary);
background: var(--primary-soft, rgba(19, 88, 255, 0.08));
border: 1px solid var(--primary-soft-border, rgba(19, 88, 255, 0.2));
border-radius: 999px;
text-transform: capitalize;
}
.product-summary-card,
.marketplace-card,
.specs-card,
.food-scores-card,
.food-ingredients-card {
padding: 22px 26px;
}
.product-summary-card {
min-height: 158px;
box-shadow: var(--card-shadow, var(--premium-shadow)), var(--card-edge, none);
}
.summary-header h1 {
font-size: clamp(25px, 2vw, 30px);
font-weight: 750;
letter-spacing: -0.035em;
}
.status-row {
gap: 9px;
margin-top: 15px;
}
.pill {
min-height: 30px;
padding: 6px 12px;
border: 1px solid var(--surface-alt, #eef1f7);
border-radius: 9px;
background: var(--surface-alt, #f6f8fb);
color: var(--text-mid, #334155);
font-size: 12px;
font-weight: 700;
}
.pill-success {
border-color: rgba(21, 148, 71, 0.08);
background: var(--premium-green-soft);
color: var(--premium-green, #087d31);
}
.icon-btn {
border-color: var(--premium-border);
background: var(--bg-white);
color: var(--text-dark, #0f172a);
box-shadow: 0 3px 10px rgba(15, 23, 42, 0.045);
}
.icon-btn:hover {
background: var(--surface-alt, #f8fbff);
color: var(--premium-blue);
}
.updated-text {
margin-top: 15px;
color: var(--text-light, #748097);
font-size: 12px;
font-weight: 650;
}
.specs-card h2,
.lower-grid h2,
.food-scores-card h2,
.food-ingredients-card h2 {
font-size: 16px;
font-weight: 800;
letter-spacing: -0.025em;
}
.specifics-grid {
gap: 14px 58px;
margin-top: 18px;
}
.specifics-grid dt {
color: var(--text-light, #6f7d94);
font-size: 12px;
font-weight: 800;
}
.specifics-grid dd {
color: var(--text-dark, #10172f);
font-size: 13px;
font-weight: 800;
}
.view-link {
color: var(--premium-blue);
font-weight: 750;
}
.lower-grid {
grid-template-columns: minmax(0, 1fr);
gap: 18px;
margin-top: 18px;
}
.distribution-card {
min-height: 292px;
padding: 22px 24px;
box-shadow: var(--card-shadow, var(--premium-shadow-soft)), var(--card-edge, none);
}
.deal-badge {
border: 1px solid rgba(21, 148, 71, 0.08);
border-radius: 10px;
background: var(--premium-green-soft);
color: var(--premium-green, #087d31);
font-weight: 800;
}
.mini-histogram {
position: relative;
gap: 8px;
height: 108px;
margin: 27px 8px 0;
padding-bottom: 14px;
border-bottom: 0;
}
.mini-histogram::after {
content: "";
position: absolute;
left: 0;
right: 0;
bottom: 3px;
height: 1px;
background: linear-gradient(90deg, rgba(21, 148, 71, 0.45), rgba(19, 88, 255, 0.42) 50%, rgba(240, 61, 87, 0.45));
}
.mini-histogram span {
border-radius: 5px 5px 1px 1px;
background: var(--premium-blue-soft, #dbe5fb);
}
.mini-histogram span:nth-child(10) {
background: var(--premium-blue);
box-shadow: 0 8px 18px rgba(19, 88, 255, 0.24);
}
.distribution-scale {
position: relative;
margin-top: 14px;
}
.distribution-scale::before,
.distribution-scale::after {
content: "";
position: absolute;
top: -18px;
width: 8px;
height: 8px;
border-radius: 999px;
}
.distribution-scale::before {
left: 0;
background: var(--premium-green);
}
.distribution-scale::after {
right: 0;
background: var(--premium-red);
}
.distribution-scale div:nth-child(2)::before {
content: "";
position: absolute;
top: -18px;
left: 50%;
width: 8px;
height: 8px;
border-radius: 999px;
background: var(--premium-blue);
transform: translateX(-50%);
}
.distribution-scale strong {
font-size: 18px;
font-weight: 800;
}
.distribution-scale span {
font-size: 12px;
font-weight: 800;
}
.market-table {
margin-top: 14px;
}
.market-table th {
padding-bottom: 10px;
color: var(--text-muted, #8b97aa);
font-size: 11px;
font-weight: 800;
}
.market-table td {
padding: 9px 0;
border-top: 1px solid var(--premium-border-soft);
font-size: 13px;
font-weight: 750;
}
.market-table td:nth-child(2),
.market-table td:nth-child(3) {
color: var(--text-mid, #394257);
font-weight: 750;
}
.market-logo {
width: 22px;
height: 22px;
}
.market-logo.backmarket {
border-radius: 5px;
}
@media (max-width: 1180px) {
.product-page {
padding: 28px 22px 34px;
}
.product-dashboard,
.dashboard-columns,
.lower-grid {
    grid-template-columns: 1fr;
}
.listing-media-card {
    min-height: 0;
}
/* Full-width media card: derive the image area height from the card WIDTH
   (stable per viewport) instead of the loaded image aspect ratio, so
   switching between portrait and landscape images never resizes the card.
   height stays within [340px, 560px]; object-fit contain letterboxes. */
.listing-image-wrap {
    min-height: 340px;
    max-height: 560px;
    aspect-ratio: 4/3;
}
}
@media (max-width: 620px) {
.product-page {
padding: 18px 14px 28px;
}
.listing-image-wrap {
    min-height: 250px;
}
.gallery-arrow {
    width: 36px;
    height: 36px;
}
.gallery-arrow-left {
    left: 12px;
}
.gallery-arrow-right {
    right: 12px;
}
}
.product-placeholder {
display: grid;
place-items: center;
width: 100%;
min-height: 300px;
color: var(--primary);
font-size: 72px;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* ==================== COLLECTIONS POPUP ==================== */
.collections-popup {
position: fixed;
inset: 0;
z-index: 500;
display: flex;
align-items: center;
justify-content: center;
}
.collections-popup:not([hidden]) {
display: flex;
}
.collections-overlay {
position: absolute;
inset: 0;
background: rgba(0, 0, 0, 0.35);
backdrop-filter: blur(4px);
}
.collections-card {
position: relative;
z-index: 1;
width: 420px;
max-width: calc(100vw - 32px);
max-height: 70vh;
background: var(--bg-white);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
box-shadow: 0 24px 64px rgba(0, 0, 0, 0.15);
display: flex;
flex-direction: column;
overflow: hidden;
}
.collections-header {
display: flex;
align-items: center;
gap: 10px;
padding: 18px 20px 14px;
border-bottom: 1px solid var(--border);
}
.collections-title {
flex: 1;
font-size: 18px;
font-weight: 800;
letter-spacing: -0.03em;
color: var(--text-dark);
}
.collections-add-btn {
width: 36px;
height: 36px;
border-radius: 10px;
background: var(--primary-soft);
color: var(--primary);
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
border: 1px solid var(--primary-soft-border);
transition: background 0.15s ease, transform 0.15s ease;
}
.collections-add-btn:hover {
background: var(--primary-soft-border, #dce6ff);
transform: translateY(-1px);
}
.collections-close-btn {
width: 32px;
height: 32px;
border-radius: 8px;
color: var(--text-light);
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: background 0.15s ease, color 0.15s ease;
}
.collections-close-btn:hover {
background: var(--surface-alt, #f1f5f9);
color: var(--text-dark);
}
.collections-create {
display: flex;
align-items: center;
gap: 8px;
padding: 12px 20px;
border-bottom: 1px solid var(--border);
background: var(--surface-alt, #fafbfe);
}
.collections-create input {
flex: 1;
height: 38px;
padding: 0 14px;
border: 1px solid var(--border);
border-radius: 10px;
font-size: 14px;
font-weight: 500;
font-family: inherit;
color: var(--text-dark);
background: var(--bg-white);
outline: none;
transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.collections-create input:focus {
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(19, 88, 255, 0.1);
}
.collections-create input::placeholder {
color: var(--text-light);
}
.collections-create-save {
height: 38px;
padding: 0 16px;
border-radius: 10px;
background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary) 100%);
color: #fff;
font-size: 14px;
font-weight: 700;
letter-spacing: -0.01em;
cursor: pointer;
border: none;
box-shadow: 0 4px 10px rgba(19, 88, 255, 0.2);
transition: transform 0.15s ease, box-shadow 0.15s ease;
white-space: nowrap;
}
.collections-create-save:hover {
transform: translateY(-1px);
box-shadow: 0 6px 14px rgba(19, 88, 255, 0.26);
}
.collections-list {
flex: 1;
overflow-y: auto;
padding: 8px 12px 12px;
}
.collection-row {
display: flex;
align-items: center;
gap: 12px;
padding: 10px 12px;
border-radius: 12px;
cursor: pointer;
transition: background 0.12s ease;
border: 1px solid transparent;
}
.collection-row:hover {
background: var(--surface-alt, #f8fafc);
}
.collection-row.selected {
background: var(--primary-soft);
border-color: var(--primary-soft-border);
}
.collection-row.selected .collection-check {
opacity: 1;
}
.collection-thumb {
width: 44px;
height: 44px;
border-radius: 10px;
overflow: hidden;
flex-shrink: 0;
background: var(--image-panel);
display: flex;
align-items: center;
justify-content: center;
}
.collection-thumb img {
width: 100%;
height: 100%;
object-fit: cover;
}
.collection-thumb .collection-thumb-placeholder {
font-size: 20px;
color: var(--primary);
}
.collection-info {
flex: 1;
min-width: 0;
}
.collection-name {
font-size: 15px;
font-weight: 700;
color: var(--text-dark);
letter-spacing: -0.01em;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.collection-count {
font-size: 12px;
font-weight: 500;
color: var(--text-light);
margin-top: 2px;
}
.collection-check {
width: 22px;
height: 22px;
border-radius: 6px;
border: 2px solid var(--border);
background: var(--bg-white);
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transition: opacity 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.collection-row.selected .collection-check {
background: var(--primary);
border-color: var(--primary);
}
.collection-check svg {
width: 14px;
height: 14px;
color: #fff;
}
.collections-empty {
text-align: center;
padding: 32px 16px;
color: var(--text-light);
font-size: 14px;
font-weight: 500;
}
.collections-empty-icon {
font-size: 32px;
display: block;
margin-bottom: 8px;
}
.collections-save-btn {
margin: 0 12px 12px;
height: 42px;
border-radius: 12px;
background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary) 100%);
color: #fff;
font-size: 15px;
font-weight: 750;
letter-spacing: -0.01em;
cursor: pointer;
border: none;
box-shadow: 0 8px 18px rgba(19, 88, 255, 0.2);
transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.collections-save-btn:hover {
transform: translateY(-1px);
box-shadow: 0 12px 24px rgba(19, 88, 255, 0.26);
}
.collections-save-btn:disabled {
opacity: 0.4;
cursor: not-allowed;
transform: none;
box-shadow: none;
}
/* ==================== LOADING HEADER ==================== */
.loading-header {
grid-column: 1/-1;
text-align: center;
padding: 20px 0 12px;
}
.loading-spinner {
display: inline-block;
width: 22px;
height: 22px;
border: 3px solid var(--border);
border-top-color: var(--primary);
border-radius: 50%;
animation: spin 0.8s linear infinite;
vertical-align: middle;
margin-right: 8px;
}
.loading-text {
color: var(--text-dark, #000000);
font-size: 18px;
font-weight: 700;
font-family: var(--font-ecommerce);
vertical-align: middle;
}
/* Marketplace dropdown selectors */
.marketplace-filter-dropdown {
margin-bottom: 16px;
gap: 8px;
}
.marketplace-select {
appearance: none;
-webkit-appearance: none;
border: 1.5px solid var(--border, #e2e8f2);
border-radius: 10px;
background: var(--bg-white) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M3 4.5L6 7.5L9 4.5' stroke='%2366758d' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat right 12px center;
padding: 9px 34px 9px 12px;
font-family: inherit;
font-size: 13px;
font-weight: 700;
color: var(--text-dark, #0b1430);
cursor: pointer;
max-width: 100%;
transition: border-color .15s ease;
}
.marketplace-select:hover { border-color: var(--primary, #1358ff); }
.marketplace-select:focus { outline: none; border-color: var(--primary, #1358ff); box-shadow: 0 0 0 3px rgba(19,88,255,0.12); }
/* Multi-select marketplace dropdown */
.mp-multiselect-wrap { position: relative; display: inline-block; }
.mp-multiselect-toggle {
appearance: none; border: 1.5px solid var(--border, #e2e8f2); border-radius: 10px;
background: var(--bg-white); padding: 9px 12px; font-family: inherit; font-size: 13px; font-weight: 700;
color: var(--text-dark, #0b1430); cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
min-width: 140px; justify-content: space-between; transition: border-color .15s ease;
}
.mp-multiselect-toggle:hover { border-color: var(--primary, #1358ff); }
.mp-multiselect-toggle svg { flex-shrink: 0; color: var(--text-light, #66758d); }
.mp-multiselect-menu {
position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; background: var(--bg-white);
border: 1px solid var(--border, #e2e8f2); border-radius: 12px; box-shadow: 0 12px 32px rgba(11,20,48,0.14);
padding: 6px; min-width: 100%; max-height: 280px; overflow-y: auto;
}
.mp-multiselect-option {
display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
font-size: 13px; font-weight: 600; color: var(--text-dark, #0b1430); cursor: pointer; user-select: none;
}
.mp-multiselect-option:hover { background: var(--primary-bg, #edf3ff); }
.mp-multiselect-option input[type="checkbox"] { accent-color: var(--primary, #1358ff); width: 15px; height: 15px; cursor: pointer; flex-shrink: 0; }
.mp-multiselect-option .mp-swatch { width: 9px; height: 9px; border-radius: 999px; display: inline-block; margin-right: 7px; vertical-align: middle; flex-shrink: 0; }
/* v71: the Prices multi-select reuses the plot-selector pill. */
.plot-selector.mp-multiselect .mp-multiselect-menu { min-width: 170px; }
/* ==================== MOBILE SECTION REORDER ==================== */
/* On smaller screens, stack the product page sections in a specific order:
summary, media, marketplace, specs, description, distribution. */
@media (max-width: 1180px) {
#product-content { display: flex; flex-direction: column; gap: 18px; }
.product-dashboard, .dashboard-columns, .product-summary-stack, .lower-grid { display: contents; }
.product-summary-card { order: 1; }
.listing-media-card { order: 2; }
.marketplace-card { order: 3; }
.specs-card { order: 4; }
.description-card { order: 5; }
.distribution-card { order: 6; }
/* Comments are the last section of the page - without an explicit order
   they default to 0 and jump ABOVE every ordered card in this flex column. */
.comments-section { order: 7; }
}
/* ============ PRICE DISTRIBUTION CARD — REDESIGN (final) ============ */
/* 1) Neutralise legacy rules that fight the new markup (same selectors, later in file = wins) */
.mini-histogram{display:block;height:auto;margin:12px 0 0;padding:0;border-bottom:0}
.mini-histogram::after{content:none}
.distribution-scale{display:block;position:relative;margin-top:2px;padding:14px 0 58px;border-top:1px dashed var(--border, #e6ebf3)}
.distribution-scale::before,
.distribution-scale::after{content:none}
.distribution-scale div:nth-child(2)::before{content:none}

/* 2) Card chrome */
.distribution-card{border:1px solid var(--border, #e8edf5);border-radius:18px;padding:22px 24px 14px}
#distribution-title{font-size:16px;font-weight:800;letter-spacing:-.02em;color:var(--text-dark)}
.distribution-controls{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin:10px 0 4px}
.chart-type-select{appearance:none;-webkit-appearance:none;border:1px solid var(--border, #e3e9f2);border-radius:999px;background:var(--auth-soft) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%2368758d' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat right 12px center;padding:7px 30px 7px 14px;font-size:12.5px;font-weight:650;color:var(--text-dark, #33415c);cursor:pointer;transition:border-color .15s,box-shadow .15s}
.chart-type-select:hover{border-color:var(--border-strong, #c9d4e6)}
.chart-type-select:focus-visible{outline:none;box-shadow:0 0 0 3px rgba(19,88,255,.15);border-color:var(--primary)}
.mp-multiselect-toggle{border-radius:999px !important}

/* 3) Chart */
.price-chart-svg{width:100%;height:auto;display:block;margin-top:6px}
.pd-hist rect{transition:opacity .15s}
.pd-hist rect:hover{opacity:.8}

/* 4) The stat strip IS the x-axis: 2.5% side insets mirror the SVG plot area (8/320) */
.distribution-scale{display:block;position:relative;margin-top:2px;padding:12px 0 66px;border-top:1px dashed var(--border, #e6ebf3)}
.distribution-scale::before,
.distribution-scale::after{content:none}
.distribution-scale div:nth-child(2)::before{content:none}
.distribution-scale .pd-track{display:block;position:relative;height:5px;border-radius:999px;margin:0 2.5%;background:linear-gradient(90deg,var(--success, #22c55e) 0%,var(--primary) 50%,var(--danger, #ef4444) 100%);opacity:.9}
.distribution-scale .pd-dot{position:absolute;top:50%;width:11px;height:11px;border-radius:50%;transform:translate(-50%,-50%);border:2.5px solid #fff;box-shadow:0 1px 4px rgba(11,20,48,.25)}
.distribution-scale .pd-dot.min{background:var(--success, #22c55e)}
.distribution-scale .pd-dot.med{background:var(--primary);width:13px;height:13px}
.distribution-scale .pd-dot.max{background:var(--danger, #ef4444)}
.distribution-scale .pd-stat{position:absolute;top:26px;display:flex;flex-direction:column;gap:2px;max-width:34%}
.distribution-scale .pd-stat.min{left:2.5%;align-items:flex-start}
.distribution-scale .pd-stat.max{right:2.5%;align-items:flex-end;text-align:right}
.distribution-scale .pd-stat.med{transform:translateX(-50%);align-items:center;text-align:center}
.distribution-scale .pd-label{font-size:10.5px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap}
.distribution-scale .pd-stat.min .pd-label{color:var(--success, #16a34a)}
.distribution-scale .pd-stat.med .pd-label{color:var(--primary)}
.distribution-scale .pd-stat.max .pd-label{color:var(--danger, #ef4444)}
.distribution-scale .pd-stat strong{font-size:17px;font-weight:800;color:var(--text-dark);letter-spacing:-.01em;font-variant-numeric:tabular-nums;white-space:nowrap}

@media (max-width:480px){
  .distribution-scale .pd-stat strong{font-size:14px}
  .distribution-scale .pd-label{font-size:9.5px}
}
/* 5) Empty state */
.pd-empty{display:grid;place-items:center;padding:32px 0;color:var(--auth-muted);font-size:13.5px}

/* v5: room for the y-axis — strip re-aligned to the new plot insets */
.distribution-scale .pd-track{margin:0 2.5% 0 10%}
.distribution-scale .pd-stat.min{left:10%}

/* === Gap + text consistency fixes === */
.price-chart-svg{margin-top:0}
.distribution-scale{margin-top:0;padding-top:10px}
.price-overview .company-price-scale{margin-top:0;padding-top:10px}
/* One colour for ALL chart text; x/y axis titles the same rendered size
   (SVG renders ~1.75× on both pages, so 7px SVG ≈ 12px HTML) */
.pd-tick{font-size:7px;font-weight:600;fill:var(--text-muted, #94a3b8)}
/* ==== Axis titles: identical look, PRICE centered under the strip ==== */
.distribution-scale{position:relative;padding-bottom:74px}
.pd-x-title{
  position:absolute;left:0;right:0;bottom:8px;margin:0;
  text-align:center;
  font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;
  color:var(--text-muted, #94a3b8);
}
.pd-axis-title{font-size:7px;font-weight:700;fill:var(--text-muted, #94a3b8);letter-spacing:.08em;text-transform:uppercase}
.price-chart-svg{overflow:visible}

/* ==== Axis titles: fixed-size HTML so x & y match on every page ==== */
.price-chart-wrap{position:relative}
.pd-y-title{
  position:absolute;left:2px;top:50%;
  writing-mode:vertical-rl;               /* rotated, reads bottom-to-top */
  transform:translateY(-50%) rotate(180deg);
}
.pd-y-title,.pd-x-title{
  font-size:11px !important;font-weight:700 !important;
  letter-spacing:.1em !important;text-transform:uppercase !important;
  color:var(--text-muted, #94a3b8) !important;
}
/* x-axis label sits at the very bottom of the strip, below the values */
.distribution-scale{padding-bottom:88px !important}
.pd-x-title{
  position:absolute !important;left:0 !important;right:0 !important;
  bottom:4px !important;margin:0 !important;text-align:center !important;
}

/* ==================== LIKE / SHARE BUTTONS ==================== */
.summary-actions-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}
.product-social-actions {
  display: flex;
  gap: 10px;
}
.product-social-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 48px;
  padding: 8px 10px;
  border: 1px solid var(--primary-soft-border, #C8D4FF);
  border-radius: 10px;
  background: var(--bg-white);
  color: var(--text-mid, #475569);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.product-social-btn:hover {
  background: var(--primary-bg, #edf3ff);
  border-color: var(--primary, #1358ff);
}
.product-social-btn svg {
  width: 20px;
  height: 20px;
}
.product-social-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-mid, #475569);
  line-height: 1;
}
.product-like-btn {
  color: #e0245e;
}
.product-like-btn.liked {
  color: #e0245e;
  border-color: #f9c8d4;
  background: #fef2f5;
}
.product-like-btn.liked .like-icon {
  fill: #e0245e;
  stroke: #e0245e;
}

/* ==================== SHARE POPUP ==================== */
.share-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.share-popup {
  background: var(--bg-white, var(--bg-white, #ffffff));
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}
.share-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.share-popup-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark, #0b1430);
  margin: 0;
}
.share-popup-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-light, #66758d);
  cursor: pointer;
  transition: all 0.15s ease;
}
.share-popup-close:hover {
  background: var(--bg-page, #f5f6fa);
  color: var(--text-dark, #0b1430);
}
.share-options {
  padding: 20px 24px;
  overflow-y: auto;
}
.share-link-preview {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.share-link-preview input {
  flex: 1;
  padding: 12px 14px;
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-dark, #0b1430);
  background: var(--bg-page, #f5f6fa);
  outline: none;
}
.share-copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  background: var(--primary, #1358ff);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.share-copy-btn:hover {
  background: var(--primary-dark, #0b3fcc);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(19, 88, 255, 0.3);
}
.share-copy-btn svg {
  width: 18px;
  height: 18px;
}
.share-platforms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.share-platform-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 12px;
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 12px;
  background: var(--bg-white, var(--bg-white, #ffffff));
  color: var(--text-mid, #263044);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.share-platform-btn:hover {
  border-color: var(--primary, #1358ff);
  background: var(--bg-page, #f5f6fa);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.share-platform-btn svg {
  width: 24px;
  height: 24px;
}


/* Last-updated status sits left of the Refresh button (bottom-right of summary card) */
.updated-row {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
gap: 12px;
margin-top: 14px;
}

/* Uniform sizing for bookmark + menu buttons (match like/share buttons) */
.summary-actions .icon-btn {
width: 48px;
height: 51px;
border-radius: 10px;
}


/* Specifics heading row matches card-title-row (title left, action right) */
.section-heading-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}

/* Plot selector (chart type dropdown) mirrors the marketplace selector */
.plot-selector {
display: flex;
align-items: center;
gap: 6px;
}
/* Keep plot + marketplace selectors on one line inside the distribution card */
.distribution-controls .marketplace-filter {
margin-top: 0;
flex-wrap: nowrap;
}
.plot-menu-item {
display: block;
width: 100%;
padding: 10px 14px;
border: 0;
border-radius: 8px;
background: transparent;
color: var(--text-mid, #475569);
font-size: 14px;
font-weight: 600;
text-align: left;
cursor: pointer;
font-family: inherit;
}
.plot-menu-item:hover {
background: var(--primary-bg, #edf3ff);
color: var(--text-dark);
}

/* ==================== MOBILE SUMMARY CARD SPACING ==================== */
/* On small screens the like/share/bookmark/menu actions used to sit almost on
   top of the "Last updated / Refresh" row. Give the actions their own clearly
   separated row with breathing room above the updated row. */
@media (max-width: 900px) {
.summary-header {
gap: 14px;
}
.summary-actions {
width: 100%;
justify-content: flex-start;
flex-wrap: wrap;
gap: 8px;
}
}
@media (max-width: 620px) {
.product-summary-card {
padding: 16px 14px;
}
.summary-actions {
width: 100%;
justify-content: space-between;
gap: 8px;
margin-top: 16px;
padding-top: 14px;
border-top: 1px solid var(--premium-border-soft, #eef2f7);
}
.summary-actions .icon-btn,
.summary-actions .product-social-btn {
flex: 1;
min-width: 0;
}
.updated-row {
margin-top: 20px;
gap: 10px;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
}
.updated-text {
font-size: 11px;
line-height: 1.4;
}
.update-btn {
padding: 0 14px;
white-space: nowrap;
}
}

/* ==================== "VIEW ALL" MODAL LAYOUT (small devices) ==================== */
/* The specifics popup uses a two-column grid; collapse it to one column on
   phones so long attribute values aren't squeezed into a broken layout. */
.specifics-modal-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 16px;
}
@media (max-width: 640px) {
.specifics-modal-grid {
grid-template-columns: 1fr;
}
}

/* ==================== HORIZONTAL SCROLL LOCK ==================== */
/* Nothing on the product page should let the user drag the page left or right.
   Internal scroll areas (e.g. the marketplace table) keep their own scrolling. */
.product-page,
#product-content,
.product-dashboard,
.lower-grid {
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

/* Let cards shrink instead of forcing their min-content width and overflowing
   the page (a common cause of horizontal movement on small screens). */
.product-dashboard > *,
.lower-grid > *,
#product-content > * {
  min-width: 0;
}

/* ==================== MARKETPLACE NAME WRAPPING ==================== */
/* The marketplace cell is a flex row (favicon + name). Without min-width:0
   the name cannot shrink, so long names stretch the whole table sideways
   instead of wrapping. Let the text wrap onto multiple lines (anywhere keeps
   unbroken tokens like long marketplace slugs wrappable too). */
.market-table td:first-child {
    min-width: 0;
}
.market-logo-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.3;
    padding-right: 4px;
}


/* ==================== SUMMARY CARD: FULL-WIDTH LAYOUT ==================== */
/* The summary card spans the full content width above the media/content
   columns; the golden-ratio split (gallery 1 : content) now applies to the
   .dashboard-columns row beneath it. */
.summary-title-wrap {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 6px;
min-width: 0;
}
/* Delivery-country picker: pin icon + inline select. Replaces the old
   "Delivery country:" / "Product location:" text lines. */
.delivery-picker {
display: inline-flex;
align-items: center;
gap: 7px;
margin-top: 2px;
padding: 0 10px;
min-height: 34px;
border: 1px solid var(--primary-soft-border, #d8e4ff);
border-radius: 8px;
background: var(--primary-bg, #edf3ff);
color: var(--primary);
cursor: pointer;
width: fit-content;
max-width: 100%;
}
.delivery-picker .delivery-pin {
flex-shrink: 0;
}
.delivery-select {
appearance: none;
-webkit-appearance: none;
border: 0;
background: transparent url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%231358ff' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat right 2px center;
padding: 6px 16px 6px 0;
font-family: inherit;
font-size: 12.5px;
font-weight: 650;
letter-spacing: -0.01em;
color: var(--primary);
cursor: pointer;
max-width: 100%;
}
.delivery-select:focus-visible {
outline: none;
border-radius: 6px;
box-shadow: 0 0 0 3px rgba(19, 88, 255, 0.15);
}
/* Separator between the title/social row and the cheapest/update row. */
.summary-divider {
height: 1px;
margin: 14px 0 12px;
border: 0;
background: var(--premium-border-soft, #eef2f7);
}
/* Bottom row: "View cheapest listing" (left, only as wide as its text)
   opposite the Update button (right). */
.summary-action-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
flex-wrap: wrap;
margin-top: 2px;
}
.summary-action-row .quick-listing-link {
flex: 0 0 auto;
width: fit-content;
margin-top: 0;
}
.summary-action-row .quick-listing-link span:nth-child(2) {
flex: 0 1 auto;
}
.summary-action-row .updated-text {
margin-left: auto;
}
@media (max-width: 620px) {
.summary-action-row .quick-listing-link {
width: 100%;
justify-content: space-between;
}
.summary-action-row .updated-text {
margin-left: 0;
}
}


/* v32/v33: distribution + historical prices side by side on desktop. On
   phones the mobile section-reorder block (display: contents + explicit
   card order) governs - the history card sits right after the distribution,
   i.e. below the description. */
@media (min-width: 1181px) {
    .lower-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
        gap: 18px;
        /* v52: product2 stretches both chart cards to the same height. */
        align-items: stretch;
    }
    .lower-grid > .distribution-card,
    .lower-grid > .price-history-card { height: 100%; }
    .lower-grid[hidden] { display: none; }
}
@media (max-width: 1180px) {
    .price-history-card { order: 7; }
    .comments-section { order: 8; }
    .lower-grid { display: contents; }
    .lower-grid[hidden] { display: none !important; }
}
.price-history-card {
    border: 1px solid var(--border, #e8edf5);
    border-radius: 18px;
    padding: 22px 24px 14px;
}
.price-history-card .price-chart-wrap { margin-top: 6px; }
@media (max-width: 760px) {
    .distribution-card,
    .price-history-card { padding: 14px 12px 8px; border-radius: 14px; }
    .distribution-scale { padding: 8px 0 52px; }
    .price-chart-svg { max-height: 132px; }
    .distribution-controls { gap: 6px; }
}


/* ==== v41: y-axis value overlay (same typography as the x-axis strip) ==== */
/* ==== v41: y-axis value overlay (same typography as the x-axis strip) ==== */
/* ==================== v48: product2.html layout ==================== */
/* New layout (default): images | main information side by side. */
.product-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.product-hero .product-summary-card { grid-column: auto; }
/* Bottom row: product information | product description side by side. */
.product-info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  /* v51: both cards share the row height and end on the same line. */
  align-items: stretch;
}
.product-info-grid > .specs-card,
.product-info-grid > .description-card { height: 100%; }
.product-info-grid > .description-card { display: flex; flex-direction: column; }
.product-info-grid > .description-card .description-content { flex: 1 1 auto; min-height: 0; }
.product-info-grid > .specs-card .specifics-grid { min-height: 0; }
/* v52: the spec/description cards always share the taller height, in the
   showcase and the compact layouts alike (the JS equalizer sets min-height). */
.product-info-grid > .specs-card,
.product-info-grid > .description-card { align-self: stretch; }
.product-dashboard:not(.layout-classic) > .marketplace-card,
.product-dashboard:not(.layout-classic) > .lower-grid {
  margin-top: 18px;
}
/* ==================== v88: food page arrangement ==================== */
/* Showcase: the Nutrition & environmental scores + Ingredients cards render
   ABOVE the price distribution / historical prices sections, with the
   description as a full-width card (the v86 arrangement). */
.product-dashboard:not(.layout-classic) > .food-info-grid,
.product-dashboard:not(.layout-classic) > .food-description-grid {
  margin-top: 18px;
}
.product-info-grid.food-info-grid { gap: 18px; align-items: stretch; }
.product-info-grid.food-description-grid { grid-template-columns: minmax(0, 1fr); }

/* Compact (layout-classic, including phones): Ingredients + Nutrition &
   environmental scores REPLACE the Product information + Product description
   cards in the right column, directly below the Marketplace breakdown. */
.product-info-grid.food-compact-info { gap: 18px; align-items: stretch; }
/* v116 compact grid: summary, then a single media/marketplace row with equal
   columns, then details, then charts. Media and marketplace share one row so
   their card boxes are equal height. */
@media (min-width: 1181px) {
  .product-dashboard.layout-classic {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .product-dashboard.layout-classic.food-page {
    grid-template-areas:
      "summary summary"
      "media market"
      "details details"
      "charts charts";
  }
  .product-dashboard.layout-classic.food-page .food-compact-info {
    grid-area: details;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }
  .product-dashboard.layout-classic.food-page .listing-media-card { grid-area: media; }
  .product-dashboard.layout-classic.food-page .marketplace-card { grid-area: market; }
  .product-dashboard.layout-classic.food-page .food-ingredients-card,
  .product-dashboard.layout-classic.food-page .food-scores-card { height: 100%; }
}
@media (max-width: 1180px) {
  /* #product-content is a flex column here and the dashboard + wrapper are
     display:contents. Without explicit order the food cards default to 0 and
     jump above the summary; 4/5 are the old specs/description slots. */
  .food-ingredients-card { order: 4; }
  .food-scores-card { order: 5; }
}
/* Classic layout: full-width summary on top, equal media/marketplace row, then
   information/description, then charts. */
@media (min-width: 1181px) {
  .product-dashboard.layout-classic {
    grid-template-areas:
      "summary summary"
      "media market"
      "details details"
      "charts charts";
    gap: 18px;
  }
  .product-dashboard.layout-classic .product-hero { display: contents; }
  .product-dashboard.layout-classic .product-summary-card { grid-area: summary; }
  .product-dashboard.layout-classic .listing-media-card { grid-area: media; }
  .product-dashboard.layout-classic .marketplace-card { grid-area: market; }
  .product-dashboard.layout-classic .product-info-grid {
    grid-area: details;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }
  .product-dashboard.layout-classic .listing-media-card,
  .product-dashboard.layout-classic .marketplace-card,
  .product-dashboard.layout-classic.food-page .listing-media-card,
  .product-dashboard.layout-classic.food-page .marketplace-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .product-dashboard.layout-classic .lower-grid {
    grid-area: charts;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 18px;
  }
}
@media (max-width: 1180px) {
  .product-hero, .product-info-grid { display: contents; }
}
/* ==================== v49: product2 metrics & price box ==================== */
/* Hero proportions + card paddings match product2. */
.product-hero { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
.product-hero .listing-media-card { padding: 14px; }
.product-hero .product-summary-card { padding: 26px; }
/* v72b: the large image is no longer fixed at 4:3 - the wrap stretches to
   the media card's height (see the flex rule in the v50 block below), so it
   matches the summary container instead of holding fixed dimensions. */
/* product2-style chart info cards */
.product-dashboard .lower-grid .distribution-card,
.product-dashboard .lower-grid .price-history-card { padding: 22px 22px 18px; }
.c-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.c-head-main { min-width: 0; }
.c-head h2 { font-size: 16px; font-weight: 700; letter-spacing: -.2px; color: var(--text-dark, #0b1430); }
.c-head .sub { font-size: 12.5px; color: var(--text-muted, #94a3b8); margin-top: 3px; }
.c-head .card-filters-toggle-row { margin-left: auto; }
/* Cheapest price box (product2 .pricebox) */
.pd-pricebox { border: 1px solid #dbe6ff; border-radius: 16px; padding: 18px 20px; background: linear-gradient(135deg, #eff4ff, #f9fbff 65%); margin-top: 16px; }
.pd-pricebox-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pd-pricebox-lbl { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--text-muted, #94a3b8); }
.pd-pricebox-line { display: flex; align-items: baseline; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.pd-pricebox-price { font-size: 36px; font-weight: 800; letter-spacing: -1.2px; color: var(--text-dark, #0b1430); }
.pd-pricebox-at { font-size: 13.5px; color: var(--text-mid, #334155); font-weight: 600; }
.pd-pricebox-at b { color: var(--text-dark, #0b1430); }
.pd-pricebox-range { position: relative; height: 6px; border-radius: 999px; background: #e3e8f2; margin: 20px 10px 6px; }
.pd-pricebox-median { position: absolute; top: -4px; width: 2px; height: 14px; border-radius: 2px; background: #a8b3c5; transform: translateX(-50%); }
.pd-pricebox-dot { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 14px; height: 14px; border-radius: 999px; background: var(--primary, #1358ff); border: 3px solid #fff; box-shadow: 0 0 0 1px #c9d8ff, 0 2px 6px rgba(37,99,235,.4); }
.pd-pricebox-lbls { display: flex; justify-content: space-between; margin: 8px 2px 0; font-size: 11.5px; font-weight: 600; color: var(--text-muted, #94a3b8); }
.pd-pricebox-lbls .lo { color: #059669; }
/* v51: the price box's own funnel filter + empty state */
.pd-pricebox-filters { margin: 10px 0 2px; }
.pd-pricebox-empty { padding: 10px 0 2px; font-size: 13px; font-weight: 600; color: var(--text-muted, #68758d); }
/* v51: price labels drawn inside the chart under the gradient axis */
.pd-axis-label { font-size: 11px; font-weight: 600; font-family: inherit; }
.pd-pricebox .pd-pricebox-filters .card-filters-panel { margin-bottom: 4px; }
/* product2-style stats strip under the history chart */
.pd-chart-stats { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--border, #e5e9f2); }
.pd-stat-item .lbl { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted, #94a3b8); }
.pd-stat-item .lbl .d { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }
.pd-stat-item .v { font-size: 16px; font-weight: 800; letter-spacing: -.3px; margin-top: 4px; color: var(--text-dark, #0b1430); }
.pd-stat-item .v small { font-size: 11px; font-weight: 600; color: var(--text-muted, #94a3b8); margin-left: 5px; }
/* distribution axis strip typography to match the stats strip */
.distribution-scale .pd-stat strong { font-size: 16px; font-weight: 800; letter-spacing: -.3px; }
.distribution-scale .pd-label { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted, #94a3b8); }
@media (max-width: 1180px) {
  .product-hero { grid-template-columns: 1fr; }
  .product-hero .listing-image-wrap { aspect-ratio: 4 / 3; }
}
/* ==================== v50: product2 polish ==================== */
/* Hero cards share the row height: the gallery stretches to the overview. */
.product-hero { align-items: stretch; }
.product-hero .listing-media-card,
.product-hero .product-summary-card { height: 100%; }
.product-hero .listing-media-card { display: flex; flex-direction: column; }
/* v50 kept the media card stretched to the summary card; v54 kept the IMAGE
   constant-sized when the summary grew (filter panel opens). v72b: the image
   now GROWS with the container - the wrap flexes to fill the card so the
   large image is as tall as the container instead of a fixed 4:3 box. */
.product-hero .listing-image-wrap { flex: 1 1 auto; min-height: 0; }
.product-hero .product-main-img { width: 100%; height: 100%; object-fit: contain; }
/* product2 segmented control (history range). */
.seg { margin-left: auto; display: flex; background: #f1f3f8; border: 1px solid var(--border, #e5e9f2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { padding: 5px 11px; border-radius: 8px; font-size: 12px; font-weight: 700; color: var(--text-muted, #94a3b8); background: none; border: 0; cursor: pointer; }
.seg button.on { background: #fff; color: var(--text-dark, #0b1430); box-shadow: 0 1px 2px rgba(16,24,40,.05), 0 4px 14px rgba(16,24,40,.05); }
.c-head .seg { margin-left: auto; }
.c-head .seg + .card-filters-toggle-row, .c-head .seg + .card-filters-toggle { margin-left: 8px; }
/* Narrower reading width (product2 is 1240). */
.product-page { max-width: 1240px; }
.pd-y-scale{
  position:absolute !important;left:2px !important;top:0 !important;bottom:0 !important;
  width:calc(10% - 8px) !important;pointer-events:none !important;
}
.pd-y-tick{
  position:absolute !important;right:6px !important;
  font-size:10.5px !important;font-weight:600 !important;
  color:var(--text-muted, #96a0b2) !important;
  background:var(--bg-white, #fff);
  padding:1px 3px !important;border-radius:4px !important;
}


/* v57: long product descriptions get a Read more toggle instead of being
   silently clamped to five lines. */
.description-content.expanded {
  -webkit-line-clamp: unset;
  overflow: visible;
}
.description-readmore {
  margin-top: 8px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary, #1358ff);
}
.description-readmore:hover { text-decoration: underline; }

/* ==================== v89: food scores + ingredients ==================== */
.food-scores-card,
.food-ingredients-card {
  display: flex;
  flex-direction: column;
}
.food-scores-content {
  margin-top: 16px;
  font-size: 14px;
}
.food-scores-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  /* v93: padding keeps the hover box-shadow inside the scroll box instead of
     being clipped by it. */
  padding: 4px 4px 8px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--border, #dbe2ee) transparent;
}
.food-scores-grid::-webkit-scrollbar { height: 6px; }
.food-scores-grid::-webkit-scrollbar-track { background: transparent; }
.food-scores-grid::-webkit-scrollbar-thumb {
  background: var(--border, #dbe2ee);
  border-radius: 999px;
}
.food-scores-grid > .food-score-tile {
  flex: 1 1 0;
  min-width: 165px;
  scroll-snap-align: start;
}
.food-score-tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--premium-border, #e6ebf4);
  border-radius: 14px;
  background: var(--bg-white, #fff);
}
.food-score-logo-wrap {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.food-score-logo {
  display: block;
  height: 56px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.food-score-tile-nova .food-score-logo {
  height: 64px;
}
.food-score-missing {
  color: var(--text-muted, #96a0b2);
  font-size: 12px;
  font-weight: 700;
}
.food-diet-negative {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #fee4e2;
  color: #b42318;
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}
.food-score-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.food-score-kicker {
  color: var(--text-muted, #96a0b2);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.food-score-desc {
  color: var(--text-dark, #0b1430);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.35;
}
.food-card-empty {
  padding: 16px 0 2px;
  color: var(--text-muted, #68758d);
  font-size: 13px;
}
.food-scores-card,
.food-ingredients-card {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.food-ingredients-content {
  margin-top: 14px;
  color: var(--text-mid, #475569);
  font-size: 14px;
  line-height: 1.7;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: none;
}
.food-ingredients-content.expanded {
  overflow-y: auto;
}
.food-scores-content:has(.description-loading),
.food-ingredients-content:has(.description-loading) {
  display: block;
  overflow: visible;
}
.ingredient-groups[hidden] { display: none !important; }
.food-modal .ingredient-breakdown,
.food-modal .ingredient-all,
.food-modal .ingredient-groups,
.food-modal .ingredient-section {
  max-height: none;
  overflow: visible;
}
.allergy-empty { color: var(--text-muted, #96a0b2); font-size: 12px; }
.allergy-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 999px;
  background: #fee4e2; color: #b42318; border: 1px solid #fecaca; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer;
}
.allergy-chip.editing { cursor: default; }
.allergy-chip.editing button { border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.allergy-add-btn {
  padding: 5px 9px; border-radius: 9px; border: 1px solid var(--primary, #1358ff); background: var(--primary-soft, #edf3ff);
  color: var(--primary, #1358ff); font: inherit; font-size: 11px; font-weight: 750; cursor: pointer;
}
.allergy-editor-note { margin: 0 0 12px; color: var(--text-muted, #68758d); font-size: 12.5px; line-height: 1.5; }
.allergy-editor-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.allergy-editor-add { display: flex; gap: 8px; align-items: center; }
.allergy-editor-add input { flex: 1 1 auto; min-width: 0; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--border, #dfe5ef); }
.allergy-editor-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.allergy-save-btn {
  padding: 9px 16px; border: 0; border-radius: 9px; background: var(--primary, #1358ff); color: #fff;
  font: inherit; font-size: 12px; font-weight: 750; cursor: pointer;
}
.allergy-save-btn:disabled { opacity: .55; cursor: not-allowed; }
/* v118: the "Contains your allergy" banner was removed - the allergy alert
   lives in the scores-section tile instead. */
.ingredient-breakdown { display: flex; flex-direction: column; gap: 14px; }
.ingredient-summary {
  color: var(--text-muted, #68758d);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .01em;
}
.ingredient-summary strong { color: var(--text-dark, #0b1430); }
.ingredient-subhead {
  margin: 0 0 7px;
  color: var(--text-dark, #0b1430);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.ingredient-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ingredient-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--premium-border-soft, #e8edf5);
  border-radius: 8px;
  background: var(--surface-alt, #f7f9fc);
  color: var(--text-mid, #475569);
  font-size: 12px;
  line-height: 1.35;
}
.ingredient-item-text { min-width: 0; overflow-wrap: anywhere; }
.ingredient-group-tag {
  display: block;
  margin-top: 1px;
  color: var(--text-muted, #96a0b2);
  font-size: 9.5px;
  font-weight: 650;
}
/* v118: personal-allergy highlight. Matching ingredients get a red tint and
   an alert glyph next to the name; Halal/Haram badges are no longer rendered
   next to ingredient names (verdicts live in the scores section). */
.ingredient-item-allergy {
  border-color: #fecaca;
  background: #fee4e2;
  color: #b42318;
}
.ingredient-alert-glyph {
  flex: 0 0 auto;
  margin-left: 2px;
  font-size: 12px;
  line-height: 1;
}
.ingredient-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}
.ingredient-section {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--premium-border, #e6ebf4);
  border-radius: 12px;
  background: var(--bg-white, #fff);
}
.ingredient-section h4 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--text-dark, #0b1430);
  font-size: 12.5px;
  font-weight: 750;
  line-height: 1.35;
}
.ingredient-count {
  flex: 0 0 auto;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--primary-soft, #edf3ff);
  color: var(--primary, #1358ff);
  font-size: 10px;
  text-align: center;
}
.ingredient-breakdown-compact .ingredient-section {
  background: var(--surface-alt, #f7f9fc);
}
@media (max-width: 760px) {
  .ingredient-section-grid { grid-template-columns: 1fr; }
  .ingredient-item { width: 100%; justify-content: space-between; }
}

/* ==================== v89: Open Food Facts detail popup ==================== */
body.food-modal-open { overflow: hidden; }
.food-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(11, 20, 48, 0.55);
  backdrop-filter: blur(2px);
}
.food-modal {
  width: min(880px, 100%);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--premium-border, #e6ebf4);
  border-radius: 18px;
  background: var(--bg-white, #fff);
  box-shadow: 0 24px 70px rgba(11, 20, 48, 0.28);
}
.food-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border, #e8edf5);
}
.food-modal-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--text-muted, #96a0b2);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.food-modal-header h2 {
  margin: 0;
  color: var(--text-dark, #0b1430);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.food-modal-close {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border, #e2e8f2);
  border-radius: 10px;
  background: var(--bg-white, #fff);
  color: var(--text-muted, #68758d);
  cursor: pointer;
}
.food-modal-close:hover {
  color: var(--text-dark, #0b1430);
  border-color: var(--border-strong, #c9d4e6);
}
.food-modal-body {
  padding: 20px 22px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.food-modal-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 30px 0;
  color: var(--text-muted, #68758d);
  font-size: 13px;
  font-weight: 600;
}
.food-modal-product {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.food-modal-image {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: contain;
  background: var(--surface-alt, #f6f8fc);
}
.food-modal-product strong {
  display: block;
  color: var(--text-dark, #0b1430);
  font-size: 15px;
  font-weight: 800;
}
.food-modal-product span {
  display: block;
  margin-top: 3px;
  color: var(--text-muted, #68758d);
  font-size: 12.5px;
  font-weight: 600;
}
.food-scores-grid-modal {
  margin-bottom: 18px;
}
.food-modal-note {
  padding: 14px 16px;
  border: 1px dashed var(--border, #e2e8f2);
  border-radius: 12px;
  color: var(--text-mid, #475569);
  font-size: 13px;
  line-height: 1.55;
}
.food-modal-attribution {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--border, #e8edf5);
  color: var(--text-muted, #96a0b2);
  font-size: 11.5px;
  line-height: 1.6;
}
.food-modal-attribution a {
  color: var(--primary, #1358ff);
  font-weight: 700;
}
.food-detail-section { margin-top: 20px; }
.food-detail-section h3 {
  margin: 0 0 10px;
  color: var(--text-dark, #0b1430);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.015em;
}
.food-detail-section h4,
.food-subhead {
  margin: 14px 0 8px;
  color: var(--text-dark, #0b1430);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.food-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border, #e8edf5);
  border-radius: 12px;
}
.food-nutrition-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.food-nutrition-table th {
  padding: 10px 12px;
  background: var(--surface-alt, #f6f8fc);
  color: var(--text-muted, #68758d);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
}
.food-nutrition-table td {
  padding: 9px 12px;
  border-top: 1px solid var(--border, #eef2f7);
  color: var(--text-mid, #475569);
}
.food-nutrition-table td:nth-child(2) {
  color: var(--text-dark, #0b1430);
  font-weight: 700;
  white-space: nowrap;
}
.food-nutrient-level {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.food-nutrient-level-low { background: #e8f8ee; color: #0b7a3b; }
.food-nutrient-level-medium { background: #fff6dd; color: #9a6500; }
.food-nutrient-level-high { background: #ffe8e5; color: #c02a17; }
.food-points-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.food-points-block {
  border: 1px solid var(--border, #e8edf5);
  border-radius: 12px;
  padding: 12px 14px;
}
.food-points-block h4 {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.food-points-block.negative h4 { color: #b42318; }
.food-points-block.positive h4 { color: #067647; }
.food-points-block ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.food-points-block li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: baseline;
  color: var(--text-mid, #475569);
  font-size: 12.5px;
}
.food-points-block li b {
  color: var(--text-dark, #0b1430);
  font-weight: 800;
}
.food-points-block li small {
  color: var(--text-muted, #96a0b2);
  font-size: 11px;
}
.food-detail-kv {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.food-detail-kv > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.food-detail-kv > div > span {
  color: var(--text-muted, #96a0b2);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.food-detail-kv strong {
  color: var(--text-dark, #0b1430);
  font-size: 13px;
  font-weight: 700;
}
.food-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.food-pill {
  padding: 4px 8px;
  border: 1px solid var(--border, #e2e8f2);
  border-radius: 999px;
  background: var(--surface-alt, #f6f8fc);
  color: var(--text-mid, #475569);
  font-size: 11px;
  font-weight: 700;
}
.food-muted {
  color: var(--text-muted, #96a0b2);
  font-size: 12px;
}
.food-eco-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.food-eco-stat {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border, #e8edf5);
  border-radius: 12px;
}
.food-eco-stat span {
  display: block;
  color: var(--text-muted, #96a0b2);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.food-eco-stat strong {
  display: block;
  margin-top: 4px;
  color: var(--text-dark, #0b1430);
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.food-eco-stat small {
  display: block;
  margin-top: 3px;
  color: var(--text-muted, #96a0b2);
  font-size: 11px;
}
.food-eco-warning {
  margin: 8px 0 0;
  color: #9a6500;
  font-size: 11.5px;
  line-height: 1.5;
}
.food-ingredient-text {
  margin: 0;
  color: var(--text-mid, #475569);
  font-size: 13.5px;
  line-height: 1.7;
}
@media (max-width: 760px) {
  .food-scores-grid > .food-score-tile { min-width: 150px; }
  .food-score-tile {
    flex-direction: row;
    align-items: center;
  }
  .food-score-logo-wrap {
    min-width: 96px;
  }
  .food-modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }
  .food-modal {
    width: 100%;
    max-height: 94vh;
    border-radius: 18px 18px 0 0;
  }
  .food-modal-header { padding: 16px 18px; }
  .food-modal-body { padding: 16px 18px 22px; }
  .food-points-grid,
  .food-eco-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== v91: badge logos, uniform tiles ==================== */
/* All tiles share the standard border; verdicts are signalled by the glyph
   beside the kicker text, never by a different border colour. */
.food-score-logo-wrap { position: relative; }

.food-score-tile-halal {
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}
.food-score-tile-halal:hover,
.food-score-tile-halal:focus-visible {
  box-shadow: 0 0 0 3px rgba(19, 88, 255, 0.16);
}

.food-tile-glyph { margin-right: 4px; font-size: 11px; }
.food-tile-glyph-ok { color: #22a053; }
.food-tile-glyph-maybe { color: #d89214; }
.food-tile-glyph-bad { color: #dc4242; }

.food-tile-muted {
  display: block;
  margin-top: 2px;
  color: var(--text-muted, #96a0b2);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}
.food-tile-change {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary, #1358ff);
}
.food-certified-chip {
  position: absolute;
  top: 4px;
  right: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(34, 160, 83, 0.16);
  color: #157a3c;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

/* v92: the scrollable tile row clips CSS ::after tooltips — food tiles use
   the JS floating tooltip instead. */
.food-scores-grid .tip::after,
.food-scores-grid .tip::before,
.food-modal .tip::after,
.food-modal .tip::before {
  display: none !important;
  content: none !important;
}
.food-tip-floating {
  position: fixed;
  z-index: 3000;
  max-width: 260px;
  padding: 8px 11px;
  border-radius: 10px;
  background: var(--text-dark, #0b1430);
  color: #ffffff;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  box-shadow: 0 10px 26px rgba(11, 20, 48, 0.22);
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  pointer-events: none;
}
.food-tip-floating.visible {
  opacity: 1;
  transform: translateY(0);
}

/* v92: per-madhhab ruling rows in the wizard result */
.halal-item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.halal-ruling-text {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-mid, #475569);
}
.halal-ruling-source {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--text-muted, #96a0b2);
}
.halal-ruling-source a {
  color: var(--primary, #1358ff);
  font-weight: 700;
}
.halal-item-permitted b { color: #22a053; }
.halal-item-conditional b { color: #d89214; }
.halal-item-doubtful b { color: #d89214; }


/* Halal wizard (sect -> school of thought -> marja -> verdict) */
.halal-wizard { max-width: 560px; }
.halal-step h3 {
  margin: 0 0 6px;
  font-size: 17px;
}
.halal-step-hint {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text-muted, #68758d);
}
.halal-option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.halal-option {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1.6px solid var(--border, #e2e8f0);
  border-radius: 12px;
  background: var(--bg-white, #fff);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.halal-option:hover { border-color: var(--primary, #1358ff); }
.halal-option.active {
  border-color: var(--primary, #1358ff);
  box-shadow: 0 0 0 3px rgba(19, 88, 255, 0.16);
}
.halal-option-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark, #0b1430);
}
.halal-option-sub {
  font-size: 12px;
  color: var(--text-muted, #68758d);
}
.halal-verdict {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 14px;
}
.halal-verdict-icon {
  font-size: 26px;
  line-height: 1;
}
.halal-verdict strong {
  display: block;
  font-size: 15px;
  color: var(--text-dark, #0b1430);
}
.halal-verdict span {
  font-size: 12.5px;
  color: var(--text-muted, #68758d);
}
.halal-verdict.halal-ok { background: rgba(34, 160, 83, 0.12); }
.halal-verdict.halal-review { background: rgba(216, 146, 20, 0.14); }
.halal-verdict.halal-bad { background: rgba(220, 66, 66, 0.12); }
.halal-items {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.halal-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  background: var(--bg-soft, #f4f6fb);
}
.halal-item b {
  font-size: 12px;
  white-space: nowrap;
}
.halal-item-haram b { color: #d43333; }
.halal-item-disputed b { color: #b07808; }
.halal-muted {
  font-size: 13px;
  color: var(--text-muted, #68758d);
  margin: 0 0 12px;
}
.halal-disclaimer {
  font-size: 12px;
  color: var(--text-muted, #68758d);
  line-height: 1.5;
  margin: 0 0 14px;
}
.halal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.halal-btn {
  padding: 9px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--border, #dfe5ef);
  background: var(--bg-white, #fff);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-dark, #0b1430);
}
.halal-btn:hover {
  border-color: var(--primary, #1358ff);
  color: var(--primary, #1358ff);
}

/* v113: independent section loaders */
.section-loading-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--border, #e8edf5);
  border-radius: 10px;
  background: var(--surface-alt, #f7f9fc);
  color: var(--text-muted, #68758d);
  font-size: 12.5px;
  line-height: 1.4;
}
.section-loader-copy {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.section-wait-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--primary, #1358ff);
  box-shadow: 0 0 0 0 rgba(19, 88, 255, .35);
  animation: section-wait-pulse 1.5s ease-out infinite;
}
.section-wait-time {
  color: var(--text-dark, #0b1430);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}
.section-skeleton-row td { padding: 9px 10px; }
.section-skeleton-line {
  display: inline-block;
  height: 11px;
  border-radius: 999px;
  background: linear-gradient(100deg, var(--surface-alt, #f1f4f9) 0%, #e8edf6 45%, var(--surface-alt, #f1f4f9) 90%);
  background-size: 200% 100%;
  animation: section-skeleton-shimmer 1.4s ease-in-out infinite;
}
.section-skeleton-line.w20 { width: 20%; }
.section-skeleton-line.w35 { width: 35%; }
.section-skeleton-line.w40 { width: 40%; }
.section-skeleton-line.w50 { width: 50%; }
.section-skeleton-line.w55 { width: 55%; }
@keyframes section-wait-pulse {
  0% { box-shadow: 0 0 0 0 rgba(19, 88, 255, .30); }
  70% { box-shadow: 0 0 0 6px rgba(19, 88, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(19, 88, 255, 0); }
}
@keyframes section-skeleton-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .section-wait-dot, .section-skeleton-line { animation: none; }
}

/* ==================== v117: ingredient popup + compact row height ==================== */
/* Ingredients (card list and popup) are tappable to manage personal allergies. */
.ingredient-item[data-ingredient] { cursor: pointer; transition: background 0.12s ease; }
.ingredient-item[data-ingredient]:hover { background: var(--surface-alt, #f6f8fc); }
/* Ingredients popup header: hint + direct editor access. */
.ingredients-modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.ingredients-modal-hint {
  margin: 0;
  color: var(--text-muted, #68758d);
  font-size: 12.5px;
  line-height: 1.5;
}
/* v117 (req 1): compact view - the media card and the marketplace card share
   one grid row; the table area keeps the height of a 7-marketplace breakdown
   (JS reserves the exact height, flex lets it fill if the media card is taller). */
@media (min-width: 1181px) {
  .product-dashboard.layout-classic .marketplace-table-scroll { flex: 1 1 auto; }
}
/* v117 (req 6): score tiles drop the description on small devices and the copy
   never overflows the row layout. */
@media (max-width: 760px) {
  .food-score-desc { display: none; }
  .food-score-copy { min-width: 0; }
}

/* ==================== v118: allergy tile ==================== */
/* Amber alert on a match (the tile jumps to first place in the grid), calm
   clear state otherwise. Always present for signed-in users with saved
   allergies. Clicking opens the ingredients popup. */
.food-score-tile-allergy { cursor: pointer; transition: box-shadow 0.15s ease; }
.food-score-tile-allergy:hover,
.food-score-tile-allergy:focus-visible { box-shadow: 0 0 0 3px rgba(19, 88, 255, 0.16); }
.food-allergy-glyph {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #e7f8ee;
  color: #157a3c;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
}
.food-score-tile-allergy.allergy-hit .food-allergy-glyph {
  background: #fee4e2;
  color: #b42318;
}
/* ==== v120: allergy alert chips (product name + Ingredients heading) ==== */
.allergy-alert-host { display: inline-flex; margin-left: 10px; vertical-align: middle; }
.allergy-alert-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid #f4b8ad;
  border-radius: 999px;
  background: #fff1f0;
  color: #b42318;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
}
.allergy-alert-chip:hover { background: #ffe4e2; }
.allergy-alert-chip .allergy-alert-glyph { font-size: 12px; }
.card-title-row .allergy-alert-host { margin-left: 8px; margin-right: auto; }
/* v121 (issue 1): the chip sits IMMEDIATELY right of "Ingredients" (the
   title row is space-between, so the auto right-margin pins Read more to
   the right edge while the chip hugs the heading). The name chip sits at
   the VERY LEFT of the summary card, flush with the card padding. */
.summary-title-wrap .allergy-alert-host { margin-left: 0; width: fit-content; }
/* ==== v120: loading skeleton mirrors the saved product layout ==== */
/* The pre-paint inline script in product.html tags #product-content with
   sk-layout-hero / sk-layout-classic (same resolution as getProductLayout:
   classic below 1181px, else the saved choice, default hero). */
.sk-layout .sk-classic-variant { display: none; }
.sk-layout-classic .sk-hero-variant { display: none; }
.sk-layout-classic .sk-classic-variant { display: block; }
@media (max-width: 1180px) {
  .sk-layout .sk-hero-variant { display: none !important; }
  .sk-layout .sk-classic-variant { display: block !important; }
}
.sk-thumb-strip { display: flex; gap: 8px; margin-top: 10px; }
.sk-thumb { width: 56px; height: 42px; border-radius: 8px; }
.sk-media-hero { width: 100%; aspect-ratio: 4 / 3; border-radius: 12px; }
.sk-chip-row { display: flex; gap: 8px; margin-top: 14px; }
.sk-chip { width: 84px; height: 24px; border-radius: 999px; }
.sk-actions-row { display: flex; gap: 10px; margin-top: 16px; }
.sk-dot { width: 38px; height: 38px; border-radius: 50%; }
.sk-grid4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.sk-cell { height: 44px; border-radius: 8px; }
.sk-duo-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
@media (max-width: 1180px) { .sk-duo-row { grid-template-columns: 1fr; } }
.sk-lower-grid { margin-top: 18px; }
