* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: #eef0f6;
    background: #07080b;
}

a {
    color: inherit;
    text-decoration: none
}

img {
    max-width: 100%;
    display: block
}

button,
input,
select,
textarea {
    font: inherit
}

.container {
    width: min(1200px, calc(100% - 44px));
    margin: 0 auto
}

/* ===== Topbar ===== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(7, 8, 11, .72);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, .10);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 74px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px
}

.brand-badge {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, #d5001c, #ff3b55);
    box-shadow: 0 18px 54px rgba(213, 0, 28, .28);
    display: grid;
    place-items: center;
    font-weight: 900;
}

.brand h1 {
    font-size: 14px;
    margin: 0;
    letter-spacing: .14em;
    text-transform: uppercase
}

.brand span {
    display: block;
    font-size: 12px;
    color: #a8afc2;
    margin-top: 3px
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px
}

.icon-btn {
    height: 42px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .03);
    color: #eef0f6;
    border-radius: 14px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: .2s ease;
    margin-left:20px;
}

.icon-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, .22)
}

.badge {
    display: inline-grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: #d5001c;
    color: #fff;
    font-size: 11px;
    margin-left: 6px;
}

/* ===== Headers ===== */
.page-head {
    padding: 26px 0 0
}

.breadcrumbs,
.crumbs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    color: #a8afc2;
    font-size: 13px;
}

.breadcrumbs a,
.crumbs a {
    color: #a8afc2
}

.sep {
    opacity: .5
}

.page-title,
.head-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-top: 10px;
}

.page-title h2,
.head-row h2 {
    margin: 0;
    font-size: 34px;
    letter-spacing: .01em;
    color:#FFFFFF;
}

@media (max-width:980px) {

    .page-title h2,
    .head-row h2 {
        font-size: 30px
    }
}

.pill {
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .03);
    color: #a8afc2;
    padding: 10px 12px;
    border-radius: 999px;
    font-size: 12px;
    white-space: nowrap;
}

/* ===== Product page layout ===== */
.grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 22px;
    padding: 18px 0 56px;
}

@media (max-width:980px) {
    .grid {
        grid-template-columns: 1fr
    }
}

.panel {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .03));
    box-shadow: 0 22px 80px rgba(0, 0, 0, .65);
    overflow: hidden;
}

.gallery {
    padding: 18px
}

.gallery-main {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(0, 0, 0, .25);
}

.gallery-main img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: contain;
}

.thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px
}

.thumb {
    width: 84px;
    height: 64px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .03);
    overflow: hidden;
    cursor: pointer;
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px
}

.details {
    padding: 22px
}

.details h3{
    color:white;
}
.price-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .10);
}

.price {
    font-size: 28px;
    font-weight: 800
}

.small {
    display: block;
    color: #a8afc2;
    font-size: 12px;
    margin-top: 6px
}

.stock {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #17c964;
    font-weight: 600;
    font-size: 13px;
    border: 1px solid rgba(23, 201, 100, .22);
    background: rgba(23, 201, 100, .07);
    padding: 8px 10px;
    border-radius: 999px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #17c964;
    box-shadow: 0 0 0 6px rgba(23, 201, 100, .12)
}

.meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 16px 0 18px;
}

@media (max-width:520px) {
    .meta {
        grid-template-columns: 1fr
    }
}

.meta .item {
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .03);
    padding: 12px 12px;
    border-radius: 14px;
}

.meta .k {
    color: #a8afc2;
    font-size: 12px
}

.meta .v {
    margin-top: 6px;
    font-weight: 700;
    font-size: 13px
}

.label {
    color: #a8afc2;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin: 14px 0 8px;
}

.searchbox {
    display: flex;
    gap: 10px
}

.select,
.input {
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .03);
    color: #eef0f6;
    padding: 12px 14px;
    border-radius: 14px;
    outline: none;
}

.select {
    min-width: 220px
}

.input {
    flex: 1
}

@media (max-width:520px) {
    .searchbox {
        flex-direction: column
    }

    .select {
        min-width: unset
    }
}

.qty-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.qty {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .03);
    padding: 8px 10px;
    border-radius: 14px;
}

.qty button {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: rgba(255, 255, 255, .02);
    color: #eef0f6;
    cursor: pointer;
}

.qty input {
    width: 44px;
    background: transparent;
    border: none;
    color: #eef0f6;
    text-align: center;
    outline: none;
    font-weight: 700;
}

.cta-row {
    display: flex;
    gap: 12px;
    margin-top: 14px;
    flex-wrap: wrap
}

.btn {
    height: 50px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    font-weight: 900;
    letter-spacing: .01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    transition: .18s ease;
    white-space: nowrap;
}

.btn-primary {
    background: #d5001c;
    color: #fff;
    flex: 1;
    min-width: 220px;
}

.btn-primary:hover {
    transform: translateY(-1px)
}

.btn-ghost {
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .16);
    color: #eef0f6;
    min-width: 170px;
}

.btn-ghost:hover {
    border-color: rgba(255, 255, 255, .28)
}

.desc {
    color: #a8afc2;
    font-size: 13px;
    line-height: 1.7;
    margin-top: 16px
}

/* ===== Checkout ===== */
.checkout {
    padding: 18px 0 56px;
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 22px;
}

@media (max-width:980px) {
    .checkout {
        grid-template-columns: 1fr
    }
}

.card {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .03));
    box-shadow: 0 22px 80px rgba(0, 0, 0, .65);
    overflow: hidden;
}

.card-inner {
    padding: 22px
}

.card-title {
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: 14px;
    margin: 0 0 16px;
}

.form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.full {
    grid-column: 1 / -1
}

.field label {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(238, 240, 246, .82);
    font-size: 12px;
    letter-spacing: .10em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.req {
    color: rgba(238, 240, 246, .55);
    font-weight: 700
}

.control {
    width: 100%;
    height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .10);
    background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
    color: #eef0f6;
    padding: 0 14px;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.control option {
    color: #07080b;
}

textarea.control {
    height: auto;
    padding: 12px 14px;
    resize: none;
    min-height: 96px
}

.help {
    margin-top: 10px;
    font-size: 12px;
    color: rgba(168, 175, 194, .92);
    line-height: 1.6
}

.cta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 18px
}

.cta .btn-primary {
    flex: 1
}

.summary-head {
    padding: 22px 22px 0
}

.summary-body {
    padding: 10px 22px 22px
}

.sum-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0
}

.sum-left strong {
    display: block;
    font-size: 13px
}

.sum-left .sub {
    color: #a8afc2;
    font-size: 12px
}

.sum-price {
    font-weight: 900;
    font-size: 13px
}

.divider {
    border-top: 1px dashed rgba(255, 255, 255, .14);
    margin: 10px 0
}

.line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    color: #a8afc2;
    font-size: 13px;
    border-top: 1px dashed rgba(255, 255, 255, .14);
}

.line:first-child .line strong {
    color: #eef0f6
}

.total strong {
    font-size: 14px
}

.summary-note {
    margin-top: 12px;
    color: rgba(168, 175, 194, .92);
    font-size: 12px;
    line-height: 1.6
}

.footer {
    border-top: 1px solid rgba(255, 255, 255, .10);
    padding: 20px 0 40px;
    color: #a8afc2;
    font-size: 12px
}

/* ===== Side cart ===== */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    opacity: 0;
    pointer-events: none;
    transition: .2s ease;
    z-index: 60;
}

.overlay.show {
    opacity: 1;
    pointer-events: auto
}

.sidecart {
    position: fixed;
    right: 0;
    top: 0;
    height: 100%;
    width: min(420px, 92vw);
    background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .03));
    border-left: 1px solid rgba(255, 255, 255, .12);
    transform: translateX(100%);
    transition: .25s ease;
    z-index: 70;
    box-shadow: -20px 0 60px rgba(0, 0, 0, .55);
    display: flex;
    flex-direction: column;
}

.sidecart.show {
    transform: translateX(0)
}

.sidecart header {
    padding: 18px 18px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.sidecart header h3 {
    margin: 0;
    font-size: 16px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color:#FFFFFF;
}

.close-x {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .03);
    color: #eef0f6;
    cursor: pointer;
}

.cart-items {
    padding: 14px 18px;
    overflow: auto;
    flex: 1
}

.cart-item {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .03);
    border-radius: 16px;
    margin-bottom: 12px;
}

.cart-item img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    background: rgba(0, 0, 0, .25);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .10);
    padding: 6px;
}

.cart-item h4 {
    margin: 0;
    font-size: 13px;
    color:#FFFFFF;
}

.cart-item .sub {
    color: #a8afc2;
    font-size: 12px;
    margin-top: 6px
}

.cart-item .right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px
}

.cart-item .remove {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, .75);
    cursor: pointer;
    font-weight: 700
}

.cart-footer {
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding: 14px 18px 18px
}

.totals {
    display: flex;
    justify-content: space-between;
    color: #a8afc2;
    font-size: 13px;
    margin-bottom: 12px
}

.totals strong {
    color: #eef0f6;
    font-size: 16px
}

/* ===== Toyota-style modals ===== */
.m-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    opacity: 0;
    pointer-events: none;
    transition: .2s ease;
    z-index: 90;
}

.m-overlay.show {
    opacity: 1;
    pointer-events: auto
}

.m-modal {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -46%);
    width: min(780px, 92vw);
    background: #fff;
    color: #111;
    border-radius: 6px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .35);
    opacity: 0;
    pointer-events: none;
    transition: .2s ease;
    z-index: 100;
    max-height: 84vh;
    display: flex;
    flex-direction: column;
}

.m-modal.show {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%)
}

.m-modal-lg {
    width: min(980px, 94vw)
}

.m-head {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 22px;
    border-bottom: 1px solid #e7e7e7;
    position: relative;
}

.m-head h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700
}

.m-body {
    padding: 22px;
    overflow: hidden;
}

.m-x {
    position: absolute;
    right: 16px;
    top: 14px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #666;
}

.m-x:hover .m-body {
    padding: 22px;
    overflow: hidden
}

.vehicle-selected {
    border: 1px solid #e7e7e7;
    padding: 14px;
    display: flex;
    gap: 14px;
    align-items: center;
}

.vehicle-thumb {
    width: 92px;
    height: 56px;
    background: linear-gradient(180deg, #efefef, #dcdcdc);
    border: 1px solid #e1e1e1;
    border-radius: 2px;
    position: relative;
}

.vehicle-thumb:after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    top: 16px;
    bottom: 14px;
    background: #fff;
    clip-path: polygon(10% 70%, 18% 40%, 38% 30%, 58% 30%, 75% 38%, 85% 55%, 86% 70%, 12% 70%);
    opacity: .85;
}

.vehicle-title {
    font-weight: 700
}

.vehicle-sub {
    color: #666;
    font-size: 13px;
    margin-top: 4px
}

.vehicle-radio {
    margin: 16px 0 14px
}

.vehicle-radio label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px
}

.vehicle-radio input {
    accent-color: #d5001c
}

.vehicle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
}

@media (max-width:720px) {
    .vehicle-grid {
        grid-template-columns: 1fr
    }
}

.vehicle-grid label {
    color: #07080b;
}

.vehicle-grid .field select {
    width: 100%;
    border: 1px solid #dcdcdc;
    background: #fff;
    height: 40px;
    padding: 0 12px;
    outline: none;
}

.m-actions {
    display: flex;
    justify-content: center;
    padding-top: 18px
}

.m-btn {
    height: 44px;
    padding: 0 22px;
    border-radius: 2px;
    border: none;
    cursor: pointer;
    font-weight: 800;
    letter-spacing: .03em;
}

.m-btn-primary {
    background: #d5001c;
    color: #fff
}

/* Compatibility table */
.m-scroll {
    border: 1px solid #e7e7e7;
    max-height: 60vh;
    overflow: auto
}

.compat-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px
}

.compat-table th,
.compat-table td {
    border: 1px solid #e7e7e7;
    padding: 14px 12px;
    vertical-align: middle;
    text-align: center;
}

.compat-table thead th {
    background: #f7f7f7;
    font-weight: 800
}

.compat-model {
    font-weight: 800;
    text-transform: uppercase
}