/* ==========================================================================
   Products Listing Page
   ========================================================================== */

/* Compact page hero */
.page-hero.compact { padding: calc(var(--header-h) + 3rem) 0 2.5rem; }
.page-hero { position: relative; color: #fff; background: var(--navy-900); overflow: hidden; padding: calc(var(--header-h) + 3rem) 0 2.5rem; }
.page-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 120% at 80% 0%, rgba(59,120,196,.4), transparent 55%); }
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { color: #fff; margin: 0.5rem 0 0.6rem; }
.page-hero p { color: rgba(255,255,255,.78); max-width: 60ch; }
.crumbs { font-size: 0.85rem; color: rgba(255,255,255,.6); display: flex; gap: 0.5rem; }
.crumbs a { color: #9dc4f0; }

/* Layout */
.shop { display: grid; grid-template-columns: 280px 1fr; gap: 2rem; align-items: start; }
@media (max-width: 900px) { .shop { grid-template-columns: 1fr; } }

/* Filters */
.filters { position: sticky; top: calc(var(--header-h) + 12px); background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.4rem; box-shadow: var(--shadow-sm); }
.filters h3 { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin: 1.2rem 0 0.7rem; }
.filters h3:first-child { margin-top: 0; }
.filter-search { position: relative; }
.filter-search input { width: 100%; padding: 0.7rem 0.9rem; border-radius: var(--r-md); border: 1px solid var(--steel-200); background: var(--bg-alt); }
.filter-list { display: grid; gap: 0.2rem; }
.filter-list button { text-align: left; padding: 0.5rem 0.7rem; border-radius: var(--r-sm); font-size: 0.9rem; color: var(--text-soft); transition: background var(--t-fast), color var(--t-fast); }
.filter-list button:hover { background: var(--bg-alt); }
.filter-list button.active { background: var(--navy-700); color: #fff; font-weight: 600; }
.filter-chip-group { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.filter-chip { padding: 0.35rem 0.7rem; border-radius: var(--r-pill); border: 1px solid var(--steel-200); font-size: 0.78rem; color: var(--text-soft); }
.filter-chip.active { background: var(--navy-500); color: #fff; border-color: var(--navy-500); }
@media (max-width: 900px) { .filters { position: static; } }

/* Toolbar */
.shop-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.shop-count { color: var(--text-muted); font-size: 0.9rem; }
.shop-toolbar select { padding: 0.55rem 0.9rem; border-radius: var(--r-md); border: 1px solid var(--steel-200); background: #fff; }
.mobile-filter-btn { display: none; }
@media (max-width: 900px) { .mobile-filter-btn { display: inline-flex; } }

/* Product grid */
.prod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.prod-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.prod-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.prod-card .media { aspect-ratio: 4 / 3; }
.prod-card .badge-row { position: absolute; top: 10px; left: 10px; z-index: 2; display: flex; gap: 6px; }
.prod-tag { font-family: var(--font-head); font-size: 0.64rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 4px 9px; border-radius: var(--r-pill); background: var(--grad-steel); color: var(--navy-900); }
.prod-tag.new { background: var(--navy-500); color: #fff; }
.prod-body { padding: 1.1rem 1.1rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.prod-body .cat { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--navy-500); font-weight: 600; }
.prod-body h3 { font-size: 1.02rem; margin: 0.3rem 0 0.4rem; }
.prod-body p { font-size: 0.85rem; flex: 1; }
.prod-actions { display: flex; gap: 0.5rem; margin-top: 0.9rem; }
.prod-actions .btn { flex: 1; padding: 0.6rem 0.7rem; font-size: 0.8rem; }
@media (max-width: 1150px) { .prod-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .prod-grid { grid-template-columns: 1fr; } }

/* States */
.shop-empty, .shop-loading { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.spinner { width: 40px; height: 40px; border: 3px solid var(--steel-200); border-top-color: var(--navy-500); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 1rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.offline-note { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; padding: 0.7rem 1rem; border-radius: var(--r-md); font-size: 0.85rem; margin-bottom: 1rem; }

/* Pagination */
.pager { display: flex; justify-content: center; gap: 0.4rem; margin-top: 2.5rem; }
.pager button { width: 42px; height: 42px; border-radius: var(--r-md); border: 1px solid var(--steel-200); background: #fff; font-weight: 600; color: var(--text-soft); transition: all var(--t-fast); }
.pager button:hover:not(:disabled) { border-color: var(--navy-500); color: var(--navy-700); }
.pager button.active { background: var(--navy-700); color: #fff; border-color: var(--navy-700); }
.pager button:disabled { opacity: 0.4; cursor: not-allowed; }
