body {
    background: #f5f7fb;
}

.card-soft {
    border: 0;
    box-shadow: 0 8px 22px rgba(18, 38, 63, 0.08);
    border-radius: 1rem;
}

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

.sidebar-box,
.featured-box {
    background: #fff;
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 8px 22px rgba(18, 38, 63, 0.08);
}

.product-card img {
    object-fit: cover;
    height: 180px;
    width: 100%;
    border-radius: .8rem;
    background: #e9ecef;
}

.product-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: .6rem;
    background: #e9ecef;
}

.small-muted {
    color: #6c757d;
    font-size: .9rem;
}

.admin-body .navbar .nav-link.active {
    font-weight: 700;
    text-decoration: underline;
}

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

.form-text-strong {
    font-size: .85rem;
    font-weight: 600;
}

.price-box {
    background: #fff;
    color: #0d6efd;
    border: 1px solid #0d6efd;
    border-radius: 1rem;
    padding: 1rem 1.25rem;
}


.badge-soft {
    background: #e8f1ff;
    color: #0d6efd;
}

.table td,
.table th {
    vertical-align: middle;
}

.login-card {
    max-width: 540px;
    margin: 2rem auto;
}


.frontend-shell {
    width: 100%;
    max-width: none;
}

.frontend-navbar .navbar-brand {
    flex-shrink: 0;
}

.site-footer .container-fluid,
.frontend-shell,
.frontend-navbar .container-fluid {
    max-width: none;
}

.frontend-layout {
    display: grid;
    grid-template-columns: clamp(220px, 18vw, 260px) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.frontend-main {
    min-width: 0;
}

.frontend-sidebar {
    position: sticky;
    top: 90px;
    max-width: 260px;
}

.frontend-sidebar .list-group-item.active {
    background: #0d6efd;
    border-color: #0d6efd;
}

@media (max-width: 1200px) {
    .frontend-layout {
        grid-template-columns: 1fr;
    }

    .frontend-sidebar {
        position: static;
        max-width: none;
    }
}


.frontend-navbar .navbar-collapse {
    gap: 1rem;
}

.header-search-form {
    min-width: 0;
}

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

.header-search-form .form-control {
    min-height: 38px;
}

.header-user-box {
    white-space: nowrap;
}

.homepage-layout {
    align-items: start;
}

.featured-grid-card {
    border: 0;
    box-shadow: 0 8px 22px rgba(18, 38, 63, 0.08);
    border-radius: 1rem;
}

.featured-grid-card .card-body {
    padding: .75rem;
}

.featured-grid-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: .8rem;
    background: #e9ecef;
}

.product-grid-card-compact {
    overflow: hidden;
}

.product-grid-image-link {
    display: block;
}

.product-grid-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .75rem;
    font-size: .7rem;
    line-height: 1.25;
    color: #6c757d;
}

.product-grid-meta-left,
.product-grid-meta-right {
    min-width: 0;
    flex: 1 1 50%;
}

.product-grid-meta-right {
    text-align: right;
}

.product-grid-vehicle {
    font-size: .85rem;
    line-height: 1.3;
    font-weight: 500;
    min-height: 2.2em;
}

.product-grid-description {
    font-size: .7rem;
    line-height: 1.3;
    font-weight: 700;
    min-height: 2.7em;
}

.product-grid-featured-order {
    font-size: .7rem;
    line-height: 1.25;
    color: #6c757d;
}

.product-grid-footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .45rem;
}

.product-grid-production {
    width: 100%;
    font-size: .72rem;
    line-height: 1.3;
    color: #6c757d;
    text-align: left;
    font-weight: 700;
}

.product-grid-button {
    display: block;
    width: 100%;
    white-space: nowrap;
    font-size: .78rem;
    padding: .45rem .75rem;
    text-transform: uppercase;
    background: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

.product-grid-button:hover,
.product-grid-button:focus {
    background: #5c636a;
    border-color: #565e64;
    color: #fff;
}

.product-lightbox-link {
    display: block;
    text-decoration: none;
}

.product-lightbox-link,
.product-lightbox-link img,
.lightbox-trigger-image {
    cursor: zoom-in;
}

.product-lightbox-link:hover,
.product-lightbox-link:focus,
.lightbox-trigger-image:hover,
.lightbox-trigger-image:focus {
    opacity: .96;
}

.product-detail-lightbox-image {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    background: #e9ecef;
}

.product-image-modal .modal-dialog {
    max-width: min(96vw, 1400px);
}

.product-image-modal .modal-content {
    background: rgba(0, 0, 0, 0.96);
    border: 0;
}

.product-image-modal .modal-body {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1rem 1.5rem;
}

.product-image-modal .modal-header {
    align-items: start;
}

.product-image-modal .modal-title {
    font-size: 1rem;
}

.product-image-modal-image {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 7rem);
    object-fit: contain;
}

@media (max-width: 1399px) {
    .frontend-navbar .navbar-collapse {
        align-items: stretch;
    }

    .header-user-box {
        white-space: normal;
    }
}


.product-image-placeholder {
    width: 100%;
    height: 220px;
    border-radius: .8rem;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-weight: 600;
}

.header-search-autocomplete {
    min-width: 0;
}

.autocomplete-results {
    position: absolute;
    top: calc(100% + .4rem);
    left: 0;
    right: auto;
    width: 400px;
    max-width: min(90vw, 520px);
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 14px 34px rgba(18, 38, 63, 0.16);
    border: 1px solid rgba(13, 110, 253, 0.08);
    z-index: 1050;
    overflow: hidden;
    max-height: 420px;
    overflow-y: auto;
}

.autocomplete-item {
    display: block;
    padding: .9rem 1rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #eef2f7;
}

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

.autocomplete-item:hover {
    background: #f8fbff;
}

.autocomplete-thumb {
    width: 72px;
    height: 72px;
    border-radius: .8rem;
    overflow: hidden;
    background: #eef2f7;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.autocomplete-thumb-placeholder {
    font-size: .72rem;
    color: #6c757d;
    font-weight: 600;
    text-align: center;
    padding: .25rem;
}

.autocomplete-meta {
    min-width: 0;
}

.autocomplete-title {
    font-weight: 700;
    margin-bottom: .2rem;
}

.autocomplete-line {
    font-size: .85rem;
    color: #495057;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-line-muted {
    color: #6c757d;
}

.autocomplete-empty {
    padding: 1rem;
    color: #6c757d;
    font-weight: 600;
}

@media (max-width: 991px) {
    .autocomplete-results {
        position: static;
        margin-top: .5rem;
    }
}

@media (max-width: 991px) {
    .header-search-grid {
        grid-template-columns: 1fr;
    }
}


.autocomplete-item-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) minmax(120px, 1fr);
    gap: 1rem;
    align-items: center;
}

.autocomplete-col {
    min-width: 0;
}

.autocomplete-col-label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6c757d;
    margin-bottom: .18rem;
    font-weight: 700;
}

.autocomplete-col-value {
    font-size: .92rem;
    color: #212529;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 767px) {
    .autocomplete-item-row {
        grid-template-columns: 1fr;
        gap: .45rem;
    }
}


.related-products-box {
    border-radius: 1rem;
}

.admin-related-search .autocomplete-results {
    width: 100%;
}

.admin-related-result {
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
}

.admin-related-item-row {
    grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 1fr) minmax(200px, 1fr);
}

.selected-related-products {
    display: grid;
    gap: .75rem;
}

.selected-related-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: .9rem 1rem;
    border-radius: .9rem;
    background: #fff;
    border: 1px solid #e9eef5;
}

.selected-related-item__content {
    min-width: 0;
}

.selected-related-item__title {
    font-weight: 700;
    margin-bottom: .2rem;
}

.selected-related-item__meta {
    color: #6c757d;
    font-size: .9rem;
    line-height: 1.4;
}

@media (max-width: 767px) {
    .selected-related-item {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-related-item-row {
        grid-template-columns: 1fr;
    }
}


.additional-models-front {
    border: 1px solid #e9eef5;
    border-radius: 1rem;
    padding: 1rem 1.1rem;
    background: #f8fbff;
}

.additional-model-badge {
    color: #0d6efd !important;
    border: 1px solid rgba(13, 110, 253, 0.16);
    padding: .55rem .85rem;
    font-size: .86rem;
}

.additional-model-badge:hover {
    background: #e8f1ff !important;
}

.admin-model-item-row {
    grid-template-columns: minmax(220px, 1.2fr) minmax(220px, 1fr);
}


.model-card-title {
    color: #212529;
}

.ajax-cart-feedback {
    margin-top: .25rem;
    border-radius: .85rem;
}

.product-card:hover .model-card-title {
    color: #0d6efd;
}


.product-thumb-lg {
    width: 120px;
    height: 120px;
}

.admin-image-placeholder {
    width: 120px;
    height: 120px;
    border-radius: .8rem;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-weight: 600;
    font-size: .9rem;
}


.autocomplete-item-inline {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-inline-text {
    display: block;
    font-size: .95rem;
    color: #212529;
    font-weight: 600;
}

.admin-ajax-upload-box .js-admin-image-delete {
    align-self: flex-start;
}


.order-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    font-size: .85rem;
}

.admin-orders-table td {
    min-width: 120px;
}


.chart-card {
    position: relative;
    min-height: 340px;
    padding: 1rem;
    background: #fff;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 1rem;
}


.site-footer {
    background: #ffffff;
    border-top: 1px solid #e9ecef;
    padding: 1.25rem 0 1.75rem;
    box-shadow: 0 -4px 18px rgba(18, 38, 63, 0.04);
}

.admin-table-actions {
    min-width: 180px;
}


.product-stock-box {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 1rem;
    padding: 1rem 1.25rem;
}


.frontend-navbar-light {
    background: #ffffff;
    border-bottom: 1px solid #dee2e6;
}

.frontend-navbar-light .navbar-brand,
.frontend-navbar-light .nav-link,
.frontend-navbar-light .navbar-toggler {
    color: #000;
}

.frontend-navbar-light .navbar-brand:hover,
.frontend-navbar-light .nav-link:hover {
    color: #000;
}

.frontend-navbar-light .navbar-toggler {
    border-color: rgba(0, 0, 0, .2);
}

.frontend-navbar-light .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.header-search-grid {
    grid-template-columns: repeat(2, minmax(0, 200px));
    justify-content: start;
}

.header-search-autocomplete,
.header-search-form .form-control {
    width: 100%;
    max-width: 200px;
}

@media (max-width: 767px) {
    .header-search-grid {
        grid-template-columns: 1fr;
    }

    .header-search-autocomplete,
    .header-search-form .form-control {
        max-width: none;
    }
}

.frontend-site-logo {
    max-height: 42px;
    width: auto;
    display: block;
}


.frontend-settings-dropdown {
    border-radius: .9rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    min-width: 12rem;
}

.frontend-settings-dropdown .dropdown-item {
    padding: .55rem .9rem;
}

.frontend-settings-dropdown .dropdown-item:hover,
.frontend-settings-dropdown .dropdown-item:focus {
    background: #f8f9fa;
}


.product-title-share-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.product-title-share-row h1 {
    min-width: 0;
}

.product-share-links {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
    flex-shrink: 0;
    margin-left: auto;
}

.product-share-link {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0d6efd;
    background: #e8f1ff;
    border: 1px solid rgba(13, 110, 253, 0.16);
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
}

.product-share-link:hover,
.product-share-link:focus {
    color: #fff;
    background: #0d6efd;
    box-shadow: 0 8px 18px rgba(13, 110, 253, 0.22);
    transform: translateY(-1px);
}

.product-share-link svg {
    width: 1.1rem;
    height: 1.1rem;
}

@media (max-width: 575px) {
    .product-title-share-row {
        flex-direction: column;
        align-items: stretch;
    }

    .product-share-links {
        justify-content: flex-start;
        margin-left: 0;
    }
}


.frontend-topbar {
    background: #fff;
    color: #000;
    min-height: 20px;
    font-size: .72rem;
}

.frontend-topbar .container-fluid {
    min-height: 20px;
}

.frontend-topbar-inner {
    min-height: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0;
}

.frontend-topbar-slot {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
    line-height: 1.2;
}

.frontend-topbar-slot-right {
    justify-content: flex-end;
    text-align: right;
}

.frontend-topbar-links,
.frontend-main-links,
.frontend-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: .85rem;
    align-items: center;
}

.frontend-topbar-link,
.frontend-main-link,
.frontend-footer-link {
    color: inherit;
    text-decoration: none;
}

.frontend-topbar-link:hover,
.frontend-main-link:hover,
.frontend-footer-link:hover {
    text-decoration: underline;
}

.frontend-topbar-blocks,
.frontend-main-blocks,
.frontend-footer-blocks {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
}

.frontend-topbar-block a,
.frontend-main-block a,
.frontend-footer-block a {
    color: inherit;
}

.frontend-main-header-slot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
    margin-right: .25rem;
    font-size: .9rem;
}

.frontend-main-header-slot .frontend-main-blocks,
.frontend-main-header-slot .frontend-main-links {
    justify-content: flex-end;
}

.site-footer .frontend-footer-blocks,
.site-footer .frontend-footer-links {
    justify-content: flex-start;
}

.site-footer .text-md-end .frontend-footer-blocks,
.site-footer .text-md-end .frontend-footer-links {
    justify-content: flex-end;
}

.cms-editor {
    border: 1px solid #d9e2ef;
    border-radius: 1rem;
    background: #fff;
    overflow: hidden;
}

.cms-editor__topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .75rem .9rem;
    background: #f8fbff;
    border-bottom: 1px solid #e6edf7;
    flex-wrap: wrap;
}

.cms-editor__tabs,
.cms-editor__toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    align-items: center;
}

.cms-editor__btn {
    border: 1px solid #ced8e5;
    background: #fff;
    color: #1f2d3d;
    border-radius: .65rem;
    padding: .35rem .65rem;
    font-size: .85rem;
    line-height: 1.2;
    cursor: pointer;
}

.cms-editor__btn.active,
.cms-editor__btn:hover {
    border-color: #0d6efd;
    color: #0d6efd;
}

.cms-editor__visual {
    min-height: 320px;
    padding: 1rem 1.1rem;
    outline: none;
}

.cms-editor__visual:empty:before {
    content: attr(data-placeholder);
    color: #98a2b3;
}

.cms-editor__source {
    border: 0 !important;
    border-radius: 0 !important;
    min-height: 320px;
    font-family: monospace;
    display: none;
}

.cms-editor__source.is-active {
    display: block;
}

.cms-editor__visual.is-hidden {
    display: none;
}

.cms-content {
    line-height: 1.7;
}

.cms-content img {
    max-width: 100%;
    height: auto;
}

.cms-content table {
    max-width: 100%;
}

@media (max-width: 1399px) {
    .frontend-main-header-slot {
        width: 100%;
        justify-content: flex-start;
        order: 3;
        margin-right: 0;
    }

    .frontend-main-header-slot .frontend-main-blocks,
    .frontend-main-header-slot .frontend-main-links {
        justify-content: flex-start;
    }
}

@media (max-width: 767px) {
    .frontend-topbar {
        min-height: auto;
        padding: .3rem 0;
    }

    .frontend-topbar-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .frontend-topbar-slot-right {
        justify-content: flex-start;
        text-align: left;
    }
}
