#product .cart-section {
    display: grid;
    gap: 10px;
    grid-template-columns: auto 1fr;
    align-items: center;
}
.product {
    display: grid;
    grid-template-columns: 1fr 0.5fr;
    gap: 22px;
    align-items: start;
}
/* Gallery */

.gallery {
    position: relative;
    background: var(--card);
    border: 1px solid #e6eefc;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    padding: 14px;
}
.gallery .media {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e6eefc;
    background: #ecf3ff;
}
.gallery .hero {
    margin: 0;
    display: block;
}
article .gallery img {
    width: 100%;
}
.thumbs {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
    justify-content: flex-start;
}
.thumb {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    border: 1px solid var(--barik-100);
    background: linear-gradient(180deg, var(--barik-100), var(--barik-200));
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
}
.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    transition: transform 0.2s ease;
}
.thumb.is-active {
    outline: 3px solid var(--barik-600);
}
.thumb.is-active img {
    transform: scale(1.03);
}
.product .badges {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
/* Buy box */

.buybox {
    background: var(--card);
    border: 1px solid #e6eefc;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    padding: 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.buybox h1 {
    margin: 0 0 6px;
    font-size: 24px;
    color: var(--barik-800);
}
.rating-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.stars {
    color: #fbbf24;
    letter-spacing: 2px;
}
.stars.sm {
    font-size: 12px;
    letter-spacing: 1px;
}
.divider {
    width: 1px;
    height: 16px;
    background: #e2e8f0;
}
.stats-row .sku, .stats-row .brand {
    font-variant: tabular-nums;
    color: #515151;
}
.stock {
    margin-left: auto;
    font-weight: 700;
}
.stock.ok {
    color: #059669;
}
.price-row {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    margin: 8px 0 12px;
    gap: 10px;
}
.price .now {
    font-size: 24px;
    color: var(--barik-800);
    font-weight: 800;
}
.price .was {
    color: #94a3b8;
    text-decoration: line-through;
    margin-left: 8px;
}
.trust small {
    color: #334155;
}
.meta {
    color: #6b7280;
    font-size: 12px;
}
/* Options */

.options {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.field label {
    display: block;
    font-weight: 700;
    color: var(--barik-700);
    margin-bottom: 6px;
}
#product .options, #product .field.product-option {
    max-width: 100%;
}
.field.product-option {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed #dbe6ff;
}
.swatches {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
    gap: 10px;
    max-width: 500px;
}
.swatch input {
    display: none;
}
.swatch span {
    display: block;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: var(--c, #ccc);
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #cfe1fb;
    cursor: pointer;
    transition: all 0.15s ease;
}
.swatch span:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
.swatch input:checked+span {
    box-shadow: 0 0 0 2px var(--barik-500);
}
.chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.chip {
    display: inline-flex;
    align-items: center;
}
.chip input {
    display: none;
}
.chip span {
    display: inline-block;
    border: 1px solid #dbe4ff;
    background: #fff;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}
.chip.is-active span, .chip input:checked+span {
    background: #eef5ff;
    border-color: #cfe1fb;
}
/* default safety (kalau belum ada) */

.product {
    display: grid;
}
.product .cards, .delivery-grid, .benefits, .swatches {
    display: grid;
}
.qty-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}
.qty {
    display: flex;
    align-items: center;
    border: 1px solid #dbe4ff;
    border-radius: 10px;
    overflow: hidden;
}
.qty input {
    width: 48px;
    height: 38px;
    text-align: center;
    border: 0;
    outline: 0;
}
.q {
    width: 38px;
    height: 38px;
    border: 0;
    background: var(--barik-50);
    color: var(--barik-600);
    cursor: pointer;
    font-size: 18px;
}
.q:active {
    transform: scale(0.97);
}
.product .cta-row {
    display: grid;
    gap: 10px;
    padding: 20px 0;
    justify-content: right;
    grid-template-columns: 1fr auto;
}
.benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.benefit {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(180deg, #ffffff, #f6faff);
    border: 1px solid #e6eefc;
    border-radius: 12px;
    padding: 10px;
    box-shadow: var(--shadow-sm);
}
.delivery {
    border: 1px dashed #cfe1fb;
    border-radius: 12px;
    padding: 10px;
}
.delivery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 8px;
}
.payments {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #eef3ff;
    margin-top: 6px;
    padding-top: 10px;
}
.pay-logos {
    display: flex;
    gap: 10px;
}
.pay {
    width: 40px;
    height: 24px;
    border-radius: 6px;
    display: inline-block;
    background: linear-gradient(180deg, #eef5ff, #d7e8ff);
    border: 1px solid #cfe1fb;
}
.pay.bank {
    background: linear-gradient(180deg, #e7f1fb, #d4e7ff);
}
.pay.ewallet {
    background: linear-gradient(180deg, #fef3c7, #fde68a);
}
.pay.visa {
    background: linear-gradient(180deg, #dbeafe, #93c5fd);
}
.pay.mc {
    background: linear-gradient(180deg, #ffe4e6, #fecaca);
}
.pay.jcb {
    background: linear-gradient(180deg, #dcfce7, #bbf7d0);
}
/* Tabs */

#main .nav-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border: 1px solid #e6eefc;
    border-radius: 14px 14px 0 0;
    background: var(--card, #fff);
    padding: 8px;
    box-shadow: var(--shadow-sm, 0 4px 12px rgba(0, 0, 0, 0.04));
    margin-top: 18px;
}
#main .nav-tabs>li {
    margin: 0;
    list-style: none;
}
#main .nav-tabs>li>a {
    display: block;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--barik-200);
    background: #fff;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    transition: all 0.2s ease;
}
#main .nav-tabs>li>a:hover {
    border-color: var(--barik-200);
    background: var(--barik-100);
    color: var(--barik-600);
}
#main .nav-tabs>li.active>a, #main .nav-tabs>li>a.active {
    background: var(--barik-50);
    border-color: var(--barik-200);
    color: var(--barik-700);
    box-shadow: inset 0 -2px 0 var(--barik-600);
}
/* Tab content box */

#main .tab-content {
    background: var(--card, #fff);
    border: 1px solid #e6eefc;
    border-top: none;
    border-radius: 0 0 14px 14px;
    box-shadow: var(--shadow-sm, 0 4px 12px rgba(0, 0, 0, 0.04));
    padding: 16px;
}
/* Panels */

#main .tab-pane {
    display: none;
}
#main .tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Description content */

#main .tab-pane p, #main .tab-pane li {
    color: #334155;
    font-size: 15px;
    line-height: 1.6;
}
#main .tab-pane ul {
    padding-left: 20px;
}
/* Attribute / Specs grid */

#main .table {
    margin-bottom: 0;
    border-color: #e6eefc;
}
#main .table th {
    background: #f8fbff;
    font-weight: 700;
    color: #0f264a;
}
#main .table td {
    background: linear-gradient(180deg, #ffffff, #f6faff);
    border-color: #eef3ff;
    color: #475569;
    vertical-align: middle;
}
/* Reviews */

#main #tab-review .review {
    border-bottom: 1px solid #eef3ff;
    padding: 10px 0;
}
#main #tab-review .review:last-child {
    border-bottom: 0;
}
#main #tab-review .r-head {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0f264a;
    font-weight: 600;
}
#main #tab-review .stars {
    color: #fbbf24;
}
#main #tab-review p {
    margin: 6px 0 4px;
}
/* Form review */

#main #form-review {
    margin-top: 14px;
}
#main #form-review .form-group label {
    font-weight: 600;
    color: #1e293b;
}
#main #form-review input, #main #form-review textarea {
    border: 1px solid #dbe4ff;
    border-radius: 10px;
    padding: 8px 10px;
    width: 100%;
    font-size: 14px;
    color: #334155;
}
#main #form-review button {
    margin-top: 10px;
    background: var(--barik-600, #164583);
    border: none;
    border-radius: 10px;
    color: #fff;
    padding: 10px 16px;
    font-weight: 700;
    transition: 0.2s;
}
#main #form-review button:hover {
    background: var(--barik-700, #12376e);
}
/* Related */

.product .related {
    margin: 20px 0;
}
.product .cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.product .card {
    background: #fff;
    border: 1px solid #e6eefc;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: 0.16s;
}
.product .card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}
.product .card .thumb {
    height: 120px;
    background: linear-gradient(180deg, #eaf2ff, #d7e8ff);
}
.product .card .body {
    padding: 10px;
}
.product .card h4 {
    margin: 0 0 4px;
    color: #0f264a;
}
.product .card .meta {
    color: #6b7280;
}
/* Sticky bar for mobile */

.product .sticky-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-top: 1px solid #e6eefc;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    box-shadow: 0 -6px 18px rgba(16, 24, 40, 0.06);
    z-index: 60;
}
.sticky-bar .price .now {
    font-weight: 800;
    color: var(--barik-800);
}
.sticky-bar .price .was {
    text-decoration: line-through;
    color: #94a3b8;
    margin-left: 6px;
}
/* Utility */

.product .wrap {
    width: min(1200px, 96vw);
    margin: 0 auto;
}
.product .btn.ghost {
    background: #fff;
    color: var(--barik-700);
    border: 1px solid var(--barik-200);
}
.product .btn.ghost:hover {
    background: var(--barik-100);
}
.product .icon-btn {
    border: 1px solid #dbe4ff;
    background: #fff;
    border-radius: 10px;
    cursor: pointer;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-sm);
    transition: 0.18s;
}
.product .icon-btn:hover {
    transform: translateY(-1px);
    background: #eef5ff;
}
.product .muted {
    color: var(--muted);
}
.product .section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 8px 0 10px;
}
.product .controls {
    display: flex;
    gap: 8px;
}
.product .pill {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
}
.product .pill.success {
    background: linear-gradient(90deg, #22c55e, #86efac);
    color: #064e3b;
}
.product .pill.info {
    background: linear-gradient(90deg, #60a5fa, #93c5fd);
    color: #0b2e58;
}
.product .pill.promo {
    background: linear-gradient(90deg, #f97316, #fbbf24);
    color: #4a2000;
}
.product .thumbnails {
    overflow: auto;
    clear: both;
    list-style: none;
    padding: 0;
    margin: 0;
}
.product .thumbnails>li {
    margin-left: 20px;
}
.product .thumbnails {
    margin-left: -20px;
}
.product .thumbnails>img {
    width: 100%;
}
.product .image-additional a {
    margin-bottom: 20px;
    padding: 5px;
    display: block;
    border: 1px solid #ddd;
}
.product .image-additional {
    max-width: 78px;
}
.product .thumbnails .image-additional {
    float: left;
    margin-left: 20px;
}
#button-cart {
    max-width: 200px;
    font-size: 16px;
}
#tab-description {
    overflow: hidden;
    position: relative;
    transition: max-height 0.3s ease;
}
/* Efek fade bawah */

#tab-description.collapsed::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 70px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
    pointer-events: none;
}
#tab-description .expand-btn {
    z-index: 999999;
    display: block;
    background: var(--barik-600, #1b5fb3);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 600;
    margin: 20px auto 0;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
    box-shadow: 0 3px 8px rgba(11, 33, 66, 0.1);
    position: absolute;
    bottom: 0;
}
#tab-description .expand-btn:hover {
    background: var(--barik-700, #12376e);
    transform: translateY(-1px);
}
#tab-description .expand-btn:active {
    transform: translateY(0);
}
#tab-description .expand-wrap {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 2;
    padding-bottom: 12px;
}
#product .cta-row button {
    min-height: 42px;
    min-width: 42px;
}
#product .qty-row .qty * {
    text-align: center;
    border: none;
}
.stats-row {
    display: flex;
    align-items: start;
    gap: 2px;
    flex-wrap: wrap;
    flex-direction: column;
}
/* ============================================================
   Related Products Section
   ============================================================ */

section.related {
    margin: 28px 0 0;
}

section.related .section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 14px;
    flex-direction: column;
    gap: 5px;
}

section.related .section-head h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--barik-800, #0f264a);
    margin: 0;
}

section.related .section-head .meta {
    font-size: 15px;
    color: #94a3b8;
}


/* Product Card */
article.product-card {
    background: var(--card, #fff);
    border: 1px solid #e6eefc;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-sm, 0 4px 12px rgba(0,0,0,.04));
    display: flex;
    flex-direction: column;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

article.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow, 0 8px 24px rgba(0,0,0,.10));
}

/* Media area */
article.product-card .product-media {
    position: relative;
    background: linear-gradient(160deg, #eaf2ff 0%, #dce9ff 100%);
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

article.product-card .product-media a {
    display: block;
    width: 100%;
    height: 100%;
}

article.product-card .product-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.28s ease;
    padding: 0;
}

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

/* Sale badge */
article.product-card .badge.sale {
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(90deg, #f97316, #fbbf24);
    color: #4a2000;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    z-index: 2;
    letter-spacing: 0.3px;
}

article.product-card .badge.sale .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ea580c;
    display: inline-block;
    flex-shrink: 0;
}

/* Wishlist button */
article.product-card .card-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
}

article.product-card .fav {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #dbe4ff;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(4px);
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 14px;
    line-height: 1;
    color: #94a3b8;
    transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
    box-shadow: var(--shadow-sm, 0 2px 6px rgba(0,0,0,.06));
}

article.product-card .fav:hover {
    color: #e11d48;
    background: #fff1f2;
    transform: scale(1.1);
}

/* Product body */
article.product-card .product-body {
    padding: 10px 12px 4px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

article.product-card .product-title {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--barik-800, #0f264a);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

article.product-card .product-body a {
    text-decoration: none;
    color: inherit;
}

article.product-card .product-body a:hover .product-title {
    color: var(--barik-600, #1b5fb3);
}

/* Rating */
article.product-card .rating {
    display: flex;
    align-items: center;
    gap: 5px;
}

article.product-card .rating .stars {
    display: flex;
    gap: 1px;
}

article.product-card .rating .stars svg {
    width: 12px;
    height: 12px;
    color: #fbbf24;
    flex-shrink: 0;
}

article.product-card .rating span {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
}

/* Price */
article.product-card .price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

article.product-card .price-new {
    font-size: 15px;
    font-weight: 800;
    color: var(--barik-800, #0f264a);
}

article.product-card .price-old {
    font-size: 12px;
    color: #94a3b8;
    text-decoration: line-through;
}

/* Card footer */
article.product-card .card-foot {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 8px 12px 12px;
    border-top: 1px solid #f0f5ff;
    margin-top: auto;
}

article.product-card .card-foot .btn {
    font-size: 13px;
    font-weight: 600;
    padding: 7px 10px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: background 0.18s ease, transform 0.14s ease, box-shadow 0.18s ease;
    white-space: nowrap;
    min-height: 34px;
}

article.product-card .card-foot .btn-primary {
    background: var(--barik-600, #164583);
    border: none;
    color: #fff;
    box-shadow: 0 2px 6px rgba(22,69,131,.20);
}

article.product-card .card-foot .btn-primary:hover {
    background: var(--barik-700, #12376e);
    box-shadow: 0 4px 10px rgba(22,69,131,.30);
    transform: translateY(-1px);
}

article.product-card .card-foot .btn-ghost {
    background: #fff;
    border: 1px solid #dbe4ff;
    color: var(--barik-600, #1b5fb3);
    width: 34px;
    padding: 0;
    border-radius: 8px;
}

article.product-card .card-foot .btn-ghost:hover {
    background: #eef5ff;
    border-color: var(--barik-300, #93c5fd);
}

/* Owl Carousel — override dot/nav warna supaya match tema */
section.related .owl-dots {
    margin-top: 14px;
    text-align: center;
}

section.related .owl-dot span {
    background: #dbe4ff !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    transition: background 0.2s ease !important;
}

section.related .owl-dot.active span {
    background: var(--barik-600, #1b5fb3) !important;
    width: 20px !important;
    border-radius: 4px !important;
}

/* ============================================================
   Responsif */

@media (max-width: 980px) {
    section.related .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .product .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .sticky-bar {
        display: flex;
    }
    .product {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 768px) {
    #main .chip .opt-img {
        width: 28px;
        height: 28px;
    }
    .swatches {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        max-width: 100%;
    }
    /* nav-tabs: stacked full width */
    #main .nav-tabs {
        flex-direction: column;
        flex-wrap: nowrap;
        padding: 6px;
    }
    #main .nav-tabs .nav-item {
        width: 100%;
    }
    #main .nav-tabs .nav-link, #main .nav-tabs>li>a {
        width: 100%;
        text-align: center;
        font-size: 14px;
        border-radius: 4px;
        margin-bottom: 2px;
    }
    #main .tab-content {
        padding: 12px;
    }
    .product {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 560px) {
    .delivery-grid {
        grid-template-columns: 1fr;
    }
    .product .cards {
        grid-template-columns: 1fr;
    }
    section.related .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    article.product-card .product-title {
        font-size: 12px;
    }
    article.product-card .card-foot .btn {
        font-size: 12px;
        padding: 6px 8px;
    }
    .benefits {
        grid-template-columns: 1fr;
    }
    /* opsional kalau swatches terlalu kecil */
    /* .swatches{grid-template-columns:repeat(3, minmax(0,1fr));} */
}


/*Override*/
.stock.ok {
    display: none;
}
