/* ── Module 2 : Catalogue & Boutique ── */

/* ─── Type selector (add/edit product) ──────────────────────────────────── */
.type-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}
.type-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 10px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    text-align: center;
    transition: all var(--transition);
    font-size: 13px;
}
.type-option input[type=radio] { display: none; }
.type-option i { font-size: 22px; color: var(--text-muted); }
.type-option small { color: var(--text-muted); font-size: 11px; }
.type-option:hover { border-color: var(--accent); }
.type-option.selected {
    border-color: var(--accent);
    background: var(--accent-dim);
}
.type-option.selected i { color: var(--accent); }

/* ─── Catalog grid (vendor list) ─────────────────────────────────────────── */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 80px;
}
.catalog-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}
.catalog-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.catalog-card--inactive { opacity: .55; }

.catalog-card__thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    background: var(--bg-input);
    overflow: hidden;
}
.catalog-card__thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.thumb-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
}
.thumb-placeholder i { font-size: 40px; color: var(--text-muted); }
.thumb-lock {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.3);
    font-size: 28px; color: rgba(255,255,255,.8);
}
.thumb-badge {
    position: absolute; top: 8px; left: 8px;
    background: rgba(0,0,0,.7);
    color: #fff; font-size: 11px; font-weight: 700;
    padding: 2px 8px; border-radius: 20px;
}

.catalog-card__body { padding: 12px 14px; flex: 1; }
.catalog-card__title { font-weight: 700; font-size: 14px; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.catalog-card__meta  { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.catalog-card__price { font-size: 16px; font-weight: 700; color: var(--accent); }

.catalog-card__actions {
    padding: 10px 14px;
    border-top: 1px solid var(--border);
    display: flex; gap: 8px;
}

/* ─── Category filter ────────────────────────────────────────────────────── */
.cat-filter {
    display: flex; gap: 8px; flex-wrap: wrap;
    margin-bottom: 20px;
}
.cat-pill {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: all var(--transition);
}
.cat-pill:hover, .cat-pill.active {
    background: var(--accent); color: #1a1a2e;
    border-color: var(--accent);
}

/* ─── Storage footer bar ─────────────────────────────────────────────────── */
.storage-footer {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 0; font-size: 13px; color: var(--text-muted);
    border-top: 1px solid var(--border); margin-top: 24px;
}
.storage-footer .storage-bar { flex: 1; height: 6px; }

/* ─── Empty state ────────────────────────────────────────────────────────── */
.empty-state {
    text-align: center; padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state i { font-size: 48px; margin-bottom: 16px; display: block; }
.empty-state p { margin-bottom: 20px; }

/* ─── Shop page (public — reprend le template original) ──────────────────── */
.shop-cat-filter {
    display: flex; gap: 8px; flex-wrap: wrap;
    padding: 10px 0 14px;
    max-width: 994px; margin: 0 auto;
}
.shop-cat-pill {
    padding: 4px 14px; border-radius: 20px; font-size: 13px;
    border: 1px solid var(--border); color: var(--text-muted);
    transition: all var(--transition);
}
.shop-cat-pill:hover, .shop-cat-pill.active {
    background: var(--accent); color: #1a1a2e; border-color: var(--accent);
}

/* Overlay cadenas sur les posts du template */
.post-overlay-lock {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.25);
    font-size: 32px; color: rgba(255,255,255,.7);
    pointer-events: none;
}
.post-badge {
    position: absolute; bottom: 8px; left: 8px;
    background: rgba(0,0,0,.7); color: #fff;
    width: 26px; height: 26px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 11px;
}
.post-price {
    position: absolute; bottom: 8px; right: 8px;
    background: var(--accent); color: #1a1a2e;
    font-size: 11px; font-weight: 700;
    padding: 2px 8px; border-radius: 20px;
}
.post-placeholder {
    width: 100%; height: 100%; min-height: 200px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-input);
}
.post-placeholder i { font-size: 40px; color: var(--text-muted); }

/* ─── Subscription plans (shop page) ────────────────────────────────────── */
.subscription-section {
    max-width: 994px; margin: 32px auto; padding: 0;
}
.sub-title {
    font-size: 18px; margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px;
}
.sub-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.sub-plan-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    transition: all var(--transition);
}
.sub-plan-card:hover { border-color: var(--accent); }
.sub-plan-name { font-weight: 700; font-size: 16px; margin-bottom: 6px; }
.sub-plan-cat  { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.sub-plan-price { font-size: 28px; font-weight: 700; color: var(--accent); }
.sub-plan-duration { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .catalog-grid { grid-template-columns: repeat(2, 1fr); }
    .type-selector { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .catalog-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}
