/*
 * XCMG Kazakhstan — restrained finish layer (2026-07-30)
 * Loaded after the production brand skin. This file intentionally changes
 * presentation only: no content, routes, metadata, or document hierarchy.
 */

/* Restore the corporate XCMG blue as the primary interface colour. Amber
   remains the construction accent used for high-energy calls to action. */
:root {
    --xcmg-blue: #00469c;
    --xcmg-blue-dark: #00336f;
    --xcmg-blue-light: #eaf2fb;
    --xcmg-blue-highlight: #72bdff;
    --xcmg-focus-ring: 0 0 0 3px rgba(0, 70, 156, 0.28);
}

.text-primary,
.section-label {
    color: var(--xcmg-blue) !important;
}

.section-label::before {
    background: var(--xcmg-blue);
}

.btn-primary {
    color: #fff !important;
    background: var(--xcmg-blue) !important;
    border-color: var(--xcmg-blue) !important;
}

.btn-primary:hover {
    color: #fff !important;
    background: var(--xcmg-blue-dark) !important;
    border-color: var(--xcmg-blue-dark) !important;
    box-shadow: 0 12px 26px rgba(0, 70, 156, 0.24);
}

.btn-dark:hover {
    color: #fff !important;
    background: var(--xcmg-blue) !important;
    border-color: var(--xcmg-blue) !important;
    box-shadow: 0 12px 26px rgba(0, 70, 156, 0.20);
}

/* Keep the transparent hero navigation readable over every slide. */
.navbar.transparent {
    background: linear-gradient(180deg, rgba(0, 40, 87, 0.68) 0%, rgba(0, 40, 87, 0) 100%) !important;
}

.navbar.shrink {
    box-shadow: 0 8px 28px rgba(18, 22, 28, 0.10);
    border-bottom-color: var(--xcmg-blue);
}

.navbar .nav-link::after {
    background: var(--xcmg-blue);
}

.swiper-hero .swiper-slide::after {
    background:
        linear-gradient(90deg, rgba(0, 35, 76, 0.94) 0%, rgba(0, 52, 105, 0.72) 42%, rgba(18, 22, 28, 0.05) 75%),
        linear-gradient(0deg, rgba(7, 19, 34, 0.82) 0%, rgba(7, 19, 34, 0) 46%);
}

.page-hero .page-hero-overlay {
    background:
        linear-gradient(90deg, rgba(0, 35, 76, 0.96) 0%, rgba(0, 58, 119, 0.82) 48%, rgba(5, 29, 54, 0.55) 100%),
        linear-gradient(180deg, rgba(0, 42, 89, 0.12) 0%, rgba(0, 27, 58, 0.66) 100%);
}

.page-hero .section-label,
.page-hero--category .section-label,
.page-hero .hero-brand {
    color: var(--xcmg-blue-highlight) !important;
}

.page-hero .section-label::before,
.page-hero--category .section-label::before {
    background: var(--xcmg-blue-highlight);
}

/* Keep the cinematic home hero, but let the catalogue begin sooner. */
.swiper-hero-image {
    display: block;
}

@media screen and (min-width: 992px) {
    .swiper-hero .swiper-slide,
    .swiper-hero-image {
        min-height: clamp(640px, 74vh, 740px);
        height: clamp(640px, 74vh, 740px) !important;
        min-height: clamp(640px, 74svh, 740px);
        height: clamp(640px, 74svh, 740px) !important;
    }

    .swiper-hero .overlay,
    .swiper-hero .overlay-1,
    .swiper-hero .overlay-2 {
        bottom: 12%;
    }

    .swiper-hero .overlay h1,
    .swiper-hero .overlay .h1 {
        font-size: clamp(2.35rem, 1.2rem + 3.25vw, 3.7rem);
        line-height: 1.04;
        margin-bottom: 14px;
        max-width: 20ch;
    }

    .swiper-hero .overlay .lead {
        font-size: clamp(1rem, 0.94rem + 0.45vw, 1.2rem);
        line-height: 1.5;
    }
}

@media screen and (max-width: 991px) {
    .swiper-hero .swiper-slide,
    .swiper-hero-image {
        min-height: clamp(590px, 72vh, 640px);
        height: clamp(590px, 72vh, 640px) !important;
        min-height: clamp(590px, 72svh, 640px);
        height: clamp(590px, 72svh, 640px) !important;
    }

    .swiper-hero .overlay,
    .swiper-hero .overlay-1,
    .swiper-hero .overlay-2 {
        bottom: 8%;
    }
}

/* Give repeated card panels a slightly cleaner, more technical finish. */
.teh-category-card > div:first-child,
.teh-model-card .card-img-wrapper {
    box-shadow: inset 0 -1px 0 rgba(18, 22, 28, 0.04);
}

.teh-category-card::after,
.teh-model-card .card-divider {
    background: linear-gradient(90deg, var(--xcmg-blue) 0 82%, var(--xcmg-amber) 82% 100%);
}

.teh-category-card:hover,
.teh-model-card:hover {
    border-color: var(--xcmg-blue) !important;
}

.teh-category-card .card-body .h6,
.teh-model-card .card-body h3 {
    text-wrap: balance;
}

.teh-category-card .card-body small {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.teh-category-card .btn svg,
.teh-model-card .btn svg,
.news-card .btn svg,
.swiper-hero .overlay .btn svg {
    transition: transform 0.2s ease;
}

.teh-category-card:hover .btn svg,
.teh-model-card:hover .btn svg,
.news-card:hover .btn svg,
.swiper-hero .overlay .btn:hover svg {
    transform: translateX(3px);
}

/* Breadcrumbs already reserve space for the fixed header. Avoid a second
   oversized spacer before the main content on interior pages. */
body > nav[aria-label="breadcrumb"] + .container.mt-5.pt-5 {
    margin-top: 2rem !important;
    padding-top: 1.5rem !important;
}

.breadcrumb {
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
}

.breadcrumb::-webkit-scrollbar {
    display: none;
}

/* Factory category copy is CMS-authored long-form content. Keep it out of the
   image hero and give its existing headings, lists, and text a readable home. */
.factory-category-content {
    padding: clamp(2.5rem, 5vw, 4.5rem) 0 1rem;
}

.factory-category-copy {
    max-width: 1040px;
    padding: clamp(1.5rem, 3vw, 2.75rem);
    overflow-x: auto;
    color: var(--xcmg-text);
    background: #fff;
    border: 1px solid var(--xcmg-line);
    border-top: 4px solid var(--xcmg-blue);
    box-shadow: var(--xcmg-shadow);
}

.factory-category-copy > :first-child {
    margin-top: 0;
}

.factory-category-copy > :last-child {
    margin-bottom: 0;
}

.factory-category-copy h1 {
    margin-bottom: 1rem;
    color: var(--xcmg-ink);
    font-size: clamp(1.65rem, 1.3rem + 1.1vw, 2.35rem);
    line-height: 1.15;
}

.factory-category-copy h2 {
    margin: 2rem 0 0.9rem;
    color: var(--xcmg-ink);
    font-size: clamp(1.2rem, 1.08rem + 0.55vw, 1.55rem);
    line-height: 1.25;
}

.factory-category-copy p {
    color: var(--xcmg-text-muted);
    line-height: 1.7;
}

.factory-category-copy ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.factory-category-copy li {
    position: relative;
    padding-left: 1.15rem;
    color: var(--xcmg-text);
}

.factory-category-copy li::before {
    position: absolute;
    top: 0.7rem;
    left: 0;
    width: 6px;
    height: 6px;
    background: var(--xcmg-amber);
    content: "";
}

.factory-category-copy li p {
    margin: 0;
    color: inherit;
    line-height: 1.5;
}

.factory-category-copy img {
    max-width: 100%;
    height: auto;
}

/* Product-detail information follows the same data-rich pattern as the main
   Tabys-KM catalogue, expressed in the XCMG visual system. */
.product-info-card {
    border-top-color: var(--xcmg-blue);
}

.product-summary {
    margin-bottom: 1rem;
    color: var(--xcmg-text-muted);
    font-size: 0.96rem;
    line-height: 1.6;
}

.product-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.product-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    color: var(--xcmg-blue-dark);
    background: var(--xcmg-blue-light);
    border: 1px solid rgba(0, 70, 156, 0.16);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
}

.product-status-chip::before {
    width: 7px;
    height: 7px;
    background: var(--xcmg-blue);
    border-radius: 50%;
    content: "";
}

.product-status-chip.is-order {
    color: var(--xcmg-amber-ink);
    background: var(--xcmg-gold-light);
    border-color: rgba(224, 134, 0, 0.22);
}

.product-status-chip.is-order::before {
    background: var(--xcmg-amber-dark);
}

.product-document-link {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 12px 14px;
    color: var(--xcmg-blue);
    background: var(--xcmg-blue-light);
    border: 1px solid rgba(0, 70, 156, 0.18);
    transition: var(--xcmg-transition);
}

.product-document-link:hover {
    color: #fff;
    background: var(--xcmg-blue);
    border-color: var(--xcmg-blue);
    transform: translateY(-1px);
}

.product-document-link svg {
    flex: 0 0 auto;
}

.product-document-link strong,
.product-document-link small {
    display: block;
    line-height: 1.3;
}

.product-document-link small {
    margin-top: 2px;
    color: var(--xcmg-text-muted);
}

.product-document-link:hover small {
    color: rgba(255, 255, 255, 0.78);
}

.product-assurance-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--xcmg-line);
    box-shadow: var(--xcmg-shadow);
}

.product-assurance-item {
    position: relative;
    min-height: 150px;
    padding: 22px;
    border-right: 1px solid var(--xcmg-line);
}

.product-assurance-item:last-child {
    border-right: 0;
}

.product-assurance-number {
    display: block;
    margin-bottom: 12px;
    color: var(--xcmg-blue);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.product-assurance-item h2 {
    margin-bottom: 8px;
    color: var(--xcmg-ink);
    font-size: 1rem;
    line-height: 1.25;
}

.product-assurance-item p {
    margin: 0;
    color: var(--xcmg-text-muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

.product-assurance-item::after {
    position: absolute;
    right: 22px;
    bottom: 0;
    left: 22px;
    height: 3px;
    background: var(--xcmg-blue);
    content: "";
}

.product-assurance-item:nth-child(even)::after {
    background: var(--xcmg-amber);
}

.product-brand-summary {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--xcmg-line);
}

.product-brand-summary img {
    width: 100%;
    max-height: 58px;
    object-fit: contain;
}

.product-brand-summary .brand-kicker {
    margin-bottom: 4px;
    color: var(--xcmg-blue);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.product-brand-summary h3 {
    margin-bottom: 8px;
    color: var(--xcmg-blue) !important;
}

.product-brand-summary p:last-child {
    margin-bottom: 0;
    color: var(--xcmg-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.product-technical-materials {
    padding: clamp(2.5rem, 5vw, 4.5rem) 0;
    background: linear-gradient(135deg, var(--xcmg-blue-light) 0%, #fff 100%);
}

.product-schema-card img {
    display: block;
    max-width: 100%;
    max-height: 420px;
    margin: auto;
    object-fit: contain;
}

.product-divider {
    background: linear-gradient(90deg, var(--xcmg-blue), var(--xcmg-amber), var(--xcmg-blue));
}

.product-chars-table table thead th {
    color: var(--xcmg-blue) !important;
    border-bottom-color: var(--xcmg-blue) !important;
}

footer {
    background: linear-gradient(135deg, #061b31 0%, #07111d 100%);
    border-top-color: var(--xcmg-blue);
}

.phone {
    color: #fff;
    background: var(--xcmg-blue);
}

.phone svg {
    color: #fff;
}

.phone:hover {
    color: #fff;
    background: var(--xcmg-blue-dark);
}

.phone:hover svg {
    color: #fff;
}

/* Product pages read sooner on compact screens while retaining the same
   image, information, and conversion controls. */
@media screen and (max-width: 991px) {
    .navbar .navbar-collapse {
        border: 1px solid var(--xcmg-line);
        border-top: 3px solid var(--xcmg-amber);
    }

    body > nav[aria-label="breadcrumb"] + .container.mt-5.pt-5 {
        margin-top: 1.25rem !important;
        padding-top: 0.75rem !important;
    }

    .product-image-card {
        min-height: 320px;
        padding: 18px;
    }

    .product-image-card img {
        max-height: 290px;
    }

    .product-info-card {
        padding: 22px;
    }

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

    .product-assurance-item:nth-child(2) {
        border-right: 0;
    }

    .product-assurance-item:nth-child(-n + 2) {
        border-bottom: 1px solid var(--xcmg-line);
    }
}

@media screen and (max-width: 767.98px) {
    .factory-page-hero .container {
        margin-top: 0 !important;
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .factory-page-hero .page-hero-product {
        max-height: 160px !important;
    }

    .factory-category-content {
        padding-top: 1.5rem;
    }

    .factory-category-copy {
        padding: 1.25rem;
    }

    .factory-category-copy h2 {
        margin-top: 1.5rem;
    }

    .factory-category-copy ul {
        grid-template-columns: 1fr;
    }

    .product-brand-summary {
        grid-template-columns: 88px minmax(0, 1fr);
        gap: 16px;
    }
}

@media screen and (max-width: 575.98px) {
    #categories .row.g-4,
    #factories .row.g-4 {
        --bs-gutter-x: 1rem;
        --bs-gutter-y: 1rem;
    }

    .teh-category-card > div:first-child {
        min-height: 138px !important;
        padding: 12px !important;
    }

    .teh-category-card .card-body {
        padding: 14px 14px 4px !important;
    }

    .teh-category-card .card-body .h6 {
        font-size: 0.96rem;
        line-height: 1.25;
        text-wrap: wrap;
        overflow-wrap: break-word;
    }

    .teh-category-card .card-footer {
        padding: 10px 14px 14px !important;
    }

    .teh-category-card .card-footer .btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 42px;
        padding: 8px 8px !important;
        font-size: 0.68rem !important;
        letter-spacing: 0.035em;
        white-space: nowrap;
    }

    .phone,
    .whatsapp {
        width: 46px;
        height: 46px;
        bottom: 16px;
    }

    .phone {
        left: 16px;
    }

    .whatsapp {
        right: 16px;
    }

    .phone svg,
    .whatsapp svg {
        width: 25px;
        height: 25px;
    }

    .ringanimation {
        width: 38px;
        height: 38px;
    }

    .product-assurance-grid {
        grid-template-columns: 1fr;
    }

    .product-assurance-item,
    .product-assurance-item:nth-child(2) {
        min-height: 0;
        border-right: 0;
        border-bottom: 1px solid var(--xcmg-line);
    }

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

    .product-brand-summary {
        grid-template-columns: 1fr;
    }

    .product-brand-summary img {
        width: 120px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .teh-category-card .btn svg,
    .teh-model-card .btn svg,
    .news-card .btn svg,
    .swiper-hero .overlay .btn svg {
        transition: none;
    }
}
