/* ============================================================
   AWA B2B — FASE 4: Features Avançadas
   Sticky Header | Quick Quote Modal | Mobile Nav | Toolbar
   ============================================================ */

/* ============================================================
   Feature 1: Sticky Header
   ============================================================ */
.awa-header-sticky,
#header.awa-header-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background: #fff;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
    animation: awa-slideDown 0.3s ease-out;
}

.awa-header-sticky .top-header,
#header.awa-header-sticky .top-header {
    display: none;
}

@keyframes awa-slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .awa-header-sticky {
        animation: none;
    }
}

/* ============================================================
   Feature 2: Quick Quote FAB + Modal
   ============================================================ */
.awa-quote-fab {
    position: fixed;
    bottom: 150px;
    right: 20px;
    z-index: 998;
}

@media (width <= 767px) {
    .awa-quote-fab {
        bottom: 136px;
        right: 14px;
    }
}

.awa-quote-fab__btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px 10px 12px;
    background: var(--primary-color, #b73337);
    color: #fff;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(183, 51, 55, 0.35);
    font-size: 13px;
    font-weight: 700;
    font-family: var(--awa-font-family, 'Inter', sans-serif);
    letter-spacing: 0.02em;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.awa-quote-fab__btn:hover,
.awa-quote-fab__btn:focus-visible {
    background: #8b1a1e;
    box-shadow: 0 6px 24px rgba(183, 51, 55, 0.5);
    transform: translateY(-2px);
    outline: none;
}

.awa-quote-fab__label {
    font-size: 13px;
    white-space: nowrap;
}

@media (width <= 600px) {
    .awa-quote-fab__btn {
        padding: 12px;
        border-radius: 50%;
    }
    .awa-quote-fab__label {
        display: none;
    }
}

/* Modal */
.awa-quote-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.awa-quote-modal.is-open {
    display: flex;
}

body.awa-modal-open {
    overflow: hidden;
}

.awa-quote-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
}

.awa-quote-modal__panel {
    position: relative;
    background: #fff;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    padding: 28px;
    animation: awa-modalIn 0.25s ease-out;
}

@keyframes awa-modalIn {
    from { transform: translateY(20px) scale(0.97); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

.awa-quote-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.awa-quote-modal__title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-color, #1e293b);
    margin: 0;
}

.awa-quote-modal__close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    color: #64748b;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.awa-quote-modal__close:hover {
    background: var(--primary-color, #b73337);
    color: #fff;
    border-color: var(--primary-color, #b73337);
}

.awa-quote-modal__field {
    margin-bottom: 14px;
}

.awa-quote-modal__field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.awa-quote-modal__field input,
.awa-quote-modal__field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.awa-quote-modal__field input:focus,
.awa-quote-modal__field textarea:focus {
    outline: none;
    border-color: var(--primary-color, #b73337);
    box-shadow: 0 0 0 3px rgba(183, 51, 55, 0.1);
}

.awa-quote-modal__submit {
    width: 100%;
    padding: 12px;
    background: var(--primary-color, #b73337);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.15s, transform 0.1s;
}

.awa-quote-modal__submit:hover {
    background: #8b1a1e;
}

.awa-quote-modal__submit:active {
    transform: scale(0.98);
}

.awa-quote-modal__footer-note {
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
    margin-top: 12px;
    margin-bottom: 0;
}

/* ============================================================
   Feature 4: Mobile Bottom Nav Enhancement
   ============================================================ */
@media (width <= 767px) {
    .fixed-bottom .mobile-bottom-link {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 0;
        background: #fff;
        border-top: 1px solid #e2e8f0;
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
    }

    .fixed-bottom .mobile-bottom-link > li {
        display: flex;
        justify-content: center;
    }

    .fixed-bottom .mobile-bottom-link > li > a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        padding: 8px 4px;
        font-size: 10px;
        font-weight: 600;
        color: #64748b;
        text-decoration: none;
        transition: color 0.15s;
        width: 100%;
        text-align: center;
    }

    .fixed-bottom .mobile-bottom-link > li > a .icon {
        font-size: 20px;
    }

    .fixed-bottom .mobile-bottom-link > li > a:hover,
    .fixed-bottom .mobile-bottom-link > li > a.active {
        color: var(--primary-color, #b73337);
    }
}

/* ============================================================
   Feature 5: Category Toolbar Enhancement
   ============================================================ */
.toolbar.toolbar-products {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    margin-bottom: 16px;
}

.toolbar-products .toolbar-amount {
    font-size: 13px;
    color: var(--text-muted, #64748b);
    font-weight: 500;
}

.toolbar-products .toolbar-amount .toolbar-number {
    font-weight: 700;
    color: var(--text-color, #1e293b);
}

.toolbar-products .toolbar-sorter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar-products .toolbar-sorter .sorter-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    color: #64748b;
}

.toolbar-products .toolbar-sorter .sorter-options {
    padding: 6px 10px;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: var(--awa-radius-sm, 4px);
    font-size: 13px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s;
}

.toolbar-products .toolbar-sorter .sorter-options:focus {
    border-color: var(--primary-color, #b73337);
    outline: none;
    box-shadow: 0 0 0 3px rgba(183, 51, 55, 0.1);
}

.toolbar-products .pages {
    width: 100%;
}

.toolbar-products .pages .items {
    display: flex;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.toolbar-products .pages .item {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toolbar-products .pages .item a,
.toolbar-products .pages .item strong {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    border-radius: var(--awa-radius-sm, 4px);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.toolbar-products .pages .item a {
    color: var(--text-muted, #64748b);
    border: 1px solid var(--border-color, #e2e8f0);
}

.toolbar-products .pages .item a:hover {
    background: var(--primary-color, #b73337);
    border-color: var(--primary-color, #b73337);
    color: #fff;
}

.toolbar-products .pages .item.current strong {
    background: var(--primary-color, #b73337);
    color: #fff;
    border-radius: var(--awa-radius-sm, 4px);
}

@media (prefers-reduced-motion: reduce) {
    .awa-quote-modal__panel,
    .awa-header-sticky {
        animation: none;
    }
}
