/* Product listing & product detail — ported from the HIT hardware page design.
   Scoped under .hit-product-page so it never clashes with Bootstrap. */

.hit-product-page {
    --blue: #0e9cdb;
    --orange: #ff9300;
    --text: #151515;
    --muted: #5f6770;
    background: #fff;
    color: var(--text);
    /* clears the fixed navbar */
    padding-top: 100px;
}

.hit-product-page *,
.hit-product-page *::before,
.hit-product-page *::after {
    box-sizing: border-box;
}

.hit-product-page a {
    text-decoration: none;
    color: inherit;
}

.hit-container {
    width: min(1110px, calc(100% - 48px));
    margin: 0 auto;
}

/* ---------- categories ---------- */

.category-wrap {
    padding: 58px 0 38px;
}

.categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    align-items: start;
    gap: 28px;
}

.category {
    display: block;
    text-align: center;
    color: #1f1f1f;
    font-size: 15px;
    transition: .2s ease;
    cursor: pointer;
}

.category:hover {
    transform: translateY(-2px);
}

.category .icon {
    height: 56px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--orange);
    margin-bottom: 8px;
}

.category .icon img {
    display: block;
    max-width: 68px;
    max-height: 48px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.category.active {
    font-weight: 700;
    color: var(--blue);
}

/* ---------- hero ---------- */

.hero {
    padding: 10px 0 58px;
}

.hero-frame {
    border-radius: 22px;
    overflow: hidden;
    background: #e6f0f4;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .03);
}

.hero-frame img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 8/3;
    object-fit: cover;
    object-position: center;
}

/* ---------- page heading / breadcrumb ---------- */

.page-heading {
    text-align: center;
    margin-bottom: 46px;
}

.page-heading h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    color: var(--text);
}

.page-heading p {
    max-width: 680px;
    margin: 12px auto 0;
    font-size: 14px;
    line-height: 1.7;
    color: var(--muted);
}

.page-breadcrumb {
    margin-bottom: 40px;
    font-size: 15px;
}

.page-breadcrumb a {
    color: var(--blue);
}

.page-breadcrumb i {
    margin: 0 6px;
    font-size: 12px;
    color: var(--muted);
}

/* ---------- product grid ---------- */

.products {
    padding: 5px 0 112px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    column-gap: 38px;
    row-gap: 66px;
}

.product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 0;
    padding: 14px 10px;
    border-radius: 18px;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.product-card.is-linked {
    cursor: pointer;
}

.product-card.is-linked:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .08);
    background: #fff;
}

.product-media {
    width: 100%;
    height: 155px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.product-media img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.product-name {
    width: 100%;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: #101010;
    margin: 0 0 8px;
}

.product-meta {
    width: 100%;
    margin: 0;
    color: #111;
    font-size: 12px;
    line-height: 1.65;
}

.product-meta p {
    margin: 0;
}

.product-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 138px;
    height: 38px;
    margin-top: 12px;
    border: 1.5px solid var(--blue);
    border-radius: 4px;
    background: var(--blue);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    transition: .2s ease;
}

.product-cta:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(14, 156, 219, .16);
}

/* ---------- product detail ---------- */

.detail-top {
    padding: 26px 0 4px;
}

.detail-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #313840;
    transition: color .2s ease;
}

.detail-back-link:hover {
    color: var(--blue);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    gap: 44px;
    align-items: start;
    padding-top: 18px;
}

/* ---------- product detail modal (product listing page) ---------- */

.product-detail-section {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: rgba(18, 27, 35, .58);
    backdrop-filter: blur(3px);
    padding: 24px;
    overflow: auto;
    align-items: flex-start;
    justify-content: center;
}

.product-detail-section.active {
    display: flex;
}

body.modal-open {
    overflow: hidden;
}

.detail-modal {
    position: relative;
    width: min(1080px, 100%);
    margin: auto;
    background: #fff;
    border-radius: 22px;
    padding: 38px 40px 40px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .24);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}

.detail-modal .detail-layout {
    padding-top: 4px;
}

.detail-modal .detail-tabs-wrap {
    margin-top: 42px;
}

.detail-close {
    position: absolute;
    top: 15px;
    right: 17px;
    z-index: 3;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: #f3f6f8;
    color: #313840;
    font-size: 27px;
    line-height: 1;
    display: grid;
    place-items: center;
    cursor: pointer;
    padding: 0;
    transition: .2s ease;
}

.detail-close:hover {
    background: #e8f5fb;
    color: var(--blue);
    transform: rotate(4deg);
}

.detail-loading {
    padding: 90px 0;
    text-align: center;
    font-size: 14px;
    color: #7a7f86;
}

.detail-gallery {
    min-width: 0;
}

.detail-main-image {
    height: 385px;
    border: 1px solid #eef0f2;
    border-radius: 16px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    overflow: hidden;
}

.detail-main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    mix-blend-mode: multiply;
}

.detail-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
}

.detail-thumb {
    width: 82px;
    height: 72px;
    border: 1.5px solid #d8dee3;
    border-radius: 8px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7px;
    cursor: pointer;
    transition: .2s ease;
}

.detail-thumb.active {
    border: 2px solid var(--blue);
}

.detail-thumb:hover {
    border-color: var(--blue);
    transform: translateY(-1px);
}

.detail-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.detail-info {
    padding-top: 8px;
}

.detail-kicker {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 4px;
}

.detail-title {
    font-size: 34px;
    line-height: 1.15;
    margin: 0 0 12px;
    font-weight: 700;
    color: #222;
}

.detail-desc {
    font-size: 14px;
    line-height: 1.7;
    color: #646b73;
    margin: 0 0 24px;
    max-width: 560px;
}

.detail-desc p {
    margin: 0 0 10px;
}

.detail-values {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding: 18px 0;
    margin: 0 0 22px;
    border-top: 1px solid #e7e9ec;
    border-bottom: 1px solid #e7e9ec;
}

.detail-value-label {
    font-size: 12px;
    color: #ff8f00;
    margin-bottom: 4px;
}

.detail-value-number {
    font-size: 22px;
    font-weight: 700;
    color: #222;
}

.detail-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.detail-btn {
    min-width: 158px;
    height: 44px;
    border-radius: 4px;
    border: 1.5px solid var(--blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    transition: .2s ease;
}

.detail-btn.primary {
    background: var(--blue);
    color: #fff;
}

.detail-btn.secondary {
    background: #fff;
    color: #222;
}

.detail-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(14, 156, 219, .16);
}

/* tabs + rich-text spec panel */

.detail-tabs-wrap {
    margin-top: 52px;
    border-top: 1px solid #e8eaed;
    padding-top: 26px;
}

.detail-tabs {
    display: flex;
    justify-content: center;
    gap: 46px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.detail-tab {
    border: 0;
    background: transparent;
    padding: 9px 2px;
    font-size: 15px;
    color: #444;
    cursor: pointer;
    position: relative;
}

.detail-tab.active {
    font-weight: 600;
}

.detail-tab.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--blue);
}

.detail-panel {
    display: none;
}

.detail-panel.active {
    display: block;
}

.detail-panel p,
.detail-panel li {
    font-size: 14px;
    line-height: 1.8;
    color: #555;
}

.detail-panel p {
    margin: 0 0 12px;
}

.detail-panel img {
    max-width: 100%;
    height: auto;
}

.detail-panel table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    border: 1px solid #dfe4e8;
    margin: 0 0 18px;
}

.detail-panel table th {
    background: var(--blue);
    color: #fff;
    text-align: left;
    padding: 13px 16px;
    font-weight: 600;
    border-right: 1px solid rgba(255, 255, 255, .28);
}

.detail-panel table td {
    padding: 13px 16px;
    border-top: 1px solid #e1e5e8;
    border-right: 1px solid #e1e5e8;
    color: #444;
}

.detail-panel table tr:nth-child(even) td {
    background: #fafbfc;
}

/* baris judul kelompok spesifikasi (Display, Port, dst.) */
.detail-panel table td.spec-section {
    background: var(--blue) !important;
    color: #fff !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    padding: 11px 16px;
}

/* related products */

.related-products {
    margin-top: 64px;
    padding-bottom: 96px;
}

.related-products h2 {
    margin: 0 0 26px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}

/* ---------- responsive ---------- */

@media (max-width: 980px) {
    .hit-product-page {
        padding-top: 90px;
    }

    .category-wrap {
        padding: 40px 0 30px;
    }

    .categories {
        grid-auto-flow: column;
        grid-auto-columns: minmax(120px, 1fr);
        grid-template-columns: none;
        overflow-x: auto;
        padding-bottom: 8px;
        scrollbar-width: none;
    }

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

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 50px 34px;
    }

    .detail-layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .product-detail-section {
        padding: 18px;
    }

    .detail-modal {
        padding: 34px 28px 30px;
        max-height: calc(100vh - 36px);
    }

    .detail-main-image {
        height: 300px;
    }

    .detail-info {
        padding-top: 0;
    }
}

@media (max-width: 640px) {
    .hit-container {
        width: min(100% - 28px, 1110px);
    }

    .category-wrap {
        padding-top: 28px;
    }

    .categories {
        gap: 16px;
    }

    .category {
        font-size: 13px;
    }

    .category .icon {
        height: 48px;
    }

    .hero {
        padding-bottom: 42px;
    }

    .hero-frame {
        border-radius: 16px;
    }

    .page-heading h1 {
        font-size: 22px;
    }

    .page-heading {
        margin-bottom: 32px;
    }

    .products {
        padding-bottom: 72px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 24px;
        row-gap: 44px;
    }

    .product-media {
        height: 128px;
    }

    .product-name {
        font-size: 14px;
    }

    .product-meta {
        font-size: 11px;
    }

    .product-detail-section {
        padding: 10px;
    }

    .detail-modal {
        padding: 34px 18px 24px;
        border-radius: 16px;
        max-height: calc(100vh - 20px);
    }

    .detail-close {
        top: 10px;
        right: 10px;
        width: 34px;
        height: 34px;
        font-size: 24px;
    }

    .detail-main-image {
        height: 240px;
        padding: 18px;
    }

    .detail-title {
        font-size: 27px;
    }

    .detail-values {
        grid-template-columns: 1fr 1fr;
    }

    .detail-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .detail-btn {
        min-width: 0;
        width: 100%;
    }

    .detail-tabs {
        justify-content: flex-start;
        gap: 24px;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .detail-panel table {
        font-size: 12px;
    }

    .detail-panel table th,
    .detail-panel table td {
        padding: 11px 10px;
    }

    .related-products {
        margin-top: 44px;
        padding-bottom: 64px;
    }
}
