/**
 * Moonio Children's E-commerce UX — Styles
 * v1.0.0
 */

/* =============================================
 * 1. TOPBAR
 * ============================================= */
.moonio-topbar {
    background: linear-gradient(90deg, #1e4a2e, #2d6b42);
    color: #fff;
    text-align: center;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    z-index: 100;
}

.moonio-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.moonio-topbar-sep {
    opacity: 0.4;
}

@media (max-width: 849px) {
    .moonio-topbar {
        font-size: 11px;
        padding: 6px 12px;
    }
    .moonio-topbar-sep {
        display: none;
    }
    .moonio-topbar-inner {
        gap: 4px;
    }
    .moonio-topbar-item:nth-child(n+4) {
        display: none;
    }
}

/* =============================================
 * 2. TRUST BAR (homepage, pod hero)
 * ============================================= */
.moonio-trust-bar {
    background: #f0fdf4 !important;
    border-bottom: 1px solid rgba(45,107,66,0.1) !important;
    padding: 28px 16px !important;
}

.moonio-trust-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 24px !important;
}

.moonio-trust-item {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
}

.moonio-trust-icon {
    flex-shrink: 0 !important;
    width: 52px !important;
    height: 52px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #fff !important;
    border-radius: 14px !important;
    box-shadow: 0 2px 8px rgba(45,107,66,0.08) !important;
}

.moonio-trust-item strong {
    display: block !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
    margin-bottom: 2px !important;
}

.moonio-trust-item > div > span {
    font-size: 12px !important;
    color: #64748b !important;
}

@media (max-width: 849px) {
    .moonio-trust-bar {
        padding: 20px 16px;
    }
    .moonio-trust-bar-inner {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .moonio-trust-icon {
        width: 44px;
        height: 44px;
    }
    .moonio-trust-item strong {
        font-size: 13px;
    }
}

/* =============================================
 * 2b. HOMEPAGE — "Jak dziala Moonio?" (3 kroki)
 * ============================================= */
.moonio-how-it-works {
    background: #fff !important;
    padding: 64px 16px !important;
    text-align: center !important;
}

.moonio-section-inner {
    max-width: 1100px !important;
    margin: 0 auto !important;
    text-align: center !important;
}

.moonio-section-heading {
    font-size: 28px !important;
    font-weight: 800 !important;
    color: #1a1a2e !important;
    margin: 0 0 8px !important;
    letter-spacing: -0.02em !important;
    text-align: center !important;
}

.moonio-section-subheading {
    font-size: 15px !important;
    color: #64748b !important;
    margin: 0 0 40px !important;
    text-align: center !important;
}

.moonio-steps-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 32px !important;
}

.moonio-step-card {
    position: relative !important;
    background: #fafbfc !important;
    border: 1px solid rgba(0,0,0,0.05) !important;
    border-radius: 20px !important;
    padding: 36px 28px 32px !important;
    transition: all 0.3s ease;
    text-align: center !important;
}

.moonio-step-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.07);
    transform: translateY(-3px);
}

.moonio-step-number {
    position: absolute !important;
    top: -14px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 28px !important;
    height: 28px !important;
    background: linear-gradient(135deg, #2d6b42, #4ade80) !important;
    color: #fff !important;
    border-radius: 50% !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(45,107,66,0.3);
}

.moonio-step-icon {
    margin-bottom: 16px !important;
}

.moonio-step-card h4 {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
    margin: 0 0 8px !important;
}

.moonio-step-card p {
    font-size: 14px !important;
    color: #64748b !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}

@media (max-width: 849px) {
    .moonio-how-it-works {
        padding: 40px 16px !important;
    }
    .moonio-section-heading {
        font-size: 22px !important;
    }
    .moonio-section-subheading {
        margin-bottom: 28px !important;
    }
    .moonio-steps-grid {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }
}

/* =============================================
 * 2c. HOMEPAGE — "Jak dbamy o bezpieczenstwo?"
 * ============================================= */
.moonio-safety-section {
    background: #f8faf9 !important;
    padding: 64px 16px !important;
    border-top: 1px solid rgba(0,0,0,0.04) !important;
    border-bottom: 1px solid rgba(0,0,0,0.04) !important;
    text-align: center !important;
}

.moonio-safety-hp-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 24px !important;
    text-align: center !important;
}

.moonio-safety-hp-card {
    background: #fff !important;
    border-radius: 16px !important;
    padding: 32px 20px !important;
    border: 1px solid rgba(45,107,66,0.06) !important;
    transition: all 0.3s ease;
    text-align: center !important;
}

.moonio-safety-hp-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.moonio-safety-hp-icon {
    width: 64px !important;
    height: 64px !important;
    background: #f0fdf4 !important;
    border-radius: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 16px !important;
}

.moonio-safety-hp-card h4 {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #1a1a2e !important;
    margin: 0 0 8px !important;
}

.moonio-safety-hp-card p {
    font-size: 13px !important;
    color: #64748b !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}

@media (max-width: 849px) {
    .moonio-safety-section {
        padding: 40px 16px !important;
    }
    .moonio-safety-hp-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }
    .moonio-safety-hp-card {
        padding: 24px 16px !important;
    }
}

/* =============================================
 * 3. VENDOR BADGE (product page)
 * ============================================= */
.moonio-vendor-badge {
    margin-bottom: 8px;
}

.moonio-vendor-badge a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #2d6b42;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    padding: 4px 12px;
    background: #f0fdf4;
    border-radius: 20px;
    border: 1px solid #bbf7d0;
    transition: all 0.2s ease;
}

.moonio-vendor-badge a::before {
    content: "\2728";
    font-size: 14px;
}

.moonio-vendor-badge a:hover {
    background: #dcfce7;
    border-color: #86efac;
}

/* =============================================
 * 3b. VENDOR TAB (product page)
 * ============================================= */
.moonio-vendor-tab {
    max-width: 700px;
}

.moonio-vendor-tab-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.moonio-vendor-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
}

.moonio-vendor-tab-header h4 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 4px;
}

.moonio-vendor-location {
    font-size: 13px;
    color: #64748b;
}

.moonio-vendor-bio {
    font-size: 14px;
    line-height: 1.7;
    color: #374151;
    margin-bottom: 20px;
}

.moonio-vendor-bio p {
    margin: 0 0 12px;
}

.moonio-vendor-bio-empty {
    font-size: 14px;
    color: #94a3b8;
    font-style: italic;
    margin-bottom: 20px;
}

.moonio-vendor-link {
    display: inline-block !important;
}

/* =============================================
 * 4. PRODUCT TRUST ICONS (inline)
 * ============================================= */
.moonio-product-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0;
    padding: 12px 0;
    border-top: 1px solid #f1f5f9;
}

.moonio-product-trust span {
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* =============================================
 * 5. STICKY ADD TO CART (mobile)
 * ============================================= */
.moonio-sticky-atc {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    padding: 12px 16px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.moonio-sticky-atc.visible {
    transform: translateY(0);
}

@media (max-width: 849px) {
    .moonio-sticky-atc {
        display: block;
    }
}

.moonio-sticky-atc-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.moonio-sticky-atc-name {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
    display: block;
}

.moonio-sticky-atc-price {
    font-size: 15px;
    font-weight: 700;
    color: #2d6b42;
}

.moonio-sticky-atc-btn {
    flex-shrink: 0;
    padding: 12px 20px !important;
    font-size: 13px !important;
    white-space: nowrap;
}

/* =============================================
 * 6. FREE SHIPPING PROGRESS BAR (cart)
 * ============================================= */
.moonio-shipping-progress {
    background: #f8faf9;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.moonio-shipping-text {
    font-size: 14px;
    color: #1a1a2e;
    margin-bottom: 10px;
    text-align: center;
}

.moonio-shipping-text.moonio-shipping-free {
    color: #2d6b42;
    font-weight: 700;
}

.moonio-shipping-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.moonio-shipping-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2d6b42, #4ade80);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* =============================================
 * 7. SAFETY TAB
 * ============================================= */
.moonio-safety-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.moonio-safety-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: #f8faf9;
    border-radius: 12px;
    border: 1px solid rgba(45,107,66,0.08);
}

.moonio-safety-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.moonio-safety-item strong {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
    color: #1a1a2e;
}

.moonio-safety-item p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.moonio-safety-note {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 16px;
}

@media (max-width: 600px) {
    .moonio-safety-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================
 * 8. SHIPPING TAB
 * ============================================= */
.moonio-shipping-tab h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 20px 0 10px;
    color: #1a1a2e;
}

.moonio-shipping-tab h4:first-child {
    margin-top: 0;
}

.moonio-shipping-tab ul {
    list-style: none;
    padding: 0;
}

.moonio-shipping-tab li {
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    color: #374151;
}

.moonio-shipping-tab li:last-child {
    border-bottom: none;
}

/* =============================================
 * 9. REVIEWS SECTION (homepage)
 * ============================================= */
.moonio-reviews-section {
    max-width: 1200px;
    margin: 48px auto;
    padding: 0 16px;
}

.moonio-reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 24px;
}

.moonio-review-card {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
}

.moonio-review-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.moonio-review-stars {
    color: #f59e0b;
    font-size: 18px;
    margin-bottom: 12px;
}

.moonio-review-text {
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
    margin-bottom: 16px;
    font-style: italic;
}

.moonio-review-author {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a2e;
}

.moonio-review-product {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}

@media (max-width: 849px) {
    .moonio-reviews-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* =============================================
 * 10. CHECKOUT PROGRESS STEPS
 * ============================================= */
.moonio-checkout-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0 auto 32px;
    max-width: 500px;
    padding: 20px 0;
}

.moonio-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.moonio-step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
}

.moonio-step.active .moonio-step-num {
    background: #2d6b42;
    color: #fff;
    box-shadow: 0 2px 8px rgba(45,107,66,0.3);
}

.moonio-step.completed .moonio-step-num {
    background: #dcfce7;
    color: #2d6b42;
}

.moonio-step-label {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.moonio-step.active .moonio-step-label {
    color: #2d6b42;
}

.moonio-step.completed .moonio-step-label {
    color: #2d6b42;
}

.moonio-step-line {
    flex-grow: 1;
    height: 2px;
    background: #e5e7eb;
    margin: 0 12px;
    margin-bottom: 24px;
    min-width: 40px;
}

@media (max-width: 500px) {
    .moonio-step-label {
        font-size: 10px;
    }
    .moonio-step-num {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
}

/* =============================================
 * 11. FOOTER ENHANCEMENTS
 * ============================================= */

/* Fix: unhide CF7 newsletter form in footer */
.footer-content .wpcf7,
.footer-widgets .wpcf7 {
    display: block !important;
}

.footer-widgets .wpcf7 input[type="email"] {
    width: 100%;
    margin-bottom: 8px;
}

.footer-widgets .wpcf7 input[type="submit"] {
    width: 100%;
    font-size: 12px !important;
    padding: 10px 16px !important;
}

.footer-widgets .wpcf7 label {
    font-size: 13px;
    color: #64748b;
}

/* Hide old Flatsome USP icon-box row (replaced by trust bar) */
#content > .row.row-divided {
    display: none !important;
}
.moonio-footer-extra {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.moonio-footer-extra-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.moonio-footer-company {
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.moonio-footer-sep {
    opacity: 0.4;
}

.moonio-footer-social {
    display: flex;
    align-items: center;
    gap: 12px;
}

.moonio-footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e8f5e9;
    color: #2d6b42 !important;
    transition: all 0.2s ease;
}

.moonio-footer-social a:hover {
    background: #2d6b42;
    color: #fff !important;
}

.moonio-footer-social a svg {
    stroke: currentColor;
}

.moonio-payment-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    width: 100%;
    justify-content: center;
}

.moonio-payment-icons span {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.03em;
}

@media (max-width: 849px) {
    .moonio-footer-extra-inner {
        justify-content: center;
        text-align: center;
    }
    .moonio-footer-company {
        justify-content: center;
        width: 100%;
    }
}

/* =============================================
 * 12. UNIFIED SECTION SPACING (homepage)
 * ============================================= */
#content > .container.section-title-container,
#content > .row,
#content > [class*="row-"],
#content > .banner-grid {
    margin-top: 0;
    padding-top: 60px;
    padding-bottom: 60px;
}

#content > .gap-element {
    display: none !important;
}

/* Flatsome section containers — uniform spacing */
.section-title-container.bestsellers,
.section-title-container {
    margin-bottom: 0 !important;
    padding-bottom: 8px;
}

/* Product grids after section titles */
#content > .row.products {
    padding-top: 0;
    padding-bottom: 64px;
}

/* Icon boxes row (USP bar with 3 items) */
#content > .row .col.pb-0 {
    padding-bottom: 0 !important;
}

@media (max-width: 849px) {
    #content > .container.section-title-container,
    #content > .row,
    #content > [class*="row-"],
    #content > .banner-grid {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    #content > .row.products {
        padding-top: 0;
        padding-bottom: 40px;
    }
}
