/* ── variabile (overwrite din admin) ─────────────────────── */
:root {
    --ar-accent:   #c0392b;
    --ar-hover:    #a93226;
    --ar-btn-text: #ffffff;
    --ar-cols:     3;
}

/* ── layout principal ────────────────────────────────────── */
.ar-wrap {
    display: flex; gap: 24px; align-items: flex-start;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    max-width: 1400px; margin: 0 auto;
}

/* ── SIDEBAR ─────────────────────────────────────────────── */
.ar-sidebar {
    width: 260px; flex-shrink: 0;
    background: #fff; border: 1px solid #e8e8e8; border-radius: 10px;
    padding: 18px; position: sticky; top: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.ar-sidebar-title {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 13px; font-weight: 700; color: #333;
    text-transform: uppercase; letter-spacing: .05em;
    padding-bottom: 12px; margin-bottom: 14px;
    border-bottom: 2px solid var(--ar-accent);
}
.ar-sidebar-close {
    display: none; background: none; border: none;
    font-size: 16px; cursor: pointer; color: #999;
}

/* ── search ──────────────────────────────────────────────── */
.ar-search-row {
    display: flex; align-items: center; gap: 6px;
    background: #f8f8f8; border: 1.5px solid #e0e0e0;
    border-radius: 7px; padding: 6px 10px; margin-bottom: 16px;
    font-size: 15px; color: #999;
}
#ar-search {
    flex: 1; border: none; outline: none;
    font-size: 13px; background: transparent; color: #333;
}
#ar-search-btn {
    background: var(--ar-accent); color: var(--ar-btn-text);
    border: none; padding: 5px 10px; border-radius: 5px;
    cursor: pointer; font-size: 12px; font-weight: 600;
}
#ar-search-btn:hover { background: var(--ar-hover); }

/* ── cascade ─────────────────────────────────────────────── */
.ar-cascade { display: flex; flex-direction: column; gap: 10px; }
.ar-step { display: flex; flex-direction: column; gap: 4px; }
.ar-step label {
    font-size: 11px; font-weight: 700; color: #888;
    text-transform: uppercase; letter-spacing: .04em;
    display: flex; align-items: center; gap: 5px;
}
.ar-step:not(.ar-disabled) label::before { content: '●'; color: var(--ar-accent); font-size: 7px; }
.ar-step.ar-disabled      label::before { content: '○'; color: #ddd; font-size: 7px; }

.ar-step select {
    width: 100%; padding: 8px 28px 8px 9px;
    border: 1.5px solid #ddd; border-radius: 6px;
    font-size: 13px; color: #333; background: #fff;
    cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 9px center;
    transition: border-color .2s, box-shadow .2s;
}
.ar-step select:focus { border-color: var(--ar-accent); box-shadow: 0 0 0 3px rgba(192,57,43,.1); outline: none; }
.ar-step.ar-disabled select { background-color: #f5f5f5; color: #bbb; cursor: not-allowed; }

#ar-reset {
    width: 100%; margin-top: 10px; padding: 8px;
    background: transparent; border: 1.5px solid #ddd;
    border-radius: 6px; color: #999; cursor: pointer;
    font-size: 12px; transition: all .2s;
}
#ar-reset:hover { border-color: var(--ar-accent); color: var(--ar-accent); background: #fff5f5; }

/* ── buton mobil deschide filtru ─────────────────────────── */
.ar-filter-toggle {
    display: none; width: 100%; margin-bottom: 14px;
    padding: 11px; background: var(--ar-accent); color: var(--ar-btn-text);
    border: none; border-radius: 7px; cursor: pointer;
    font-size: 14px; font-weight: 600; text-align: left;
}

/* ── overlay mobil ───────────────────────────────────────── */
#ar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.45); z-index: 999;
}

/* ── main dreapta ────────────────────────────────────────── */
.ar-main { flex: 1; min-width: 0; }

/* ── results header ──────────────────────────────────────── */
#ar-results-header {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 8px;
    padding-bottom: 12px; margin-bottom: 16px;
    border-bottom: 1px solid #eee;
}
#ar-results-count { font-size: 14px; font-weight: 600; color: #333; }
.ar-sort { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #666; }
.ar-sort select { padding: 5px 8px; border: 1px solid #ddd; border-radius: 5px; font-size: 13px; }

/* ── grid produse ────────────────────────────────────────── */
#ar-products-grid {
    display: grid;
    grid-template-columns: repeat(var(--ar-cols), 1fr);
    gap: 16px;
}

/* ── card produs ─────────────────────────────────────────── */
.ar-card {
    display: flex; flex-direction: column;
    background: #fff; border: 1px solid #eee; border-radius: 10px;
    overflow: hidden; text-decoration: none; color: inherit;
    transition: box-shadow .2s, transform .2s; position: relative;
}
.ar-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.1); transform: translateY(-2px); }

.ar-card-img {
    position: relative; aspect-ratio: 1;
    overflow: hidden; background: #f9f9f9;
}
.ar-card-img img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }

/* ── buton info ⓘ ────────────────────────────────────────── */
.ar-info-btn {
    position: absolute; top: 7px; right: 7px;
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--ar-accent); color: var(--ar-btn-text);
    border: none; cursor: pointer; font-size: 15px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    opacity: .85; transition: opacity .2s, transform .2s; z-index: 2;
    line-height: 1;
}
.ar-info-btn:hover { opacity: 1; transform: scale(1.12); }

.ar-card-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.ar-card-name { font-size: 12px; font-weight: 600; color: #222; line-height: 1.4; }
.ar-card-sku  { font-size: 11px; color: #aaa; }
.ar-card-price { font-size: 15px; font-weight: 700; color: var(--ar-accent); margin-top: auto; padding-top: 6px; }
.ar-card-btn {
    display: block; text-align: center;
    background: var(--ar-accent); color: var(--ar-btn-text);
    padding: 7px; border-radius: 5px; font-size: 12px; font-weight: 600;
    margin-top: 8px; transition: background .2s;
}
.ar-card:hover .ar-card-btn { background: var(--ar-hover); }

/* ── loading / no results / placeholder ──────────────────── */
#ar-loading, #ar-no-results, #ar-placeholder {
    text-align: center; padding: 70px 20px; color: #bbb; font-size: 14px;
}
.ar-spinner {
    width: 36px; height: 36px; border: 3px solid #eee;
    border-top-color: var(--ar-accent); border-radius: 50%;
    animation: ar-spin .7s linear infinite; margin: 0 auto 12px;
}
@keyframes ar-spin { to { transform: rotate(360deg); } }

/* ── MODAL descriere ─────────────────────────────────────── */
#ar-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.55); z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
#ar-modal-box {
    background: #fff; border-radius: 12px; padding: 28px;
    max-width: 480px; width: 100%; position: relative;
    box-shadow: 0 12px 40px rgba(0,0,0,.2);
}
#ar-modal-close {
    position: absolute; top: 12px; right: 14px;
    background: none; border: none; font-size: 18px;
    cursor: pointer; color: #aaa; line-height: 1;
}
#ar-modal-close:hover { color: #333; }
#ar-modal-title { margin: 0 0 12px; font-size: 15px; color: #222; line-height: 1.4; padding-right: 20px; }
#ar-modal-desc  { font-size: 13px; color: #555; line-height: 1.7; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 900px) {
    #ar-products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .ar-wrap { flex-direction: column; }

    /* Sidebar devine drawer din stanga */
    .ar-sidebar {
        position: fixed; top: 0; left: -280px; bottom: 0;
        width: 270px; border-radius: 0; z-index: 1000;
        overflow-y: auto; transition: left .25s ease;
        box-shadow: 4px 0 20px rgba(0,0,0,.15);
    }
    .ar-sidebar.ar-sidebar-open { left: 0; }
    .ar-sidebar-close { display: block; }
    .ar-filter-toggle { display: block; }
    .ar-main { width: 100%; }
}

@media (max-width: 480px) {
    #ar-products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .ar-card-name { font-size: 11px; }
}
