/**
 * marketplace.css
 * Custom styles khusus untuk Marketplace Sumberjaya Emas
 * Extends template Ecomus tanpa menimpa style utama
 */

/* ── Variables ── */
:root {
    --gold-primary: #C9A84C;
    --gold-dark: #8B6914;
    --gold-light: #F5E6B8;
    --dark-gold-bg: #1a1208;
    --card-shadow: 0 4px 20px rgba(0,0,0,.08);
    --radius-card: 8px;
}

/* ── Preload Logo ── */
.preload-logo {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.preload-logo .preload-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
    position: relative;
    z-index: 1;
}
.preload-container .spinner {
    border-top-color: var(--gold-primary, #C9A84C) !important;
}

/* ── Logo Header ── */
.logo-header {
    text-decoration: none;
    line-height: 1;
}
.logo-header img.logo {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    object-fit: contain;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}
.logo-header:hover img.logo {
    transform: scale(1.05);
}
.logo-header .brand-text {
    color: var(--gold-primary, #C9A84C);
    letter-spacing: 0.5px;
    font-size: 17px;
    font-weight: 800;
}

/* ── Announcement Bar (Top Bar Emas) ── */
.announcement-bar.bg_dark {
    background: #111 !important;
}
.announcement-bar {
    position: relative;
    padding-right: 44px;
}
.announcement-bar-item p {
    letter-spacing: 0.5px;
    font-size: 12px;
}
.announcement-bar .close-announcement-bar {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 14px;
    cursor: pointer;
    z-index: 5;
    color: #fff;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.announcement-bar .close-announcement-bar:hover {
    opacity: 1;
}

/* ── Desktop Category Items Hover & Active ── */
.header-list-categories .categories-item.active a,
.header-list-categories .categories-item a:hover {
    color: var(--gold-primary, #C9A84C);
}

/* ── Mobile Version Header & Top Bar Optimization ── */
@media (max-width: 767px) {
    .announcement-bar {
        padding-right: 32px;
    }
    .announcement-bar-item p {
        font-size: 11px;
        padding: 7px 0;
    }
    .announcement-bar .close-announcement-bar {
        right: 8px;
        font-size: 12px;
    }
    .header-style-2 .wrapper-header {
        min-height: 52px;
    }
    .header-default .main-header .wrapper-header {
        padding-top: 4px;
        padding-bottom: 4px;
    }
    .logo-header img.logo {
        width: 28px !important;
        height: 28px !important;
    }
    .logo-header .brand-text {
        font-size: 14px !important;
        letter-spacing: 0.3px !important;
    }
    .wrapper-header .nav-icon {
        gap: 12px !important;
    }
    #header .nav-icon .icon {
        font-size: 18px;
    }
    #header .nav-icon .count-box {
        top: -4px;
        right: -8px;
        height: 16px;
        min-width: 16px;
        line-height: 16px;
        font-size: 10px;
    }
}

/* ── Header Bottom Category Pills on Mobile/Tablet ── */
@media (max-width: 991px) {
    .header-bottom {
        background: #0d0d0d;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    .header-bottom .wrapper-header {
        min-height: 44px !important;
        justify-content: flex-start !important;
        padding: 0 !important;
    }
    .header-bottom .header-list-categories {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap !important;
        gap: 6px !important;
        width: 100%;
        padding: 6px 8px !important;
        scrollbar-width: none;
    }
    .header-bottom .header-list-categories::-webkit-scrollbar {
        display: none;
    }
    .header-bottom .header-list-categories .categories-item {
        min-height: auto !important;
        flex-shrink: 0;
    }
    .header-bottom .header-list-categories .categories-item a {
        padding: 5px 12px !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        border-radius: 20px !important;
        background: rgba(255, 255, 255, 0.06);
        color: rgba(255, 255, 255, 0.85) !important;
        border: 1px solid rgba(255, 255, 255, 0.12);
        display: inline-block;
        transition: all 0.2s ease;
    }
    .header-bottom .header-list-categories .categories-item.active a {
        background: var(--gold-primary, #C9A84C) !important;
        color: #000 !important;
        border-color: var(--gold-primary, #C9A84C) !important;
        box-shadow: 0 2px 8px rgba(201, 168, 76, 0.35);
    }
}

/* ── Harga Emas Banner ── */
.bg-dark-gold {
    background: var(--dark-gold-bg);
    background: linear-gradient(135deg, #1a1208 0%, #2d1f0a 50%, #1a1208 100%);
    padding: 60px 0;
}

.table-harga-emas {
    width: 100%;
    border-collapse: collapse;
    color: #fff;
}
.table-harga-emas thead th {
    padding: 10px 16px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,.5);
    border-bottom: 1px solid rgba(201,168,76,.3);
}
.table-harga-emas tbody tr {
    border-bottom: 1px solid rgba(255,255,255,.05);
    transition: background .2s;
}
.table-harga-emas tbody tr:hover {
    background: rgba(201,168,76,.08);
}
.table-harga-emas tbody td {
    padding: 14px 16px;
    font-size: 14px;
    vertical-align: middle;
}
.btn-outline-warning {
    border: 1px solid var(--gold-primary) !important;
    color: var(--gold-primary) !important;
    background: transparent;
    padding: 4px 14px;
    font-size: 12px;
    transition: all .2s;
}
.btn-outline-warning:hover {
    background: var(--gold-primary) !important;
    color: #000 !important;
}

/* ── Produk Card Kustomisasi ── */
.card-product {
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform .25s ease, box-shadow .25s ease;
}
.card-product:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,.14);
}
.card-product.out-of-stock .product-img {
    filter: grayscale(.6);
    opacity: .75;
}

/* Badge Karat */
.product-badge-karat {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}
.badge-karat {
    display: inline-block;
    background: var(--gold-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: .5px;
    box-shadow: 0 2px 8px rgba(201,168,76,.5);
}

/* Price specs */
.price-specs {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Stock warning */
.stock-warning small {
    display: flex;
    align-items: center;
    gap: 4px;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .6; }
}

/* Btn add to cart success state */
.btn-add-to-cart.btn-success-state {
    background: #28a745 !important;
    border-color: #28a745 !important;
}

/* ── Produk List Grid ── */
.grid-layout-6 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
@media (max-width: 1199px) {
    .grid-layout-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767px) {
    .grid-layout-6 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 400px) {
    .grid-layout-6 { grid-template-columns: 1fr; }
}

/* ── Filter Karat Buttons ── */
.btn-filter-karat {
    background: transparent;
    border: 1px solid #ddd;
    color: #555;
    cursor: pointer;
    font-size: 13px;
    padding: 6px 16px;
    border-radius: 20px !important;
    transition: all .2s;
}
.btn-filter-karat:hover,
.btn-filter-karat.active {
    background: var(--gold-primary) !important;
    border-color: var(--gold-primary) !important;
    color: #fff !important;
}

/* ── Keunggulan Icon Box ── */
.tf-icon-box .icon-box-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--gold-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: var(--gold-dark);
    transition: all .3s;
}
.tf-icon-box:hover .icon-box-icon {
    background: var(--gold-primary);
    color: #fff;
    transform: scale(1.08);
}
.tf-icon-box .title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
}

/* ── Collection Grid ── */
.collection-item-v3 {
    display: block;
    border-radius: var(--radius-card);
    overflow: hidden;
    position: relative;
    box-shadow: var(--card-shadow);
}
.collection-item-v3 .collection-image {
    aspect-ratio: 1/1;
    background: #f5f5f5;
}
.collection-item-v3 .collection-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.collection-item-v3:hover .collection-image img {
    transform: scale(1.06);
}
.collection-item-v3 .collection-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(transparent, rgba(0,0,0,.65));
    color: #fff;
}
.collection-item-v3 .title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}
.collection-item-v3 .count {
    font-size: 11px;
    color: rgba(255,255,255,.75);
    margin: 2px 0 0;
}

/* ── Footer Custom ── */
.footer-logo img {
    max-height: 48px;
    width: auto;
}
.footer .footer-menu_item {
    color: #666;
    font-size: 13px;
    line-height: 1.8;
}
.footer .footer-menu-list a:hover {
    color: var(--gold-primary);
}

/* ── Table responsive fix ── */
.table-responsive {
    border-radius: var(--radius-card);
    overflow: hidden;
}

/* ── bg-f2 override ── */
.bg-f2 {
    background: #f8f8f6 !important;
}

/* ── Flat Title ── */
.flat-title {
    margin-bottom: 32px;
}
.flat-title .title {
    font-size: 28px;
    font-weight: 700;
}
.flat-title .sub-title {
    font-size: 14px;
    color: #888;
    margin-top: 6px;
}

/* ── Mobile responsiveness ── */
@media (max-width: 768px) {
    .bg-dark-gold { padding: 40px 0; }
    .flat-title .title { font-size: 22px; }
    .filter-karat { gap: 6px !important; }
    .btn-filter-karat { font-size: 11px; padding: 4px 10px; }
    .table-harga-emas thead th,
    .table-harga-emas tbody td { padding: 10px 8px; font-size: 12px; }
}

/* ── Empty state ── */
.empty-state {
    padding: 40px 20px;
    color: #999;
}
.empty-state .icon { font-size: 48px; display: block; margin-bottom: 12px; }

/* ── Keunggulan / Icon Box Section Styling ── */
.keunggulan-item {
    background: #ffffff;
    border: 1px solid #ebebeb;
    border-radius: 12px;
    padding: 24px 18px;
    height: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.keunggulan-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(201, 168, 76, 0.15);
    border-color: rgba(201, 168, 76, 0.5);
}
.keunggulan-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #FFF8E7;
    border: 1.5px solid rgba(201, 168, 76, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}
.keunggulan-icon-wrap i {
    font-size: 28px;
    color: var(--gold-primary, #C9A84C);
    line-height: 1;
    transition: all 0.3s ease;
}
.keunggulan-item:hover .keunggulan-icon-wrap {
    background: var(--gold-primary, #C9A84C);
    border-color: var(--gold-primary, #C9A84C);
}
.keunggulan-item:hover .keunggulan-icon-wrap i {
    color: #ffffff;
    transform: scale(1.1);
}
.keunggulan-title {
    font-size: 15px;
    font-weight: 700;
    color: #222222;
    margin-bottom: 8px;
}
.keunggulan-desc {
    font-size: 13px;
    color: #777777;
    line-height: 1.5;
    margin-bottom: 0;
}

@media (max-width: 576px) {
    .keunggulan-item {
        padding: 18px 12px;
    }
    .keunggulan-icon-wrap {
        width: 52px;
        height: 52px;
        margin-bottom: 12px;
    }
    .keunggulan-icon-wrap i {
        font-size: 22px;
    }
    .keunggulan-title {
        font-size: 14px;
        margin-bottom: 6px;
    }
    .keunggulan-desc {
        font-size: 12px;
        line-height: 1.4;
    }
}

/* ── Filter Tabs Produk Rekomendasi ── */
.flat-title-recommend {
    margin-bottom: 24px;
    padding: 0 4px;
}
.flat-title-recommend .title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
    color: #111111;
    display: inline-block;
}

.tab-filter-catalog {
    max-width: 100%;
}

.nav-tab-filter {
    display: inline-flex;
    align-items: center;
    background: #F4F4F6;
    border: 1px solid #E5E5E8;
    border-radius: 50px;
    padding: 4px;
    gap: 4px;
    margin: 0;
    list-style: none;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.nav-tab-filter::-webkit-scrollbar {
    display: none;
}

.nav-tab-filter .nav-tab-item {
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    list-style: none;
}

.nav-tab-filter .nav-tab-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 16px;
    font-size: 13.5px;
    font-weight: 600;
    color: #555555;
    border-radius: 40px;
    text-decoration: none;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.25s ease;
    white-space: nowrap;
    cursor: pointer;
    line-height: 1.2;
}

.nav-tab-filter .nav-tab-value i {
    font-size: 13px;
    line-height: 1;
    transition: all 0.2s ease;
}

.nav-tab-filter .nav-tab-value:hover {
    color: #111111;
    background: rgba(201, 168, 76, 0.12);
}

/* Tab Aktif: Tema Emas Sumberjaya */
.nav-tab-filter .nav-tab-value.active {
    background: var(--gold-primary, #C9A84C);
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(201, 168, 76, 0.35);
    border-color: var(--gold-primary, #C9A84C);
}
.nav-tab-filter .nav-tab-value.active i {
    color: #ffffff !important;
}

/* Link Tab "Lihat Semua" */
.nav-tab-filter .nav-tab-more {
    background: #ffffff;
    color: var(--gold-dark, #8B6914);
    border: 1px solid rgba(201, 168, 76, 0.35);
    font-weight: 600;
}
.nav-tab-filter .nav-tab-more:hover {
    background: var(--gold-primary, #C9A84C);
    color: #ffffff !important;
    border-color: var(--gold-primary, #C9A84C);
}
.nav-tab-filter .nav-tab-more i {
    font-size: 12px;
    transition: transform 0.2s ease;
}
.nav-tab-filter .nav-tab-more:hover i {
    transform: translateX(3px);
    color: #ffffff !important;
}

/* Optimalisasi Tampilan Versi Mobile */
@media (max-width: 576px) {
    .flat-title-recommend {
        margin-bottom: 18px;
    }
    .flat-title-recommend .title {
        font-size: 20px;
    }
    .tab-filter-catalog {
        width: 100%;
    }
    .nav-tab-filter {
        width: 100%;
        display: flex;
        justify-content: space-between;
        padding: 3px;
        gap: 3px;
        border-radius: 30px;
    }
    .nav-tab-filter .nav-tab-item {
        flex: 1 1 0;
        text-align: center;
    }
    .nav-tab-filter .nav-tab-value {
        width: 100%;
        padding: 7px 4px;
        font-size: 11.5px;
        gap: 4px;
        justify-content: center;
        border-radius: 25px;
    }
    .nav-tab-filter .nav-tab-value i {
        font-size: 12px;
    }
}

/* ── Mobile Search Result Cards (skyapi/search & canvasSearch) ── */
.search-card-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}
.search-card-mobile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #ffffff;
    border: 1px solid #ECECEC;
    border-radius: 10px;
    text-decoration: none !important;
    transition: all 0.2s ease-in-out;
    position: relative;
    color: inherit;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.search-card-mobile:hover, .search-card-mobile:active {
    background: #FFFDF8;
    border-color: rgba(201, 168, 76, 0.45);
    box-shadow: 0 4px 14px rgba(201, 168, 76, 0.12);
    transform: translateY(-1px);
    color: inherit;
}
.search-card-thumb {
    position: relative;
    width: 68px;
    height: 68px;
    min-width: 68px;
    border-radius: 8px;
    overflow: hidden;
    background: #F8F8F8;
    border: 1px solid #ECECEC;
}
.search-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.search-card-thumb .badge-karat {
    position: absolute;
    bottom: 3px;
    right: 3px;
    background: rgba(17, 17, 17, 0.85);
    color: #F5E6B8;
    font-size: 9.5px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    line-height: 1.2;
    border: 1px solid rgba(201, 168, 76, 0.4);
}
.search-card-body {
    flex: 1;
    min-width: 0;
}
.search-card-badges {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 3px;
}
.search-card-badges .badge-cat {
    font-size: 10.5px;
    font-weight: 600;
    color: #8B6914;
    background: #FFF8E7;
    padding: 1px 6px;
    border-radius: 4px;
    line-height: 1.2;
}
.search-card-badges .badge-status {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 4px;
    line-height: 1.2;
}
.search-card-badges .status-nw {
    color: #198754;
    background: #E8F5E9;
}
.search-card-badges .status-bl {
    color: #0d6efd;
    background: #E7F1FF;
}
.search-card-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #111111;
    margin: 0 0 3px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.search-card-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--gold-primary, #C9A84C);
    margin-bottom: 4px;
    line-height: 1.2;
}
.search-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.search-card-meta .meta-item {
    font-size: 11px;
    color: #777777;
    background: #F4F4F6;
    padding: 1px 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    line-height: 1.3;
}
.search-card-meta .meta-item i {
    font-size: 10px;
    color: var(--gold-primary, #C9A84C);
}
.search-card-action {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #AAAAAA;
    padding-left: 2px;
}
.search-card-mobile:hover .search-card-action {
    color: var(--gold-primary, #C9A84C);
}


