/* Milatextrade — CSS minimal (sub-faza 1g)
 * Estetica: tehnic-B2B simplu, sistem fonts, paleta gri + un singur accent.
 * Design imersiv vine in Faza 3 (BRIEF §2). Aici doar: functional + lizibil + responsive.
 */

/* ─── Reset light ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.55;
    color: #1f2933;
    background: #ffffff;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #0a5d80; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Layout primitives ───────────────────────────────────────────────── */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}
.muted { color: #5a6571; }
.small { font-size: 0.875rem; }
.lead  { font-size: 1.125rem; color: #3e4953; }

/* ─── Header ──────────────────────────────────────────────────────────── */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e3e7eb;
    padding: 1rem 0;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.site-brand {
    color: #1f2933;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}
.site-brand strong { font-size: 1.1rem; }
.site-brand .tagline { color: #5a6571; font-size: 0.8rem; }

.site-nav .nav-toggle {
    display: none;
    background: none;
    border: 1px solid #d1d6da;
    padding: 0.4rem 0.8rem;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 4px;
}
.nav-list {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    gap: 1.25rem;
}
.nav-list a {
    color: #1f2933;
    font-weight: 500;
    padding: 0.5rem 0;
    display: block;
}
.nav-list a:hover { color: #0a5d80; text-decoration: none; }

@media (max-width: 768px) {
    .site-nav .nav-toggle { display: block; }
    .nav-list {
        display: none;
        position: absolute;
        right: 1rem;
        top: 4rem;
        background: #fff;
        border: 1px solid #e3e7eb;
        flex-direction: column;
        padding: 0.5rem 1rem;
        gap: 0.25rem;
        min-width: 200px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.06);
        z-index: 10;
    }
    .nav-list.open { display: flex; }
}

/* ─── Breadcrumb ──────────────────────────────────────────────────────── */
.breadcrumb {
    background: #f7f9fa;
    border-bottom: 1px solid #e3e7eb;
    padding: 0.5rem 0;
    font-size: 0.875rem;
}
.breadcrumb ol {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}
.breadcrumb li:not(:last-child)::after {
    content: "›";
    margin-left: 0.3rem;
    color: #8a949e;
}

/* ─── Hero / sections ─────────────────────────────────────────────────── */
.hero {
    padding: 3rem 0;
    background: linear-gradient(180deg, #f7f9fa 0%, #fff 100%);
    text-align: center;
}
.hero h1 { font-size: 2rem; margin: 0 0 1rem; }
.hero .lead { max-width: 720px; margin: 0 auto 1.5rem; }

section { padding: 2.5rem 0; }
section h2 { font-size: 1.5rem; margin: 0 0 1.5rem; }

/* ─── Buttons ─────────────────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 0.65rem 1.25rem;
    border-radius: 4px;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    margin-right: 0.5rem;
}
.btn-primary {
    background: #0a5d80;
    color: #fff;
    border-color: #0a5d80;
}
.btn-primary:hover { background: #084c69; text-decoration: none; color: #fff; }
.btn-secondary {
    background: transparent;
    color: #0a5d80;
    border-color: #d1d6da;
}
.btn-secondary:hover { background: #f0f4f6; text-decoration: none; }

/* ─── Cards ───────────────────────────────────────────────────────────── */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}
.card {
    border: 1px solid #e3e7eb;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover {
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-color: #b8c1cb;
}
.card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: #f7f9fa;
    padding: 0.5rem;
}
.card-body { padding: 0.75rem 1rem 1rem; }
.card-body h3 { margin: 0 0 0.3rem; font-size: 1rem; }

/* ─── Page content (prose) ────────────────────────────────────────────── */
.page-article, .product-article, .contact-page, .error-page { padding: 2rem 0 3rem; }
.page-header h1 { font-size: 1.75rem; margin: 0 0 1rem; }
.model-code { color: #5a6571; margin: 0 0 0.25rem; }

.prose {
    max-width: 780px;
}
.prose h2, .prose h3 { margin-top: 1.75rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 1rem; }
.prose ul, .prose ol { padding-left: 1.5rem; }
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.875rem;
}
.prose table th, .prose table td {
    padding: 0.5rem;
    border: 1px solid #e3e7eb;
    text-align: left;
    vertical-align: top;
}
.prose table th { background: #f7f9fa; font-weight: 600; }
.prose img { margin: 0.5rem 0; }

/* ─── Models in table (categorie cu specs) ────────────────────────────── */
.models-table-wrap { margin: 2.5rem 0; }
.table-scroll { overflow-x: auto; }
.models-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.models-table th, .models-table td {
    padding: 0.6rem 0.75rem;
    border: 1px solid #e3e7eb;
    text-align: left;
    vertical-align: middle;
}
.models-table thead th {
    background: #1f2933;
    color: #fff;
    font-weight: 500;
}
.models-table tbody tr:nth-child(even) { background: #f7f9fa; }
.extra-specs-row td {
    background: #fafbfc;
    border-top: 0;
    padding: 0.4rem 0.75rem;
}
.extra-specs-row span { margin-right: 1rem; }

/* ─── Product page ────────────────────────────────────────────────────── */
.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 1.5rem 0 2rem;
}
@media (max-width: 768px) {
    .product-grid { grid-template-columns: 1fr; }
}
.product-main-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: #f7f9fa;
    border: 1px solid #e3e7eb;
    padding: 1rem;
}
.product-no-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #f0f4f6;
    color: #8a949e;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-gallery {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}
.product-gallery img {
    border: 1px solid #e3e7eb;
    padding: 0.25rem;
    background: #fff;
    cursor: pointer;
}
.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0 1.5rem;
}
.specs-table th, .specs-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #e3e7eb;
    text-align: left;
    vertical-align: top;
}
.specs-table th {
    width: 40%;
    color: #5a6571;
    font-weight: 500;
    background: #f7f9fa;
}
.product-actions { margin: 1.5rem 0; }
.product-actions .btn { margin-bottom: 0.5rem; }

/* ─── CTA + contact ───────────────────────────────────────────────────── */
.cta-contact {
    margin: 2.5rem 0 0;
    padding: 1.5rem;
    background: #f7f9fa;
    border-left: 3px solid #0a5d80;
}
.cta-contact p { margin: 0; }

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-top: 2rem;
}
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-form label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 500;
}
.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d6da;
    border-radius: 4px;
    font: inherit;
    background: #fff;
    margin-top: 0.25rem;
}
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: 2px solid #0a5d80;
    outline-offset: 1px;
    border-color: #0a5d80;
}
.contact-form textarea { font-family: inherit; resize: vertical; min-height: 120px; }
.form-note { margin: 0.5rem 0 1rem; }
#form-result { font-weight: 500; margin-top: 0.5rem; }

/* ─── Footer ──────────────────────────────────────────────────────────── */
.site-footer {
    margin-top: 3rem;
    background: #1f2933;
    color: #d1d6da;
    padding: 2.5rem 0 1rem;
}
.site-footer h3 { color: #fff; margin: 0 0 0.75rem; font-size: 1rem; }
.site-footer a { color: #b8c1cb; }
.site-footer a:hover { color: #fff; }
.footer-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}
.footer-links {
    list-style: none;
    margin: 0; padding: 0;
}
.footer-links li { margin-bottom: 0.35rem; }
.footer-bottom {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #2d3a47;
}
.site-footer .muted { color: #8a949e; }

/* ─── Error page ──────────────────────────────────────────────────────── */
.error-page h1 { font-size: 1.75rem; }
.error-suggestions {
    list-style: none;
    padding: 0;
    margin: 1rem 0 2rem;
}
.error-suggestions li { margin-bottom: 0.4rem; }

/* ─── Print ───────────────────────────────────────────────────────────── */
@media print {
    .site-header, .site-footer, .breadcrumb, .cta-contact, .product-actions { display: none; }
    a { color: #000; text-decoration: none; }
    .container { max-width: 100%; }
}
