:root {
    --aof-primary: #000000; 
    --aof-panel-bg: #ffffff;
    --aof-radius: 8px; /* Squareish modern edge */
    --aof-text-main: #333333;
    --aof-border-color: #eaeaea;
    --aof-transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ==========================================================================
   1. Top Bar Layout & Outline Buttons
   ========================================================================== */
.aof-top-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.aof-btn-outline {
    background: transparent;
    color: var(--aof-primary);
    border: 1px solid var(--aof-primary);
    padding: 10px 24px;
    border-radius: var(--aof-radius);
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
}

.aof-btn-outline:hover {
    background: var(--aof-primary);
    color: #ffffff;
}

/* Style the Dropdown to match the outline button */
.aof-select-outline {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 40px; 
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 10px auto;
}

.aof-select-outline:hover {
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
}

/* ==========================================================================
   2. Panel Layout & Animation
   ========================================================================== */
.aof-panel {
    position: fixed;
    top: 0; right: -100%;
    width: 100%; max-width: 420px; height: 100dvh;
    background: var(--aof-panel-bg);
    z-index: 999999;
    transition: right var(--aof-transition);
    display: flex; flex-direction: column;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    font-family: inherit;
    color: var(--aof-text-main);
}
.aof-panel.active { right: 0; }

.aof-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px);
    z-index: 999998; opacity: 0; visibility: hidden;
    transition: all var(--aof-transition);
}
.aof-overlay.active { opacity: 1; visibility: visible; }

/* ==========================================================================
   3. Panel Internals
   ========================================================================== */
.aof-panel-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 24px; border-bottom: 1px solid var(--aof-border-color);
}
.aof-panel-header h3 { font-size: 20px; margin: 0; }
.aof-close-btn {
    background: transparent; border: none; font-size: 28px; cursor: pointer; color: #888; transition: 0.2s;
}
.aof-close-btn:hover { color: #000; transform: rotate(90deg); }

.aof-panel-content { flex-grow: 1; overflow-y: auto; padding: 24px; }
.aof-section { margin-bottom: 32px; }
.aof-section h4 { margin: 0 0 16px 0; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; color: #888; }

.aof-sort-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.aof-sort-btn {
    background: #fff; border: 1px solid var(--aof-border-color); padding: 12px;
    border-radius: var(--aof-radius); cursor: pointer; color: var(--aof-text-main); font-size: 13px; transition: 0.2s;
}
.aof-sort-btn:hover { border-color: var(--aof-primary); }
.aof-sort-btn.active { background: var(--aof-primary); color: #fff; border-color: var(--aof-primary); font-weight: 600; }

.aof-accordion { border-bottom: 1px solid var(--aof-border-color); }
.aof-accordion-trigger {
    width: 100%; text-align: left; background: none; border: none; padding: 18px 0;
    font-size: 15px; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between;
}
.aof-accordion-content { padding-bottom: 18px; display: flex; flex-direction: column; gap: 12px; }

.aof-price-inputs { display: flex; align-items: center; gap: 12px; }
.aof-price-inputs input { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: var(--aof-radius); outline: none; }
.aof-price-inputs input:focus { border-color: var(--aof-primary); }
.aof-checkbox-label { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.aof-attr-checkbox { width: 18px; height: 18px; accent-color: var(--aof-primary); cursor: pointer; }

.aof-panel-footer { padding: 24px; border-top: 1px solid var(--aof-border-color); }
.aof-btn-solid {
    width: 100%; background: var(--aof-primary); color: #fff; padding: 16px;
    border-radius: var(--aof-radius); border: none; font-size: 16px; font-weight: 600; cursor: pointer;
}
.aof-btn-solid:hover { opacity: 0.9; }