/* =========================================================
   YTR AUTOPARTS
   MAIN STYLESHEET
========================================================= */

:root {
    --red: #e31b23;
    --red2: #bb1017;
    --ink: #0d0d0f;
    --char: #171719;
    --muted: #707279;
    --line: #e8e8eb;
    --soft: #f6f7f8;
    --white: #ffffff;

    --radius: 18px;
    --shadow: 0 14px 40px rgba(0, 0, 0, 0.10);

    --container: 1180px;

    /* Header */
    --header-height: 72px;

    /* Logo */
    --logo-height: 38px;
    --logo-max-width: 175px;
}


/* =========================================================
   RESET
========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}


/* =========================================================
   CONTAINER
========================================================= */

.container {
    width: min(var(--container), 92%);
    margin-inline: auto;
}


/* =========================================================
   HEADER
========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;

    background: rgba(8, 8, 9, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar {
    min-height: var(--header-height);

    display: flex;
    align-items: center;

    gap: 28px;
}


/* =========================================================
   LOGO
========================================================= */

.brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;

    flex: 0 0 auto;

    width: auto;
    max-width: 180px;

    line-height: 1;
}

.site-logo {
    display: block;

    width: auto;
    height: var(--logo-height);

    max-width: var(--logo-max-width);
    max-height: var(--logo-height);

    object-fit: contain;
    object-position: left center;

    margin: 0;
    padding: 0;
}

/*
   Jika logo lama berupa teks masih digunakan,
   class berikut tetap tersedia.
*/

.brand-ytr {
    font-size: 31px;
    font-weight: 900;
    font-style: italic;

    letter-spacing: -2px;

    color: var(--red);
}

.brand-auto {
    font-size: 17px;
    font-weight: 900;
    font-style: italic;

    letter-spacing: -0.5px;

    color: var(--white);
}


/* =========================================================
   MAIN NAVIGATION
========================================================= */

.main-nav {
    display: flex;
    align-items: center;

    gap: 26px;

    margin-left: auto;
}

.main-nav a {
    position: relative;

    padding: 29px 0;

    font-size: 14px;
    font-weight: 500;

    color: #eeeeee;

    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--red);
}

.main-nav a::after {
    content: "";

    position: absolute;
    left: 0;
    right: 0;
    bottom: 20px;

    width: 0;
    height: 2px;

    margin: auto;

    background: var(--red);

    transition: width 0.2s ease;
}

.main-nav a:hover::after {
    width: 100%;
}


/* =========================================================
   HEADER SEARCH
========================================================= */

.header-search {
    display: flex;
    align-items: center;

    min-width: 185px;

    border: 1px solid #3a3a3c;
    border-radius: 999px;

    overflow: hidden;

    transition:
        border-color 0.2s ease,
        background 0.2s ease;
}

.header-search:focus-within {
    border-color: var(--red);
    background: rgba(255, 255, 255, 0.04);
}

.header-search input {
    width: 145px;

    padding: 10px 5px 10px 15px;

    color: var(--white);
    background: transparent;

    border: 0;
    outline: 0;
}

.header-search input::placeholder {
    color: #888888;
}

.header-search button {
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 13px;

    color: var(--white);
    background: transparent;

    border: 0;

    font-size: 19px;

    cursor: pointer;
}

.header-search button:hover {
    color: var(--red);
}


/* =========================================================
   MOBILE MENU BUTTON
========================================================= */

.nav-toggle {
    display: none;

    margin-left: auto;

    color: var(--white);
    background: transparent;

    border: 0;

    font-size: 26px;

    cursor: pointer;
}


/* =========================================================
   HERO
========================================================= */

.hero {
    position: relative;

    color: var(--white);

    overflow: hidden;

    background:
        radial-gradient(
            circle at 70% 20%,
            #421015 0,
            transparent 26%
        ),
        linear-gradient(
            120deg,
            #080809 0,
            #111111 48%,
            #060606 100%
        );
}

.hero-grid {
    min-height: 590px;

    display: grid;

    grid-template-columns: 1.02fr 1fr;

    align-items: center;
}

.eyebrow {
    font-size: 12px;
    font-weight: 700;

    letter-spacing: 3px;
    text-transform: uppercase;

    color: #8f9196;
}

.hero .eyebrow {
    color: #c8c8ca;
}

.hero-copy {
    position: relative;
    z-index: 2;

    padding: 70px 0;
}

.hero h1 {
    max-width: 700px;

    margin: 18px 0 20px;

    font-size: clamp(42px, 5vw, 60px);
    font-weight: 900;
    font-style: italic;

    line-height: 0.98;
    letter-spacing: -2.7px;
}

.hero h1 span {
    color: var(--red);
}

.hero-copy > p {
    max-width: 590px;

    margin: 0;

    color: #d7d7d9;

    font-size: 18px;
    line-height: 1.65;
}


/* =========================================================
   BUTTON
========================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 46px;

    padding: 14px 22px;

    border: 0;
    border-radius: 10px;

    font-weight: 800;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.btn-primary {
    color: var(--white);

    background:
        linear-gradient(
            135deg,
            var(--red),
            #f42b34
        );

    box-shadow:
        0 10px 25px rgba(227, 27, 35, 0.22);
}

.btn-primary:hover {
    background: var(--red2);
    transform: translateY(-2px);
}


/* =========================================================
   HERO FEATURES
========================================================= */

.hero-features {
    display: flex;
    align-items: center;

    gap: 35px;

    margin-top: 42px;
    padding-top: 25px;

    border-top: 1px solid #2b2b2d;
}

.hero-features div {
    display: flex;
    align-items: center;

    gap: 11px;

    color: #dddddd;

    font-size: 13px;
}

.hero-features b {
    color: var(--white);

    font-size: 24px;
}


/* =========================================================
   HERO IMAGE
========================================================= */

.hero-visual {
    align-self: stretch;

    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.hero-visual img {
    width: 120%;
    max-width: none;

    margin-left: -10%;

    filter:
        drop-shadow(
            0 30px 35px rgba(0, 0, 0, 0.5)
        );
}


/* =========================================================
   VEHICLE FINDER
========================================================= */

.vehicle-wrap {
    position: relative;
    z-index: 5;

    margin-top: -47px;
}

.vehicle-finder {
    padding: 26px 30px;

    background: var(--white);

    border: 1px solid #eeeeee;
    border-radius: 16px;

    box-shadow: var(--shadow);
}

.vf-title {
    display: flex;
    align-items: center;

    gap: 14px;
}

.vf-title h2 {
    margin: 0;

    font-size: 20px;
}

.vf-title p {
    margin: 5px 0 0;

    color: var(--muted);

    font-size: 13px;
}

.vf-icon {
    font-size: 25px;
}

.vf-fields {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr))
        1.1fr;

    gap: 15px;

    margin-top: 22px;
}

.vf-fields label {
    font-size: 12px;
    font-weight: 700;
}

.vf-fields select,
.filter-row select,
.catalog-search input {
    width: 100%;

    margin-top: 7px;
    padding: 13px 14px;

    color: var(--ink);
    background: var(--white);

    border: 1px solid #dddfe4;
    border-radius: 9px;

    outline: 0;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.vf-fields select:focus,
.filter-row select:focus,
.catalog-search input:focus {
    border-color: var(--red);

    box-shadow:
        0 0 0 3px rgba(227, 27, 35, 0.08);
}

.vf-submit {
    align-self: end;

    min-height: 45px;
}


/* =========================================================
   GENERAL SECTION
========================================================= */

.section {
    padding: 65px 0;
}

.section-soft {
    background: var(--soft);
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 30px;

    margin-bottom: 24px;
}

.section-head h2 {
    margin: 7px 0 0;

    font-size: 31px;

    letter-spacing: -1px;
}

.section-head > a {
    flex: 0 0 auto;

    color: var(--red);

    font-size: 13px;
    font-weight: 700;
}

.redline {
    display: block;

    width: 38px;
    height: 3px;

    background: var(--red);
}


/* =========================================================
   CATEGORY
========================================================= */

.category-grid {
    display: grid;

    grid-template-columns:
        repeat(6, minmax(0, 1fr));

    gap: 12px;
}

.category-card {
    position: relative;

    min-height: 210px;

    display: flex;
    flex-direction: column;
    justify-content: flex-end;

    padding: 20px;

    color: var(--white);

    background:
        linear-gradient(
            155deg,
            #262629,
            #0e0e0f
        );

    border-radius: 15px;

    overflow: hidden;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.category-card::before {
    content: "";

    position: absolute;

    top: -15%;
    right: -30%;

    width: 170px;
    height: 170px;

    border: 24px solid rgba(227, 27, 35, 0.35);
    border-radius: 50%;
}

.category-card:hover {
    transform: translateY(-5px);

    box-shadow:
        0 15px 30px rgba(0, 0, 0, 0.18);
}

.category-art {
    position: absolute;

    top: 22px;
    left: 20px;
}

.category-art span {
    font-size: 48px;

    filter: grayscale(1);
}

.category-card h3 {
    margin: 0 0 4px;

    font-size: 16px;
}

.category-card p {
    margin: 0;

    color: #aaaaaa;

    font-size: 12px;
}

.category-card > b {
    position: absolute;

    right: 16px;
    bottom: 17px;
}


/* =========================================================
   LATEST PRODUCT SLIDER
========================================================= */

.latest-slider {
    display: flex;

    gap: 16px;

    overflow-x: auto;
    overflow-y: hidden;

    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;

    scrollbar-width: none;

    padding: 4px 2px 15px;
}

.latest-slider::-webkit-scrollbar {
    display: none;
}

.latest-slider .product-card {
    flex:
        0 0 calc(
            (100% - 48px) / 4
        );

    scroll-snap-align: start;
}


/* =========================================================
   PRODUCT CARD
========================================================= */

.product-card,
.catalog-card {
    background: var(--white);

    border: 1px solid var(--line);
    border-radius: 14px;

    overflow: hidden;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.product-card:hover,
.catalog-card:hover {
    transform: translateY(-4px);

    box-shadow:
        0 15px 30px rgba(0, 0, 0, 0.08);
}

.product-image {
    height: 220px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 22px;

    background:
        linear-gradient(
            #ffffff,
            #fafafa
        );
}

.product-image img {
    width: 100%;
    height: 100%;

    object-fit: contain;
}

.product-card-body,
.catalog-card-body {
    padding: 17px;
}

.badge {
    display: inline-block;

    padding: 5px 8px;

    color: var(--white);
    background: var(--red);

    border-radius: 5px;

    font-size: 10px;
    font-weight: 700;
}

.product-card h3,
.catalog-card h3 {
    margin: 10px 0 5px;

    font-size: 17px;
}

.product-card p,
.catalog-card p {
    color: var(--muted);

    font-size: 13px;
    line-height: 1.5;
}

.product-card small {
    display: block;

    margin: 5px 0 14px;

    color: #999999;
}

.product-card-body > a,
.card-link {
    color: var(--red);

    font-size: 13px;
    font-weight: 800;
}


/* =========================================================
   ADVANTAGES
========================================================= */

.advantages {
    padding: 45px 0;

    color: var(--white);

    background: #0b0b0c;
}

.advantages-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 26px;
}

.advantages-grid > div {
    padding-right: 25px;

    border-right: 1px solid #2d2d2f;
}

.advantages-grid > div:last-child {
    border-right: 0;
}

.advantages span {
    font-size: 28px;
}

.advantages h3 {
    margin: 10px 0 6px;

    font-size: 15px;
}

.advantages p {
    color: #aaaaaa;

    font-size: 12px;
    line-height: 1.55;
}


/* =========================================================
   FOOTER
========================================================= */

.site-footer {
    padding: 55px 0 20px;

    color: var(--white);

    background: #0a0a0b;
}

.footer-grid {
    display: grid;

    grid-template-columns:
        2fr 1fr 1fr 1.3fr;

    gap: 45px;
}

.footer-grid h4 {
    margin-top: 0;
}

.footer-grid p,
.footer-grid a {
    display: block;

    color: #999999;

    font-size: 13px;
    line-height: 1.8;
}

.footer-grid a:hover {
    color: var(--white);
}

.footer-brand {
    margin-bottom: 15px;
}


/* Footer image logo */

.footer-logo {
    display: block;

    width: auto;
    height: 52px;

    max-width: 230px;

    object-fit: contain;
    object-position: left center;
}

.copyright {
    margin-top: 35px;
    padding-top: 18px;

    color: #777777;

    border-top: 1px solid #242426;

    font-size: 12px;
}


/* =========================================================
   CATALOG HERO
========================================================= */

.catalog-hero {
    padding: 75px 0;

    color: var(--white);

    background:
        linear-gradient(
            110deg,
            #101012,
            #242427
        );
}

.catalog-hero h1 {
    margin: 12px 0;

    font-size: 48px;
}

.catalog-hero p {
    color: #bbbbbb;
}


/* =========================================================
   CATALOG SEARCH
========================================================= */

.catalog-search {
    padding: 20px;

    background: var(--white);

    border: 1px solid var(--line);
    border-radius: 16px;

    box-shadow: var(--shadow);
}

.search-row {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        130px;

    gap: 10px;
}

.search-row input {
    margin: 0;

    font-size: 15px;
}

.filter-row {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 10px;

    margin-top: 10px;
}


/* =========================================================
   PRODUCT GRID
========================================================= */

.product-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 18px;
}

.catalog-card .product-image {
    height: 210px;
}

.mini-cat {
    color: var(--red);

    font-size: 10px;
    font-weight: 800;

    text-transform: uppercase;
    letter-spacing: 1px;
}

.sku {
    margin: 4px 0 !important;

    font-size: 12px !important;
}

.empty-state {
    grid-column: 1 / -1;

    padding: 70px 20px;

    color: #666666;

    text-align: center;

    border: 1px dashed #cccccc;
    border-radius: 15px;
}


/* =========================================================
   PRODUCT DETAIL
========================================================= */

.product-detail {
    padding-top: 80px;
}

.detail-grid {
    display: grid;

    grid-template-columns:
        1.05fr 1fr;

    gap: 65px;

    align-items: center;
}

.detail-image {
    min-height: 500px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 45px;

    background: #f7f7f8;

    border-radius: 20px;
}

.detail-image img {
    max-height: 430px;

    object-fit: contain;
}

.detail-copy h1 {
    margin: 12px 0;

    font-size: 46px;
    line-height: 1.05;
}

.partno {
    margin: 18px 0;
    padding: 13px 0;

    color: #666666;

    border-top: 1px solid #eeeeee;
    border-bottom: 1px solid #eeeeee;
}

.lead {
    font-size: 18px;
    font-weight: 600;
}

.description {
    margin-bottom: 25px;

    color: #666666;

    line-height: 1.75;
}

.info-columns {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 50px;
}

.spec-table > div,
.fitment-list > div {
    display: grid;

    grid-template-columns:
        1fr 1.4fr;

    padding: 13px 0;

    border-bottom: 1px solid #dddddd;
}

.spec-table span,
.fitment-list span {
    color: #666666;
}

.fitment-list > div {
    display: flex;
    justify-content: space-between;

    gap: 20px;
}

.fitment-list span {
    font-size: 13px;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 980px) {

    :root {
        --header-height: 68px;
        --logo-height: 34px;
        --logo-max-width: 155px;
    }

    .topbar {
    min-height: var(--header-height);
    height: var(--header-height);

    display: flex;
    align-items: center;

    gap: 18px;

    padding-top: 0;
    padding-bottom: 0;
}


    /* Mobile Navigation */

    .main-nav {
        position: absolute;

        top: var(--header-height);
        left: 0;
        right: 0;

        display: none;
        flex-direction: column;
        align-items: flex-start;

        gap: 0;

        margin: 0;
        padding: 15px 4% 25px;

        background: #111111;

        border-top: 1px solid #2a2a2a;
        border-bottom: 1px solid #252525;

        box-shadow:
            0 15px 30px rgba(0, 0, 0, 0.3);
    }

    .main-nav.open {
        display: flex;
    }

    .main-nav a {
        width: 100%;

        padding: 14px 0;

        border-bottom: 1px solid #222222;
    }

    .main-nav a:last-child {
        border-bottom: 0;
    }

    .main-nav a::after {
        display: none;
    }


    .nav-toggle {
        display: block;
    }

    .header-search {
        display: none;
    }


    /* Hero */

    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        display: none;
    }

    .hero h1 {
        font-size: 48px;
    }


    /* Vehicle */

    .vf-fields {
        grid-template-columns:
            1fr 1fr;
    }


    /* Categories */

    .category-grid {
        grid-template-columns:
            repeat(3, 1fr);
    }


    /* Product Slider */

    .latest-slider .product-card {
        flex-basis:
            calc(
                (100% - 16px) / 2
            );
    }


    /* Catalog */

    .product-grid {
        grid-template-columns:
            repeat(3, 1fr);
    }


    /* Advantages */

    .advantages-grid {
        grid-template-columns:
            1fr 1fr;
    }


    /* Footer */

    .footer-grid {
        grid-template-columns:
            1fr 1fr;
    }


    /* Detail */

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-image {
        min-height: 380px;
    }

    .info-columns {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 640px) {

    :root {
        --header-height: 68px;
        --logo-height: 35px;
        --logo-max-width: 160px;
    }


    /* Header */

    .topbar {
        gap: 12px;
    }

    .nav-toggle {
        font-size: 24px;
    }


    /* Hero */

    .hero-grid {
        min-height: 510px;
    }

    .hero-copy {
        padding:
            58px 0
            90px;
    }

    .hero h1 {
        font-size: 39px;

        letter-spacing: -1.7px;
    }

    .hero-copy > p {
        font-size: 16px;
    }

    .hero-features {
        gap: 15px;

        flex-wrap: wrap;
    }


    /* Vehicle Finder */

    .vehicle-wrap {
        margin-top: -45px;
    }

    .vehicle-finder {
        padding: 20px;
    }

    .vf-title {
        align-items: flex-start;
    }

    .vf-fields,
    .filter-row,
    .search-row {
        grid-template-columns: 1fr;
    }


    /* Sections */

    .section {
        padding: 48px 0;
    }

    .section-head {
        align-items: center;

        gap: 15px;
    }

    .section-head h2 {
        font-size: 25px;
    }


    /* Categories */

    .category-grid {
        grid-template-columns:
            1fr 1fr;
    }

    .category-card {
        min-height: 185px;
    }


    /* Slider */

    .latest-slider .product-card {
        flex-basis: 82%;
    }


    /* Products */

    .product-grid {
        grid-template-columns:
            1fr 1fr;

        gap: 12px;
    }

    .product-image {
        height: 180px;
    }

    .catalog-card .product-image {
        height: 150px;

        padding: 15px;
    }

    .catalog-card-body {
        padding: 12px;
    }

    .catalog-card h3 {
        font-size: 14px;
    }

    .catalog-card p {
        font-size: 12px;
    }


    /* Advantages */

    .advantages-grid {
        grid-template-columns: 1fr;
    }

    .advantages-grid > div {
        padding-right: 0;
        padding-bottom: 18px;

        border-right: 0;
        border-bottom: 1px solid #2d2d2f;
    }

    .advantages-grid > div:last-child {
        border-bottom: 0;
    }


    /* Footer */

    .footer-grid {
        grid-template-columns: 1fr;

        gap: 30px;
    }

    .footer-logo {
        height: 44px;
        max-width: 200px;
    }


    /* Catalog */

    .catalog-hero {
        padding: 55px 0;
    }

    .catalog-hero h1 {
        font-size: 36px;
    }


    /* Product Detail */

    .detail-copy h1 {
        font-size: 35px;
    }

    .detail-image {
        min-height: 280px;

        padding: 25px;
    }

    .fitment-list > div {
        display: block;
    }

    .fitment-list span {
        display: block;

        margin-top: 5px;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 420px) {

    :root {
        --logo-height: 32px;
        --logo-max-width: 145px;
    }

    .container {
        width: 94%;
    }

    .hero h1 {
        font-size: 34px;
    }

    .category-grid {
        gap: 9px;
    }

    .category-card {
        min-height: 165px;

        padding: 15px;
    }

    .category-art {
        top: 17px;
        left: 15px;
    }

    .category-art span {
        font-size: 39px;
    }

    .product-grid {
        gap: 9px;
    }
}