/* ===========================================
   GLOBAL TYPOGRAPHY & CONTAINER
=========================================== */
html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Roboto", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    color: #222;
    letter-spacing: 0;
    margin: 0;
    padding: 0;
}
.sp-container {
    max-width: 420px;
    margin: 0 auto;
    background: #f8f8f8;
    position: relative;
    padding-bottom: 64px; /* for bottom bar */
}

/* ===========================================
   HEADER FIXED
=========================================== */
.sp-header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 420px;
    max-width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    transition: all 0.25s ease;
    opacity: 0;
	height: 65px;
    padding: 0 10px;
    background: transparent;
    gap: 8px;
}
.sp-header-search form {
    width: 100%;
}

.sp-search-input {
    width: 100%;
    height: 34px;
    background: #f3f3f3;
    border-radius: 18px;
    border: none;
    padding: 0 14px;
    font-size: 13px;
    outline: none;
}

.sp-header.visible {
    opacity: 1;
    background: #ffffff !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.sp-header-icons {
    display: flex;
    gap: 10px;
    align-items: center;
}
.sp-btn-back{
    font-size: 22px;
    margin-right: 6px;
    cursor: pointer;
	background:#ffffff;
	border:none;
	color:#EE4D2D;
}
.sp-icon {
    color:#EE4D2D;
}
.sp-cart-icon {
    position: relative;
    display: inline-block;
}

.sp-cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    border-radius: 999px;
    background: #ff5722;
    color: #fff;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
}
.sp-cart-badge.hidden {
    display: none;
}
.sp-icon-cart {
    position: relative;
}


/* ===========================================
   GALLERY SLIDER
=========================================== */
.sp-gallery-slider {
    width: 100%;
    position: relative;
    overflow: hidden;
}
.sp-slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
}
.sp-slide {
    width: 100%;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.sp-slide-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sp-slide::before {
    content: "";
    display: block;
    padding-bottom: 100%; /* 1:1 ratio */
}
.sp-slide-counter {
    position: absolute;
    bottom: 8px;
    right: 12px;
    background: rgba(0,0,0,0.4);
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 12px;
    z-index: 10;
}

/* ===========================================
   PRICE BOX
=========================================== */
.sp-page-content {
    padding-top: 10px;
}
.sp-price-box {
    padding: 16px;
    background: #fff;
    margin-bottom: 8px;
}
.sp-price-main {
    font-size: 22px;
    font-weight: 600;
    color: #D32F2F;
}
.sp-price-sub {
    font-size: 14px;
    color: #666;
    margin-top: 4px;
}
.sp-price-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
.sp-price-meta .sold-count {
    font-size: 12px;
    color: #888;
}

/* ===========================================
   TITLE
=========================================== */
.sp-title-box {
    padding: 0 16px 12px;
}
.sp-title {
    font-size: 16px;
    font-weight: 500;
    color: #222;
    margin: 0;
}

/* ===========================================
   VARIATION SUMMARY
=========================================== */
.sp-var-summary {
    background: #fff;
    padding: 16px;
    margin-top: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.sp-var-title {
    font-size: 14px;
    font-weight: 500;
    color: #222;
}
.sp-var-desc {
    font-size: 12px;
    color: #888;
}

/* ===========================================
   SHIPPING INFO
=========================================== */
.sp-shipping {
    background: #fff;
    padding: 16px;
    margin-top: 8px;
}
.sp-ship-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 6px;
}
.sp-ship-val {
    color: #222;
}
.sp-ship-sub {
    font-size: 12px;
    color: #666;
    display: flex;
    gap: 8px;
    margin-top: 4px;
}
.sp-free-ongkir, .sp-cod {
    color: #0f9d58;
}

/* ===========================================
   SECTION (SPEC / DESCRIPTION / REVIEW)
=========================================== */
.sp-section {
    background: #fff;
    margin-top: 8px;
    padding: 16px;
}
.sp-section-deskripsi{
    background: #fff;
    margin-top: 8px;
	margin-bottom:50px;
    padding: 16px;
}
.sp-sec-header {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    margin-bottom: 12px;
}
.sp-sec-body {
    font-size: 14px;
    color: #444;
}
.sp-desc-wrapper {
    position: relative;
    overflow: hidden;
}
.sp-desc-content {
    max-height: 90px;
    overflow: hidden;
    transition: max-height 0.3s ease;
    line-height: 20px;
}
.sp-desc-wrapper.expanded .sp-desc-content {
    max-height: 2000px;
}
.sp-desc-toggle {
    margin-top: 12px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #FF5722;
    cursor: pointer;
}
.sp-desc-toggle::before {
    content: "";
    display: block;
    width: 100%;
    height: 1px;
    background: #eee;
    margin-bottom: 10px;
}
.sp-desc-wrapper:not(.expanded)::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 48px;
    height: 50px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), #fff);
    pointer-events: none;
}

/* ===========================================
   BOTTOM BAR
=========================================== */
.sp-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 420px;
    max-width: 100%;
    height: 50px;
    display: flex;
    z-index: 99999;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.15);
}
.sp-bottom-left-product {
    width: 45%;
    background: #13AE87;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
	
}
.sp-bottom-icon {
    width: 50%;
    text-align: center;
    cursor: pointer;
}
.sp-bottom-icon svg {
    margin-top: 4px;
}
.sp-bottom-icon-label {
    margin-top: 2px;
    font-size: 11px;
    color: #fff;
}
.sp-btm-separator {
    width: 1px;
    height: 50%;
    background: rgba(255,255,255,0.4);
}
.sp-bottom-right {
    width: 55%;
    background: #FF5722;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 0 4px;
}
.sp-bottom-buy-title {
    font-size: 14px;
}
.sp-bottom-buy-price {
    font-size: 17px;
    font-weight: 600;
    margin-top: 2px;
}
.sp-bottom-icon:active,
.sp-bottom-right:active {
    opacity: 0.7;
}

/* ===========================================
   POPUP VARIAN SHOPEE
=========================================== */
.sp-variant-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0);
    backdrop-filter: blur(0);
    transition: background .35s ease, backdrop-filter .35s ease;
    z-index: 99998;
    pointer-events: none;
}
.sp-variant-overlay.show {
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(3px);
    pointer-events: auto;
}
.sp-variant-popup {
    position: fixed;
    bottom: -100%;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    width: 430px;
    max-width: 100%;
    max-height: 80%;
    background: #fff;
    border-radius: 16px 16px 0 0;
    z-index: 99999;
    transition: transform .38s cubic-bezier(0.18,0.89,0.32,1.28), bottom .38s ease;
    overflow-y: auto;
}
.sp-variant-popup.show {
    bottom: 0;
    transform: translateX(-50%) translateY(-4px);
}
.sp-variant-header {
    display: flex;
    justify-content: space-between;
    padding: 14px;
    border-bottom: 1px solid #eee;
}
.sp-variant-title {
    font-size: 16px;
    font-weight: 600;
}
.sp-variant-close {
    font-size: 20px;
    cursor: pointer;
}
.sp-variant-body {
    padding: 0 16px 16px;
}
.sp-variant-img img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
}
.sp-variant-price-container {
    margin-top: 12px;
}
.sp-variant-price {
    font-size: 18px;
    font-weight: 600;
    color: #D32F2F;
}
.sp-variant-stock {
    font-size: 12px;
    color: #0f9d58;
    margin-top: 4px;
}
.sp-var-group {
    margin-top: 16px;
}
.sp-var-group-title {
    font-size: 14px;
    font-weight: 500;
    color: #222;
    margin-bottom: 8px;
}
.sp-var-group-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.sp-var-item {
    padding: 8px 12px;
    font-size: 14px;
    color: #444;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
}
.sp-var-item.active {
    border-color: #FF5722;
    color: #FF5722;
}
.sp-var-item.disabled {
    opacity: 0.4;
    pointer-events: none;
}
.sp-var-qty-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}
.sp-var-qty-label {
    font-size: 14px;
    color: #444;
}
.sp-var-qty-box {
    display: flex;
    align-items: center;
    gap: 8px;
}
.sp-qty-btn {
    width: 32px;
    height: 32px;
    font-size: 20px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
}
.sp-qty-btn:hover {
    background: #f5f5f5;
}
#spQtyInput {
    width: 48px;
    text-align: center;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 4px;
}
.sp-variant-footer {
    display: flex;
    gap: 8px;
    padding: 16px;
    border-top: 1px solid #eee;
}
.sp-btn-add-cart, .sp-btn-buy-now {
    flex: 1;
    font-size: 14px;
    padding: 12px 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.sp-btn-add-cart {
    background: #FF5722;
    color: #fff;
}
.sp-btn-buy-now {
    background: #FF5722;
    color: #fff;
}
.sp-btn-add-cart:active, .sp-btn-buy-now:active {
    opacity: 0.8;
}
/* SEARCH BAR DALAM HEADER */
.sp-header-search {
    flex: 1;
    margin: 0 8px;
    display: flex;
    align-items: center;
}

.sp-header-search input {
    width: 100%;
  
    border-radius: 20px;
 
    padding: 0 14px;
    
    color: #333;
    font-size: 13px;
    outline: none;
    box-shadow: 0 0 0 rgba(0,0,0,0);
	
	
    height: 34px;
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    border: 1px solid #eee;
    padding: 0 14px;
    
}
/* HEADER TRANSPARENT AWAL */
.sp-header {
    background: rgba(255,255,255,0);
}

/* HEADER SAAT SCROLL (Shopee Style) */
.sp-header.visible {
    background: #ffffff;
    box-shadow: 0 1px 6px rgba(0,0,0,0.12);
}


/* =======================
   SHOPEE TOAST NOTIFY
======================= */
.sp-toast {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -30%) scale(0.7);
    background: rgba(0,0,0,0.85);
    padding: 16px 26px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 15px;
    opacity: 0;
    z-index: 9999999;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
}

.sp-toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.sp-toast-icon svg {
    display: block;
}
/* Badge Bounce Animation */
@keyframes spBadgeBounce {
    0%   { transform: translateY(0) scale(1); }
    30%  { transform: translateY(-8px) scale(1.1); }
    60%  { transform: translateY(0) scale(1); }
    100% { transform: translateY(0); }
}

.sp-cart-badge.bump {
    animation: spBadgeBounce 0.35s ease;
}
#spSliderTrack {
    will-change: transform;
    touch-action: pan-y;
}
.sp-slide {
    -webkit-user-drag: none;
    user-select: none;
}

