/* ==========================================
   LAYOUT UTAMA & BODY
   ========================================== */
body.page-body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #f4f4f5; /* Sedikit lebih abu agar card putih kontras */
    color: #1e293b;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px;
}

/* ==========================================
   HERO BANNER TOKO (Responsive Optimized)
   ========================================== */
.hero-banner {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.hero-icon {
    font-size: 36px;
    background: #f1f5f9;
    padding: 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.hero-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 13px;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 8px;
    transition: color 0.2s;
}

.hero-back-link:hover {
    color: #4f46e5;
}

.hero-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0fdf4;
    color: #16a34a;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
}

.hero-status-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
}

.hero-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin: 4px 0;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    color: #64748b;
    font-size: 13px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-location {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
}

.hero-location-icon {
    font-size: 20px;
}

.hero-location-label {
    font-size: 10px;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
}

.hero-location-value {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin: 2px 0 0 0;
}

/* ==========================================
   MAIN LAYOUT GRID (SIDEBAR & CONTENT)
   ========================================== */
.main-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* KOMPONEN KARTU (CARD) */
.card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.card-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 12px 0;
}

/* FORM INPUT UMUM */
.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* TOMBOL UTUM */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary { background: #0f172a; color: white; }
.btn-primary:hover { background: #1e293b; }
.btn-secondary { background: #f1f5f9; color: #475569; }
.btn-secondary:hover { background: #e2e8f0; }

.tracking-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* RESOLUTION HUB STYLE */
.section-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #1e293b;
}

.resolution-search { margin-bottom: 12px; }
.resolution-input-group { display: flex; gap: 6px; }
.resolution-input-wrap { position: relative; flex: 1; }
.resolution-prefix {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-weight: 600;
}
.resolution-input { padding-left: 28px; }
.copy-button { width: 42px; padding: 0; }
.copy-toast {
    font-size: 11px;
    color: #10b981;
    margin: 4px 0 0 2px;
    font-weight: 500;
}
.resolution-actions { display: flex; flex-direction: column; gap: 8px; }
.resolution-action {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.resolution-cancel { background: #fef2f2; color: #dc2626; }
.resolution-cancel:hover { background: #fee2e2; }
.resolution-complain { background: #f0fdf4; color: #16a34a; }
.resolution-complain:hover { background: #dcfce7; }
.resolution-action.disabled { opacity: 0.5; pointer-events: none; }

/* ==========================================
   ETALASE KONTEN & GRID PRODUK (STYLE SHOPEE)
   ========================================== */
.content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 12px;
}

.section-heading {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.section-subtitle {
    font-size: 12px;
    color: #64748b;
    margin: 2px 0 0 0;
}

.section-badge {
    background: #e0e7ff;
    color: #4f46e5;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
}

/* GRID UTAMA PRODUK */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

/* KARTU PRODUK ALA SHOPEE */
.product-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.08);
}

/* RASIO GAMBAR 1:1 KOTAK PERSIS (FITUR SHOPEE) */
.product-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; 
    background: #f8fafc;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Terpotong rapi di tengah tanpa merusak aspek rasio */
}

.product-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #fe5722; /* Jingga khas marketplace */
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
}

.product-body {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
}

.product-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px 0;
    line-height: 1.4;
    /* Batasi maksimal 2 baris teks judul */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-desc {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* VARIAN UKURAN */
.product-variant {
    margin-top: 8px;
}

.product-variant-label {
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
}

.product-variant-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.variant-btn {
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid;
    cursor: pointer;
}

/* KUANTITAS PLUS MINUS */
.qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

.qty-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
}

.qty-control {
    display: flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
}

.qty-btn {
    border: none;
    background: #f8fafc;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.qty-input {
    width: 32px;
    border: none;
    border-left: 1px solid #cbd5e1;
    border-right: 1px solid #cbd5e1;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 0;
    outline: none;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* FOOTER CARD (HARGA & TOMBOL) */
.product-footer {
    display: flex;
    flex-direction: column; /* Ditumpuk vertikal biar muat di grid kecil */
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

.product-price {
    font-size: 16px;
    font-weight: 700;
    color: #fe5722; /* Warna harga shopee */
}

.buy-button {
    width: 100%;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
}

.btn-dark {
    background: #fe5722;
    color: white;
}
.btn-dark:hover {
    background: #e04f1e;
}

/* KONDISI KOSONG */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 16px;
    background: white;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
}
.empty-icon { font-size: 36px; display: block; margin-bottom: 8px; }
.empty-text { color: #64748b; font-size: 13px; font-weight: 500; }

.hidden { display: none !important; }


/* ==========================================
   MEDIA QUERY: TABLET (768px)
   ========================================== */
@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr; /* Sidebar pindah ke atas/bawah */
        gap: 20px;
    }

    .hero-banner {
        padding: 16px;
        gap: 16px;
    }

    .hero-title {
        font-size: 18px;
    }

    .product-grid {
        /* Grid mengecil tapi masih aman dibaca */
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); 
        gap: 12px;
    }
}

/* ==========================================
   MEDIA QUERY: HP / MOBILE (480px) -> ALA SHOPEE MOBILE
   ========================================== */
@media (max-width: 480px) {
    .page-container {
        padding: 12px 8px; /* Memperluas area layar HP */
    }

    .hero-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        border-radius: 12px;
    }

    .hero-icon {
        display: none; /* Sembunyikan icon biar gak makan tempat di HP */
    }

    .hero-content {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .hero-location {
        width: 100%;
        box-sizing: border-box;
    }

    /* FIX GRID: Otomatis membagi 2 Kolom Sejajar (Double Column Shopee) */
    .product-grid {
        grid-template-columns: repeat(2, 1fr); 
        gap: 8px; /* Jarak tipis khas mobile e-commerce */
    }

    .product-card {
        border-radius: 8px;
    }

    .product-body {
        padding: 8px; /* Padding mini */
        gap: 8px;
    }

    .product-title {
        font-size: 12px; /* Font dikecilkan agar pas */
    }

    .product-desc {
        display: none; /* Sembunyikan deskripsi panjang di HP biar ringkas */
    }

    .product-variant-label {
        font-size: 9px;
    }

    .variant-btn {
        padding: 2px 6px;
        font-size: 10px;
    }

    .qty-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .qty-control {
        width: 100%;
        justify-content: space-between;
    }

    .qty-input {
        flex: 1;
    }

    .product-price {
        font-size: 14px;
    }

    .buy-button {
        padding: 6px 8px;
        font-size: 11px;
    }
}