/* ═══════════════════════════════════════════════════════════════════════════
 * THEME: DEFAULT (Look WP original Milatex Prod Impex)
 * Bar turcoaz vibrant, submenuri dropdown, layout simplu.
 * Restaurat din aspectul site-ului WP original (www.milatextrade.ro).
 * ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --c-teal:       #15c1b8;  /* turcoaz primary (bar) */
    --c-teal-dark:  #11a59d;  /* hover/active */
    --c-teal-light: #6dd5d0;
    --c-teal-pale:  #d4f1ee;

    --c-ink:        #1a1f1f;
    --c-text:       #2c3338;
    --c-mid:        #5a6571;
    --c-mute:       #8a949e;
    --c-line:       #e3e7eb;
    --c-bg:         #ffffff;
    --c-bg-soft:    #f7f9fa;

    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --radius: 4px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 24px rgba(0,0,0,0.10);
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; }
body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--c-teal); text-decoration: none; transition: color 180ms; }
a:hover { color: var(--c-teal-dark); }
h1, h2, h3, h4 { color: var(--c-ink); margin: 0 0 1rem; font-weight: 700; line-height: 1.25; }
h1 { font-size: clamp(1.85rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 1.5rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
p { margin: 0 0 1rem; color: var(--c-text); }
.muted { color: var(--c-mid); }
.small { font-size: 0.875rem; }
.lead  { font-size: 1.125rem; color: var(--c-mid); line-height: 1.65; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* ─── Header bar TURCOAZ (WP original look) ───────────────────────────── */
.site-header {
    background: var(--c-teal);
    color: #fff;
    padding: 0;
    border-bottom: 0;
    position: relative;
    z-index: 100;
}
.header-inner, .site-header .container {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    gap: clamp(2rem, 5vw, 5rem);
    min-height: 80px;
}
.site-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 0;
    flex-shrink: 0;
}
.site-brand:hover { text-decoration: none; }
.brand-icon {
    width: 56px; height: 56px;
    background: #fff;
    border-radius: 6px;
    padding: 4px;
    object-fit: contain;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1.45rem; color: #fff; font-weight: 700; letter-spacing: -0.02em; }
.brand-text .brand-sub { color: rgba(255,255,255,0.9); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; margin-top: 3px; font-weight: 500; }
/* Compatibilitate cu vechiul markup (.tagline) — daca exista */
.site-brand .tagline { color: rgba(255,255,255,0.85); font-size: 0.78rem; margin-top: 2px; }

.site-nav { display: flex; align-items: stretch; }
.nav-toggle {
    display: none;
    background: none; border: 0;
    color: #fff; font-size: 1.5rem; padding: 0.25rem 0.75rem;
    cursor: pointer;
}
.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: stretch;
    gap: 0;
}
.nav-list > li {
    position: relative;
    display: flex;
    align-items: stretch;
}
.nav-list > li > a {
    display: flex;
    align-items: center;
    padding: 0 0.9rem;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0;
    transition: background 150ms;
    white-space: nowrap;
}
.nav-list > li > a:hover,
.nav-list > li:hover > a,
.nav-list > li.has-sub:focus-within > a {
    background: var(--c-teal-dark);
    color: #fff;
    text-decoration: none;
}
.nav-list .chev {
    margin-left: 0.4rem;
    font-size: 1.1em;
    font-weight: 400;
    opacity: 0.85;
    transition: transform 200ms;
    display: inline-block;
}
.nav-list > li:hover .chev { transform: rotate(90deg); }

/* Sub-menu dropdown */
.nav-list .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--c-teal);
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 200ms, transform 200ms, visibility 200ms;
    z-index: 99;
    border-top: 2px solid var(--c-teal-dark);
}
.nav-list > li:hover > .sub-menu,
.nav-list > li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-list .sub-menu li { display: block; }
.nav-list .sub-menu a {
    display: block;
    padding: 0.58rem 1.05rem;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    transition: background 150ms;
}
.nav-list .sub-menu a:hover {
    background: var(--c-teal-dark);
    color: #fff;
    text-decoration: none;
}

/* ─── Hero ────────────────────────────────────────────────────────────── */
.hero {
    background: var(--c-bg-soft);
    padding: 3rem 0 2.5rem;
    text-align: center;
}
.hero h1 {
    color: var(--c-ink);
    max-width: 22ch;
    margin: 0 auto 1rem;
}
.hero p, .hero .lead {
    max-width: 60ch;
    margin: 0 auto 1rem;
    color: var(--c-mid);
}
.hero p:last-child { margin-bottom: 0; }
.hero a:not(.btn) { color: var(--c-teal); }

/* ─── Buttons ─────────────────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 180ms;
    border: 2px solid transparent;
    line-height: 1.4;
    cursor: pointer;
    font-family: inherit;
    margin-right: 0.5rem;
}
.btn-primary {
    background: var(--c-teal);
    color: #fff;
    border-color: var(--c-teal);
}
.btn-primary:hover { background: var(--c-teal-dark); border-color: var(--c-teal-dark); color: #fff; text-decoration: none; }
.btn-secondary {
    background: #fff;
    color: var(--c-teal);
    border-color: var(--c-teal);
}
.btn-secondary:hover { background: var(--c-teal-pale); color: var(--c-teal-dark); text-decoration: none; }

/* ─── Breadcrumb ──────────────────────────────────────────────────────── */
.breadcrumb { background: var(--c-bg-soft); padding: 0.75rem 0; border-bottom: 1px solid var(--c-line); }
.breadcrumb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.875rem; color: var(--c-mid); }
.breadcrumb-list li:not(:last-child)::after { content: '›'; margin-left: 0.5rem; color: var(--c-mute); }
.breadcrumb-list a { color: var(--c-teal); }

/* ─── Sectiuni generale ───────────────────────────────────────────────── */
.top-categories, .value-props, .page-article, .products-grid {
    padding: 3rem 0;
}
.top-categories h2, .value-props h2, .products-grid h2 {
    text-align: center;
    margin-bottom: 2rem;
}

/* ─── Cards ───────────────────────────────────────────────────────────── */
.cards, .children-grid .cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.card {
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--c-ink);
    transition: all 200ms;
    display: flex;
    flex-direction: column;
}
.card:hover {
    border-color: var(--c-teal);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    text-decoration: none;
    color: var(--c-ink);
}
.card img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    width: 100%;
    background: var(--c-bg-soft);
}
.card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { color: var(--c-ink); font-size: 1.1rem; margin-bottom: 0.5rem; }
.card-body p { font-size: 0.9rem; color: var(--c-mid); flex: 1; margin-bottom: 0; }

/* ─── Value props ─────────────────────────────────────────────────────── */
.value-props { background: var(--c-bg-soft); }
.props-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.props-grid > div { background: #fff; padding: 1.5rem; border-radius: var(--radius); border-left: 3px solid var(--c-teal); }
.props-grid h3 { color: var(--c-ink); font-size: 1.1rem; }
.props-grid p { font-size: 0.95rem; color: var(--c-mid); }

/* ─── Page article ────────────────────────────────────────────────────── */
.page-article .page-header { margin-bottom: 2rem; }
.page-article .page-header h1 { color: var(--c-teal); border-bottom: 3px solid var(--c-teal); padding-bottom: 0.5rem; display: inline-block; }
.page-article .page-intro, .page-article .page-content {
    max-width: 80ch;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--c-text);
}
.page-article .page-content h2, .page-article .page-content h3 { color: var(--c-ink); margin-top: 2rem; }
.page-article .page-content a { color: var(--c-teal); }
.page-article .page-content img { border-radius: var(--radius); margin: 1.5rem 0; }
.page-article .page-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.9rem; }
.page-article .page-content th, .page-article .page-content td { padding: 0.6rem 0.75rem; border: 1px solid var(--c-line); text-align: left; }
.page-article .page-content th { background: var(--c-teal-pale); color: var(--c-ink); font-weight: 600; }

/* ─── Models table ────────────────────────────────────────────────────── */
.models-table-wrap { overflow-x: auto; margin: 2rem 0; }
.models-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; background: #fff; }
.models-table th { background: var(--c-teal); color: #fff; padding: 0.65rem 0.75rem; text-align: left; font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.models-table td { padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--c-line); }
.models-table tr:hover { background: var(--c-teal-pale); }
.models-table code, .models-table .model-code { color: var(--c-teal-dark); font-weight: 600; font-family: ui-monospace, "Consolas", monospace; }

/* ─── Products grid (pe categorie) ────────────────────────────────────── */
.products-grid { background: var(--c-bg-soft); padding: 3rem 0; }
.products-grid .cards { grid-template-columns: repeat(4, 1fr); }
.products-grid .card h3 { font-size: 0.95rem; }

/* ─── CTA contact ─────────────────────────────────────────────────────── */
.cta-contact { background: var(--c-teal); color: #fff; padding: 2rem; border-radius: var(--radius); margin-top: 2rem; text-align: center; }
.cta-contact p { color: #fff; font-size: 1.1rem; margin-bottom: 1rem; }
.cta-contact .btn { background: #fff; color: var(--c-teal); border-color: #fff; }
.cta-contact .btn:hover { background: var(--c-teal-pale); color: var(--c-teal-dark); }

/* ─── Product page ────────────────────────────────────────────────────── */
.product-article, .product-page { padding: 2rem 0; color: var(--c-text); }
.product-article .page-header, .product-page .page-header { margin-bottom: 1rem; }
.product-article .page-header h1, .product-page h1 { color: var(--c-ink); margin-bottom: 0.5rem; }
.product-article .model-code { color: var(--c-mid); margin-bottom: 0.5rem; font-size: 0.9rem; }
.product-article .model-code strong { color: var(--c-ink); }
.product-article .muted { color: var(--c-mid); }
.product-grid, .product-page .product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 1.5rem; align-items: start; }
.product-media .product-main-image { margin-bottom: 1rem; }
.product-media .product-no-image { background: var(--c-bg-soft); color: var(--c-mid); padding: 3rem 1rem; text-align: center; border: 1px solid var(--c-line); border-radius: var(--radius); }
.product-media .product-gallery { display: flex; gap: 0.5rem; margin-top: 1rem; flex-wrap: wrap; }
.product-media .product-gallery img { width: 70px; height: 70px; object-fit: cover; border: 1px solid var(--c-line); border-radius: var(--radius); cursor: pointer; }
.product-info { color: var(--c-text); }
.product-short { color: var(--c-text); font-size: 1rem; line-height: 1.7; margin-bottom: 1.5rem; }
.product-short p, .product-short ul, .product-short ol, .product-short li,
.product-short strong, .product-short em, .product-short span, .product-short a { color: inherit; }
.product-short a, .product-content a, .prose a { color: var(--c-teal-dark); }
.product-short a:hover, .product-content a:hover, .prose a:hover { color: var(--c-teal); }
.product-short [style*="color"], .product-content [style*="color"], .prose [style*="color"] { color: inherit !important; }
.product-info .product-specs h2 { font-size: 1.15rem; color: var(--c-ink); margin: 1.5rem 0 0.5rem; }
.product-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1.5rem; }
.product-content, .prose { color: var(--c-text); line-height: 1.7; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--c-line); }
.product-content p, .prose p, .product-content li, .prose li { color: inherit; }
.product-content h2, .prose h2 { color: var(--c-ink); margin-top: 1.5rem; }
.product-content h3, .prose h3 { color: var(--c-ink); margin-top: 1.25rem; }
.product-content table, .prose table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.9rem; }
.product-content th, .prose th { background: var(--c-bg-soft); padding: 0.5rem 0.75rem; text-align: left; }
.product-content td, .prose td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--c-line); }
.product-gallery img { border-radius: var(--radius); margin-bottom: 1rem; box-shadow: var(--shadow-sm); }
.product-info .specs-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.92rem; }
.product-info .specs-table th { background: var(--c-teal-pale); color: var(--c-ink); padding: 0.55rem 0.75rem; text-align: left; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; width: 40%; font-weight: 600; }
.product-info .specs-table td { padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--c-line); }

/* ─── Footer ──────────────────────────────────────────────────────────── */
.site-footer { background: var(--c-ink); color: #cbd2d9; padding: 2.5rem 0 1.5rem; }
.site-footer a { color: #cbd2d9; }
.site-footer a:hover { color: #fff; }
.site-footer .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.site-footer h4 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.75rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.4rem; font-size: 0.875rem; }
.site-footer .footer-brand { grid-column: span 2; }
.site-footer .footer-brand strong { color: #fff; font-size: 1.05rem; }
.site-footer .footer-brand p { color: #8a949e; font-size: 0.875rem; max-width: 40ch; }
.site-footer .footer-copyright { grid-column: 1 / -1; border-top: 1px solid #2d3a47; margin-top: 1.5rem; padding-top: 1rem; font-size: 0.78rem; color: #8a949e; }

/* ─── Forms ───────────────────────────────────────────────────────────── */
.contact-form label { display: block; margin-bottom: 1rem; font-weight: 500; }
.contact-form input, .contact-form select, .contact-form textarea {
    width: 100%; padding: 0.55rem 0.75rem; border: 1px solid var(--c-line); border-radius: var(--radius); font: inherit; margin-top: 0.25rem; background: #fff;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: 2px solid var(--c-teal); outline-offset: 1px; border-color: var(--c-teal); }
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form button { background: var(--c-teal); color: #fff; padding: 0.7rem 1.5rem; border: 0; border-radius: var(--radius); font-weight: 600; cursor: pointer; }
.contact-form button:hover { background: var(--c-teal-dark); }

/* ─── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .nav-toggle { display: inline-flex; align-items: center; }
    .header-inner, .site-header .container { min-height: 64px; flex-wrap: wrap; }
    .site-nav { flex: 1 0 100%; order: 3; }
    .nav-list {
        display: none;
        flex-direction: column;
        background: var(--c-teal);
        padding: 0.5rem 0;
        align-items: stretch;
    }
    .nav-list.open { display: flex; }
    .nav-list > li { display: block; }
    .nav-list > li > a { padding: 0.75rem 1.25rem; }
    .nav-list .sub-menu {
        position: static;
        opacity: 1; visibility: visible;
        transform: none;
        box-shadow: none;
        background: var(--c-teal-dark);
        padding-left: 0;
        border-top: 0;
    }
    .nav-list .sub-menu a { padding-left: 2.5rem; font-size: 0.85rem; }
    .nav-list > li:hover .chev { transform: none; }
    .cards, .children-grid .cards, .products-grid .cards { grid-template-columns: 1fr; }
    .props-grid { grid-template-columns: 1fr; }
    .product-page .product-layout, .product-grid { grid-template-columns: 1fr; }
    .site-footer .container { grid-template-columns: 1fr 1fr; }
    .site-footer .footer-brand { grid-column: span 2; }
}

/* ─── 404 Error page ──────────────────────────────────────────────────── */
.error-page { padding: 4rem 0; text-align: center; background: var(--c-bg-soft); min-height: 60vh; }
.error-page .container { max-width: 880px; }
.error-code {
    font-size: clamp(5rem, 18vw, 10rem);
    font-weight: 800;
    line-height: 1;
    color: var(--c-teal);
    letter-spacing: -0.05em;
    opacity: 0.85;
    margin-bottom: 0.5rem;
}
.error-page h1 { color: var(--c-ink); margin: 0 0 1rem; font-size: clamp(1.5rem, 3vw, 2rem); }
.error-page .error-lead { font-size: 1.1rem; color: var(--c-mid); max-width: 56ch; margin: 0 auto 2.5rem; line-height: 1.6; }
.error-suggestions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
    text-align: left;
}
.error-suggestion {
    display: block;
    background: #fff;
    border: 1px solid var(--c-line);
    border-left: 3px solid var(--c-teal);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: var(--c-ink);
    transition: all 180ms;
}
.error-suggestion:hover { border-color: var(--c-teal); box-shadow: var(--shadow-md); transform: translateY(-2px); color: var(--c-ink); text-decoration: none; }
.error-suggestion strong { display: block; font-size: 1.05rem; color: var(--c-teal); margin-bottom: 0.25rem; }
.error-suggestion span { font-size: 0.875rem; color: var(--c-mid); line-height: 1.5; }
.error-actions { display: flex; justify-content: center; gap: 0.75rem; margin-top: 2rem; flex-wrap: wrap; }
@media (max-width: 700px) { .error-suggestions-grid { grid-template-columns: 1fr; } }

/* ─── Print ───────────────────────────────────────────────────────────── */
@media print {
    .site-header, .site-footer, .breadcrumb, .cta-contact { display: none; }
    a { color: #000; text-decoration: none; }
    .container { max-width: 100%; }
}
/* Nested navigation flyouts */
@media (min-width: 901px) {
    .site-nav,
    .nav-list,
    .nav-list li {
        overflow: visible;
    }

    .nav-list .sub-menu li {
        position: relative;
    }

    .nav-list .sub-menu .sub-menu {
        top: 0;
        left: 100%;
        transform: translateX(-4px);
    }

    .nav-list .sub-menu li:hover > .sub-menu,
    .nav-list .sub-menu li:focus-within > .sub-menu,
    .nav-list .sub-menu li.open > .sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }

    .nav-list li.has-sub > a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
    }

    .nav-list .sub-menu li.has-sub > a .chev {
        margin-left: auto;
    }

    .nav-list > li.has-sub:hover > a > .chev,
    .nav-list > li.has-sub:focus-within > a > .chev,
    .nav-list > li.has-sub.open > a > .chev {
        transform: rotate(90deg);
    }

    .nav-list > li:hover .sub-menu .chev,
    .nav-list > li:focus-within .sub-menu .chev {
        transform: none;
    }
}
