
/* ==========================================================================
   MIXBILL / MIXTOKO - MODERN DIGITAL MARKETPLACE THEME
   Tailored for Digital Products, Scripts, Source Code, Top-Up & Memberships
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #2563eb;         /* Royal Blue */
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --secondary: #0f172a;       /* Slate 900 */
    --accent: #10b981;          /* Emerald Green */
    --accent-light: #ecfdf5;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 14px -2px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 10px 25px -4px rgba(15, 23, 42, 0.1);
}

/* Base Reset */
* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    margin: 0 auto;
    padding: 0;
    max-width: 860px;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover {
    color: var(--primary-hover);
}

img {
    max-width: 100%;
    vertical-align: middle;
}

input, textarea, select, button {
    font-family: inherit;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

input[type="text"], input[type="password"], input[type="email"], input[type="number"], textarea, select {
    background: #fff;
    border: 1px solid var(--border);
    padding: 8px 12px;
    color: var(--text-main);
    width: 100%;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type="text"]:focus, input[type="password"]:focus, textarea:focus, select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

input[type="submit"], button, .button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 8px 16px;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}
input[type="submit"]:hover, button:hover, .button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   HEADER MODERN
   ========================================================================== */
.new-header {
    background: #ffffff;
    color: var(--text-main);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.new-header a {
    color: var(--text-main);
}
.header-logo {
    font-size: 1.35em;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--primary) !important;
    display: flex;
    align-items: center;
    gap: 8px;
}
.header-icons {
    display: flex;
    align-items: center;
    gap: 16px;
}
.icon-button {
    position: relative !important; /* WAJIB relative agar badge menempel tepat di pojok ikon */
    color: var(--secondary) !important;
    background: #f1f5f9;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    font-size: 16px;
    transition: all 0.2s ease;
    text-decoration: none;
    box-sizing: border-box;
}
.icon-button:hover {
    background: #e2e8f0;
    color: var(--primary) !important;
}
.icon-badge {
    position: absolute !important;
    top: -4px !important;
    right: -4px !important;
    background-color: var(--danger);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    height: 18px;
    min-width: 18px;
    padding: 0 4px;
    line-height: 16px;
    border-radius: 9999px;
    border: 2px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    z-index: 10;
    pointer-events: none;
}

/* ==========================================================================
   CARDS & SECTIONS (Replacing old .tmenu & .menu)
   ========================================================================== */
.mainpage {
    padding: 12px;
}

/* Section Title */
.tmenu, .tnews {
    background: transparent;
    padding: 14px 4px 8px 4px;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: none;
    margin: 10px 0 4px 0;
}
.tmenu b, .tnews b {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

/* Content Card */
.menu, .container, .list, .news {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin: 8px 0;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.menu:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

/* ==========================================================================
   PRODUCT GRID (2-KOLOM SEJAJAR KIRI-KANAN RAPI DI HP)
   ========================================================================== */
.product-grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr) !important; /* 2 Kolom Kiri Kanan Sejajar Rapi */
    gap: 10px !important;
    padding: 6px 0 16px 0;
}
@media (min-width: 768px) {
    .product-grid-container {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 14px !important;
    }
}

.product-grid-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}
.product-grid-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #cbd5e1;
}

.product-grid-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    max-height: 120px;
    object-fit: cover;
    background: #f1f5f9;
    border-bottom: 1px solid var(--border);
    display: block;
}

.product-grid-info {
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-grid-title {
    font-weight: 700;
    font-size: 12px;
    color: var(--text-main);
    line-height: 1.35;
    height: 2.7em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 4px;
}

.product-grid-price {
    margin-top: auto;
    font-size: 13px;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
}
.product-grid-price .sale-price {
    color: var(--danger);
    font-weight: 800;
    font-size: 13px;
}
.product-grid-price .original-price-striked {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 400;
    text-decoration: line-through;
}

.product-grid-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #f1f5f9;
}

.mem-badge-grid {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 4px;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.star-rating {
    color: #fbbf24;
    font-size: 10px;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   BANNER SLIDER (PROPORTIONAL & COMPACT UNTUK HP)
   ========================================================================== */
.banner-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin: 6px 0 12px 0;
    background: #0f172a;
    aspect-ratio: 2.5 / 1;
    max-height: 155px; /* Proporsional, tidak terlalu besar di layar mobile */
}
.banner-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}
.banner-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    min-width: 100%;
    box-sizing: border-box;
}
.banner-slide a {
    display: block;
    width: 100%;
    height: 100%;
}
.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ==========================================================================
   FLASH SALE / DEAL SECTION - HORIZONTAL ELONGATED CARDS (SEPERTI AWAL)
   ========================================================================== */
.flash-sale-wrapper {
    margin: 12px 0 16px 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.06);
    border: 1px solid #fee2e2;
    background: #ffffff;
}

.flash-sale-header {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    padding: 9px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flash-header-left {
    display: flex;
    align-items: center;
    gap: 7px;
}
.flash-icon-box {
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #fef08a;
}

.flash-title {
    font-size: 13.5px;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: #ffffff;
}

.flash-sale-container {
    display: flex;
    gap: 10px;
    padding: 12px;
    background: #fffafa;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.flash-sale-container::-webkit-scrollbar {
    display: none;
}

/* Horizontal elongated card */
.flash-sale-item {
    flex: 0 0 220px;
    max-width: 220px;
    background: #ffffff;
    border: 1px solid #fee2e2;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
    scroll-snap-align: start;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    padding: 10px 10px 8px 10px;
    box-sizing: border-box;
}
.flash-sale-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.1);
    border-color: #fca5a5;
}

.flash-sale-item a {
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.flash-sale-item-content {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}
.flash-sale-item-content img {
    width: 58px;
    height: 58px;
    border-radius: 6px;
    object-fit: cover;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    flex-shrink: 0;
}

.flash-sale-info {
    flex: 1;
    min-width: 0;
}
.flash-sale-info b.product-title {
    font-size: 11.5px;
    font-weight: 700;
    color: #0f172a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
    margin-bottom: 4px;
}
.flash-sale-info .original-price {
    font-size: 10px;
    color: #94a3b8;
    text-decoration: line-through;
    display: inline-block;
    margin-right: 4px;
}
.flash-sale-info .sale-price {
    font-size: 12.5px;
    font-weight: 800;
    color: #dc2626;
    display: inline-block;
}

.flash-sale-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 6px;
    border-top: 1px dashed #f1f5f9;
    gap: 6px;
}
.discount-pill {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
    font-size: 9.5px;
    font-weight: 800;
    padding: 2.5px 6px;
    border-radius: 5px;
    display: inline-block;
    line-height: 1.2;
}
.flash-sale-footer .timer-badge {
    background: #dc2626;
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 9.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.2;
}
.flash-sale-footer .timer-badge i {
    font-size: 9px;
}

/* ==========================================================================
   BOTTOM APP BAR / NAVIGATION
   ========================================================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 860px !important;
    height: 60px;
    background: #ffffff;
    border-top: 1px solid var(--border);
    display: flex !important;
    justify-content: space-around !important;
    align-items: center !important;
    z-index: 99999 !important;
    box-sizing: border-box !important;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
}
.bottom-nav-spacer {
    height: 70px;
}
.nav-item {
    color: #94a3b8 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    transition: color 0.15s ease;
}
.nav-item:hover, .nav-item.active {
    color: var(--primary) !important;
}
.nav-item i {
    font-size: 19px;
    margin-bottom: 2px;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.paging, .pagelink {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 16px 0;
    background: transparent;
    border: none;
}
.paging a, .pagelink a, .pagelink b {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-main);
}
.pagelink b {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.paging a:hover, .pagelink a:hover {
    background: #f1f5f9;
    border-color: var(--border-hover);
}

/* ==========================================================================
   FOOTER COPYRIGHT
   ========================================================================== */
.new-footer {
    background: #0f172a;
    color: #94a3b8;
    text-align: center;
    padding: 24px 16px;
    font-size: 12px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    margin-top: 24px;
}
.new-footer a {
    color: #cbd5e1;
}

.slider-dots-container {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}
.slider-dot {
    width: 7px;
    height: 7px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: all 0.25s ease;
}
.slider-dot.active {
    width: 20px;
    background: #ffffff;
}
