:root {
    --red: #b5121b;
    --red-dark: #7f0d15;
    --navy: #0b2341;
    --gold: #c9a227;
    --paper: #f8f5ef;
    --white: #ffffff;
    --ink: #20242a;
    --muted: #6b7280;
    --line: #e7e0d7;
    --success: #15803d;
    --danger: #991b1b;
    --shadow: 0 18px 45px rgba(11, 35, 65, .12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Tahoma, Arial, sans-serif;
    background: var(--paper);
    color: var(--ink);
    line-height: 1.8;
}

a {
    color: inherit;
    text-decoration: none;
}

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

button,
input,
textarea,
select {
    font: inherit;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.top-strip {
    background: var(--navy);
    color: var(--white);
    font-size: 14px;
}

.strip-inner {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 8px 22px rgba(11, 35, 65, .08);
}

.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--line);
}

.nav-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
}

.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: var(--red);
    color: var(--white);
    font-weight: 800;
    font-size: 28px;
    border-bottom: 4px solid var(--gold);
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    color: var(--red-dark);
    font-size: 17px;
}

.brand small {
    color: var(--muted);
    font-size: 12px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-inline-start: auto;
}

.nav-links a {
    color: var(--navy);
    padding: 10px 12px;
    border-radius: 6px;
    font-weight: 700;
    white-space: nowrap;
}

.nav-links a:hover {
    background: #fff1f2;
    color: var(--red);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-link,
.whatsapp-link,
.btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 6px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 800;
    transition: transform .16s ease, background .16s ease, color .16s ease, border-color .16s ease;
}

.cart-link {
    background: var(--navy);
    color: var(--white);
}

.cart-link span,
.admin-count {
    min-width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--gold);
    color: var(--navy);
    font-size: 12px;
}

.whatsapp-link,
.btn-primary {
    background: var(--red);
    color: var(--white);
}

.btn-primary:hover,
.whatsapp-link:hover,
.cart-link:hover {
    transform: translateY(-1px);
}

.btn-outline {
    color: var(--red);
    border: 1px solid var(--red);
    background: var(--white);
}

.btn-navy {
    background: var(--navy);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-small {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 13px;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    background: var(--white);
    border-radius: 6px;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--navy);
    margin: 6px 0;
}

.hero {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(120deg, rgba(127, 13, 21, .96), rgba(181, 18, 27, .88)),
        repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 2px, transparent 2px 18px);
    color: var(--white);
}

.hero::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    bottom: 0;
    width: 45%;
    height: 10px;
    background: var(--gold);
}

.hero-inner {
    min-height: 520px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr);
    align-items: center;
    gap: 36px;
    padding: 54px 0;
}

.hero-copy h1 {
    margin: 0 0 18px;
    max-width: 720px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.25;
}

.hero-copy p {
    max-width: 650px;
    margin: 0 0 24px;
    font-size: 19px;
    color: #fff7ed;
}

.hero-actions,
.section-actions,
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.press-board {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.press-sheet {
    min-height: 340px;
    background: var(--white);
    color: var(--navy);
    border-radius: 8px;
    padding: 26px;
    position: relative;
    overflow: hidden;
}

.press-sheet::before {
    content: "";
    position: absolute;
    inset: 18px;
    border: 2px solid var(--red);
    border-bottom-color: var(--gold);
    pointer-events: none;
}

.press-sheet h2 {
    position: relative;
    margin: 0 0 18px;
    color: var(--red);
    font-size: 30px;
}

.press-list {
    position: relative;
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0 20px 0 0;
    font-weight: 800;
}

.section {
    padding: 58px 0;
}

.section-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.section-title h2,
.page-title h1 {
    margin: 0;
    color: var(--navy);
    font-size: clamp(26px, 3vw, 38px);
}

.section-title p,
.page-title p {
    margin: 8px 0 0;
    color: var(--muted);
}

.grid {
    display: grid;
    gap: 18px;
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.service-card,
.product-card,
.info-card,
.form-card,
.table-card,
.summary-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(11, 35, 65, .06);
}

.service-card,
.info-card {
    padding: 22px;
}

.service-card h3,
.info-card h3 {
    margin: 0 0 8px;
    color: var(--red);
}

.service-card p,
.info-card p {
    margin: 0;
    color: var(--muted);
}

.product-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-card-image {
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #fff, #f3f4f6);
    display: grid;
    place-items: center;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card-body {
    padding: 16px;
    display: grid;
    gap: 10px;
    flex: 1;
}

.product-card h3 {
    margin: 0;
    color: var(--navy);
    font-size: 18px;
    line-height: 1.5;
}

.product-card p {
    margin: 0;
    color: var(--muted);
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.price {
    color: var(--red);
    font-size: 20px;
    font-weight: 900;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 800;
}

.badge-ok {
    background: #dcfce7;
    color: var(--success);
}

.badge-off {
    background: #fee2e2;
    color: var(--danger);
}

.page-hero {
    background: var(--navy);
    color: var(--white);
    padding: 50px 0;
}

.page-title h1 {
    color: var(--white);
}

.page-title p {
    color: #dbeafe;
}

.filters {
    padding: 22px 0 0;
}

.filter-form {
    display: grid;
    grid-template-columns: 1fr 220px auto;
    gap: 12px;
    align-items: end;
}

.field {
    display: grid;
    gap: 6px;
}

.field label {
    color: var(--navy);
    font-weight: 800;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: var(--white);
    color: var(--ink);
    padding: 12px 13px;
    min-height: 46px;
}

.field textarea {
    min-height: 120px;
    resize: vertical;
}

.form-card {
    padding: 22px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.field-full {
    grid-column: 1 / -1;
}

.product-details {
    display: grid;
    grid-template-columns: minmax(320px, .95fr) minmax(0, 1.05fr);
    gap: 32px;
    align-items: start;
}

.gallery-main {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.thumbs button {
    border: 2px solid transparent;
    background: var(--white);
    border-radius: 6px;
    padding: 0;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    cursor: pointer;
}

.thumbs button.is-active {
    border-color: var(--red);
}

.thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
}

.product-info h1 {
    margin: 0 0 12px;
    color: var(--navy);
    font-size: clamp(26px, 4vw, 42px);
}

.cart-layout,
.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
    align-items: start;
}

.cart-item {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr) 130px 90px;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-bottom: 1px solid var(--line);
}

.cart-item:last-child {
    border-bottom: 0;
}

.cart-item img,
.cart-placeholder {
    width: 90px;
    height: 90px;
    border-radius: 6px;
    object-fit: cover;
    background: #f3f4f6;
    display: grid;
    place-items: center;
    color: var(--muted);
}

.qty-control {
    display: grid;
    grid-template-columns: 34px 48px 34px;
    align-items: center;
    gap: 4px;
}

.qty-control button {
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    background: var(--white);
    border-radius: 6px;
    cursor: pointer;
}

.qty-control input {
    width: 48px;
    height: 34px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.summary-card,
.table-card {
    padding: 18px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.summary-row.total {
    color: var(--red);
    font-size: 20px;
    font-weight: 900;
    border-bottom: 0;
}

.empty-state {
    text-align: center;
    padding: 36px 18px;
    color: var(--muted);
}

.alert {
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-weight: 800;
}

.alert-success {
    background: #dcfce7;
    color: var(--success);
}

.alert-error {
    background: #fee2e2;
    color: var(--danger);
}

.site-footer {
    background: var(--navy);
    color: var(--white);
    margin-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 26px;
    padding: 42px 0;
}

.site-footer h3,
.site-footer h4 {
    margin: 0 0 12px;
    color: var(--gold);
}

.site-footer a {
    display: block;
    color: #e5e7eb;
    margin: 6px 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.12);
    padding: 14px;
    text-align: center;
    color: #d1d5db;
}

.admin-body {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    background: #f3f4f6;
}

.admin-sidebar {
    background: var(--navy);
    color: var(--white);
    min-height: 100vh;
    padding: 18px;
    position: sticky;
    top: 0;
}

.admin-brand {
    display: block;
    color: var(--gold);
    font-weight: 900;
    font-size: 19px;
    margin-bottom: 20px;
}

.admin-sidebar nav {
    display: grid;
    gap: 6px;
}

.admin-sidebar nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 6px;
    color: #f9fafb;
}

.admin-sidebar nav a:hover {
    background: rgba(255,255,255,.1);
}

.admin-main {
    padding: 24px;
}

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

.admin-topbar h1 {
    margin: 0;
    color: var(--navy);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}

.stat-card strong {
    display: block;
    color: var(--red);
    font-size: 30px;
    line-height: 1.2;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

.data-table th,
.data-table td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: right;
    vertical-align: top;
}

.data-table th {
    background: #f9fafb;
    color: var(--navy);
}

.table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-form {
    max-width: 980px;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: linear-gradient(135deg, var(--navy), var(--red-dark));
}

.login-box {
    width: min(430px, 100%);
    background: var(--white);
    border-radius: 8px;
    padding: 26px;
    box-shadow: var(--shadow);
}

.login-box h1 {
    margin: 0 0 20px;
    color: var(--navy);
}

.image-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.image-admin-grid figure {
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: var(--white);
}

.image-admin-grid img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.image-admin-grid figcaption {
    padding: 8px;
}

@media (max-width: 980px) {
    .nav-toggle {
        display: block;
        margin-inline-start: auto;
    }

    .nav-links,
    .nav-actions {
        display: none;
    }

    .nav-links.is-open,
    .nav-actions.is-open {
        display: grid;
        grid-column: 1 / -1;
        width: 100%;
    }

    .nav-inner {
        flex-wrap: wrap;
    }

    .hero-inner,
    .product-details,
    .cart-layout,
    .checkout-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-form,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .cart-item {
        grid-template-columns: 80px 1fr;
    }

    .admin-body {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
        min-height: auto;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

    .strip-inner,
    .section-title,
    .admin-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-inner {
        min-height: auto;
        padding: 38px 0 44px;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .brand {
        min-width: 0;
    }

    .brand strong {
        font-size: 15px;
    }

    .table-card {
        overflow-x: auto;
    }

    .data-table {
        min-width: 760px;
    }
}
