.rel-sec {
    margin-top: 46px;
    padding-top: 22px;
    border-top: 1px solid #e5e7eb;
}

.rel-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.rel-title {
    margin: 0;
    font-size: 22px;
    letter-spacing: -.2px;
}

.rel-all {
    font-weight: 700;
    color: #0f2e57;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    transition: .2s ease;
}

.rel-all:hover {
    transform: translateY(-1px);
    border-color: #0f2e57;
}

.rel-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

@media (max-width: 1100px) {
    .rel-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .rel-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .rel-grid {
        grid-template-columns: 1fr;
    }
}

.rel-card {
    display: block;
    text-decoration: none;
    color: #0b1220;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 30px rgba(2, 8, 23, .06);
    transition: .25s ease;
}

.rel-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 55px rgba(2, 8, 23, .12);
    border-color: #cbd5e1;
}

.rel-media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #f3f4f6;
    overflow: hidden;
}

.rel-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform .35s ease;
}

.rel-card:hover .rel-media img {
    transform: scale(1.06);
}

.rel-body {
    padding: 14px 14px 16px;
}

.rel-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.rel-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    color: #0f2e57;
    background: rgba(15, 46, 87, .10);
    border: 1px solid rgba(15, 46, 87, .10);
    white-space: nowrap;
}

.rel-code {
    font-size: 12px;
    font-weight: 800;
    color: #6b7280;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    padding: 6px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.rel-name {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rel-desc {
    margin: 0 0 14px;
    color: #6b7280;
    line-height: 1.6;
    font-size: 13px;
    min-height: 42px;
}

.rel-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 14px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 13px;
    border: 1px solid #e5e7eb;
    background: #fff;
    transition: .2s ease;
}

.rel-card:hover .rel-cta {
    border-color: #0f2e57;
    background: #0f2e57;
    color: #fff;
}

/* =========================
   PRODUCTS PAGE
========================= */
.products-page {
    padding: 34px 0 54px;
    background: #fff;
}

.products-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

@media (max-width: 980px) {
    .products-top {
        display: none;
    }
}

.products-title {
    margin: 0 0 6px;
    color: var(--p-blue);
    font-size: 28px;
    font-weight: 700;
}

.products-sub {
    margin: 0;
    color: var(--p-muted);
    line-height: 1.6;
}

.products-search {
    display: flex;
    align-items: center;
    border: 1px solid rgba(15, 46, 87, .18);
    border-radius: 999px;
    overflow: hidden;
    height: 42px;
    min-width: 320px;
}

.products-search input {
    border: 0;
    outline: 0;
    width: 100%;
    padding: 0 14px;
    font-size: 14px;
    height: 42px;
    border-radius: 0;
}

.products-search button {
    border: 0;
    cursor: pointer;
    height: 42px;
    width: 46px;
    background: var(--p-blue);
    display: grid;
    place-items: center;
}

.products-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 26px;
    align-items: start;
}

/* Filters */
.filters {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.filters-card {
    background: #fff;
    border: 1px solid var(--p-line);
    border-radius: var(--p-radius);
    box-shadow: var(--p-shadow);
    padding: 16px 16px 14px;
}

.filters-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.filters-head h3 {
    margin: 0;
    color: var(--p-blue);
    font-weight: 700;
    font-size: 16px;
}

.filters-note {
    color: var(--p-muted);
    font-size: 12px;
    font-weight: 700;
}

.filters-group {
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid rgba(15, 46, 87, .10);
}

.filters-label {
    color: var(--p-blue);
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 10px;
}

.chip {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #111827;
    padding: 7px 10px;
    border-radius: 10px;
    border: 1px solid rgba(15, 46, 87, .12);
    margin-bottom: 8px;
    cursor: pointer;
    background: #fff;
    text-decoration: unset;
}

.chip input {
    accent-color: var(--p-blue);
}

.chip.active {
    background: var(--p-blue);
    color: #fff;
    border-color: var(--p-blue);
}

/* Ajax states */
#productGrid.is-loading {
    opacity: .5;
    pointer-events: none;
    transition: opacity .15s ease;
}

.products-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 16px;
    color: #64748b;
}

.products-empty strong {
    display: block;
    font-size: 18px;
    color: #111827;
    margin-bottom: 6px;
}

.filters-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.catalog-card {
    display: block;
    text-decoration: none;
    background: var(--p-blue);
    color: #fff;
    border-radius: var(--p-radius);
    padding: 16px;
    box-shadow: var(--p-shadow);
}

.catalog-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
}

.catalog-sub {
    opacity: .9;
    font-size: 13px;
    margin-bottom: 10px;
}

.catalog-btn {
    display: inline-block;
    font-weight: 700;
}

/* Products right */
.products-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.count {
    color: var(--p-muted);
    font-weight: 400;
}

.count strong {
    color: var(--p-blue);
}

.sort {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--p-muted);
    font-weight: 800;
}

.sort select {
    height: 38px;
    border: 1px solid rgba(15, 46, 87, .18);
    border-radius: 12px;
    padding: 0 12px;
    outline: none;
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.p-card {
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid var(--p-line);
    border-radius: var(--p-radius);
    overflow: hidden;
    box-shadow: var(--p-shadow);
    display: flex;
    flex-direction: column;
    transform: translateY(0);
    transition: transform .2s ease, box-shadow .2s ease;
}

.p-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(2, 8, 23, .16);
}

.p-img {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #fff;
    overflow: hidden;
    padding: 26px;
}

.p-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    transform: scale(1);
}

.p-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    background: #fff;
    color: var(--p-blue);
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(15, 46, 87, .18);
    font-size: 12px;
}

.store-badge {
    position: absolute;
    left: 12px;
    bottom: 25px;
    background: #fff;
    color: #5a2a12;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(15, 46, 87, .18);
    font-size: 12px;
}

.p-badge.dark {
    background: var(--p-blue);
    color: #fff;
    border-color: var(--p-blue);
}

.p-body {
    padding: 14px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.p-cat {
    color: var(--p-muted);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .4px;
}

.p-name {
    margin: 0;
    color: var(--p-blue);
    font-size: 16px;
    font-weight: 700;
}

.p-desc {
    margin: 0;
    color: #374151;
    line-height: 1.6;
    font-size: 13px;
}

.p-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.p-tag {
    font-size: 12px;
    font-weight: 700;
    color: var(--p-blue);
    background: rgba(15, 46, 87, .08);
    padding: 6px 10px;
    border-radius: 999px;
}

.p-link {
    color: var(--p-blue);
    font-weight: 700;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 18px;
}

.page {
    text-decoration: none;
    border: 1px solid rgba(15, 46, 87, .18);
    border-radius: 12px;
    padding: 9px 12px;
    font-weight: 700;
    color: var(--p-blue);
    background: #fff;
}

.page.active {
    background: var(--p-blue);
    color: #fff;
    border-color: var(--p-blue);
}

.page.dots {
    border: 0;
    padding: 0 6px;
    color: var(--p-muted);
}

.page.next {
    margin-left: auto;
}

@media (max-width: 560px) {
    .grid {
        grid-template-columns: 1fr !important;
    }

    .products-layout {
        grid-template-columns: unset !important;
    }
}

.price-tag {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, #0f2e57, #143a6d);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 30px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.5px;
}

.pdetail {
    background: #fff;
    padding: 34px 0 70px;
}

/* Breadcrumb */
.pdetail-bc {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--d-muted);
    font-weight: 800;
    font-size: 13px;
    margin-bottom: 14px;
}

.pdetail-bc a {
    color: var(--d-blue);
    text-decoration: none;
}

.pdetail-bc .sep {
    opacity: .7;
}

.pdetail-bc .current {
    opacity: .9;
}

/* Top grid */
.pdetail-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 26px;
    align-items: start;
}

/* Gallery */
.pdetail-gallery {
    background: #fff;
    border: 1px solid var(--d-line);
    border-radius: var(--d-radius);
    box-shadow: var(--d-shadow);
}


.g-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.g-main {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #e5e7eb;
    border: 1px solid rgba(15, 46, 87, .12);
}

.g-pane {
    display: none;
}

.g-pane img {
    width: 100%;
    height: 440px;
    object-fit: contain;
    display: block;
}

#g1:checked ~ .g-main .g1,
#g2:checked ~ .g-main .g2,
#g3:checked ~ .g-main .g3,
#g4:checked ~ .g-main .g4 {
    display: block;
}

.g-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    background: #fff;
    color: var(--d-blue);
    font-weight: 700;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(15, 46, 87, .18);
    font-size: 12px;
}

.g-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.g-thumb {
    width: 74px;
    height: 58px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(15, 46, 87, .16);
    cursor: pointer;
    background: #e5e7eb;
    display: block;
}

.g-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transform: scale(1.05);
}

/* Active thumb highlight */
#g1:checked ~ .g-thumbs label[for="g1"],
#g2:checked ~ .g-thumbs label[for="g2"],
#g3:checked ~ .g-thumbs label[for="g3"],
#g4:checked ~ .g-thumbs label[for="g4"] {
    outline: 3px solid rgba(15, 46, 87, .18);
    border-color: rgba(15, 46, 87, .35);
}

/* Info */
.pdetail-info {
    background: #fff;
    border: 1px solid var(--d-line);
    border-radius: var(--d-radius);
    box-shadow: var(--d-shadow);
    padding: 18px;
    position: sticky;
    top: 90px;
}

.pname {
    margin: 0 0 10px;
    color: var(--d-blue);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.15;
}

.psub {
    margin: 0 0 12px;
    color: #374151;
    line-height: 1.8;
    font-size: 14px;
}

.p-price {
    margin: 0 0 12px;
    color: #000000;
    line-height: 1.8;
    font-size: 19px;
}

.kicker {
    color: var(--d-blue);
    font-weight: 700;
    letter-spacing: .5px;
    font-size: 12px;
    margin-bottom: 10px;
}

.pbox {
    border: 1px solid rgba(15, 46, 87, .12);
    border-radius: 14px;
    padding: 12px;
    background: rgba(15, 46, 87, .04);
    margin-bottom: 14px;
}

.pbox-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.pbox-row:last-child {
    margin-bottom: 0;
}

.pbox-item {
    background: #fff;
    border: 1px solid rgba(15, 46, 87, .12);
    border-radius: 12px;
    padding: 10px 10px;
}

.pbox-item span {
    display: block;
    color: var(--d-muted);
    font-weight: 800;
    font-size: 12px;
    margin-bottom: 4px;
}

.pbox-item strong {
    color: var(--d-blue);
    font-weight: 700;
    font-size: 13px;
}

.pactions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}


.pnote {
    font-size: 12px;
    color: var(--d-muted);
    line-height: 1.6;
}

.pnote strong {
    color: var(--d-blue);
}

/* Tabs (CSS only) */
.ptabs {
    margin-top: 22px;
    border: 1px solid var(--d-line);
    border-radius: var(--d-radius);
    box-shadow: var(--d-shadow);
    overflow: hidden;
}


.t-head {
    display: flex;
    gap: 0;
    background: rgba(15, 46, 87, .05);
    border-bottom: 1px solid rgba(15, 46, 87, .10);
}

.t-tab {
    flex: 1;
    padding: 14px 14px;
    text-align: center;
    cursor: pointer;
    font-weight: 700;
    color: var(--d-blue);
    user-select: none;
    border-right: 1px solid rgba(15, 46, 87, .10);
}

.t-tab:last-child {
    border-right: 0;
}

#t1:checked ~ .t-head label[for="t1"],
#t2:checked ~ .t-head label[for="t2"],
#t3:checked ~ .t-head label[for="t3"] {
    background: #fff;
}

.t-body {
    padding: 18px;
    background: #fff;
}

.t-pane {
    display: none;
    color: #374151;
    line-height: 1.9;
}

.t-pane ul {
    margin: 10px 0 0;
    padding-left: 18px;
}

.t-pane ol {
    margin: 10px 0 0;
    padding-left: 18px;
}

#t1:checked ~ .t-body .t1,
#t2:checked ~ .t-body .t2,
#t3:checked ~ .t-body .t3 {
    display: block;
}


.specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.spec {
    border: 1px solid rgba(15, 46, 87, .12);
    border-radius: 12px;
    padding: 10px;
    background: rgba(15, 46, 87, .04);
}

.spec span {
    display: block;
    color: var(--d-muted);
    font-weight: 800;
    font-size: 12px;
    margin-bottom: 4px;
}

.spec strong {
    color: var(--d-blue);
    font-weight: 700;
    font-size: 13px;
}

.t-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}


.callout {
    margin-top: 12px;
    padding: 12px 14px;
    border-left: 4px solid var(--d-blue);
    background: rgba(15, 46, 87, .06);
    border-radius: 12px;
    font-weight: 800;
}

.callout a {
    color: var(--d-blue);
    text-decoration: none;
    font-weight: 700;
}


/* Responsive */
@media (max-width: 980px) {
    .pdetail-grid {
        grid-template-columns: 1fr;
    }

    .pdetail-info {
        position: static;
        padding: unset;
    }

    .g-pane img {
        height: 360px;
    }
}

@media (max-width: 560px) {
    .g-pane img {
        height: 280px;
    }

    .pbox-row {
        grid-template-columns: 1fr;
    }

    .specs {
        grid-template-columns: 1fr;
    }
}
