/* ═══════════════════════════════════════════════════════════════════════
   D&H Distribution Importer — Frontend CSS  v2.6.0
   Author: AmericaTech, Inc.
   ═══════════════════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────────────────────────────────
   DESIGN TOKENS
   ─────────────────────────────────────────────────────────────────────── */
:root {
    --dh-blue:        #1e40af;
    --dh-blue-light:  #eff6ff;
    --dh-blue-mid:    #dbeafe;
    --dh-navy:        #0f172a;
    --dh-slate-900:   #0f172a;
    --dh-slate-700:   #334155;
    --dh-slate-500:   #64748b;
    --dh-slate-400:   #94a3b8;
    --dh-slate-200:   #e2e8f0;
    --dh-slate-100:   #f1f5f9;
    --dh-slate-50:    #f8fafc;
    --dh-white:       #ffffff;
    --dh-amber-50:    #fffbeb;
    --dh-amber-200:   #fde68a;
    --dh-amber-800:   #92400e;
    --dh-radius-sm:   6px;
    --dh-radius:      10px;
    --dh-radius-lg:   14px;
    --dh-shadow:      0 1px 4px rgba(0,0,0,.07), 0 4px 12px rgba(0,0,0,.04);
    --dh-shadow-sm:   0 1px 3px rgba(0,0,0,.06);
    --dh-font-mono:   'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Courier New', monospace;
    --dh-transition:  0.15s ease;
}

/* ───────────────────────────────────────────────────────────────────────
   ROOT WRAPPER
   ─────────────────────────────────────────────────────────────────────── */
.dandh-desc {
    margin: 30px 0 8px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--dh-slate-700);
}

/* ───────────────────────────────────────────────────────────────────────
   SECTION TITLE  ("Product Description" divider)
   ─────────────────────────────────────────────────────────────────────── */
.dandh-desc__section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.dandh-desc__section-line {
    flex: 1;
    height: 1px;
    background: var(--dh-slate-200);
}

.dandh-desc__section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--dh-slate-400);
    white-space: nowrap;
}

/* ───────────────────────────────────────────────────────────────────────
   CARD BASE  (shared by all three cards)
   ─────────────────────────────────────────────────────────────────────── */
.dandh-desc__card {
    background: var(--dh-white);
    border: 1px solid var(--dh-slate-200);
    border-radius: var(--dh-radius);
    overflow: hidden;
    box-shadow: var(--dh-shadow);
}

.dandh-desc__card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    background: var(--dh-slate-50);
    border-bottom: 1px solid var(--dh-slate-200);
    font-size: 12px;
    font-weight: 700;
    color: var(--dh-slate-500);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dandh-desc__card-icon {
    width: 15px;
    height: 15px;
    color: var(--dh-blue);
    flex-shrink: 0;
}

/* ───────────────────────────────────────────────────────────────────────
   CARD 1 — PRODUCT IDENTIFICATION  (Mfr / Part# / UPC / Names)
   ─────────────────────────────────────────────────────────────────────── */
.dandh-desc__identity-rows {
    display: flex;
    flex-direction: column;
}

.dandh-desc__id-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    align-items: baseline;
    padding: 10px 18px;
    border-bottom: 1px solid var(--dh-slate-100);
    transition: background var(--dh-transition);
    gap: 14px;
}
.dandh-desc__id-row:last-child  { border-bottom: none; }
.dandh-desc__id-row:hover       { background: var(--dh-slate-50); }

/* Wider key column for the longer "Long Description" row */
.dandh-desc__id-row--long       { align-items: flex-start; }

.dandh-desc__id-key {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--dh-slate-500);
    user-select: none;
}

.dandh-desc__id-key svg {
    width: 13px;
    height: 13px;
    color: var(--dh-slate-400);
    flex-shrink: 0;
}

.dandh-desc__id-val {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--dh-slate-900);
    word-break: break-word;
    line-height: 1.55;
}

/* Monospace style for codes */
.dandh-desc__code {
    font-family: var(--dh-font-mono);
    font-size: 12.5px;
    color: var(--dh-slate-700);
    background: var(--dh-slate-100);
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--dh-radius-sm);
    border: 1px solid var(--dh-slate-200);
    letter-spacing: 0.03em;
}

/* ───────────────────────────────────────────────────────────────────────
   CARD 2 — PRODUCT OVERVIEW  (Marketing copy paragraph)
   ─────────────────────────────────────────────────────────────────────── */
.dandh-desc__copy-body {
    padding: 18px 22px;
    font-size: 14px;
    line-height: 1.85;
    color: var(--dh-slate-700);
}

.dandh-desc__copy-body p             { margin: 0 0 12px !important; }
.dandh-desc__copy-body p:last-child  { margin-bottom: 0 !important; }

/* Left accent stripe on copy card */
.dandh-desc__copy-card {
    border-left: 3px solid var(--dh-blue);
}

/* ───────────────────────────────────────────────────────────────────────
   CARD 3 — ADDITIONAL PRODUCT DETAILS  (tile grid)
   ─────────────────────────────────────────────────────────────────────── */
.dandh-desc__details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0;
}

.dandh-desc__detail-tile {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 14px 18px;
    border-right: 1px solid var(--dh-slate-100);
    border-bottom: 1px solid var(--dh-slate-100);
    transition: background var(--dh-transition);
}
.dandh-desc__detail-tile:hover { background: var(--dh-slate-50); }

.dandh-desc__detail-label {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--dh-slate-400);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dandh-desc__detail-value {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--dh-slate-900);
    line-height: 1.4;
    word-break: break-word;
}

/* ───────────────────────────────────────────────────────────────────────
   PROP 65 WARNING  (amber alert box)
   ─────────────────────────────────────────────────────────────────────── */
.dandh-desc__prop65 {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--dh-amber-50);
    border: 1px solid var(--dh-amber-200);
    border-radius: var(--dh-radius);
    padding: 14px 18px;
    font-size: 12.5px;
    color: var(--dh-amber-800);
    line-height: 1.65;
}

.dandh-desc__prop65-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 1px;
    stroke: #b45309;
}

.dandh-desc__prop65-text strong {
    display: block;
    margin-bottom: 3px;
    font-size: 12px;
    letter-spacing: 0.03em;
}

/* ───────────────────────────────────────────────────────────────────────
   FOOTER  (D&H badge + item#)
   ─────────────────────────────────────────────────────────────────────── */
.dandh-desc__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 4px 2px;
    border-top: 1px solid var(--dh-slate-100);
    font-size: 12px;
    color: var(--dh-slate-400);
}

.dandh-desc__footer-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dandh-desc__footer-left svg {
    width: 14px;
    height: 14px;
    stroke: var(--dh-slate-300);
    flex-shrink: 0;
}

.dandh-desc__footer-left strong {
    color: var(--dh-slate-500);
    font-weight: 600;
}

.dandh-desc__footer-right {
    font-family: var(--dh-font-mono);
    font-size: 11px;
    color: var(--dh-slate-400);
}

.dandh-desc__footer-sku {
    background: var(--dh-slate-100);
    border: 1px solid var(--dh-slate-200);
    padding: 2px 7px;
    border-radius: 4px;
    color: var(--dh-slate-500);
    font-weight: 600;
    letter-spacing: 0.04em;
}

/* ───────────────────────────────────────────────────────────────────────
   SPECIFICATIONS TAB
   ─────────────────────────────────────────────────────────────────────── */
.dandh-specs-tab { padding: 8px 0; }

.dandh-specs-body {
    background: var(--dh-slate-50);
    border: 1px solid var(--dh-slate-200);
    border-radius: var(--dh-radius);
    padding: 18px 22px;
    font-size: 13px;
    line-height: 1.9;
    color: var(--dh-slate-700);
    white-space: pre-line;
}

/* ───────────────────────────────────────────────────────────────────────
   RESPONSIVE — TABLET  (≤ 680px)
   ─────────────────────────────────────────────────────────────────────── */
@media (max-width: 680px) {

    .dandh-desc__id-row {
        grid-template-columns: 160px 1fr;
        padding: 9px 14px;
        gap: 10px;
    }

    .dandh-desc__id-key { font-size: 12px; }
    .dandh-desc__id-val { font-size: 13px; }

    .dandh-desc__details-grid {
        grid-template-columns: 1fr 1fr;
    }

    .dandh-desc__copy-body {
        padding: 14px 16px;
        font-size: 13.5px;
    }

    .dandh-desc__card-header {
        padding: 10px 14px;
    }
}

/* ───────────────────────────────────────────────────────────────────────
   RESPONSIVE — MOBILE  (≤ 480px)
   ─────────────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {

    .dandh-desc__id-row {
        grid-template-columns: 1fr;
        gap: 3px;
        padding: 10px 14px;
    }

    .dandh-desc__id-key {
        font-size: 11px;
        color: var(--dh-slate-400);
    }

    .dandh-desc__details-grid {
        grid-template-columns: 1fr;
    }

    .dandh-desc__footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ───────────────────────────────────────────────────────────────────────
   PRINT
   ─────────────────────────────────────────────────────────────────────── */
@media print {
    .dandh-desc__card       { box-shadow: none !important; border: 1px solid #ccc !important; }
    .dandh-desc__copy-card  { border-left: 3px solid #555 !important; }
    .dandh-desc__footer     { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   PRODUCT DETAILS TAB  (.dandh-pd)
   ═══════════════════════════════════════════════════════════════════════ */

.dandh-pd {
    font-size: 14px;
    line-height: 1.65;
    color: #1e293b;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 4px 0;
}

/* ── Discontinued alert ────────────────────────────────────────────── */
.dandh-pd__disco {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-left: 4px solid #dc2626;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 13.5px;
    color: #7f1d1d;
    line-height: 1.65;
}
.dandh-pd__disco svg {
    width: 20px; height: 20px;
    stroke: #dc2626;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ── Page heading ──────────────────────────────────────────────────── */
.dandh-pd__heading {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 0 2px !important;
    padding: 0 !important;
    border: none !important;
    line-height: 1.4 !important;
}

/* ── Marketing copy / intro paragraph ─────────────────────────────── */
.dandh-pd__intro {
    font-size: 14px;
    line-height: 1.85;
    color: #374151;
    padding: 16px 20px;
    background: #f8fafc;
    border-left: 3px solid #1e40af;
    border-radius: 0 8px 8px 0;
    border-top: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}
.dandh-pd__intro p             { margin: 0 0 10px !important; }
.dandh-pd__intro p:last-child  { margin-bottom: 0 !important; }

/* ── Key identifiers row ───────────────────────────────────────────── */
.dandh-pd__ids {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.dandh-pd__id-item {
    display: flex;
    flex-direction: column;
    padding: 10px 18px;
    border-right: 1px solid #f1f5f9;
    flex: 1 0 auto;
    min-width: 120px;
}

.dandh-pd__id-sep {
    display: none; /* Separators hidden; border-right handles visual split */
}

.dandh-pd__id-key {
    font-size: 10.5px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 2px;
}

.dandh-pd__id-val {
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
    word-break: break-word;
}

.dandh-pd__code {
    font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', monospace;
    font-size: 12.5px;
    letter-spacing: 0.03em;
    color: #334155;
}

/* ── Detail tiles grid ─────────────────────────────────────────────── */
.dandh-pd__tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.dandh-pd__tile {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 13px 16px;
    border-right: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.12s;
}
.dandh-pd__tile:hover { background: #f8fafc; }

.dandh-pd__tile-label {
    font-size: 10.5px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.dandh-pd__tile-value {
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
}

.dandh-pd__instock  { color: #059669; }
.dandh-pd__outofstock { color: #dc2626; }

/* ── Return / Section card ─────────────────────────────────────────── */
.dandh-pd__section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.dandh-pd__section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.dandh-pd__section-header svg {
    width: 15px; height: 15px;
    stroke: #1e40af;
    flex-shrink: 0;
}

.dandh-pd__section-body {
    padding: 13px 18px;
    margin: 0 !important;
    font-size: 13.5px;
    color: #374151;
    line-height: 1.7;
}

/* ── Supplier footer ───────────────────────────────────────────────── */
.dandh-pd__supplier {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: #94a3b8;
    padding: 8px 0 0;
    border-top: 1px solid #f1f5f9;
}
.dandh-pd__supplier svg  { width: 14px; height: 14px; stroke: #cbd5e1; flex-shrink: 0; }
.dandh-pd__supplier strong { color: #64748b; }

/* ── Prop 65 warning ───────────────────────────────────────────────── */
.dandh-pd__prop65 {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 13px 16px;
    font-size: 12.5px;
    color: #78350f;
    line-height: 1.65;
}
.dandh-pd__prop65 svg {
    width: 20px; height: 20px;
    stroke: #b45309;
    flex-shrink: 0;
    margin-top: 1px;
}
.dandh-pd__prop65-text strong {
    display: inline;
    font-size: 12px;
    letter-spacing: 0.02em;
}

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .dandh-pd__ids        { flex-direction: column; }
    .dandh-pd__id-item    { border-right: none; border-bottom: 1px solid #f1f5f9; }
    .dandh-pd__tiles      { grid-template-columns: 1fr 1fr; }
    .dandh-pd__intro      { padding: 13px 15px; }
}

@media (max-width: 420px) {
    .dandh-pd__tiles      { grid-template-columns: 1fr; }
    .dandh-pd__heading    { font-size: 16px !important; }
}

@media print {
    .dandh-pd__disco      { border: 1px solid #aaa !important; background: #fff !important; }
    .dandh-pd__tiles, .dandh-pd__ids { border: 1px solid #ccc !important; }
    .dandh-pd__intro      { background: #fff !important; border: 1px solid #ccc !important; }
    .dandh-pd__supplier   { display: none; }
}
