:root {
    --bg: #f5f3ee;
    --surface: #fffdf8;
    --surface-strong: #ffffff;
    --ink: #15202b;
    --muted: #617182;
    --line: #d6d0c4;
    --brand: #d66b2d;
    --brand-dark: #a64c18;
    --accent: #0d1b2a;
    --accent-soft: #d8e2ec;
    --success: #2f7d5b;
    --shadow: 0 20px 40px rgba(13, 27, 42, 0.08);
}

body {
    background:
        radial-gradient(circle at top left, rgba(214, 107, 45, 0.12), transparent 30%),
        linear-gradient(180deg, #f8f5ef 0%, #f2efe8 100%);
    color: var(--ink);
    font-family: "IBM Plex Sans", sans-serif;
}

h1,
h2,
h3,
.navbar-brand strong,
.footer-title,
.price-value {
    font-family: "Manrope", sans-serif;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(14px);
    background: rgba(248, 245, 239, 0.88);
    border-bottom: 1px solid rgba(21, 32, 43, 0.08);
}

.flash-stack {
    padding-top: 1rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.brand-mark {
    width: 2.7rem;
    height: 2.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.9rem;
    background: var(--accent);
    color: white;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.navbar-brand small {
    display: block;
    color: var(--muted);
    max-width: 28rem;
}

.navbar-nav .nav-link,
.nav-phone {
    color: var(--ink);
    font-weight: 500;
}

.navbar-toggler {
    border-color: rgba(21, 32, 43, 0.16);
}

.hero-band {
    padding: 4rem 0 2.5rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.9fr;
    gap: 1.5rem;
    align-items: stretch;
}

.hero-copy,
.hero-card,
.filter-panel,
.product-card,
.gallery-panel,
.detail-copy,
.offer-box,
.compatibility-note,
.site-footer,
.empty-state,
.simple-error .container {
    background: rgba(255, 253, 248, 0.9);
    border: 1px solid rgba(21, 32, 43, 0.08);
    box-shadow: var(--shadow);
}

.hero-copy {
    padding: 2rem;
    border-radius: 1.6rem;
}

.hero-copy h1 {
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1;
    margin: 0.5rem 0 1rem;
}

.eyebrow {
    display: inline-block;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(214, 107, 45, 0.12);
    color: var(--brand-dark);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.hero-points span,
.detail-tags span,
.product-meta span {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.75rem;
    margin-right: 0.35rem;
    margin-bottom: 0.35rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.9rem;
    white-space: nowrap;
}

.hero-card {
    border-radius: 1.6rem;
    padding: 1.5rem;
    display: grid;
    gap: 1rem;
    align-content: center;
    background:
        linear-gradient(160deg, rgba(13, 27, 42, 0.96), rgba(31, 53, 74, 0.95)),
        var(--accent);
    color: white;
}

.hero-stat strong {
    display: block;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1;
}

.catalog-section {
    padding: 0 0 4rem;
}

.filter-panel {
    border-radius: 1.5rem;
    padding: 1.25rem;
    position: sticky;
    top: 6rem;
}

.filter-title {
    font-weight: 800;
    font-size: 1.15rem;
    margin-bottom: 1rem;
}

.catalog-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.25rem;
}

.custom-order-link {
    white-space: nowrap;
}

.seo-links {
    display: grid;
    gap: 0.85rem;
    margin-bottom: 1.2rem;
}

.seo-links-group {
    display: flex;
    gap: 0.8rem;
    align-items: baseline;
    flex-wrap: wrap;
}

.seo-links-title {
    font-weight: 700;
    color: var(--ink);
}

.seo-links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
}

.seo-links-list a {
    color: var(--muted);
    border-bottom: 1px solid transparent;
}

.seo-links-list a:hover {
    color: var(--ink);
    border-color: rgba(21, 32, 43, 0.24);
}

.catalog-toolbar h2,
.section-heading h2,
.detail-copy h1 {
    margin: 0;
}

.catalog-hint {
    color: var(--muted);
    display: flex;
    gap: 0.45rem;
    align-items: center;
}

.product-card {
    border-radius: 1.4rem;
    overflow: hidden;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 48px rgba(13, 27, 42, 0.12);
}

.product-image {
    display: block;
    aspect-ratio: 4 / 3;
    background: linear-gradient(180deg, #efe7d8, #faf7f1);
}

.product-image img,
.main-shot img,
.thumb-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-image-fallback {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--brand-dark);
    font-size: 3rem;
}

.product-body {
    padding: 1.2rem;
}

.product-body h3 {
    font-size: 1.1rem;
    margin: 0.5rem 0 0.7rem;
    line-height: 1.3;
}

.product-body p {
    color: var(--muted);
    min-height: 4.7rem;
}

.product-admin-meta {
    color: var(--muted);
    font-size: 0.92rem;
    margin-bottom: 0.8rem;
}

.product-bottom {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}

.price-label {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.price-value {
    font-size: 1.35rem;
    font-weight: 800;
}

.btn-accent {
    background: var(--brand);
    color: white;
    border: 0;
}

.btn-accent:hover,
.btn-accent:focus {
    background: var(--brand-dark);
    color: white;
}

.pagination-wrap {
    margin-top: 2rem;
}

.pagination .page-link {
    color: var(--accent);
}

.pagination .active .page-link {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

.empty-state,
.simple-error .container {
    border-radius: 1.5rem;
    padding: 3rem 1.5rem;
}

.empty-state i,
.success-box i {
    font-size: 2.5rem;
    color: var(--brand);
}

.detail-section {
    padding: 2rem 0 4rem;
}

.breadcrumbs {
    display: flex;
    gap: 0.6rem;
    color: var(--muted);
    margin-bottom: 1rem;
}

.gallery-panel,
.detail-copy {
    border-radius: 1.6rem;
    padding: 1.25rem;
}

.main-shot {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 1.1rem;
    background: linear-gradient(180deg, #efe7d8, #faf7f1);
}

.gallery-open,
.thumb-button {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.gallery-open {
    height: 100%;
}

.gallery-open img {
    transition: transform 0.25s ease;
}

.gallery-open:hover img {
    transform: scale(1.02);
}

.thumb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    margin-top: 0.9rem;
}

.thumb-grid button {
    display: block;
    border-radius: 0.9rem;
    overflow: hidden;
    aspect-ratio: 1;
    border: 1px solid rgba(21, 32, 43, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.thumb-grid button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 24px rgba(13, 27, 42, 0.12);
}

.detail-copy {
    height: 100%;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.lead {
    color: var(--muted);
}

.spec-list {
    display: grid;
    gap: 0.8rem;
    margin: 1.25rem 0;
}

.spec-list div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(21, 32, 43, 0.08);
}

.compatibility-note,
.offer-box {
    border-radius: 1.2rem;
    padding: 1rem 1.1rem;
    margin: 1rem 0;
}

.offer-box {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    background: linear-gradient(135deg, rgba(214, 107, 45, 0.14), rgba(214, 107, 45, 0.04));
}

.detail-price {
    font-size: 2rem;
}

.related-section {
    margin-top: 3rem;
}

.compact-card .product-body {
    padding: 1rem;
}

.site-footer {
    margin: 2rem auto;
    border-radius: 1.6rem;
    width: min(1320px, calc(100% - 2rem));
    padding: 1.1rem 1.5rem;
}

.footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.footer-brand strong {
    font-family: "Manrope", sans-serif;
    font-size: 1rem;
}

.footer-brand span,
.footer-contact a {
    color: var(--muted);
}

.footer-contact a:hover {
    color: var(--ink);
}

.htmx-indicator {
    color: var(--muted);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    opacity: 1;
}

.success-box {
    text-align: center;
    padding: 2rem 1rem;
}

.gallery-modal-content {
    background: rgba(7, 14, 22, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.4rem;
    overflow: hidden;
}

.gallery-close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    z-index: 3;
    background-color: rgba(255, 255, 255, 0.92);
}

.gallery-slide {
    min-height: min(82vh, 980px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3.5rem 4rem 6.5rem;
}

.gallery-slide img {
    max-width: 100%;
    max-height: 72vh;
    object-fit: contain;
    border-radius: 1rem;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
}

.gallery-modal .carousel-control-prev,
.gallery-modal .carousel-control-next {
    width: 8%;
}

.gallery-modal .carousel-control-prev-icon,
.gallery-modal .carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.16);
    background-size: 55%;
}

.gallery-indicators {
    position: static;
    margin: 0;
    padding: 0 1.25rem 1.25rem;
    display: flex;
    justify-content: center;
    gap: 0.65rem;
}

.gallery-indicators [data-bs-target] {
    width: 74px;
    height: 74px;
    margin: 0;
    border: 2px solid transparent;
    border-radius: 0.8rem;
    overflow: hidden;
    opacity: 0.6;
    background: transparent;
    text-indent: 0;
}

.gallery-indicators .active {
    opacity: 1;
    border-color: var(--brand);
}

.gallery-indicators img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.order-lead,
.order-footnote,
.detail-description p,
.footer-grid p {
    color: var(--muted);
}

.custom-hero {
    padding: 2.25rem 0 4rem;
}

.custom-hero-card,
.custom-form-card,
.custom-order-copy,
.catalog-cta {
    background: rgba(255, 253, 248, 0.92);
    border: 1px solid rgba(21, 32, 43, 0.08);
    box-shadow: var(--shadow);
    border-radius: 1.5rem;
}

.admin-shell {
    padding: 2rem 0 4rem;
}

.admin-login-card,
.admin-table-wrap,
.admin-form-card {
    background: rgba(255, 253, 248, 0.92);
    border: 1px solid rgba(21, 32, 43, 0.08);
    box-shadow: var(--shadow);
    border-radius: 1.4rem;
}

.admin-login-card {
    max-width: 34rem;
    margin: 0 auto;
    padding: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.admin-header p {
    color: var(--muted);
    margin: 0.35rem 0 0;
}

.admin-filter-bar {
    display: grid;
    grid-template-columns: minmax(260px, 1.6fr) 220px 220px auto;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.admin-table-wrap {
    padding: 0.75rem 1rem;
    overflow-x: auto;
}

.admin-table th {
    white-space: nowrap;
}

.admin-sort-link {
    color: inherit;
    text-decoration: none;
}

.admin-sort-link:hover,
.admin-sort-link:focus {
    color: var(--brand-dark);
}

.admin-product-title {
    font-weight: 600;
}

.admin-product-title a {
    color: inherit;
    text-decoration: none;
}

.admin-product-title a:hover,
.admin-product-title a:focus {
    color: var(--brand-dark);
}

.admin-product-subtitle {
    color: var(--muted);
    font-size: 0.9rem;
}

.admin-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.admin-actions form {
    margin: 0;
}

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

.admin-form-card {
    padding: 1rem;
}

.admin-form-card-wide {
    grid-column: 1 / -1;
}

.admin-form-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.custom-hero-card {
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.custom-hero-text {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 58rem;
}

.custom-points {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.custom-points span {
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    background: rgba(214, 107, 45, 0.12);
    color: var(--brand-dark);
    white-space: nowrap;
}

.custom-order-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 1.5rem;
}

.custom-order-copy,
.custom-form-card {
    padding: 1.5rem;
}

.custom-order-copy h2,
.custom-form-head h2 {
    margin-bottom: 0.8rem;
}

.custom-order-list {
    margin: 0;
    padding-left: 1.15rem;
    color: var(--muted);
}

.custom-order-list li + li {
    margin-top: 0.6rem;
}

.catalog-cta {
    margin-top: 2rem;
    padding: 1.4rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    background: linear-gradient(135deg, rgba(214, 107, 45, 0.16), rgba(13, 27, 42, 0.04));
}

.catalog-cta h3,
.catalog-cta h2 {
    margin: 0.35rem 0 0.55rem;
}

.catalog-cta p,
.custom-form-head p {
    margin: 0;
    color: var(--muted);
}

.detail-cta {
    margin-top: 2.5rem;
}

@media (max-width: 991px) {
    .hero-grid,
    .footer-bar {
        grid-template-columns: 1fr;
    }

    .filter-panel {
        position: static;
    }

    .catalog-toolbar,
    .offer-box,
    .spec-list div,
    .catalog-cta {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-bar {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .custom-order-layout {
        grid-template-columns: 1fr;
    }

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

    .admin-header,
    .admin-actions {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 767px) {
    .hero-band {
        padding-top: 2.5rem;
    }

    .hero-copy,
    .hero-card,
    .filter-panel,
    .gallery-panel,
    .detail-copy {
        border-radius: 1.2rem;
    }

    .site-footer {
        width: calc(100% - 1rem);
        margin: 1.5rem 0.5rem;
    }

    .gallery-slide {
        min-height: auto;
        padding: 4rem 1rem 5.75rem;
    }

    .gallery-slide img {
        max-height: 64vh;
    }

    .gallery-modal .carousel-control-prev,
    .gallery-modal .carousel-control-next {
        width: 14%;
    }

    .gallery-indicators {
        padding: 0 0.75rem 0.9rem;
        gap: 0.45rem;
    }

    .gallery-indicators [data-bs-target] {
        width: 56px;
        height: 56px;
    }
}
