/* 
 * SIAKADPONPES - Mobile-First Marketplace Styling
 * Designed for ultra-fast loading, intuitive mobile UX, and clean modern aesthetic
 */

:root {
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --primary-light: #e0f2fe;
    --accent-orange: #f97316;
    --shopee-orange: #ee4d2d;
    --shopee-orange-hover: #d73211;
    --success: #10b981;
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Mobile Container Wrapper */
.app-container {
    width: 100%;
    max-width: 768px; /* Mobile app style width centered on desktop */
    margin: 0 auto;
    background: #ffffff;
    min-height: 100vh;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Top App Header */
.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px;
    backdrop-filter: blur(8px);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 700;
    font-size: 1.05rem;
}

.brand-badge {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-back-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    transition: all 0.2s ease;
}

.btn-back-home:hover {
    background: #bae6fd;
}

/* Search Bar */
.search-wrapper {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 0.95rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    background: #f1f5f9;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-main);
    outline: none;
    transition: all 0.2s ease;
}

.search-input:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.clear-search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 0.9rem;
    display: none;
    padding: 4px;
}

/* Banner Hero */
.marketplace-banner {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 60%, #075985 100%);
    color: white;
    padding: 20px 16px;
    position: relative;
    overflow: hidden;
}

.banner-content {
    position: relative;
    z-index: 2;
}

.banner-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.banner-title {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 6px;
}

.banner-subtitle {
    font-size: 0.85rem;
    color: #e0f2fe;
    line-height: 1.4;
}

.banner-decor {
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

/* Trust / Feature Badges */
.trust-badges {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
}

.trust-item i {
    font-size: 1.1rem;
    color: var(--primary);
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 8px;
}

.section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-count-badge {
    font-size: 0.75rem;
    background: #e2e8f0;
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 600;
}

/* Product Feed Grid */
.product-feed {
    padding: 8px 14px 40px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Product Card - Clean Mobile List/Card Style */
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.card-top {
    position: relative;
    width: 100%;
    background: #f8fafc;
    text-align: center;
    overflow: hidden;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    cursor: pointer;
}

.card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    transition: transform 0.3s ease;
}

.product-card:hover .card-img {
    transform: scale(1.03);
}

.badge-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4px;
}

.badge-platform {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(238, 77, 45, 0.95);
    color: white;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Card Body */
.card-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.rating-badge {
    display: flex;
    align-items: center;
    gap: 3px;
    color: #eab308;
    font-weight: 700;
}

.sold-badge {
    color: var(--text-light);
}

.product-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.35;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    cursor: pointer;
}

.product-title:hover {
    color: var(--primary);
}

.product-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 14px;
    margin-top: auto;
}

.price-current {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--shopee-orange);
}

.price-original {
    font-size: 0.82rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.discount-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: #dc2626;
    background: #fee2e2;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Action Buttons */
.card-actions {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 8px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-copy {
    background: #f1f5f9;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-copy:hover {
    background: #e2e8f0;
    color: var(--text-main);
}

.btn-copy:active {
    transform: scale(0.97);
}

.btn-view {
    background: linear-gradient(135deg, var(--shopee-orange), #ff6b3d);
    color: white;
    box-shadow: 0 3px 6px rgba(238, 77, 45, 0.25);
}

.btn-view:hover {
    background: linear-gradient(135deg, var(--shopee-orange-hover), #f85b2b);
    color: white;
    box-shadow: 0 4px 10px rgba(238, 77, 45, 0.35);
}

.btn-view:active {
    transform: scale(0.97);
}

/* Toast Notification */
.toast-box {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1e293b;
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    max-width: 90%;
}

.toast-box.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-box i {
    color: var(--success);
    font-size: 1.1rem;
}

/* Floating WhatsApp / Assistance Button */
.floating-wa-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 52px;
    height: 52px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    text-decoration: none;
    z-index: 90;
    transition: transform 0.2s ease;
}

.floating-wa-btn:hover {
    transform: scale(1.08);
}

/* Footer info */
.app-footer {
    margin-top: auto;
    background: #f8fafc;
    border-top: 1px solid var(--border-color);
    padding: 20px 16px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-light);
}

.app-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* Empty search state */
.empty-state {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.empty-state i {
    font-size: 3rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.empty-state h3 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 0.85rem;
    color: var(--text-muted);
}
