/* Rey Card Filter — UI responsive mobile-first */
#rey-cardfilter-wrap { --rcf-accent:#25b9d7; --rcf-accent2:#1a93ab; --rcf-bg:#0e1b2c; --rcf-card:#13243a; --rcf-line:rgba(255,255,255,.10); --rcf-txt:#eaf2f8; --rcf-mut:rgba(234,242,248,.55); margin:0 0 24px; }

/* Pannello filtri */
.rcf-panel { background:var(--rcf-card); border:1px solid var(--rcf-line); border-radius:14px; padding:14px; margin-bottom:18px; position:sticky; top:8px; z-index:30; box-shadow:0 6px 24px rgba(0,0,0,.25); }
.rcf-search { position:relative; margin-bottom:12px; }
.rcf-search input { width:100%; box-sizing:border-box; height:48px; padding:0 16px 0 46px; border-radius:10px; border:1px solid var(--rcf-line); background:var(--rcf-bg); color:var(--rcf-txt); font-size:16px; outline:none; transition:border-color .15s, box-shadow .15s; }
.rcf-search input::placeholder { color:var(--rcf-mut); }
.rcf-search input:focus { border-color:var(--rcf-accent); box-shadow:0 0 0 3px rgba(37,185,215,.18); }
.rcf-search svg { position:absolute; left:15px; top:50%; transform:translateY(-50%); width:20px; height:20px; opacity:.5; }

.rcf-filters { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.rcf-field { display:flex; flex-direction:column; gap:4px; min-width:0; }
.rcf-field label { font-size:11px; text-transform:uppercase; letter-spacing:.8px; color:var(--rcf-mut); font-weight:600; padding-left:2px; }
.rcf-select { height:44px; padding:0 12px; border-radius:10px; border:1px solid var(--rcf-line); background:var(--rcf-bg); color:var(--rcf-txt); font-size:15px; outline:none; cursor:pointer; -webkit-appearance:none; appearance:none; background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' stroke='%2380a0b5' stroke-width='1.6' fill='none' stroke-linecap='round'/></svg>"); background-repeat:no-repeat; background-position:right 12px center; padding-right:30px; }
.rcf-select:focus { border-color:var(--rcf-accent); }

.rcf-bar { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:12px; flex-wrap:wrap; }
.rcf-count { font-size:14px; color:var(--rcf-txt); font-weight:600; }
.rcf-count b { color:var(--rcf-accent); }
.rcf-reset { background:none; border:1px solid var(--rcf-line); color:var(--rcf-mut); border-radius:8px; padding:7px 14px; font-size:13px; cursor:pointer; transition:all .15s; }
.rcf-reset:hover { color:var(--rcf-txt); border-color:var(--rcf-accent); }

/* Griglia risultati */
.rcf-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:12px; }
.rcf-card { background:var(--rcf-card); border:1px solid var(--rcf-line); border-radius:12px; overflow:hidden; display:flex; flex-direction:column; transition:transform .15s, box-shadow .15s, border-color .15s; text-decoration:none; }
.rcf-card:hover { transform:translateY(-3px); box-shadow:0 10px 28px rgba(0,0,0,.35); border-color:rgba(37,185,215,.5); }
.rcf-card-img { aspect-ratio:376/535; background:#0a1422; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.rcf-card-img img { width:100%; height:100%; object-fit:contain; }
.rcf-card-body { padding:10px; display:flex; flex-direction:column; gap:7px; flex:1; }
.rcf-card-name { font-size:13.5px; line-height:1.25; color:var(--rcf-txt); font-weight:600; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:34px; }
.rcf-badges { display:flex; flex-wrap:wrap; gap:4px; }
.rcf-badge { font-size:10px; padding:3px 7px; border-radius:6px; font-weight:600; letter-spacing:.2px; }
.rcf-badge.ed { background:rgba(255,255,255,.06); color:var(--rcf-mut); }
.rcf-badge.ra { background:rgba(37,185,215,.14); color:var(--rcf-accent); }
.rcf-badge.lg { background:rgba(255,255,255,.06); color:var(--rcf-mut); }
.rcf-badge.foil { background:linear-gradient(90deg,#ffd86b,#ff9a3c); color:#3a2400; }
.rcf-card-foot { display:flex; align-items:center; justify-content:space-between; margin-top:auto; padding-top:4px; }
.rcf-price { font-size:17px; font-weight:800; color:var(--rcf-accent); }
.rcf-go { font-size:12px; color:var(--rcf-mut); }

/* Stato vuoto / loading */
.rcf-empty { text-align:center; padding:40px 16px; color:var(--rcf-mut); grid-column:1/-1; }
.rcf-loadmore { display:block; width:100%; margin:18px auto 0; max-width:320px; height:48px; border-radius:10px; border:none; background:var(--rcf-accent); color:#04222b; font-size:16px; font-weight:700; cursor:pointer; transition:background .15s; }
.rcf-loadmore:hover { background:var(--rcf-accent2); color:#fff; }
.rcf-loading { opacity:.5; pointer-events:none; }
.rcf-spinner { width:30px; height:30px; border:3px solid var(--rcf-line); border-top-color:var(--rcf-accent); border-radius:50%; animation:rcfspin .7s linear infinite; margin:30px auto; grid-column:1/-1; }
@keyframes rcfspin { to { transform:rotate(360deg); } }

/* Tablet */
@media (min-width:600px) {
    .rcf-filters { grid-template-columns:repeat(4,1fr); }
    .rcf-grid { grid-template-columns:repeat(3,1fr); gap:16px; }
}
/* Desktop */
@media (min-width:992px) {
    .rcf-grid { grid-template-columns:repeat(5,1fr); }
    .rcf-card-name { font-size:14px; }
}

/* Toggle vista griglia/lista */
.rcf-viewtoggle { display:flex; border:1px solid var(--rcf-line); border-radius:8px; overflow:hidden; }
.rcf-vbtn { background:transparent; border:none; padding:7px 11px; color:var(--rcf-mut); cursor:pointer; display:flex; align-items:center; transition:background .15s,color .15s; }
.rcf-vbtn svg { fill:currentColor; }
.rcf-vbtn:hover { color:var(--rcf-txt); }
.rcf-vbtn.active { background:var(--rcf-accent); color:#04222b; }

/* Vista LISTA */
.rcf-list { display:flex; flex-direction:column; gap:6px; }
.rcf-row { display:flex; align-items:center; gap:12px; background:var(--rcf-card); border:1px solid var(--rcf-line); border-radius:10px; padding:8px 12px; text-decoration:none; transition:border-color .15s,background .15s; }
.rcf-row:hover { border-color:rgba(37,185,215,.5); background:#16293f; }
.rcf-row-img { width:38px; flex:0 0 38px; aspect-ratio:376/535; background:#0a1422; border-radius:5px; overflow:hidden; display:flex; align-items:center; justify-content:center; }
.rcf-row-img img { width:100%; height:100%; object-fit:contain; }
.rcf-row-main { flex:1; min-width:0; }
.rcf-row-name { font-size:14px; font-weight:600; color:var(--rcf-txt); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rcf-row-meta { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:3px; font-size:12px; color:var(--rcf-mut); }
.rcf-row-right { display:flex; flex-direction:column; align-items:flex-end; gap:2px; flex-shrink:0; }
.rcf-row-qty { font-size:11px; font-weight:600; }
.rcf-qty-ok { color:#46c97e; }
.rcf-qty-no { color:rgba(234,242,248,.4); }
@media (max-width:520px) {
    .rcf-row-name { white-space:normal; }
    .rcf-row-meta span:nth-child(n+3) { display:none; }
}
