/* ============================================================
   part.css — styles for /part.php detail page
   ============================================================ */

/* Solo header on the detail page — brand centred, no nav */
.header-inner--solo {
    justify-content: center;
}
.header-inner--solo .logo a {
    justify-content: center;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
    padding: 14px 16px;
    font-size: 13px;
    color: var(--muted, #7f8c8d);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.breadcrumb a { color: var(--accent, #1e90ff); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--muted, #7f8c8d); }

.part-detail {
    padding: 8px 16px 60px;
    max-width: 1100px;
    margin: 0 auto;
}

.part-detail-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    margin-bottom: 32px;
}

/* ---------- Gallery ---------- */
.detail-gallery { min-width: 0; }
.detail-main-img {
    position: relative;
    width: 100%;
    height: 380px;
    background: #f8fafc;
    border: 1px solid var(--border, #e1e8ed);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow: hidden;
}
.detail-main-img img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}
.detail-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.detail-thumb {
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    transition: border-color .15s;
}
.detail-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-thumb.active { border-color: var(--accent, #1e90ff); }
.detail-thumb:hover { border-color: #7dd3fc; }

/* ---------- Info ---------- */
.detail-info { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

.detail-sku {
    display: inline-block;
    align-self: flex-start;
    background: var(--sku-bg, #0a3d62);
    color: #fff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 6px;
    letter-spacing: 0.7px;
}
.detail-info h1 {
    font-size: clamp(22px, 3.5vw, 30px);
    line-height: 1.25;
    margin: 4px 0;
    color: var(--primary, #0a3d62);
}
.detail-partno {
    font-size: 15px;
    color: var(--muted, #7f8c8d);
    margin: 0;
}
.detail-partno strong { color: var(--text, #2c3e50); }

.detail-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 6px 0;
}
.badge-soldout { background: #fee2e2; color: #b91c1c; }
.badge-low     { background: #fef3c7; color: #92400e; }
.badge-stock   { background: #d4f5e2; color: #18794e; }

.detail-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary, #0a3d62);
    margin: 6px 0;
}
.detail-price.price-por {
    color: #b45309;
    font-style: italic;
    font-size: 22px;
}

.detail-spec-list {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 6px 12px;
    background: #f8fafc;
    border: 1px solid var(--border, #e1e8ed);
    border-radius: 8px;
    padding: 14px 16px;
    margin: 8px 0;
    font-size: 14px;
}
.detail-spec-list dt {
    color: var(--muted, #7f8c8d);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    align-self: center;
}
.detail-spec-list dd {
    color: var(--text, #2c3e50);
    font-weight: 600;
    margin: 0;
    align-self: center;
}

.detail-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.detail-actions .btn {
    flex: 1 1 160px;
    min-height: 46px;
}

/* ---------- Sections ---------- */
.detail-section {
    background: #fff;
    border-radius: 12px;
    padding: 22px 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}
.detail-section h2 {
    font-size: 18px;
    color: var(--primary, #0a3d62);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border, #e1e8ed);
}
.detail-description {
    color: #374151;
    font-size: 15px;
    line-height: 1.7;
}

.back-link {
    text-align: center;
    margin-top: 20px;
    font-size: 15px;
}
.back-link a { color: var(--accent, #1e90ff); text-decoration: none; }
.back-link a:hover { text-decoration: underline; }

.spec-body {
    background: #f8fafc;
    border: 1px solid var(--border, #e1e8ed);
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.65;
    color: #374151;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .part-detail-card {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    .detail-main-img { height: 300px; }
    .detail-info h1 { font-size: 22px; }
    .detail-price { font-size: 24px; }
    .detail-actions .btn { flex: 1 1 100%; }
}

@media (max-width: 500px) {
    .part-detail { padding: 8px 12px 40px; }
    .part-detail-card { padding: 16px; border-radius: 10px; }
    .detail-main-img { height: 220px; padding: 10px; }
    .detail-spec-list { grid-template-columns: 1fr; gap: 4px; }
    .detail-spec-list dt { margin-top: 6px; }
    .detail-thumb { width: 58px; height: 58px; }
    .detail-section { padding: 16px 16px; }
}