/* ============================================================================
   AG PRODUCTION  -  SHOP PAGE STYLES   (pages/shop/shop.css)
   ============================================================================ */

/* filter bar */
.shop-toolbar {
    display: flex; flex-wrap: wrap; align-items: flex-end; gap: .9rem;
    margin-bottom: .6rem; padding: 1rem 1.1rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.tb-field { display: flex; flex-direction: column; min-width: 0; }
.tb-search { flex: 1 1 14rem; }
.tb-field select.field { cursor: pointer; padding-right: 2.2rem; }
.shop-count { margin: 0 .25rem 1rem; min-height: 1.3em; color: var(--faint); font-size: .8rem; }

@media (max-width: 600px) {
    .shop-toolbar { padding: .75rem; gap: .6rem; }
    .tb-field { flex: 1 1 calc(50% - .6rem); }
    .tb-search { flex: 1 1 100%; }
}

/* product grid: fits as many cards per row as the screen allows (more on big monitors) */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: clamp(.9rem, 1.4vw, 1.6rem); }

.shop-card {
    padding: 1.1rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    cursor: pointer; -webkit-tap-highlight-color: transparent;
    transition: border-color .25s, transform .3s cubic-bezier(.2, .8, .3, 1), box-shadow .3s, background-color .4s;
    animation: shop-in .45s cubic-bezier(.2, .8, .3, 1) both; animation-delay: calc(var(--i, 0) * 30ms);
}
.shop-card:active { transform: scale(.985); border-color: var(--accent); }
@media (hover: hover) {
    .shop-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 14px 34px -14px var(--glow); }
    .shop-card:hover .shop-card-img img { transform: scale(1.05); }
}
.shop-card-img {
    position: relative; height: clamp(10rem, 12vw, 14rem);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
    background: var(--media); border: 1px solid var(--media-border); border-radius: var(--radius-sm);
    transition: background-color .4s, border-color .4s;
}
.shop-card-img img { max-width: 90%; max-height: 90%; object-fit: contain; transition: transform .4s cubic-bezier(.2, .8, .3, 1); }
.img-missing { padding: .6rem; color: var(--media-muted); font-weight: 700; font-size: .9rem; text-align: center; }
.shop-card h3 { margin-top: .85rem; font-size: 1rem; font-weight: 700; line-height: 1.3; }
.shop-price { margin-top: .25rem; font-size: 1.1rem; font-weight: 800; color: var(--accent-text); }

.shop-save { margin-top: .15rem; color: var(--muted); font-size: .72rem; font-weight: 700; }
.shop-save::before { content: '▼ '; color: var(--accent-text); font-size: .6rem; }

.shop-badge {
    position: absolute; top: .5rem; left: .5rem; padding: .15rem .6rem; border-radius: 1.25rem;
    background: var(--accent); color: var(--accent-ink); font-size: .65rem; font-weight: 900; letter-spacing: .5px;
}
.shop-badge.is-out { background: var(--danger); color: #fff; }
.shop-card.is-soldout .shop-card-img img { opacity: .45; }

.shop-empty {
    grid-column: 1 / -1; padding: 3.5rem 1.2rem; text-align: center; color: var(--muted);
    border: 1px dashed var(--border-strong); border-radius: var(--radius-lg);
}

/* phones: two cards across so you see more at once */
@media (max-width: 600px) {
    .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
    .shop-card { padding: .6rem; border-radius: var(--radius); }
    .shop-card-img { height: 8.2rem; }
    .shop-card h3 { margin-top: .6rem; font-size: .85rem; }
    .shop-price { font-size: 1rem; }
}

@keyframes shop-in { from { opacity: 0; transform: translateY(.6rem); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .shop-card { animation: none; } }
