/* ==========================================================================
   Item detail — Stitch-inspired 8+4 Sticky Sidebar Layout (Round 330)
   Loaded only by resources/views/web/item.blade.php through @push('head').
   Scope: .detail--v2 and its bands. Everything else keeps vitrin.css rules.
   Tokens come from vitrin.css (--green, --price, --ink, --muted, --line ...).
   ========================================================================== */

.detail--v2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 368px;
    column-gap: 24px;
    row-gap: 20px;
    align-items: start;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
}

/* Main column (8-col equivalent): left in LTR, right in FA RTL */
.detail--v2 .iv2-identity,
.detail--v2 .iv2-overview,
.detail--v2 .iv2-cost,
.detail--v2 .iv2-compare,
.detail--v2 .detail-content-more {
    grid-column: 1;
    min-width: 0;
}

/* Sticky conversion & seller sidebar (4-col equivalent) */
.detail--v2 .iv2-seller {
    grid-column: 2;
    grid-row: 1 / span 6;
    position: sticky;
    top: var(--iv2-side-top, 84px);
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    min-width: 0;
}

/* ---- Band 1: Identity Card ----------------------------------------------- */

.detail--v2 .iv2-identity {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 22px 24px 20px;
    box-shadow: var(--shadow-sm);
}

.detail--v2 .iv2-identity .detail-kicker {
    margin: 0 0 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--subtle);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.detail--v2 .iv2-identity h1 {
    margin: 0;
    font-size: 24px;
    line-height: 1.45;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.detail--v2 .iv2-identity .detail-header-row {
    align-items: flex-start;
    gap: 16px;
}

.detail--v2 .iv2-identity .price-row-wrap {
    display: none;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.detail--v2 .iv2-identity .price-lg {
    margin: 0;
    font-size: 28px;
    line-height: 1.25;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--price);
}

.detail--v2 .iv2-identity .badges {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail--v2 .iv2-identity .detail-deal-note {
    margin-top: 10px;
}

/* ---- Band 2: Visual Gallery + Specs & Description ------------------------ */

.detail--v2 .iv2-overview {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.detail--v2 .iv2-gallery {
    /* vitrin.css makes .detail .gallery position:sticky for the old 2-col layout;
       reset it here so the gallery scrolls naturally above the description card. */
    position: static;
    top: auto;
    z-index: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail--v2 .iv2-gallery .hero-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    height: auto;
    max-height: 480px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--surface-2);
    cursor: zoom-in;
}

.detail--v2 .iv2-gallery .hero {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 45%;
    border-radius: var(--radius-md);
    display: block;
    transition: transform .35s ease;
}

.detail--v2 .iv2-gallery .hero-wrapper:hover .hero {
    transform: scale(1.02);
}

/* Frosted glass counter & zoom triggers (override hero-wrapper line-height:0) */
.detail--v2 .iv2-gallery .hero-counter-badge,
.detail--v2 .iv2-gallery .zoom-badge {
    line-height: 1.4;
    backdrop-filter: blur(8px);
}

.detail--v2 .iv2-gallery button.zoom-badge {
    border: 0;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.detail--v2 .iv2-gallery .thumbs {
    margin-top: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 8px;
}

.detail--v2 .iv2-gallery .thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 2px solid transparent;
    transition: border-color .15s ease, opacity .15s ease;
}

.detail--v2 .iv2-gallery .thumb.active {
    border-color: var(--green);
}

.detail--v2 .iv2-gallery .visual-search-btn-wrap {
    margin-top: 2px;
    padding-top: 0;
}

/* Scope card: Specs + Description + Quick Inquiry + Delivery */
.detail--v2 .iv2-scope {
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    box-shadow: var(--shadow-sm);
    min-width: 0;
}

.detail--v2 .iv2-scope .detail-desc-box {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.detail--v2 .iv2-scope .detail-content-title {
    margin: 0 0 12px;
    font-size: 17px;
    font-weight: 700;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail--v2 .iv2-scope .detail-content-title svg {
    color: var(--green);
}

.detail--v2 .iv2-scope .note {
    margin: 0;
    font-size: 15px;
    line-height: 1.9;
    color: var(--ink);
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.detail--v2 .iv2-desc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    min-height: 38px;
    padding: 4px 2px;
    border: 0;
    background: transparent;
    color: var(--green);
    font: inherit;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
}

.detail--v2 .iv2-desc-toggle[hidden] {
    display: none;
}

.detail--v2 .iv2-desc-toggle svg {
    transition: transform .15s ease;
}

.detail--v2 .iv2-desc-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

/* Stitch-style 2-column tinted specification cards */
.detail--v2 .iv2-scope .item-specs-box {
    margin-top: 18px;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    padding: 18px 0 0;
    background: transparent;
}

.detail--v2 .iv2-scope .specs-title {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
}

.detail--v2 .iv2-scope .specs-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.detail--v2 .iv2-scope .spec-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 14px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.detail--v2 .iv2-scope .spec-label {
    font-size: 13px;
    color: var(--muted);
}

.detail--v2 .iv2-scope .spec-value {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ink);
    text-align: end;
}

.detail--v2 .iv2-scope .item-delivery-estimate-card {
    margin-top: 4px;
    border-radius: var(--radius-md);
}

/* Inquiry strip: pill chips */
.detail--v2 .iv2-inquiry {
    margin-top: 2px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail--v2 .iv2-inquiry-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
}

.detail--v2 .iv2-inquiry-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail--v2 .iv2-chip {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill);
    background: var(--surface-2);
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.detail--v2 .iv2-chip:hover,
.detail--v2 .iv2-chip:focus-visible {
    border-color: var(--green);
    background: var(--green-soft);
    color: var(--green);
    text-decoration: none;
}

/* ---- Band 3: Sticky Sidebar Cards (Actions + Seller & Trust) ------------- */

.detail--v2 .iv2-seller-action {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.detail--v2 .iv2-sidebar-price-head {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail--v2 .iv2-sidebar-price-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--subtle);
}

.detail--v2 .iv2-sidebar-price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.detail--v2 .iv2-sidebar-price-val {
    font-size: 26px;
    line-height: 1.2;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--price);
}

.detail--v2 .iv2-sidebar-price-pill {
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    background: var(--green-soft);
    color: var(--green);
    font-size: 11.5px;
    font-weight: 700;
}

.detail--v2 .iv2-seller-action .btn-primary-cta {
    width: 100%;
    min-height: 48px;
    margin-top: 0;
    border-radius: var(--radius-md);
    justify-content: center;
    box-shadow: 0 4px 14px rgb(27 94 32 / 0.22);
}

.detail--v2 .iv2-seller-action .btn-primary-cta:hover {
    box-shadow: 0 6px 18px rgb(20 83 45 / 0.28);
}

.detail--v2 .iv2-seller-action .secondary-actions-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.detail--v2 .iv2-seller-action .secondary-actions-bar .btn-secondary-action {
    min-height: 42px;
    border-radius: var(--radius-md);
    justify-content: center;
}

.detail--v2 .iv2-seller-action .item-buy-box {
    margin: 0;
    border: 0;
    padding: 0;
    background: transparent;
}

.detail--v2 .iv2-seller-action .owner-view-stats-bar {
    margin-bottom: 0;
}

.detail--v2 .iv2-owner-stats-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: var(--green-soft);
    border: 1px solid var(--green-border);
    font-size: 13px;
}

.detail--v2 .iv2-owner-stats-main {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-wrap: wrap;
}

.detail--v2 .iv2-owner-stats-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
    color: var(--ink);
}

.detail--v2 .iv2-owner-stats-hint {
    font-size: 11.5px;
    color: var(--muted);
}

.detail--v2 .iv2-owner-stats-link {
    font-size: 12px;
    font-weight: 700;
    color: var(--green);
    text-decoration: none;
    white-space: nowrap;
}

.detail--v2 .iv2-owner-stats-link:hover {
    text-decoration: underline;
}

.detail--v2 .iv2-btn-promote {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid var(--warning);
    border-radius: var(--radius-sm);
    color: var(--warning);
    font-weight: 700;
    text-decoration: none;
}

.detail--v2 .iv2-owner-delete-form {
    margin: 0;
    width: 100%;
}

.detail--v2 .iv2-btn-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid rgba(220, 38, 38, 0.35);
    border-radius: var(--radius-sm);
    background: transparent;
    color: #dc2626;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.detail--v2 .iv2-btn-delete:hover {
    background: rgba(220, 38, 38, 0.08);
    border-color: #dc2626;
}

/* Seller identity, metrics & trust card */
.detail--v2 .iv2-seller-main {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.detail--v2 .iv2-seller-main .seller-card {
    background: transparent;
    border: 0;
    padding: 0;
    box-shadow: none;
    margin: 0;
}

.detail--v2 .iv2-seller-main .seller-card-head {
    padding: 0 0 14px;
    border-bottom: 1px solid var(--line);
}

.detail--v2 .iv2-seller-main .seller-avatar {
    width: 52px;
    height: 52px;
}

/* Stitch-style tinted reputation metrics bar */
.detail--v2 .iv2-seller-main .seller-facts {
    margin-top: 12px;
    padding: 10px 12px;
    background: var(--surface-2);
    border-radius: var(--radius-md);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.detail--v2 .iv2-seller-main .seller-trust-report-link {
    margin-top: 12px;
    width: 100%;
    justify-content: center;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    border: 1px solid var(--line);
    font-weight: 700;
}

.detail--v2 .iv2-seller-main .seller-trust-report-link:hover {
    border-color: var(--green);
    background: var(--green-soft);
}

.detail--v2 .iv2-seller-main .item-trust-box {
    margin-top: 2px;
}

/* Stitch-style 4px logical start border on safe shopping shield */
.detail--v2 .iv2-seller-main .safe-shopping-shield-card {
    border-inline-start: 4px solid var(--green);
    border-radius: var(--radius-md);
}

.detail--v2 .epfc-pill-meetup {
    background: var(--green-soft);
    color: var(--green);
}

.detail--v2 .share-chip.chip-card-qr {
    background: var(--green);
    color: #ffffff;
    border: 1px solid var(--green);
    text-decoration: none;
}

.detail--v2 .share-chip.chip-email {
    background: var(--surface-2);
    color: var(--ink);
    border: 1px solid var(--line-strong);
    text-decoration: none;
}

/* ---- Payment Summary (secure checkout listings only) --------------------- */

.detail--v2 .iv2-cost {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
}

.detail--v2 .iv2-cost-title,
.detail--v2 .iv2-compare-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
}

.detail--v2 .iv2-cost-rows {
    margin: 0;
    display: flex;
    flex-direction: column;
}

.detail--v2 .iv2-cost-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    min-height: 40px;
    padding: 8px 0;
    border-top: 1px solid var(--line);
}

.detail--v2 .iv2-cost-row dt {
    color: var(--muted);
    font-size: 13.5px;
}

.detail--v2 .iv2-cost-row dd {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
    text-align: end;
}

.detail--v2 .iv2-cost-total {
    border-top: 1px solid var(--line-strong);
    padding-top: 12px;
}

.detail--v2 .iv2-cost-total dt {
    color: var(--ink);
    font-weight: 700;
    font-size: 14px;
}

.detail--v2 .iv2-cost-total dd {
    font-size: 20px;
    font-weight: 800;
    color: var(--price);
}

.detail--v2 .iv2-cost-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--green);
    text-decoration: none;
}

.detail--v2 .iv2-cost-link:hover {
    text-decoration: underline;
}

/* ---- Comparison: same shelf, same currency only ------------------------- */

.detail--v2 .iv2-compare {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

.detail--v2 .iv2-compare-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 420px;
}

.detail--v2 .iv2-col-label {
    width: 112px;
}

.detail--v2 .iv2-compare-table thead a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}

.detail--v2 .iv2-compare-table thead a:hover {
    color: var(--green);
}

.detail--v2 .iv2-compare-table th,
.detail--v2 .iv2-compare-table td {
    text-align: start;
    padding: 10px 12px;
    border-top: 1px solid var(--line);
    vertical-align: top;
}

.detail--v2 .iv2-compare-table thead th {
    border-top: 0;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ink);
    padding-bottom: 8px;
}

.detail--v2 .iv2-compare-table tbody th {
    font-weight: 600;
    color: var(--subtle);
    white-space: nowrap;
}

.detail--v2 .iv2-compare-table td {
    color: var(--ink);
    font-weight: 600;
}

.detail--v2 .iv2-compare-current {
    background: var(--green-soft);
}

.detail--v2 .iv2-compare-diff {
    display: inline-block;
    margin-inline-start: 6px;
    padding: 1px 6px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
    unicode-bidi: isolate;
}

.detail--v2 .iv2-compare-diff.is-higher {
    background: var(--green-soft);
    color: var(--green);
}

.detail--v2 .iv2-compare-diff.is-lower {
    background: var(--surface-2);
    color: var(--muted);
}

.detail--v2 .iv2-compare-flag {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    font-weight: 700;
    color: var(--green);
}

/* ---- Support Area: Q&A, Map, Price History, FAQ -------------------------- */

.detail--v2 .detail-content-more {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail--v2 .detail-content-more > section,
.detail--v2 .detail-content-more > div {
    margin: 0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.detail--v2 .qa-zero-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-2);
    color: var(--muted);
    font-size: 13.5px;
    text-decoration: none;
}

.detail--v2 .qa-zero-row:hover {
    border-color: var(--green);
    color: var(--green);
    text-decoration: none;
}

.detail--v2 .price-history-box {
    padding: 18px 20px;
    border-radius: var(--radius-lg);
}

.detail--v2 .price-history-box .price-history-header {
    margin-bottom: 8px;
}

.detail--v2 .item-map-box {
    padding: 18px 20px;
    border-radius: var(--radius-lg);
}

.detail--v2 .item-map-box .map-click-to-load,
.detail--v2 .item-map-box .map-fallback-placeholder {
    min-height: 150px;
    padding: 18px;
    border-radius: var(--radius-md);
}

.detail--v2 .item-map-box .map-placeholder-icon {
    width: 44px;
    height: 44px;
}

.detail--v2 .map-privacy-notice {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
    margin-top: 10px;
    padding: 8px 12px;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
}

/* Breadcrumb link contrast: brand green instead of low-contrast teal */
.item-detail-main .item-detail-breadcrumbs a {
    color: var(--green);
}

/* Focus indicators */
.detail--v2 .iv2-chip:focus-visible,
.detail--v2 .iv2-desc-toggle:focus-visible,
.detail--v2 .iv2-cost-link:focus-visible,
.detail--v2 .iv2-gallery button.zoom-badge:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}

/* ---- Dark Mode Contrast Fixes (WCAG AA >= 4.5:1) ------------------------- */

html.dark .item-detail-main .item-detail-breadcrumbs a,
html[data-theme="dark"] .item-detail-main .item-detail-breadcrumbs a,
html.dark .detail--v2 .iv2-compare-flag,
html[data-theme="dark"] .detail--v2 .iv2-compare-flag,
html.dark .detail--v2 .iv2-cost-link,
html[data-theme="dark"] .detail--v2 .iv2-cost-link,
html.dark .detail--v2 .iv2-desc-toggle,
html[data-theme="dark"] .detail--v2 .iv2-desc-toggle,
html.dark .detail--v2 .iv2-owner-stats-link,
html[data-theme="dark"] .detail--v2 .iv2-owner-stats-link,
html.dark .detail--v2 .epfc-pill-meetup,
html[data-theme="dark"] .detail--v2 .epfc-pill-meetup,
html.dark .detail--v2 .iv2-sidebar-price-pill,
html[data-theme="dark"] .detail--v2 .iv2-sidebar-price-pill {
    color: #86efac;
}

html.dark .detail--v2 .iv2-sidebar-price-pill,
html[data-theme="dark"] .detail--v2 .iv2-sidebar-price-pill {
    background: rgba(16, 185, 129, 0.18);
}

html.dark .detail--v2 .iv2-compare-current,
html[data-theme="dark"] .detail--v2 .iv2-compare-current {
    background: rgba(16, 185, 129, 0.14);
}

html.dark .detail--v2 .iv2-compare-diff.is-higher,
html[data-theme="dark"] .detail--v2 .iv2-compare-diff.is-higher {
    background: rgba(16, 185, 129, 0.2);
    color: #86efac;
}

html.dark .detail--v2 .iv2-chip:hover,
html[data-theme="dark"] .detail--v2 .iv2-chip:hover,
html.dark .detail--v2 .iv2-chip:focus-visible,
html[data-theme="dark"] .detail--v2 .iv2-chip:focus-visible {
    border-color: #4ade80;
    background: rgba(16, 185, 129, 0.16);
    color: #86efac;
}

html.dark .detail--v2 .map-privacy-notice,
html[data-theme="dark"] .detail--v2 .map-privacy-notice {
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.12);
}

html.dark .detail--v2 .iv2-btn-promote,
html[data-theme="dark"] .detail--v2 .iv2-btn-promote {
    border-color: #fbbf24;
    color: #fbbf24;
}

html.dark .detail--v2 .iv2-btn-delete,
html[data-theme="dark"] .detail--v2 .iv2-btn-delete {
    border-color: rgba(248, 113, 113, 0.45);
    color: #f87171;
}

html.dark .detail--v2 .iv2-btn-delete:hover,
html[data-theme="dark"] .detail--v2 .iv2-btn-delete:hover {
    background: rgba(248, 113, 113, 0.14);
    border-color: #f87171;
}

/* ---- Tablet & Mobile (<= 1023px): Single-Column Flow --------------------- */

@media (max-width: 1023px) {
    .detail--v2 {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .detail--v2 .iv2-identity,
    .detail--v2 .iv2-overview,
    .detail--v2 .iv2-seller,
    .detail--v2 .iv2-cost,
    .detail--v2 .iv2-compare,
    .detail--v2 .detail-content-more {
        grid-column: auto;
        grid-row: auto;
        order: 0;
        position: static;
    }

    /* Band 1 shows the price right at the top on mobile/tablet */
    .detail--v2 .iv2-identity .price-row-wrap {
        display: flex;
    }

    .detail--v2 .iv2-sidebar-price-head {
        display: none;
    }

    .item-detail-main {
        padding-bottom: 124px;
    }

    .detail--v2 .iv2-identity {
        padding: 16px;
        border-radius: var(--radius-md);
    }

    .detail--v2 .iv2-identity h1 {
        font-size: 20px;
        line-height: 1.5;
    }

    .detail--v2 .iv2-identity .price-lg {
        font-size: 24px;
    }

    .detail--v2 .iv2-overview {
        gap: 14px;
    }

    .detail--v2 .iv2-gallery {
        padding: 12px;
        border-radius: var(--radius-md);
    }

    .detail--v2 .iv2-gallery .hero-wrapper {
        aspect-ratio: 4 / 3;
        max-height: 320px;
    }

    .detail--v2 .iv2-gallery .thumbs {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .detail--v2 .iv2-scope {
        padding: 16px;
        border-radius: var(--radius-md);
    }

    .detail--v2 .iv2-scope .specs-grid {
        grid-template-columns: 1fr;
    }

    .detail--v2 .iv2-scope .note {
        font-size: 14.5px;
        line-height: 1.85;
        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .detail--v2 .iv2-scope .note.is-expanded {
        display: block;
        -webkit-line-clamp: unset;
        overflow: visible;
    }

    .detail--v2 .iv2-seller {
        gap: 14px;
    }

    .detail--v2 .iv2-seller-action,
    .detail--v2 .iv2-seller-main {
        padding: 16px;
        border-radius: var(--radius-md);
    }

    .detail--v2 .iv2-cost,
    .detail--v2 .iv2-compare {
        padding: 16px;
        border-radius: var(--radius-md);
    }

    .detail--v2 .iv2-col-label {
        width: 84px;
    }

    .detail--v2 .iv2-compare-table th,
    .detail--v2 .iv2-compare-table td {
        padding: 9px 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .detail--v2 .iv2-gallery .hero,
    .detail--v2 .iv2-gallery .thumb,
    .detail--v2 .iv2-chip,
    .detail--v2 .iv2-desc-toggle svg {
        transition: none;
    }
}

/* Free V4 Market Price Deal Badge on Item Detail (Round 343) */
.v4-deal-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #dcfce7;
    color: #14532d;
    font-size: 0.78rem;
    font-weight: 800;
}
html[data-theme="dark"] .v4-deal-badge,
html.dark .v4-deal-badge {
    background: rgba(21, 128, 61, 0.28);
    color: #86efac;
}

/* Free V4 Visual Market Price Gauge on Item Detail (Round 347) */
.v4-price-gauge {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--surface-alt, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
}
.v4-pg-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    margin-bottom: 8px;
}
.v4-pg-zone {
    font-weight: 800;
}
.v4-pg-zone.is-great { color: #15803d; }
.v4-pg-zone.is-fair { color: #0f766e; }
.v4-pg-zone.is-high { color: #b45309; }
.v4-pg-avg {
    color: var(--muted, #475569);
    font-variant-numeric: tabular-nums;
}
.v4-pg-track {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 3px;
    height: 8px;
    margin: 4px 0 6px;
}
.v4-pg-seg { border-radius: 999px; }
.v4-pg-seg.is-great { background: #22c55e; }
.v4-pg-seg.is-fair { background: #f59e0b; }
.v4-pg-seg.is-high { background: #ef4444; }
.v4-pg-marker {
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #0f172a;
    border: 2.5px solid #ffffff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.35);
    transform: translate(-50%, -50%);
}
[dir="rtl"] .v4-pg-marker {
    transform: translate(50%, -50%);
}
.v4-pg-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--muted, #64748b);
}
html[data-theme="dark"] .v4-price-gauge,
html.dark .v4-price-gauge {
    background: #111827;
    border-color: #1f2937;
}
html[data-theme="dark"] .v4-pg-zone.is-great,
html.dark .v4-pg-zone.is-great { color: #86efac; }
html[data-theme="dark"] .v4-pg-zone.is-fair,
html.dark .v4-pg-zone.is-fair { color: #5eead4; }
html[data-theme="dark"] .v4-pg-zone.is-high,
html.dark .v4-pg-zone.is-high { color: #fcd34d; }
html[data-theme="dark"] .v4-pg-marker,
html.dark .v4-pg-marker { background: #ffc107; border-color: #0f172a; }

/* ==========================================================================
   Yapishtir V3 Signature Parity for Item Detail (Round 355)
   Warm Ivory (#faf9f5) + Deep Forest (#14532d) + Corona Amber (#ffc107)
   ========================================================================== */
html:not([data-theme="dark"]):not(.dark) body:has(main.item-detail-main) {
    background-color: #faf9f5;
}

.item-detail-main .iv2-card,
.item-detail-main .iv2-sidebar-card,
.item-detail-main .iv2-gallery-shell {
    border-radius: 16px;
    border-color: rgba(20, 83, 45, 0.12);
    box-shadow: 0 3px 14px rgba(15, 23, 42, 0.04);
}

.item-detail-main .btn-primary-cta {
    background: #14532d;
    border-color: #14532d;
    border-radius: 12px;
}

.item-detail-main .btn-primary-cta:hover {
    background: #0f3f22;
    border-color: #0f3f22;
}

html[data-theme="dark"] .item-detail-main .iv2-card,
html[data-theme="dark"] .item-detail-main .iv2-sidebar-card,
html[data-theme="dark"] .item-detail-main .iv2-gallery-shell,
html.dark .item-detail-main .iv2-card,
html.dark .item-detail-main .iv2-sidebar-card,
html.dark .item-detail-main .iv2-gallery-shell {
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow: none;
}
