/* ===== Homepage Layout (Atlassian style) ===== */

/* Featured products section */
.featured-section { padding: 32px 0; }
.featured-section .section-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;
}
.featured-section .container { max-width: 100%; }
.featured-section .section-header h2 { margin: 0; font-size: 1.25rem; font-weight: 600; }
.featured-section .section-header a { font-size: .88rem; font-weight: 500; }
.section-divider { height: 1px; background: var(--border); margin: 0; }

/* Marquee companies */
.marquee-wrap { background: var(--bg-card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 16px 0; overflow: hidden; }
.marquee { mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 32px; width: max-content; animation: marquee 40s linear infinite; }
.marquee-track:hover { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 16px;
    background: var(--bg); border-radius: var(--radius); color: var(--text-secondary);
    font-size: .85rem; font-weight: 500; text-decoration: none; white-space: nowrap;
}
.marquee-item:hover { text-decoration: none; }
.marquee-item img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }

/* Stats bar */
.stats-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: var(--bg-card); border-top: 1px solid var(--border); }
.stat-item { text-align: center; padding: 32px 16px; border-right: 1px solid var(--border-light); }
.stat-item:last-child { border-right: none; }
.stat-item strong { display: block; font-size: 1.8rem; font-weight: 700; color: var(--text); }
.stat-item span { font-size: .88rem; color: var(--text-muted); }

/* View toggle pills */
.view-pills { display: flex; flex-wrap: wrap; gap: 6px; background: var(--bg); padding: 3px; border-radius: var(--radius); max-width: 100%; }
.view-pill {
    padding: 6px 14px; border-radius: 6px; font-size: .82rem; font-weight: 500;
    color: var(--text-secondary); cursor: pointer; border: none; background: transparent;
    font-family: var(--font); transition: background .15s, color .15s;
}
.view-pill.active, .view-pill:hover { background: var(--bg-card); color: var(--text); box-shadow: 0 1px 3px rgba(9,30,66,.08); }

/* Product badges */
.product-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 8px; border-radius: 4px; font-size: .72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .03em;
}
.badge-spotlight { background: #fffbeb; color: #d97706; }
.badge-bestseller { background: #fef2f2; color: #dc2626; }
.badge-new { background: #ecfdf5; color: #059669; }
.badge-cloud { background: var(--primary-light); color: var(--primary); }

/* Company card */
.company-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 24px; box-shadow: var(--shadow); transition: box-shadow .2s, transform .15s;
}
.company-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.company-card h3 { margin: 12px 0 4px; font-size: 1rem; font-weight: 600; }
.company-card .muted { font-size: .85rem; }

/* Homepage image slider */
.home-slider { background: var(--bg-card); }
.slider-track {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.slider-track::-webkit-scrollbar { display: none; }
.slide {
    flex: 0 0 100%; scroll-snap-align: start; position: relative;
    aspect-ratio: 1200 / 300; max-height: 300px; overflow: hidden;
}
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide-caption {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.7)); color: #fff;
    padding: 40px 24px 16px; font-size: 1rem; font-weight: 500;
}
.slider-dots {
    display: flex; justify-content: center; gap: 8px; padding: 12px 0;
}
.dot {
    width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--primary);
    background: transparent; cursor: pointer; padding: 0; transition: background .2s;
}
.dot.active { background: var(--primary); }

@media (max-width: 768px) {
    .slide { aspect-ratio: 16 / 9; max-height: none; }
    .slide-caption { font-size: .85rem; padding: 24px 16px 12px; }
}

[dir="rtl"] .slider-track { direction: ltr; }
[dir="rtl"] .slide-caption { text-align: right; }

/* RTL overrides */
[dir="rtl"] .stat-item { border-right: none; border-left: 1px solid var(--border-light); }
[dir="rtl"] .stat-item:last-child { border-left: none; }
