/**
 * Moonio Modern Design Refresh
 * Modernizacja wyglądu bez zmiany layoutu Flatsome.
 * v1.1.0
 */

/* =============================================
 * 1. TYPOGRAFIA
 * ============================================= */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #1a1a2e;
    letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, h6,
.section-title,
.product-title {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #1a1a2e;
}

/* =============================================
 * 2. SECTION HEADINGS
 * ============================================= */
.section-title,
.product-section-title,
h3.section-title-normal {
    position: relative;
    padding-bottom: 16px;
    margin-bottom: 32px;
    font-size: 28px;
    font-weight: 800;
    text-transform: none;
    letter-spacing: -0.03em;
}

.section-title::after,
h3.section-title-normal::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 3px;
    background: linear-gradient(90deg, #2d6b42, #4ade80);
    border-radius: 2px;
}

/* =============================================
 * 3. PRODUCT CARDS — EQUAL HEIGHT FIX
 * ============================================= */
/* Flexbox equal height for product grids */
.products .row,
.product-row,
.row.large-columns-4,
.row.large-columns-3,
.row.large-columns-5 {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
}

.product-small {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.product-small .col-inner {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.product-small .box-image {
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    flex-shrink: 0;
}

.product-small .box-text {
    padding: 16px 14px 20px !important;
    text-align: center;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    justify-content: space-between !important;
}

/* Product title — fixed height area */
.product-small .product-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    color: #1a1a2e;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-small .product-title a {
    color: inherit;
    text-decoration: none;
}

.product-small .product-title a:hover {
    color: #2d6b42;
}

/* Price — consistent spacing */
.product-small .price,
.product .price {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 8px 0 12px;
    flex-shrink: 0;
}

/* Button — always at bottom */
.product-small .add_to_cart_button,
.product-small .button.product_type_variable {
    margin-top: auto !important;
    align-self: center;
}

/* Hover effects */
.product-small:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
    border-color: transparent;
}

.product-small .box-image img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-small:hover .box-image img {
    transform: scale(1.05);
}

/* Column wrapper — ensure equal height */
.product-small .col-inner,
.products .product-small > .col-inner {
    height: 100% !important;
}

.products .col,
.product-row > .col {
    display: flex !important;
}

.product .price del {
    opacity: 0.4;
    font-weight: 400;
    font-size: 13px;
}

.product .price ins {
    color: #dc2626;
    text-decoration: none;
    font-weight: 700;
}

/* =============================================
 * 4. BUTTONS
 * ============================================= */
.button,
button:not(.flickity-prev-next-button):not(.search-submit):not(.searchform button):not(.moonio-exit-popup-close),
input[type="submit"]:not(.searchform input[type="submit"]),
.add_to_cart_button,
.product_type_variable,
.single_add_to_cart_button,
.checkout-button {
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    letter-spacing: 0.02em !important;
    text-transform: uppercase !important;
    padding: 12px 24px !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(45, 107, 66, 0.15);
}

/* Search button — match search input height */
.searchform .search-submit,
.searchform button[type="submit"] {
    padding: 10px 14px !important;
    font-size: 14px !important;
    border-radius: 0 12px 12px 0 !important;
    box-shadow: none !important;
    min-height: 0 !important;
    line-height: 1.2 !important;
}

.button:hover,
.add_to_cart_button:hover,
.single_add_to_cart_button:hover {
    box-shadow: 0 4px 16px rgba(45, 107, 66, 0.25) !important;
    transform: translateY(-1px);
}

.product-small .button,
.product-small .add_to_cart_button,
.product-small .button.product_type_variable,
.product-small .button.product_type_simple {
    font-size: 11px !important;
    padding: 10px 16px !important;
    border-radius: 10px !important;
    min-width: 120px;
    text-align: center;
}

/* Consistent "Wybierz opcje" vs "Dodaj do koszyka" styling */
.product-small .button.product_type_variable {
    background: transparent !important;
    color: #2d6b42 !important;
    border: 1.5px solid #2d6b42 !important;
    box-shadow: none;
}

.product-small .button.product_type_variable:hover {
    background: #2d6b42 !important;
    color: #fff !important;
}

/* =============================================
 * 5. BADGE "PROMOCJA!"
 * ============================================= */
.badge-container .badge-inner,
.onsale,
.callout {
    background: linear-gradient(135deg, #dc2626, #ef4444) !important;
    color: #fff !important;
    border-radius: 20px !important;
    padding: 4px 12px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3) !important;
}

/* =============================================
 * 6. HEADER
 * ============================================= */
.header-main {
    padding: 12px 0 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: none !important;
}

.header-nav .nav > li > a {
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 14px 20px !important;
    transition: color 0.2s ease;
}

.header-nav .nav > li > a:hover {
    color: #2d6b42 !important;
}

.header-bottom,
.top-divider {
    background: linear-gradient(90deg, #1e4a2e, #2d6b42, #1e4a2e) !important;
}

.searchform input[type="search"] {
    border-radius: 12px !important;
    border: 1px solid #e5e7eb !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #f9fafb;
}

.searchform input[type="search"]:focus {
    border-color: #2d6b42 !important;
    box-shadow: 0 0 0 3px rgba(45, 107, 66, 0.1) !important;
    background: #fff;
    outline: none;
}

.searchform .search-submit,
.searchform button {
    border-radius: 0 12px 12px 0 !important;
}

/* =============================================
 * 7. TRUST BADGES / USP
 * ============================================= */
.col.pb-0 .icon-box,
.icon-box {
    background: #f8faf9;
    border-radius: 16px;
    padding: 28px 20px !important;
    transition: all 0.3s ease;
    border: 1px solid rgba(45, 107, 66, 0.08);
}

.icon-box:hover {
    background: #fff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.icon-box h5 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.icon-box p {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
}

/* =============================================
 * 8. NEWSLETTER INPUT
 * ============================================= */
.mc4wp-form input[type="email"],
input[placeholder*="email"],
input[placeholder*="adres email"] {
    border-radius: 12px !important;
    border: 2px solid #e5e7eb !important;
    padding: 14px 18px !important;
    font-size: 15px !important;
    transition: all 0.2s ease;
    background: #fff !important;
}

.mc4wp-form input[type="email"]:focus,
input[placeholder*="email"]:focus {
    border-color: #2d6b42 !important;
    box-shadow: 0 0 0 3px rgba(45, 107, 66, 0.1) !important;
}

/* =============================================
 * 9. PRODUCERS
 * ============================================= */
.banner .banner-layers {
    border-radius: 16px;
    overflow: hidden;
}

/* =============================================
 * 10. PRODUCT PAGE — tabs
 * ============================================= */
.woocommerce-tabs .tabs li a,
.tabbed-content .tabs li a {
    font-weight: 600 !important;
    font-size: 13px !important;
    letter-spacing: 0.03em !important;
    text-transform: uppercase !important;
    padding: 12px 24px !important;
    border-radius: 12px 12px 0 0 !important;
    transition: all 0.2s ease;
}

.woocommerce-tabs .tabs li.active a {
    color: #2d6b42 !important;
    border-bottom: 3px solid #2d6b42 !important;
}

.product-thumbnails .col {
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.product-thumbnails .col:hover,
.product-thumbnails .col.active {
    border-color: #2d6b42;
}

.variable-item {
    border-radius: 10px !important;
    transition: all 0.2s ease !important;
}

.variable-item.selected,
.variable-item:hover {
    box-shadow: 0 0 0 2px #2d6b42 !important;
}

/* =============================================
 * 11. BREADCRUMB
 * ============================================= */
.woocommerce-breadcrumb,
.breadcrumbs {
    font-size: 12px;
    color: #94a3b8;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.woocommerce-breadcrumb a,
.breadcrumbs a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.woocommerce-breadcrumb a:hover,
.breadcrumbs a:hover {
    color: #2d6b42;
}

/* =============================================
 * 12. SLIDER DOTS + ARROWS
 * ============================================= */
.flickity-page-dots .dot {
    width: 24px !important;
    height: 4px !important;
    border-radius: 4px !important;
    background: #cbd5e1 !important;
    opacity: 1 !important;
    transition: all 0.3s ease;
    margin: 0 3px !important;
}

.flickity-page-dots .dot.is-selected {
    background: #2d6b42 !important;
    width: 40px !important;
}

.flickity-prev-next-button {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

.flickity-prev-next-button:hover {
    background: #fff !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
}

/* =============================================
 * 13. FOOTER
 * ============================================= */
.footer-wrapper,
footer.footer {
    background: #f8faf9 !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.footer-content .widget-title,
.footer-widgets h3 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #1a1a2e;
    margin-bottom: 16px;
}

.footer-content a {
    color: #64748b;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-content a:hover {
    color: #2d6b42;
}

.absolute-footer {
    background: #f1f5f3 !important;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    padding: 16px 0 !important;
    font-size: 13px;
    color: #94a3b8;
}

.payment-icons .payment-icon {
    opacity: 0.5;
    transition: opacity 0.2s ease;
    filter: grayscale(100%);
}

.payment-icons .payment-icon:hover {
    opacity: 1;
    filter: grayscale(0%);
}

/* =============================================
 * 14. ANIMATIONS
 * ============================================= */
@media (prefers-reduced-motion: no-preference) {
    .product-small,
    .icon-box,
    .banner {
        animation: moonio-fadein 0.6s ease both;
    }

    @keyframes moonio-fadein {
        from { opacity: 0; transform: translateY(12px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .product-small:nth-child(1) { animation-delay: 0.05s; }
    .product-small:nth-child(2) { animation-delay: 0.1s; }
    .product-small:nth-child(3) { animation-delay: 0.15s; }
    .product-small:nth-child(4) { animation-delay: 0.2s; }
    .product-small:nth-child(5) { animation-delay: 0.25s; }
    .product-small:nth-child(6) { animation-delay: 0.3s; }
    .product-small:nth-child(7) { animation-delay: 0.35s; }
    .product-small:nth-child(8) { animation-delay: 0.4s; }
}

/* =============================================
 * 15. CATEGORY LABELS
 * ============================================= */
.product-small .product-cat,
.product .product-cat,
.product-small .box-text .category {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #2d6b42;
    opacity: 0.7;
}

/* =============================================
 * 16. QUANTITY SELECTOR
 * ============================================= */
.quantity {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.quantity .minus,
.quantity .plus {
    background: #f8faf9 !important;
    border: none !important;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity .minus:hover,
.quantity .plus:hover {
    background: #e8f5e9 !important;
}

.quantity .qty {
    border: none !important;
    text-align: center;
    font-weight: 600;
    font-size: 15px;
    width: 50px;
}

/* =============================================
 * 17. SCROLLBAR + GLOBAL
 * ============================================= */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

body, #wrapper, .page-wrapper {
    background: #fafbfc !important;
}

.container {
    max-width: 1280px;
}

::selection {
    background: rgba(45, 107, 66, 0.15);
    color: #1a1a2e;
}

/* =============================================
 * 18. MOBILE
 * ============================================= */
@media (max-width: 849px) {
    .product-small {
        border-radius: 12px;
        margin-bottom: 12px;
    }

    .product-small .box-text {
        padding: 12px 10px 16px !important;
    }

    .product-small .product-title {
        font-size: 13px;
        min-height: 36px;
    }

    .product-small .price {
        font-size: 14px;
    }

    .section-title,
    h3.section-title-normal {
        font-size: 22px;
        margin-bottom: 24px;
    }

    .product-small .button {
        font-size: 10px !important;
        padding: 8px 12px !important;
        border-radius: 8px !important;
    }

    .back-to-top {
        border-radius: 50% !important;
        width: 44px !important;
        height: 44px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    }
}
