/* ============================================================
   Multivac Partner Products – Main Stylesheet
   ============================================================ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --color-primary: #003366;
    --color-primary-light: #004a99;
    --color-accent: #e63946;
    --color-bg: #f5f7fa;
    --color-white: #ffffff;
    --color-text: #333333;
    --color-muted: #6c757d;
    --color-border: #dee2e6;
    --radius: 6px;
    --shadow: 0 2px 8px rgba(0,0,0,.08);
    --container-width: 1200px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-light); }

img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--container-width); margin: 0 auto; padding: 0 20px; }

/* ── Header ── */
.site-header {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 64px;
}

.logo { color: var(--color-white); font-size: 1.2rem; white-space: nowrap; }
.logo span { font-weight: 300; opacity: .85; }

.main-nav { flex: 1; }
.nav-list { list-style: none; display: flex; gap: 4px; }
.nav-list a {
    color: var(--color-white);
    padding: 8px 16px;
    border-radius: var(--radius);
    transition: background .2s;
}
.nav-list a:hover { background: rgba(255,255,255,.15); color: var(--color-white); }

.nav-toggle { display: none; background: none; border: none; color: var(--color-white); font-size: 1.5rem; cursor: pointer; }

.header-search { display: flex; }
.header-search input {
    padding: 6px 12px;
    border: none;
    border-radius: var(--radius) 0 0 var(--radius);
    width: 200px;
    font-size: .9rem;
}
.header-search button {
    padding: 6px 14px;
    background: var(--color-accent);
    color: var(--color-white);
    border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    cursor: pointer;
    font-size: .9rem;
}

/* ── Hero ── */
.hero {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: var(--color-white);
    padding: 80px 20px;
    text-align: center;
    margin: -20px -20px 40px;
    border-radius: 0 0 12px 12px;
}
.hero h1 { font-size: 2.4rem; margin-bottom: 12px; }
.hero p  { font-size: 1.15rem; opacity: .9; max-width: 600px; margin: 0 auto 24px; }
.hero .btn { font-size: 1rem; }

/* ── Buttons ── */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-size: .95rem;
    transition: background .2s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--color-accent); color: var(--color-white); }
.btn-primary:hover { background: #c5303c; color: var(--color-white); }
.btn-secondary { background: var(--color-primary); color: var(--color-white); }
.btn-secondary:hover { background: var(--color-primary-light); color: var(--color-white); }
.btn-sm { padding: 6px 14px; font-size: .85rem; }
.btn-outline { background: transparent; border: 2px solid var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: var(--color-white); }
.btn-danger { background: #dc3545; color: #fff; }
.btn-danger:hover { background: #b02a37; color: #fff; }

/* ── Section titles ── */
.section-title {
    font-size: 1.6rem;
    margin-bottom: 24px;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--color-primary);
    display: inline-block;
}

/* ── Grid ── */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* ── Cards ── */
.card {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #e9ecef;
}
.card-body { padding: 16px; }
.card-body h3 { font-size: 1.1rem; margin-bottom: 6px; }
.card-body p { color: var(--color-muted); font-size: .9rem; }
.card-meta { font-size: .8rem; color: var(--color-muted); margin-top: 8px; }

/* ── Brands strip ── */
.brands-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}
.brands-strip img {
    height: 50px;
    width: auto;
    filter: grayscale(100%);
    opacity: .6;
    transition: all .3s;
}
.brands-strip img:hover { filter: none; opacity: 1; }

/* ── Contact cards ── */
.contact-card {
    display: flex;
    gap: 16px;
    align-items: center;
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}
.contact-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    background: #e9ecef;
}
.contact-card h4 { margin-bottom: 2px; }
.contact-card .title { color: var(--color-muted); font-size: .9rem; }
.contact-card .contact-info { font-size: .85rem; margin-top: 4px; }

/* ── Product detail ── */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.product-gallery { display: flex; flex-direction: column; gap: 12px; }
.product-gallery .main-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: var(--radius);
    background: #e9ecef;
}
.product-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.product-thumbs img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
}
.product-thumbs img.active, .product-thumbs img:hover { border-color: var(--color-primary); }
.product-info h1 { font-size: 1.8rem; margin-bottom: 8px; }
.product-meta { color: var(--color-muted); font-size: .9rem; margin-bottom: 16px; }
.product-description { margin-bottom: 24px; line-height: 1.8; }

/* ── Filter bar ── */
.filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    align-items: center;
}
.filter-bar select, .filter-bar input {
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: .9rem;
}

/* ── News ── */
.news-card .card-body h3 { font-size: 1rem; }
.news-card .card-body .date { font-size: .8rem; color: var(--color-muted); margin-bottom: 6px; }

/* ── Article ── */
.article { max-width: 800px; }
.article h1 { font-size: 2rem; margin-bottom: 8px; }
.article .meta { color: var(--color-muted); margin-bottom: 24px; }
.article .body { line-height: 1.8; }
.article .body p { margin-bottom: 16px; }

/* ── Footer ── */
.site-footer {
    background: var(--color-primary);
    color: rgba(255,255,255,.7);
    text-align: center;
    padding: 24px 20px;
    margin-top: 60px;
    font-size: .9rem;
}

.site-main { padding: 20px 0; min-height: 60vh; }

/* ── Page heading ── */
.page-heading { margin-bottom: 30px; }
.page-heading h1 { font-size: 1.8rem; }
.page-heading p { color: var(--color-muted); }

/* ── Placeholder image ── */
.img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    color: #adb5bd;
    font-size: .85rem;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; height: auto; padding: 12px 20px; }
    .nav-toggle { display: block; }
    .nav-list { display: none; flex-direction: column; width: 100%; }
    .nav-list.open { display: flex; }
    .header-search { width: 100%; margin-top: 8px; }
    .header-search input { flex: 1; }
    .product-detail { grid-template-columns: 1fr; }
    .hero { padding: 48px 20px; }
    .hero h1 { font-size: 1.8rem; }
}

/* ============================================================
   Admin Styles
   ============================================================ */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 240px;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 20px 0;
    flex-shrink: 0;
}
.admin-sidebar .brand {
    padding: 0 20px 20px;
    font-size: 1.1rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,.15);
    margin-bottom: 12px;
}
.admin-sidebar nav a {
    display: block;
    color: rgba(255,255,255,.8);
    padding: 10px 20px;
    transition: background .2s;
    font-size: .9rem;
}
.admin-sidebar nav a:hover,
.admin-sidebar nav a.active {
    background: rgba(255,255,255,.12);
    color: #fff;
}

.admin-content {
    flex: 1;
    padding: 30px;
    background: var(--color-bg);
    overflow-x: auto;
}
.admin-content h1 { font-size: 1.6rem; margin-bottom: 24px; }

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

/* ── Dashboard cards ── */
.dash-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; margin-bottom: 30px; }
.dash-card {
    background: var(--color-white);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}
.dash-card .number { font-size: 2rem; font-weight: 700; color: var(--color-primary); }
.dash-card .label { font-size: .9rem; color: var(--color-muted); }

/* ── Tables ── */
.table-wrap { overflow-x: auto; }
table.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
table.data-table th, table.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    font-size: .9rem;
}
table.data-table th { background: var(--color-primary); color: var(--color-white); font-weight: 600; }
table.data-table tr:hover { background: #f0f4f8; }
table.data-table img { width: 50px; height: 40px; object-fit: cover; border-radius: 4px; }

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 4px; font-size: .9rem; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: .95rem;
    font-family: inherit;
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.login-wrap {
    max-width: 400px;
    margin: 80px auto;
    background: var(--color-white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.login-wrap h1 { text-align: center; margin-bottom: 24px; }

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: .9rem;
}
.alert-success { background: #d4edda; color: #155724; }
.alert-danger  { background: #f8d7da; color: #842029; }
.alert-info    { background: #cce5ff; color: #004085; }

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: .75rem;
    font-weight: 600;
}
.badge-active   { background: #d4edda; color: #155724; }
.badge-inactive { background: #f8d7da; color: #842029; }

@media (max-width: 768px) {
    .admin-sidebar { display: none; }
    .admin-content { padding: 16px; }
    .form-row { grid-template-columns: 1fr; }
}
