/* Reset dan Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.4;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
}

/* Header */
.header {
    background: linear-gradient(135deg, #ee4d2d, #ff6b35);
    padding: 20px 16px;
    color: white;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: url('https://images.pexels.com/photos/1275229/pexels-photo-1275229.jpeg?auto=compress&cs=tinysrgb&w=300') center/cover;
    opacity: 0.3;
    transform: rotate(15deg);
    border-radius: 20px;
}

/* WhatsApp Button */
.whatsapp-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
}

.whatsapp-btn a {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #229ED9;
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.whatsapp-btn a:hover {
    background:  #1C93D3;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.whatsapp-btn svg {
    width: 16px;
    height: 16px;
}

.whatsapp-btn span {
    display: none;
}

@media (min-width: 400px) {
    .whatsapp-btn span {
        display: inline;
    }
}

.store-info {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.store-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.store-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.star-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    background: #ee4d2d;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
    border: 2px solid white;
}

.store-details h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.store-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.rating-stars {
    color: #fbbf24;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    background: white;
    border-bottom: 1px solid #e5e7eb;
}

.nav-tab {
    flex: 1;
    padding: 16px;
    text-align: center;
    font-weight: 500;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-tab.active {
    color: #ee4d2d;
    border-bottom-color: #ee4d2d;
}

.nav-tab:hover {
    color: #ee4d2d;
}

/* Filter Tabs - Grid Layout yang Sejajar dengan Nav Tabs */
.filter-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 0;
    background: white;
    border-bottom: 1px solid #f3f4f6;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    /* Hide scrollbar */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar {
    display: none;
}

.filter-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 8px;
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
    text-align: center;
    scroll-snap-align: start;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}

.filter-tab.active {
    color: #ee4d2d;
    font-weight: 600;
    border-bottom-color: #ee4d2d;
    background-color: #fef2f2;
}

.filter-tab:hover {
    color: #ee4d2d;
    background-color: #f9fafb;
}

.filter-tab i {
    font-size: 12px;
    margin-left: 4px;
}


/* Products Grid */
.products-section {
    padding: 16px;
    background: #f8f9fa;
}

.products-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: relative;
    transition: all 0.3s ease;
}

.product-card:active {
    transform: scale(0.98);
}

.product-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.promo-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.product-info {
    padding: 12px;
}

.product-badges {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-star {
    background: #ee4d2d;
    color: white;
}

.product-name {
    font-size: 13px;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 34px;
}

.product-price {
    font-size: 16px;
    font-weight: 700;
    color: #ee4d2d;
    margin-bottom: 6px;
}

.komisi-badge {
    display: inline-block;
    background: linear-gradient(45deg, #ee4d2d, #ff6b35);
    color: white;
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.product-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 12px;
}

.rating {
    display: flex;
    align-items: center;
    gap: 2px;
}

.rating i {
    color: #fbbf24;
    font-size: 10px;
}

.shopee-btn {
    width: 100%;
    background: linear-gradient(45deg, #ee4d2d, #ff6b35);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: block;
    text-align: center;
}

.shopee-btn:hover {
    background: linear-gradient(45deg, #dc2626, #ee4d2d);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(238, 77, 45, 0.3);
}

.shopee-btn:active {
    transform: translateY(0);
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 360px) {
    .products-grid {
        gap: 8px;
    }
    
    .product-info {
        padding: 10px;
    }
    
    .product-name {
        font-size: 12px;
    }
    
    .product-price {
        font-size: 15px;
    }
    
    .shopee-btn {
        font-size: 11px;
        padding: 8px;
    }
}

@media (min-width: 481px) {
    .container {
        max-width: 600px;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

/* Hover effects for desktop */
@media (hover: hover) {
    .product-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
    
    .nav-tab:hover {
        background-color: #f9fafb;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus states for accessibility */
.shopee-btn:focus,
.nav-tab:focus,
.filter-tab:focus {
    outline: 2px solid #ee4d2d;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .header {
        background: #ee4d2d !important;
        -webkit-print-color-adjust: exact;
    }
    
    .shopee-btn {
        background: #ee4d2d !important;
        -webkit-print-color-adjust: exact;
    }
}
