
:root {
    --primary: #405DE6;
    --secondary: #833AB4;
    --accent: #FD1D1D;
    --light: #f8f9fa;
    --dark: #262626;
    --text: #333;
    --text-light: #8e8e8e;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
}

body {
    background-color: #fafafa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
}

.marketplace-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 12px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 0 4px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.view-all {
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
}

.product-media-container {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
    background: #f5f5f5;
}

.media-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image {
    transition: transform 0.5s ease;
}

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

.product-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--accent);
    color: white;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    z-index: 2;
}

.product-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

.action-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: var(--dark);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.action-btn:hover {
    background: white;
    transform: scale(1.1);
}

.action-btn.like:hover {
    color: var(--accent);
}

.action-btn i {
    font-size: 12px;
}

.product-info {
    padding: 10px;
}

.product-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--dark);
    margin: 0 0 5px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.product-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 6px 0;
}

.product-meta {
    display: flex;
    align-items: center;
    padding-top: 6px;
    border-top: 1px solid #f0f0f0;
}

.shop-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    margin-right: 6px;
    object-fit: cover;
}

.shop-name {
    font-size: 11px;
    color: var(--text);
    margin: 0;
}

.empty-state {
    grid-column: span 2;
    text-align: center;
    padding: 30px 15px;
}

.empty-icon {
    font-size: 36px;
    color: #ddd;
    margin-bottom: 12px;
}

.empty-text {
    color: var(--text-light);
    margin: 0;
    font-size: 14px;
}

/* Video play button */
.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.video-play-btn::after {
    content: "";
    display: block;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 12px solid var(--dark);
    margin-left: 3px;
}

/* Responsive columns */
@media (min-width: 400px) {
    .items-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

@media (min-width: 600px) {
    .marketplace-container {
        padding: 16px;
    }
    
    .items-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .section-title {
        font-size: 22px;
    }
    
    .product-title {
        font-size: 14px;
    }
    
    .product-price {
        font-size: 16px;
    }
}

@media (min-width: 900px) {
    .items-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
    
    .marketplace-container {
        max-width: 1200px;
    }
}
