/* ═══════════════════════════════════════════
   STW TOP FLEXI NAVIGATION — FRONTEND STYLES
   All selectors prefixed with stw-tfn-JesusSaves-
   ═══════════════════════════════════════════ */

/* ─── Navigation Bar (shared) ─── */

.stw-tfn-JesusSaves-nav-bar {
    width: 100%;
    box-sizing: border-box;
    z-index: 2147483640;
    position: relative;
}

.stw-tfn-JesusSaves-nav-inner {
    display: flex;
    align-items: stretch;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 48px;
}

.stw-tfn-JesusSaves-group {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
}

.stw-tfn-JesusSaves-group-left   { justify-content: flex-start; margin-right: auto; }
.stw-tfn-JesusSaves-group-center { justify-content: center; flex: 0 1 auto; }
.stw-tfn-JesusSaves-group-right  { justify-content: flex-end; margin-left: auto; }

/* ─── Desktop Nav ─── */

.stw-tfn-JesusSaves-desktop-nav {
    background: linear-gradient(45deg,
        var(--stw-tfn-JesusSaves-d-grad1, #ffffff),
        var(--stw-tfn-JesusSaves-d-grad2, #f8f9fa),
        var(--stw-tfn-JesusSaves-d-grad3, #e8eaed)
    );
    margin-top: var(--stw-tfn-JesusSaves-d-mt, 0px);
    margin-bottom: var(--stw-tfn-JesusSaves-d-mb, 0px);
}

/* ─── Mobile Nav ─── */

.stw-tfn-JesusSaves-mobile-nav {
    display: none;
    background: linear-gradient(45deg,
        var(--stw-tfn-JesusSaves-m-grad1, #ffffff),
        var(--stw-tfn-JesusSaves-m-grad2, #f8f9fa),
        var(--stw-tfn-JesusSaves-m-grad3, #e8eaed)
    );
    margin-top: var(--stw-tfn-JesusSaves-m-mt, 0px);
    margin-bottom: var(--stw-tfn-JesusSaves-m-mb, 0px);
}

/* Mobile bar removed - sections display directly */

/* ─── Section (shared) ─── */

.stw-tfn-JesusSaves-sec {
    position: relative;
    display: inline-flex;
    align-items: center;
    align-self: stretch;
    padding: 8px 16px;
    box-sizing: border-box;
    transition: background 0.2s ease;
}

/* ─── Image section ─── */

.stw-tfn-JesusSaves-sec-image img {
    display: block;
    object-fit: cover;
    max-width: none;
    flex-shrink: 0;
}

.stw-tfn-JesusSaves-sec-image a {
    display: inline-block;
    line-height: 0;
}

/* ─── Cart section ─── */

.stw-tfn-JesusSaves-cart-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.stw-tfn-JesusSaves-cart-link svg {
    width: 22px;
    height: 22px;
    transition: fill 0.2s ease;
}

.stw-tfn-JesusSaves-cart-count {
    font-size: 12px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}

/* ─── Text block section ─── */

.stw-tfn-JesusSaves-sec-text {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    text-decoration: none;
    line-height: 1.3;
}

.stw-tfn-JesusSaves-sec-text a {
    text-decoration: none;
    color: inherit;
}

.stw-tfn-JesusSaves-text-line1 {
    font-size: 14px;
}

.stw-tfn-JesusSaves-text-line2 {
    font-size: 12px;
}

/* ─── Icon + Text section ─── */

.stw-tfn-JesusSaves-sec-icon-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}

.stw-tfn-JesusSaves-sec-icon-text a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}

.stw-tfn-JesusSaves-icon-img {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    max-width: none;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 4px;
}

.stw-tfn-JesusSaves-icon-lines {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.stw-tfn-JesusSaves-icon-line1 {
    font-size: 13px;
    font-weight: 600;
}

.stw-tfn-JesusSaves-icon-line2 {
    font-size: 11px;
    color: #666;
}

/* ─── Shortcode section ─── */

.stw-tfn-JesusSaves-sec-shortcode {
    font-size: 13px;
}

/* ═══════════════════════════════════════════
   MEGA MENU (Desktop only)
   ═══════════════════════════════════════════ */

.stw-tfn-JesusSaves-mega-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 2147483647;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    padding: 16px;
    min-width: 280px;
    max-width: 750px;
}

.stw-tfn-JesusSaves-mega-dropdown.stw-tfn-JesusSaves-open {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.stw-tfn-JesusSaves-mega-child {
    text-align: center;
}

.stw-tfn-JesusSaves-mega-child a {
    display: block;
    text-decoration: none;
    color: #1d2327;
    transition: opacity 0.2s ease;
}

.stw-tfn-JesusSaves-mega-child a:hover {
    opacity: 0.8;
}

.stw-tfn-JesusSaves-mega-child-img {
    display: block;
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 6px;
}

.stw-tfn-JesusSaves-mega-child-title {
    font-size: 14px;
    font-weight: 600;
    margin: 4px 0 0;
    line-height: 1.3;
}

/* ─── Mobile Accordion for children ─── */

.stw-tfn-JesusSaves-mobile-children-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #0073aa;
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.stw-tfn-JesusSaves-mobile-children-toggle .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.stw-tfn-JesusSaves-mobile-children-toggle.stw-tfn-JesusSaves-expanded .dashicons {
    transform: rotate(180deg);
}

.stw-tfn-JesusSaves-mobile-children {
    display: none;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 0;
}

.stw-tfn-JesusSaves-mobile-children.stw-tfn-JesusSaves-children-open {
    display: flex;
}

.stw-tfn-JesusSaves-mobile-child a {
    display: block;
    text-decoration: none;
    color: #1d2327;
    text-align: center;
}

.stw-tfn-JesusSaves-mobile-child img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 4px;
}

.stw-tfn-JesusSaves-mobile-child-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: capitalize;
}

/* ═══════════════════════════════════════════
   SCHEMA.ORG (hidden)
   ═══════════════════════════════════════════ */

.stw-tfn-JesusSaves-schema-hidden {
    display: none !important;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

@media (max-width: 768px) {
    .stw-tfn-JesusSaves-desktop-nav {
        display: none !important;
    }
    .stw-tfn-JesusSaves-mobile-nav {
        display: block !important;
    }
    .stw-tfn-JesusSaves-mobile-nav .stw-tfn-JesusSaves-sec-image img {
        width: auto !important;
        height: auto !important;
        max-width: 100%;
        max-height: 50px;
        object-fit: contain;
    }
    .stw-tfn-JesusSaves-mobile-nav .stw-tfn-JesusSaves-icon-img {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px;
        min-height: 28px;
    }
}

@media (min-width: 769px) {
    .stw-tfn-JesusSaves-desktop-nav {
        display: block !important;
    }
    .stw-tfn-JesusSaves-mobile-nav {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .stw-tfn-JesusSaves-nav-inner {
        padding: 6px 10px;
        gap: 8px;
    }
    .stw-tfn-JesusSaves-group {
        gap: 8px;
    }
    .stw-tfn-JesusSaves-mobile-panel {
        padding: 8px 10px 12px;
    }
    .stw-tfn-JesusSaves-icon-img {
        width: 24px;
        height: 24px;
    }
    .stw-tfn-JesusSaves-icon-line1 { font-size: 11px; }
    .stw-tfn-JesusSaves-icon-line2 { font-size: 10px; }
    .stw-tfn-JesusSaves-text-line1 { font-size: 12px; }
    .stw-tfn-JesusSaves-text-line2 { font-size: 11px; }
}

/* ─── Edge positioning for mega dropdown ─── */

.stw-tfn-JesusSaves-mega-dropdown.stw-tfn-JesusSaves-edge-right {
    left: auto;
    right: 0;
}

/* ═══════════════════════════════════════════
   WC LOGIN SECTION
   ═══════════════════════════════════════════ */

.stw-tfn-JesusSaves-sec-wc-login {
    cursor: pointer;
}

.stw-tfn-JesusSaves-sec-wc-login .stw-tfn-JesusSaves-login-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}

/* ═══════════════════════════════════════════
   LOGIN MODAL POPUP
   ═══════════════════════════════════════════ */

.stw-tfn-JesusSaves-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2147483647;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.stw-tfn-JesusSaves-modal.stw-tfn-JesusSaves-modal-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.stw-tfn-JesusSaves-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--stw-tfn-JesusSaves-modal-overlay, rgba(0, 0, 0, 0.6));
    backdrop-filter: blur(4px);
}

.stw-tfn-JesusSaves-modal-content {
    position: relative;
    background: var(--stw-tfn-JesusSaves-modal-bg, #ffffff);
    border-radius: var(--stw-tfn-JesusSaves-modal-radius, 12px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    animation: stw-tfn-modal-fade-in 0.3s ease;
}

@keyframes stw-tfn-modal-fade-in {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.stw-tfn-JesusSaves-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--stw-tfn-JesusSaves-modal-close-bg, #f0f0f1);
    color: var(--stw-tfn-JesusSaves-modal-close-color, #50575e);
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.stw-tfn-JesusSaves-modal-close:hover {
    background: var(--stw-tfn-JesusSaves-modal-close-hover-bg, #dcdcde);
    color: var(--stw-tfn-JesusSaves-modal-close-hover-color, #1d2327);
}

.stw-tfn-JesusSaves-modal-panel {
    display: none;
}

.stw-tfn-JesusSaves-modal-panel.active {
    display: block;
}

.stw-tfn-JesusSaves-modal-title {
    margin: 0 0 24px;
    font-size: 24px;
    font-weight: 600;
    color: var(--stw-tfn-JesusSaves-modal-title-color, #1d2327);
    text-align: center;
}

.stw-tfn-JesusSaves-modal-desc {
    margin: -16px 0 20px;
    font-size: 14px;
    color: var(--stw-tfn-JesusSaves-modal-text-color, #50575e);
    text-align: center;
}

.stw-tfn-JesusSaves-form-group {
    margin-bottom: 16px;
}

.stw-tfn-JesusSaves-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--stw-tfn-JesusSaves-modal-label-color, #1d2327);
}

.stw-tfn-JesusSaves-form-group input[type="text"],
.stw-tfn-JesusSaves-form-group input[type="email"],
.stw-tfn-JesusSaves-form-group input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 1px solid var(--stw-tfn-JesusSaves-modal-input-border, #dcdcde);
    border-radius: var(--stw-tfn-JesusSaves-modal-input-radius, 6px);
    background: var(--stw-tfn-JesusSaves-modal-input-bg, #ffffff);
    color: var(--stw-tfn-JesusSaves-modal-input-color, #1d2327);
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.stw-tfn-JesusSaves-form-group input:focus {
    outline: none;
    border-color: var(--stw-tfn-JesusSaves-modal-input-focus, #2271b1);
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

.stw-tfn-JesusSaves-remember {
    margin-top: 12px;
}

.stw-tfn-JesusSaves-remember label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: normal;
    cursor: pointer;
}

.stw-tfn-JesusSaves-form-message {
    padding: 10px 12px;
    margin-bottom: 12px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
}

.stw-tfn-JesusSaves-form-message.success {
    display: block;
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.stw-tfn-JesusSaves-form-message.error {
    display: block;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.stw-tfn-JesusSaves-btn-submit {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    color: var(--stw-tfn-JesusSaves-modal-btn-color, #ffffff);
    background: var(--stw-tfn-JesusSaves-modal-btn-bg, #2271b1);
    border: none;
    border-radius: var(--stw-tfn-JesusSaves-modal-btn-radius, 6px);
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.stw-tfn-JesusSaves-btn-submit:hover {
    background: var(--stw-tfn-JesusSaves-modal-btn-hover, #135e96);
}

.stw-tfn-JesusSaves-btn-submit:active {
    transform: scale(0.98);
}

.stw-tfn-JesusSaves-btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.stw-tfn-JesusSaves-modal-links {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
}

.stw-tfn-JesusSaves-modal-links a {
    color: var(--stw-tfn-JesusSaves-modal-link-color, #2271b1);
    text-decoration: none;
}

.stw-tfn-JesusSaves-modal-links a:hover {
    text-decoration: underline;
}

.stw-tfn-JesusSaves-link-sep {
    margin: 0 8px;
    color: #dcdcde;
}

/* Modal responsive */
@media (max-width: 480px) {
    .stw-tfn-JesusSaves-modal-content {
        padding: 24px 20px;
        margin: 10px;
        width: calc(100% - 20px);
    }
    .stw-tfn-JesusSaves-modal-title {
        font-size: 20px;
    }
}
