:root {
    --kih: #102a43;
    --kih2: #1769aa;
    --soft: #f4f7fb;
}
body {
    background: var(--soft);
    color: #1f2937;
    font-family:
        Inter,
        system-ui,
        -apple-system,
        Segoe UI,
        Roboto,
        sans-serif;
}
.topbar {
    background: linear-gradient(110deg, #0b2239, #174e7a);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}
.brand-dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #44d7b6;
    margin-right: 8px;
}
.card {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 5px 22px rgba(16, 42, 67, 0.07);
}
.stat {
    padding: 22px;
}
.stat i {
    font-size: 28px;
}
.hero {
    background: linear-gradient(120deg, #0b2239, #1c6ea4);
    color: #fff;
    border-radius: 20px;
    padding: 30px;
}
.table thead th {
    white-space: nowrap;
}
.badge {
    font-weight: 600;
}
.product-card img {
    height: 170px;
    object-fit: cover;
    background: #eef2f7;
}
.login-wrap {
    min-height: calc(100vh - 120px);
    display: grid;
    place-items: center;
}
.login-card {
    max-width: 460px;
    width: 100%;
}
.sidebar-note {
    background: #eaf4ff;
    border-left: 4px solid #2d8bd8;
    padding: 12px 15px;
}
.step {
    display: flex;
    gap: 12px;
    align-items: center;
}
.step .num {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #e8f1fa;
    color: #145a86;
    font-weight: 700;
}
.step.active .num {
    background: #145a86;
    color: #fff;
}
.money {
    font-variant-numeric: tabular-nums;
}
.form-control,
.form-select {
    border-radius: 10px;
}
.btn {
    border-radius: 10px;
}
.cart-sticky {
    position: sticky;
    top: 15px;
}
.small-muted {
    font-size: 0.86rem;
    color: #6b7280;
}
.stat-click {
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
    cursor: pointer;
}
.stat-click:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(16, 42, 67, 0.14);
}
.product-thumb {
    height: 110px;
    width: 100%;
    object-fit: cover;
}
.product-main-image {
    height: 210px;
    object-fit: cover;
    background: #eef2f7;
}
.gallery-thumb {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 7px;
    border: 2px solid transparent;
    cursor: pointer;
}
.gallery-thumb.active {
    border-color: #1769aa;
}
.color-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid #bbb;
    margin-right: 5px;
    vertical-align: -1px;
}
/* KIH dealer storefront */
.kih-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1;
}
.kih-brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    background: #fff;
    border-radius: 9px;
    padding: 3px;
}
.kih-brand span {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.kih-brand b {
    font-size: 0.82rem;
    letter-spacing: 0.04em;
}
.kih-brand small {
    font-size: 0.67rem;
    opacity: 0.72;
    font-weight: 500;
}
.nav-cart {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.dealer-home-hero {
    background: linear-gradient(120deg, #071a2d 0%, #0b4d83 55%, #1769aa 100%);
    border-radius: 24px;
    padding: 38px;
    color: #fff;
    overflow: hidden;
    position: relative;
    box-shadow: 0 18px 45px rgba(7, 26, 45, 0.16);
}
.dealer-home-hero:after {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    right: -100px;
    top: -130px;
}
.eyebrow,
.section-kicker {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    font-weight: 800;
}
.eyebrow {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    color: #bfe7ff;
}
.section-kicker {
    color: #1769aa;
}
.brand-panel {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    text-align: left;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 15px;
    position: relative;
    z-index: 1;
}
.dealer-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    background: #fff;
    border-radius: 12px;
    padding: 4px;
}
.brand-panel strong,
.brand-panel small {
    display: block;
}
.brand-panel strong {
    font-size: 0.82rem;
}
.brand-panel small {
    font-size: 0.72rem;
    opacity: 0.7;
    margin-top: 4px;
}
.dealer-product-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #e9eef4;
    box-shadow: 0 8px 26px rgba(16, 42, 67, 0.06);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}
.dealer-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 17px 38px rgba(16, 42, 67, 0.12);
}
.product-image-link {
    display: block;
    position: relative;
    background: #f4f7fb;
}
.dealer-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.dealer-product-placeholder {
    height: 235px;
    display: grid;
    place-items: center;
    background: #eef3f8;
    color: #9aa8b6;
    font-size: 3rem;
}
.dealer-product-placeholder.large {
    height: 470px;
}
.view-product {
    position: absolute;
    right: 13px;
    top: 13px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff;
    color: #102a43;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(5px);
    transition: 0.2s;
}
.dealer-product-card:hover .view-product {
    opacity: 1;
    transform: none;
}
.dealer-product-body {
    padding: 18px;
}
.dealer-product-body h3 {
    font-size: 1rem;
    line-height: 1.35;
    min-height: 43px;
    margin: 0 0 7px;
    font-weight: 750;
}
.product-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0b4d83;
}
.product-add-form {
    display: flex;
    gap: 8px;
    align-items: end;
    margin-top: 17px;
}
.qty-wrap {
    flex: 1;
}
.qty-wrap label {
    font-size: 0.68rem;
    color: #7b8794;
    display: block;
    margin-bottom: 5px;
}
.qty-wrap input {
    height: 42px;
    border-radius: 10px;
    border: 1px solid #dce4ec;
    padding: 0 10px;
    width: 100%;
}
.add-product-btn {
    height: 42px;
    padding: 0 14px;
}
.product-detail-wrap {
    max-width: 1180px;
    margin: 0 auto;
}
.back-link {
    color: #1769aa;
    text-decoration: none;
    font-weight: 650;
}
.product-detail-card {
    background: #fff;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(16, 42, 67, 0.09);
    border: 1px solid #e8edf3;
}
.product-gallery-panel {
    padding: 28px;
    background: #f5f8fb;
}
.main-product-photo {
    height: 470px;
    background: #fff;
    border-radius: 18px;
    display: grid;
    place-items: center;
    overflow: hidden;
}
.main-product-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.product-thumbnails {
    display: flex;
    gap: 10px;
    overflow: auto;
}
.gallery-select {
    padding: 0;
    border: 2px solid transparent;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    width: 70px;
    height: 70px;
    flex: 0 0 auto;
}
.gallery-select.active {
    border-color: #1769aa;
}
.gallery-select img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-info-panel {
    padding: 42px;
}
.product-tag {
    display: inline-block;
    padding: 7px 10px;
    border-radius: 999px;
    background: #e8f4ff;
    color: #1769aa;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.09em;
}
.product-info-panel h1 {
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.08;
    margin: 9px 0 14px;
    font-weight: 800;
    color: #102a43;
}
.detail-price {
    font-size: 1.75rem;
    font-weight: 850;
    color: #0b4d83;
}
.detail-price span {
    font-size: 0.82rem;
    color: #718096;
    font-weight: 600;
}
.detail-description {
    margin-top: 20px;
    color: #596779;
    line-height: 1.75;
}
.detail-section {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid #e7edf3;
}
.detail-section h4 {
    font-size: 1rem;
    font-weight: 800;
}
.color-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.color-chip {
    border: 1px solid #dce4ec;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.85rem;
    background: #fff;
}
.detail-order-box {
    margin-top: 28px;
    background: #f5f8fb;
    border-radius: 15px;
    padding: 17px;
}
.detail-order-box label {
    font-size: 0.75rem;
    font-weight: 750;
    margin-bottom: 7px;
}
.qty-detail {
    max-width: 120px;
}
.detail-content-card {
    background: #fff;
    border: 1px solid #e7edf3;
    border-radius: 18px;
    padding: 26px;
    box-shadow: 0 8px 25px rgba(16, 42, 67, 0.05);
}
.detail-content-card h3 {
    font-weight: 800;
    margin: 5px 0 15px;
}
.rich-text {
    white-space: normal;
    color: #596779;
    line-height: 1.75;
}
.order-stat-card {
    height: 100%;
    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 17px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 7px 22px rgba(16, 42, 67, 0.05);
}
.order-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #eaf4ff;
    color: #1769aa;
    display: grid;
    place-items: center;
    font-size: 1.25rem;
}
.order-stat-card span {
    display: block;
    font-size: 0.75rem;
    color: #738091;
    font-weight: 650;
}
.order-stat-card strong {
    display: block;
    font-size: 1.35rem;
    margin-top: 3px;
}
.order-stat-card.pending .order-stat-icon {
    background: #fff3df;
    color: #b66a00;
}
.orders-table-card {
    overflow: hidden;
}
.orders-page-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
}
.kih-footer {
    background: #081a2a;
    color: #aebdca;
    margin-top: 50px;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.footer-brand img {
    width: 52px;
    height: 52px;
    background: #fff;
    border-radius: 10px;
    padding: 3px;
}
.footer-brand strong,
.footer-brand span {
    display: block;
}
.footer-brand strong {
    color: #fff;
    font-size: 0.85rem;
}
.footer-brand span {
    font-size: 0.72rem;
    margin-top: 4px;
}
.kih-footer h6 {
    color: #fff;
    font-weight: 750;
    margin-bottom: 12px;
}
.kih-footer p {
    line-height: 1.75;
    font-size: 0.88rem;
}
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    gap: 15px;
    font-size: 0.75rem;
    color: #8193a3;
}
@media (max-width: 767px) {
    .dealer-home-hero {
        padding: 25px 20px;
    }
    .brand-panel {
        margin-top: 5px;
    }
    .dealer-product-image {
        height: 210px;
    }
    .product-gallery-panel {
        padding: 15px;
    }
    .main-product-photo,
    .dealer-product-placeholder.large {
        height: 330px;
    }
    .product-info-panel {
        padding: 25px 20px;
    }
    .orders-page-head {
        align-items: start;
        gap: 15px;
    }
    .orders-page-head .btn {
        white-space: nowrap;
    }
    .footer-bottom {
        flex-direction: column;
    }
    .kih-brand b {
        font-size: 0.68rem;
    }
    .kih-brand small {
        font-size: 0.6rem;
    }
}
