/* =========================================================
   SILAKOM - PRODUCT / CATEGORY PAGES
   ========================================================= */


/* =========================================================
   1. CATALOG TOOLBAR
   ========================================================= */

.catalog-toolbar {
    padding: 14px;

    background: #ffffff;
    border: 1px solid var(--silakom-border);
    border-radius: 18px;
}

.filter-search {
    position: relative;
}

.filter-search i {
    position: absolute;
    top: 50%;
    left: 14px;

    color: #7d8d87;

    transform: translateY(-50%);
}

.filter-search .form-control {
    padding-left: 40px;
}

.catalog-result-info {
    color: #5e6d68;
    font-size: 0.92rem;
}

.catalog-result-info strong {
    color: var(--silakom-ink);
}


/* =========================================================
   2. PRODUCT CARD
   ========================================================= */

.product-card {
    display: flex;
    flex-direction: column;

    overflow: hidden;

    background: #ffffff;
    border: 1px solid var(--silakom-border);
    border-radius: 20px;

    transition: 0.25s;
}

.product-card:hover {
    transform: translateY(-5px);

    box-shadow: 0 18px 42px rgba(18, 54, 43, 0.09);
}

.product-image-wrap {
    position: relative;

    display: block;
    overflow: hidden;

    aspect-ratio: 4 / 3;

    background: #eef4f1;
}

.product-image {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: 0.35s;
}

.product-card:hover .product-image {
    transform: scale(1.035);
}


/* =========================================================
   3. PRODUCT BADGES
   ========================================================= */

.product-category,
.sale-type {
    position: absolute;
    top: 12px;

    padding: 6px 9px;

    font-size: 0.66rem;
    font-weight: 800;

    border-radius: 999px;
}

.product-category {
    left: 12px;

    color: #26433a;
    background: rgba(255, 255, 255, 0.93);
}

.sale-type {
    right: 12px;

    color: #087144;
    background: #dff3e8;
}

.sale-type.preorder {
    color: #8b6000;
    background: #fff2cf;
}


/* =========================================================
   4. PRODUCT BODY
   ========================================================= */

.product-body {
    display: flex;
    flex: 1;
    flex-direction: column;

    padding: 17px;
}

.researcher {
    color: #75847f;
    font-size: 0.72rem;
}

.product-body h3 {
    margin: 0.55rem 0;

    font-size: 1.05rem;
    line-height: 1.35;
}

.product-body h3 a {
    color: var(--silakom-ink);
}

.product-body p {
    display: -webkit-box;
    overflow: hidden;

    color: #687873;
    font-size: 0.82rem;
    line-height: 1.55;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.product-footer {
    display: flex;
    align-items: end;
    justify-content: space-between;

    margin-top: auto;
}

.product-footer small {
    display: block;

    color: #8a9893;
    font-size: 0.68rem;
}

.round-arrow {
    display: grid;
    place-items: center;

    width: 36px;
    height: 36px;

    background: var(--silakom-soft);
    border-radius: 50%;
}


/* =========================================================
   5. PAGINATION
   ========================================================= */

.catalog-pagination-wrap {
    display: flex;
    justify-content: center;

    margin-top: 2.75rem;
}

.catalog-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.catalog-pagination .page-item {
    margin: 0;
}

.catalog-pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;

    min-width: 42px;
    height: 42px;
    padding: 0.5rem 0.8rem;

    color: #42514c;
    font-size: 0.88rem;
    font-weight: 650;

    background: #ffffff;
    border: 1px solid var(--silakom-border);
    border-radius: 12px !important;

    box-shadow: none;

    transition: 0.18s ease;
}

.catalog-pagination .page-link:hover {
    color: var(--silakom-primary);

    background: var(--silakom-soft);
    border-color: #bad2c8;
}

.catalog-pagination .page-item.active .page-link {
    color: #ffffff;

    background: var(--silakom-primary);
    border-color: var(--silakom-primary);

    box-shadow: 0 8px 20px rgba(10, 107, 79, 0.18);
}

.catalog-pagination .page-item.disabled .page-link {
    color: #a7b2ae;

    background: #f8faf9;
    border-color: #edf1ef;

    opacity: 0.8;
}

.catalog-pagination .pagination-nav {
    padding-right: 1rem;
    padding-left: 1rem;
}

.catalog-pagination .pagination-ellipsis .page-link {
    min-width: 32px;
    padding-right: 0.35rem;
    padding-left: 0.35rem;

    background: transparent;
    border-color: transparent;
}


/* =========================================================
   6. CATEGORY LARGE CARD
   ========================================================= */

.category-large-card {
    display: flex;
    gap: 20px;

    height: 100%;
    padding: 26px;

    color: var(--silakom-ink);

    border: 1px solid var(--silakom-border);
    border-radius: 24px;

    transition: 0.2s;
}

.category-large-card:hover {
    transform: translateY(-3px);

    box-shadow: 0 18px 38px rgba(14, 58, 45, 0.08);
}

.category-icon.lg {
    flex: 0 0 auto;

    width: 64px;
    height: 64px;

    font-size: 1.8rem;
}

.category-large-card span {
    color: var(--silakom-muted);
    font-size: 0.75rem;
}

.category-large-card h2 {
    margin: 0.25rem 0;

    font-size: 1.4rem;
}

.category-large-card p {
    color: var(--silakom-muted);
    font-size: 0.9rem;
}


/* =========================================================
   7. PRODUCT DETAIL
   ========================================================= */

.product-detail-section {
    background: #fbfdfc;
}

.breadcrumb-custom {
    display: flex;
    gap: 9px;

    overflow: hidden;

    color: #84938e;

    white-space: nowrap;
}

.breadcrumb-custom span:last-child {
    overflow: hidden;

    text-overflow: ellipsis;
}

.detail-image-card {
    position: relative;

    overflow: hidden;

    background: #eef4f1;
    border: 1px solid var(--silakom-border);
    border-radius: 26px;
}

.detail-image-card img {
    width: 100%;

    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.sale-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 7px 11px;

    color: #087144;
    font-size: 0.75rem;
    font-weight: 800;

    background: #e0f3e8;
    border-radius: 999px;
}

.sale-pill.preorder {
    color: #8b6000;
    background: #fff2cf;
}

.product-detail-title {
    margin: 1rem 0;

    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 780;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.researcher-box {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 14px 0;
}

.researcher-box .avatar {
    display: grid;
    place-items: center;

    width: 48px;
    height: 48px;

    color: var(--silakom-primary);
    font-size: 1.2rem;

    background: var(--silakom-soft);
    border-radius: 50%;
}

.researcher-box small,
.researcher-box span {
    display: block;

    color: var(--silakom-muted);
    font-size: 0.76rem;
}

.researcher-box strong {
    display: block;
}

.price-box {
    margin-top: 8px;
    padding: 18px;

    background: #ffffff;
    border: 1px solid var(--silakom-border);
    border-radius: 18px;
}

.price-box small,
.price-box span {
    display: block;

    color: var(--silakom-muted);
    font-size: 0.75rem;
}

.price-box strong {
    display: block;

    color: var(--silakom-primary);
    font-size: 1.7rem;
}

.qty-input {
    max-width: 82px;
}

.content-card {
    height: 100%;
    padding: 26px;

    background: #ffffff;
    border: 1px solid var(--silakom-border);
    border-radius: 22px;
}

.content-card h2 {
    font-size: 1.3rem;
}

.content-card h3 {
    margin-top: 1.6rem;

    font-size: 1.05rem;
}

.content-card p {
    color: #61716c;
    line-height: 1.75;
}

.product-meta > div {
    padding: 10px 0;

    border-bottom: 1px solid #edf1ef;
}

.product-meta dt {
    color: #83918c;
    font-size: 0.72rem;
}

.product-meta dd {
    margin: 2px 0 0;

    font-weight: 650;
}

.product-meta > div:last-child {
    border-bottom: 0;
}


/* =========================================================
   8. RESPONSIVE
   ========================================================= */

@media (max-width: 575.98px) {

    .category-large-card {
        flex-direction: column;

        padding: 20px;
    }

    .product-detail-title {
        font-size: 2.1rem;
    }

    .catalog-pagination-wrap {
        margin-top: 2.2rem;
    }

    .catalog-pagination {
        gap: 0.3rem;
    }

    .catalog-pagination .page-link {
        min-width: 38px;
        height: 38px;
        padding: 0.4rem 0.65rem;

        font-size: 0.82rem;
        border-radius: 10px !important;
    }

    .catalog-pagination .pagination-nav {
        padding-right: 0.7rem;
        padding-left: 0.7rem;
    }
}

/* =========================================================
   PRODUCT DETAIL - MARKETPLACE REVISION
   ========================================================= */

.product-card-category {
    margin-bottom: 8px;
    color: var(--silakom-primary);
    font-size: .72rem;
    font-weight: 700;
}

.product-owner-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    color: #39564d;
    font-size: .75rem;
    font-weight: 700;
    background: #f2f6f4;
    border: 1px solid var(--silakom-border);
    border-radius: 999px;
}

.product-secondary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.product-description-full {
    width: 100%;
}

.product-description-text {
    color: #3e4e49;
    line-height: 1.8;
}


/* =========================================================
   PATCH 07 | Detail produk: tipografi & tombol satu baris
   Perbaikan dari PATCH 06 (tanpa mengubah HTML atau fungsinya).
   ========================================================= */
.product-detail-title {
    margin: .75rem 0 .8rem;
    max-width: none;
    font-size: clamp(1.7rem, 2.3vw, 2.25rem);
    font-weight: 745;
    line-height: 1.18;
    letter-spacing: -.025em;
    overflow-wrap: break-word;
}

.product-detail-section .lead.text-secondary {
    max-width: 34rem;
    color: #60716b !important;
    font-size: 1rem;
    line-height: 1.55;
}

/* 3 kontrol: jumlah | keranjang | bagikan. Tidak boleh saling memaksa
   tombol dua baris pada kolom produk desktop. */
.product-action-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 134px;
    align-items: stretch;
    gap: 9px;
    margin-top: 1.3rem;
}

.product-cart-form {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: stretch;
    gap: 9px;
    min-width: 0;
    margin: 0;
}

.product-action-bar .qty-input {
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: 50px;
    padding: .45rem .25rem;
    text-align: center;
    font-size: .92rem;
    font-weight: 650;
    border-radius: 12px;
}

.product-action-bar .product-cart-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 50px;
    width: 100%;
    padding: .55rem .5rem;
    font-size: .84rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    border-radius: 12px;
    box-shadow: 0 9px 18px rgba(10, 107, 79, .1);
}

.product-action-bar .product-cart-button .bi {
    flex-shrink: 0;
}

.product-action-bar .product-secondary-actions {
    display: block;
    width: 100%;
    min-width: 0;
}

.product-action-bar .product-share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 50px;
    padding: .55rem .45rem;
    font-size: .765rem;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
    color: #36524a;
    background: #ffffff;
    border: 1px solid var(--silakom-border);
    border-radius: 12px;
}

body .product-detail-section .product-action-bar .product-share-button:hover,
body .product-detail-section .product-action-bar .product-share-button:focus,
body .product-detail-section .product-action-bar .product-share-button:active,
body .product-detail-section .product-action-bar .product-share-button:focus-visible {
    color: var(--silakom-primary);
    background: #f5faf7;
    border-color: #bfd5cb;
}

.product-share-menu {
    min-width: 220px;
    padding: .5rem;
    border: 1px solid rgba(18, 54, 43, .08) !important;
    border-radius: 14px;
    box-shadow: 0 18px 38px rgba(14, 58, 45, .12) !important;
}
body .product-detail-section .product-share-menu .dropdown-item {
    padding: .68rem .78rem;
    border-radius: 10px;
    font-weight: 550;
}
body .product-detail-section .product-share-menu .dropdown-item:hover,
body .product-detail-section .product-share-menu .dropdown-item:focus,
body .product-detail-section .product-share-menu .dropdown-item:active {
    color: var(--silakom-primary);
    background: #f1f7f4;
}

/* Saat layout detail menjadi satu kolom, tetap sebaris selama cukup ruang.
   Khusus HP sempit, dua tombol dipisah agar tidak saling menekan. */
@media (max-width: 575.98px) {
    .product-detail-title {
        font-size: clamp(1.55rem, 6.2vw, 1.9rem);
    }
    .product-action-bar {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }
    .product-cart-form {
        grid-template-columns: 66px minmax(0, 1fr);
        gap: 9px;
    }
    .product-action-bar .product-share-button {
        width: 100%;
    }
}


/* =========================================================
   PATCH 29 | Detail produk profesional
   Remake area pembelian dan header deskripsi produk.
   ========================================================= */
.product-purchase-panel {
    margin-top: 1.45rem;
    padding: 18px;
    background: #ffffff;
    border: 1px solid var(--silakom-border);
    border-radius: 24px;
    box-shadow: 0 18px 38px rgba(18, 54, 43, 0.06);
}

.detail-price-box {
    margin-top: 0;
    padding: 18px 20px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdfc 100%);
    border: 1px solid #e3ebe7;
    border-radius: 18px;
}

.detail-price-box small {
    margin-bottom: 6px;
    color: #6a7a74;
    font-size: .73rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.detail-price-box strong {
    font-size: clamp(1.85rem, 2vw, 2.2rem);
    line-height: 1.05;
}

.product-action-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 12px;
    margin-top: 14px;
    align-items: stretch;
}

.product-cart-form {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
    min-width: 0;
    margin: 0;
}

.quantity-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 10px 14px;
    background: #f8fbfa;
    border: 1px solid var(--silakom-border);
    border-radius: 18px;
}

.quantity-label {
    color: #6b7a74;
    font-size: .69rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.product-action-bar .qty-input {
    width: 100%;
    min-height: auto;
    padding: 0;
    color: var(--silakom-ink);
    font-size: 1.15rem;
    font-weight: 760;
    text-align: left;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none !important;
}

.product-action-bar .qty-input:focus {
    background: transparent;
}

.product-action-bar .product-cart-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 72px;
    width: 100%;
    padding: 14px 18px;
    font-size: .98rem;
    font-weight: 760;
    line-height: 1.2;
    white-space: nowrap;
    border-radius: 18px;
    box-shadow: 0 14px 24px rgba(var(--theme-ring-rgb), .18);
}

.product-action-bar .product-cart-button .bi,
.product-share-button-copy .bi {
    flex: 0 0 auto;
    font-size: 1.05rem;
}

.product-action-bar .product-secondary-actions {
    display: flex;
    width: 100%;
    min-width: 0;
}

.product-action-bar .product-secondary-actions .dropdown,
.product-action-bar .product-secondary-actions .product-share-button {
    width: 100%;
}

.product-action-bar .product-share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 72px;
    padding: 14px 16px;
    font-size: .92rem;
    font-weight: 700;
    line-height: 1.2;
    color: #2f3f3a;
    background: #ffffff;
    border: 1px solid #d7e1dc;
    border-radius: 18px;
    box-shadow: none;
}

.product-action-bar .product-share-button::after {
    margin-left: 12px;
}

.product-share-button-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

body .product-detail-section .product-action-bar .product-share-button:hover,
body .product-detail-section .product-action-bar .product-share-button:focus,
body .product-detail-section .product-action-bar .product-share-button:active,
body .product-detail-section .product-action-bar .product-share-button:focus-visible {
    color: #26342f;
    background: #f5faf8;
    border-color: #c6d4cd;
}

.product-share-menu {
    min-width: 220px;
    padding: .55rem;
    border: 1px solid rgba(18, 54, 43, .08) !important;
    border-radius: 16px;
    box-shadow: 0 18px 38px rgba(14, 58, 45, .12) !important;
}

body .product-detail-section .product-share-menu .dropdown-item {
    padding: .72rem .82rem;
    border-radius: 12px;
    font-weight: 600;
}

.purchase-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    color: #687872 !important;
}

.purchase-note .bi {
    color: var(--silakom-primary);
}

.product-section-card {
    overflow: hidden;
    padding: 0;
}

.product-section-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(var(--theme-ring-rgb), .12) 0%, rgba(var(--theme-ring-rgb), .04) 100%);
    border-bottom: 1px solid #e1e9e5;
}

.product-section-kicker {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    margin-bottom: 10px;
    color: var(--silakom-primary);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, .88);
    border-radius: 999px;
}

.product-section-header h2 {
    margin: 0;
    color: #1f2d28;
    font-size: clamp(1.28rem, 2vw, 1.5rem);
    font-weight: 760;
}

.product-section-header p {
    margin: 8px 0 0;
    max-width: 760px;
    color: #5f6f69;
    font-size: .92rem;
    line-height: 1.7;
}

.product-description-text {
    padding: 24px;
}

@media (max-width: 991.98px) {
    .product-action-bar {
        grid-template-columns: minmax(0, 1fr);
    }

    .product-action-bar .product-secondary-actions {
        display: block;
    }
}

@media (max-width: 575.98px) {
    .product-purchase-panel {
        padding: 14px;
        border-radius: 20px;
    }

    .detail-price-box {
        padding: 16px;
    }

    .product-cart-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .quantity-panel,
    .product-action-bar .product-cart-button,
    .product-action-bar .product-share-button {
        min-height: 60px;
    }

    .product-action-bar .product-cart-button,
    .product-action-bar .product-share-button {
        border-radius: 16px;
    }

    .product-section-header {
        padding: 18px 18px 16px;
    }

    .product-description-text {
        padding: 18px;
    }
}


/* =========================================================
   PATCH 30 | Rapatkan action detail agar CTA tidak terpotong
   Basis: PATCH 29, tidak mengubah perilaku form atau dropdown.
   ========================================================= */
.product-detail-section .product-action-bar {
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 10px;
}

.product-detail-section .product-cart-form {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 10px;
}

.product-detail-section .product-action-bar .product-cart-button {
    gap: 7px;
    padding: 12px 10px;
    font-size: .86rem;
    white-space: normal;
    text-align: center;
}

.product-detail-section .product-action-bar .product-cart-button span {
    min-width: 0;
    overflow-wrap: break-word;
}

.product-detail-section .product-action-bar .product-share-button {
    gap: 0;
    padding: 12px 7px;
    font-size: .84rem;
    white-space: nowrap;
}

.product-detail-section .product-share-button-copy {
    gap: 6px;
}

.product-detail-section .product-share-button::after {
    margin-left: 6px;
}

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

/* Satu kolom saat detail beralih ke layout tablet. */
@media (max-width: 991.98px) {
    .product-detail-section .product-action-bar {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Pada layar HP kecil tombol tetap punya ruang yang aman. */
@media (max-width: 575.98px) {
    .product-detail-section .product-cart-form {
        grid-template-columns: minmax(0, 1fr);
    }
    .product-detail-section .product-action-bar .product-cart-button,
    .product-detail-section .product-action-bar .product-share-button {
        min-height: 56px;
    }
}
