@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

.raysa-portal-wrapper {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #2d3748;
    max-width: 950px;
    margin: 0 auto;
    background-color: #f7fafc;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    position: relative;
    box-sizing: border-box;
}

.raysa-portal-wrapper *, .raysa-portal-wrapper *::before, .raysa-portal-wrapper *::after {
    box-sizing: border-box;
}

/* ==========================================
 * 1. LOGIN CARD (Glassmorphic)
 * ========================================== */
.raysa-login-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    padding: 45px 35px;
    width: 100%;
    max-width: 420px;
    margin: 40px auto;
    box-shadow: 0 15px 35px rgba(31, 38, 135, 0.08), 0 5px 15px rgba(0, 0, 0, 0.02);
    text-align: center;
    transition: transform 0.3s ease;
}

.raysa-login-header {
    margin-bottom: 30px;
}

.raysa-login-header h2 {
    font-size: 26px;
    font-weight: 800;
    color: #1a365d;
    margin: 0 0 5px 0;
    letter-spacing: -0.5px;
}

.raysa-login-header p {
    font-size: 14px;
    font-weight: 600;
    color: #d69e2e;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.raysa-portal-form .form-group {
    text-align: left;
    margin-bottom: 20px;
}

.raysa-portal-form label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 8px;
    color: #4a5568;
}

.raysa-portal-form input[type="text"],
.raysa-portal-form input[type="password"],
.raysa-portal-search-bar input[type="text"] {
    width: 100%;
    height: 46px;
    padding: 10px 16px;
    border: 1px solid #cbd5e0;
    border-radius: 10px;
    font-size: 14px;
    background-color: #ffffff;
    color: #2d3748;
    transition: all 0.25s ease;
}

.raysa-portal-form input:focus,
.raysa-portal-search-bar input:focus {
    outline: none;
    border-color: #2b6cb0;
    box-shadow: 0 0 0 4px rgba(43, 108, 176, 0.1);
}

.feedback-area {
    margin-top: 20px;
    font-size: 14px;
}

/* ==========================================
 * 2. PORTAL HEADER & CLIENT LOGGED IN
 * ========================================== */
.client-logged-in {
    background-color: #ffffff;
    border: 1px solid #edf2f7;
    padding: 30px;
}

.raysa-portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f7fafc;
    padding-bottom: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.user-greeting h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a365d;
    margin: 0 0 5px 0;
}

.user-greeting h3 span {
    color: #2b6cb0;
}

.user-greeting p {
    font-size: 13px;
    color: #718096;
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* Buttons */
.raysa-portal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.btn-primary { background-color: #2b6cb0; color: #fff; }
.btn-primary:hover { background-color: #1a365d; transform: translateY(-1px); }

.btn-secondary { background-color: #edf2f7; color: #4a5568; }
.btn-secondary:hover { background-color: #e2e8f0; color: #2d3748; }

.btn-success { background-color: #38a169; color: #fff; }
.btn-success:hover { background-color: #2f855a; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(56, 161, 105, 0.2); }

.btn-danger { background-color: #fff5f5; color: #e53e3e; border: 1px solid #fed7d7; }
.btn-danger:hover { background-color: #fed7d7; color: #c53030; }

.btn-block { width: 100%; }

/* ==========================================
 * 3. SEARCH BAR
 * ========================================== */
.raysa-portal-search-bar {
    position: relative;
    margin-bottom: 25px;
}

.raysa-portal-search-bar .search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 18px;
    pointer-events: none;
}

.raysa-portal-search-bar input {
    padding-left: 45px !important;
    padding-right: 40px !important;
}

.clear-search-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 22px;
    color: #a0aec0;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.clear-search-btn:hover {
    color: #4a5568;
    background: #edf2f7;
}

/* ==========================================
 * 4. CATEGORIES & CATALOG
 * ========================================== */
.category-block {
    background: #ffffff;
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid #edf2f7;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.category-block:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.category-title {
    margin: 0;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s ease;
}

.level-1-title {
    background-color: #f7fafc;
    color: #1a365d;
    font-size: 16px;
    font-weight: 700;
    border-bottom: 1px solid #edf2f7;
}

.level-1-title:hover {
    background-color: #edf2f7;
}

.level-2-title {
    background-color: #ffffff;
    color: #4a5568;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid #f7fafc;
    border-top: 1px solid #edf2f7;
    padding: 12px 20px 12px 35px;
}

.level-2-title:hover {
    background-color: #f7fafc;
}

.toggle-arrow {
    font-size: 16px;
    transition: transform 0.25s ease;
    color: #a0aec0;
}

.category-block.collapsed .toggle-arrow {
    transform: rotate(0deg);
}

.category-block:not(.collapsed) > .category-title > .toggle-arrow {
    transform: rotate(90deg);
}

.category-group {
    transition: max-height 0.3s ease-out;
}

.category-block.collapsed > .category-group {
    display: none;
}

.subcategory-group {
    padding-left: 20px;
}

.no-products-msg {
    padding: 12px 20px;
    font-style: italic;
    color: #a0aec0;
    font-size: 13px;
    margin: 0;
}

/* ==========================================
 * 5. PRODUCT ROW
 * ========================================== */
.products-list {
    display: flex;
    flex-direction: column;
}

.product-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #f7fafc;
    transition: background-color 0.15s ease;
}

.product-row:last-child {
    border-bottom: none;
}

.product-row:hover {
    background-color: #fcfdfd;
}

.prod-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 70%;
}

.prod-sku {
    font-size: 11px;
    font-weight: 700;
    color: #a0aec0;
    letter-spacing: 0.5px;
    font-family: monospace;
}

.prod-name {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
}

/* Custom quantity selectors */
.qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.qty-btn {
    border: none;
    background: #f7fafc;
    width: 32px;
    height: 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    color: #4a5568;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: #e2e8f0;
    color: #2d3748;
}

.prod-qty {
    width: 48px;
    height: 32px;
    border: none;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #2d3748;
    -moz-appearance: textfield;
}

.prod-qty::-webkit-outer-spin-button,
.prod-qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.product-row.has-qty {
    background-color: #f0fff4;
}

.product-row.has-qty .prod-qty {
    color: #2f855a;
}

.product-row.has-qty .qty-selector {
    border-color: #38a169;
}

/* ==========================================
 * 6. FLOATING BAR
 * ========================================== */
.raysa-floating-bar {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 900px;
    background: #1a365d;
    border-radius: 16px;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 25px rgba(26, 54, 93, 0.25), 0 4px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
    from { transform: translate(-50%, 100px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

.summary-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
}

.selected-count-badge {
    background-color: #ecc94b;
    color: #1a365d;
    font-weight: 800;
    font-size: 15px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.summary-text {
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.2px;
}

/* ==========================================
 * 7. MODALS
 * ========================================== */
.raysa-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 32, 44, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.raysa-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.raysa-modal-content {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.raysa-modal.active .raysa-modal-content {
    transform: scale(1);
}

.raysa-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.raysa-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1a365d;
}

.modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #a0aec0;
    transition: color 0.15s;
}

.modal-close:hover {
    color: #2d3748;
}

.raysa-modal-body {
    padding: 24px;
    overflow-y: auto;
}

.modal-table-wrapper {
    border: 1px solid #edf2f7;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 15px;
}

.raysa-modal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.raysa-modal-table th {
    background-color: #f7fafc;
    padding: 10px 12px;
    text-align: left;
    font-weight: 700;
    color: #4a5568;
    border-bottom: 1px solid #edf2f7;
}

.raysa-modal-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #edf2f7;
}

.raysa-modal-table tr:last-child td {
    border-bottom: none;
}

.col-qty {
    text-align: center;
    width: 80px;
}

.raysa-modal-table td.col-qty {
    text-align: center;
    font-weight: 800;
    color: #2b6cb0;
}

.raysa-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #edf2f7;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Success Card */
.success-card {
    max-width: 400px;
    padding: 40px 30px;
    text-align: center;
}

.success-check-icon {
    font-size: 64px;
    width: 64px;
    height: 64px;
    color: #38a169;
    margin-bottom: 15px;
    display: inline-block;
}

.success-card h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1a365d;
    margin: 0 0 10px 0;
}

.success-card p {
    font-size: 14px;
    color: #718096;
    line-height: 1.4;
    margin-bottom: 25px;
}

/* ==========================================
 * 8. HISTORY SIDEBAR DRAWER
 * ========================================== */
.raysa-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 32, 44, 0.4);
    z-index: 2500;
    display: flex;
    justify-content: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.raysa-drawer.active {
    opacity: 1;
    pointer-events: auto;
}

.raysa-drawer-content {
    background: #ffffff;
    width: 100%;
    max-width: 450px;
    height: 100%;
    box-shadow: -5px 0 25px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.raysa-drawer.active .raysa-drawer-content {
    transform: translateX(0);
}

.raysa-drawer-header {
    padding: 20px 24px;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.raysa-drawer-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1a365d;
}

.drawer-close {
    font-size: 24px;
    cursor: pointer;
    color: #a0aec0;
    transition: color 0.15s;
}

.drawer-close:hover {
    color: #2d3748;
}

.raysa-drawer-body {
    padding: 24px;
    overflow-y: auto;
    flex-grow: 1;
}

.no-history-msg {
    text-align: center;
    color: #a0aec0;
    font-style: italic;
    margin-top: 40px;
}

/* History Cards */
.history-order-card {
    background: #f7fafc;
    border: 1px solid #edf2f7;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.history-card-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    color: #4a5568;
    margin-bottom: 6px;
}

.history-card-header .order-id {
    color: #2b6cb0;
}

.history-card-header .order-date {
    color: #718096;
    font-weight: 500;
}

.history-card-summary {
    font-size: 12px;
    color: #4a5568;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.toggle-order-details {
    color: #a0aec0;
    font-size: 16px;
    transition: transform 0.2s;
}

.history-order-card.expanded .toggle-order-details {
    transform: rotate(180deg);
}

.history-card-details {
    margin-top: 12px;
    border-top: 1px dashed #cbd5e0;
    padding-top: 10px;
}

.history-card-details table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.history-card-details td, .history-card-details th {
    padding: 6px 4px;
    text-align: left;
}

.history-card-details th {
    font-weight: 700;
    color: #718096;
    border-bottom: 1px solid #edf2f7;
}

.history-card-details td {
    border-bottom: 1px solid #f7fafc;
}
.history-card-details tr:last-child td {
    border-bottom: none;
}

.alerts-frontend {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 15px;
}

/* Alert modifiers */
.alert-error {
    background-color: #fff5f5;
    border-left: 4px solid #e53e3e;
    color: #c53030;
}

.alert-success {
    background-color: #f0fff4;
    border-left: 4px solid #38a169;
    color: #256041;
}

.alert-info {
    background-color: #ebf8ff;
    border-left: 4px solid #3182ce;
    color: #2b6cb0;
}

/* Spacing helpers */
.mb-15 { margin-bottom: 15px; }
.mt-15 { margin-top: 15px; }
.mr-10 { margin-right: 10px; }
.pt-10 { padding-top: 10px; }
.d-flex { display: flex; }
.gap-10 { gap: 10px; }

/* ==========================================
 * 9. CATEGORY THUMBNAILS & PRODUCT COLORS
 * ========================================== */
.category-thumbnail {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    display: inline-block;
}

.subcat-thumbnail {
    width: 26px;
    height: 26px;
    margin-right: 8px;
}

.raysa-color-circle {
    display: inline-block;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    vertical-align: middle;
    margin-left: 8px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.05);
    cursor: help;
}

/* ==========================================
 * 10. CATEGORY ANCHOR NAV BAR (Option A) — Collapsible
 * ========================================== */
.raysa-category-nav {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    padding: 6px 14px;
    margin-bottom: 20px;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.raysa-category-nav:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
}

/* Toggle button */
.cat-nav-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 0;
    color: #4a5568;
    flex-shrink: 0;
    font-family: inherit;
    font-weight: 600;
}

.cat-nav-toggle-btn:focus {
    outline: none;
}

.cat-nav-icon {
    color: #4a5568;
    flex-shrink: 0;
}

.cat-nav-label {
    font-size: 12px;
    font-weight: 700;
    color: #4a5568;
    text-transform: none;
    letter-spacing: 0.3px;
    white-space: nowrap;
    line-height: 1;
}

.cat-nav-chevron {
    display: inline-block;
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    color: #718096;
    margin-left: 4px;
}

/* Expanded state */
.raysa-category-nav.expanded {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: #ffffff;
    border-color: #c3d8f8;
    border-radius: 16px;
    padding: 14px 18px;
    box-shadow: 0 4px 16px rgba(43, 108, 176, 0.08);
    width: 100%;
}

.raysa-category-nav.expanded:hover {
    background: #ffffff;
    border-color: #c3d8f8;
}

.raysa-category-nav.expanded .cat-nav-toggle-btn {
    border-bottom: 1px solid #edf2f7;
    width: 100%;
    padding-bottom: 10px;
    margin-bottom: 4px;
    color: #2b6cb0;
}

.raysa-category-nav.expanded .cat-nav-icon {
    color: #2b6cb0;
}

.raysa-category-nav.expanded .cat-nav-label {
    color: #2b6cb0;
}

.raysa-category-nav.expanded .cat-nav-chevron {
    transform: rotate(90deg);
    color: #2b6cb0;
}

/* Pills container — hidden by default */
.cat-nav-links {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    padding-top: 8px;
}

.raysa-category-nav.expanded .cat-nav-links {
    display: flex;
}

.cat-nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 13px;
    background: #ffffff;
    border: 1px solid #c3d8f8;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #2b6cb0;
    text-decoration: none;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(43, 108, 176, 0.06);
}

.cat-nav-pill:hover {
    background: #2b6cb0;
    color: #ffffff;
    border-color: #2b6cb0;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(43, 108, 176, 0.2);
    text-decoration: none;
}

.cat-nav-pill.active {
    background: #1a365d;
    color: #ffffff;
    border-color: #1a365d;
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.25);
}

.cat-nav-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* ==========================================
 * 11. AUTOCOMPLETE SEARCH DROPDOWN (Option E)
 * ========================================== */
.raysa-portal-search-bar {
    position: relative;
}

.search-autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #c3d8f8;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(43, 108, 176, 0.12), 0 2px 8px rgba(0, 0, 0, 0.05);
    z-index: 500;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.2s ease, opacity 0.18s ease;
}

.search-autocomplete-dropdown.visible {
    max-height: 320px;
    opacity: 1;
    pointer-events: auto;
    overflow-y: auto;
}

.autocomplete-item {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.12s ease;
    border-bottom: 1px solid #f7fafc;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background-color: #ebf4ff;
}

.ac-sku {
    font-family: monospace;
    font-size: 11px;
    font-weight: 700;
    color: #a0aec0;
    white-space: nowrap;
    flex-shrink: 0;
    background: #f7fafc;
    padding: 1px 5px;
    border-radius: 4px;
}

.ac-name {
    font-size: 13px;
    font-weight: 500;
    color: #2d3748;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================
 * 12. BACK TO TOP BUTTON
 * ========================================== */
.raysa-back-to-top {
    position: fixed;
    bottom: 20px;
    right: 25px;
    width: 40px;
    height: 40px;
    background-color: #333333;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.22s ease, background-color 0.22s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.raysa-back-to-top.visible {
    opacity: 0.8;
    transform: translateY(0);
    pointer-events: auto;
}

.raysa-back-to-top:hover {
    background-color: #111111;
    color: #ffffff;
    opacity: 1;
    transform: translateY(-2px);
}

.raysa-back-to-top .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: 1;
}



/* ==========================================
 * 13. RESPONSIVE ADJUSTMENTS
 * ========================================== */
/* ==========================================
 * MOBILE RESPONSIVE — max-width: 640px
 * ========================================== */
@media (max-width: 640px) {

    /* Reduce outer wrapper padding — more space for content */
    .raysa-portal-wrapper {
        padding: 8px 6px;
        border-radius: 10px;
    }

    /* Login card — less horizontal padding on small screens */
    .raysa-login-card {
        padding: 28px 16px;
        margin: 20px auto;
        border-radius: 16px;
    }

    /* Portal content area */
    .client-logged-in {
        padding: 12px 10px;
    }

    /* Header — stack logo/greeting and logout button */
    .raysa-portal-header {
        padding-bottom: 12px;
        margin-bottom: 16px;
        gap: 10px;
    }
    .user-greeting h3 {
        font-size: 16px;
    }

    /* Floating bar — tighter on mobile */
    .raysa-floating-bar {
        width: calc(100% - 16px);
        padding: 12px 14px;
        bottom: 16px;
        border-radius: 16px;
    }

    /* Category nav bar */
    .raysa-category-nav {
        padding: 7px 10px;
    }
    .cat-nav-pill {
        font-size: 11px;
        padding: 4px 10px;
    }

    /* Product rows — compact spacing */
    .product-row {
        padding: 8px 6px;
        gap: 8px;
    }
    .prod-sku {
        font-size: 10px;
    }
    .prod-name {
        font-size: 13px;
    }

    /* Category titles */
    .category-title.level-1-title {
        font-size: 13px;
        padding: 10px 10px;
    }
    .category-title.level-2-title {
        font-size: 12px;
        padding: 8px 10px;
    }

    /* Order summary / floating bar items */
    .bar-summary-text {
        font-size: 12px;
    }

    /* Back to top button — keep above floating bar */
    .raysa-back-to-top {
        bottom: 15px;
        right: 15px;
    }

    .raysa-back-to-top.summary-bar-active {
        bottom: 85px;
    }

    /* Search bar */
    .raysa-portal-search-bar input {
        font-size: 13px;
    }
}
