/* ========================================
   Home layout enhancements
   ======================================== */

/* Category pills (above the hero product) */
.category-pills-top {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.category-pills-top .category-pill {
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--bg);
    color: var(--ink);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.category-pills-top .category-pill:hover {
    background: rgba(14, 139, 139, 0.1);
    border-color: var(--primary);
}

.category-pills-top .category-pill.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Ad strip */
.ad-strip-section {
    padding: 20px 0;
}

.ad-strip {
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
}

.ad-strip img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

/* Compact product grid */
.products-small-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin-top: 32px;
}

.product-small-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-small-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.product-small-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-small-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background: var(--bg);
}

.product-small-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.discount-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #e74c3c;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
}

.product-small-info {
    padding: 12px;
}

.badge-small {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    margin-bottom: 6px;
}

.badge-small.badge-featured {
    background: rgba(255, 193, 7, 0.15);
    color: #f39c12;
}

.badge-small.badge-hot {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}

.badge-small.badge-new {
    background: rgba(46, 204, 113, 0.15);
    color: #27ae60;
}

.badge-small.badge-sale {
    background: rgba(155, 89, 182, 0.15);
    color: #8e44ad;
}

.badge-small.badge-default {
    background: rgba(52, 152, 219, 0.15);
    color: #2980b9;
}

.product-small-info h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 40px;
}

.product-small-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 4px;
}

.product-small-price .price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.original-price-small {
    font-size: 12px;
    color: var(--muted);
    text-decoration: line-through;
}

.product-sales-small {
    font-size: 12px;
    color: var(--muted);
}

/* SEO description area */
.seo-panel {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow);
    line-height: 1.8;
}

.seo-panel p {
    margin: 0;
    color: var(--ink);
}

.seo-notice {
    text-align: center;
    padding: 20px;
}

.seo-notice h3 {
    margin: 0 0 16px 0;
    color: var(--primary);
}

.seo-notice p {
    margin: 12px 0;
    color: var(--muted);
}

.seo-tips {
    background: rgba(14, 139, 139, 0.08);
    border-left: 4px solid var(--primary);
    padding: 16px;
    margin-top: 20px !important;
    text-align: left;
    border-radius: 4px;
}

.seo-tips strong {
    color: var(--ink);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}

/* Responsive */
@media (max-width: 1200px) {
    .products-small-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .products-small-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .ad-strip img {
        height: 100px;
    }
}

@media (max-width: 768px) {
    .products-small-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .category-pills-top .category-pill {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .ad-strip img {
        height: 80px;
    }
}

@media (max-width: 480px) {
    .products-small-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-small-info h4 {
        font-size: 13px;
    }
    
    .product-small-price .price {
        font-size: 14px;
    }
}
