/*
Theme Name: Paese Child (Blocksy)
Theme URI: https://paese.pl
Description: Motyw potomny dla Blocksy Pro – Paese Store
Author: Paese
Template: blocksy
Version: 2.1.0
Requires PHP: 7.4
Text Domain: paese
*/

/* ======================================================
   GLOBAL RESPONSIVE BASE
====================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
}

/* Fluid typography */
h1 {
    font-size: clamp(24px, 2.4vw, 36px);
}

h2 {
    font-size: clamp(20px, 2vw, 28px);
}

h3 {
    font-size: clamp(18px, 1.6vw, 22px);
}

p {
    font-size: clamp(12px, 0.95vw, 14px);
}

/* ======================================================
   ACCESSIBILITY
====================================================== */

.paese-home-h1 {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

[data-header*="type-1"] .ct-header [data-id="menu"] .sub-menu .ct-menu-link {
    --theme-text-transform: none !important;
    text-transform: none !important;
}

/* ======================================================
   BLOCKSY / THEME OVERRIDES
====================================================== */

/* Home only — remove vertical spacing */
body.home .ct-container-full[data-vertical-spacing],
body.home .ct-container[data-vertical-spacing] {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Mega menu images */
.ct-header [data-id="menu"] .sub-menu .stk-block-image,
.ct-header [data-id="menu"] .sub-menu .stk-img-wrapper,
.ct-header [data-id="menu"] .sub-menu .stk-link,
.ct-header [data-id="menu"] .sub-menu figure {
    width: 100% !important;
    max-width: 100% !important;
}

.ct-header [data-id="menu"] .sub-menu .stk-img-wrapper img {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
}

.ct-header [data-id="menu"] .sub-menu .stk-img-wrapper,
.ct-header [data-id="menu"] .sub-menu .stk-img-wrapper img,
.ct-header [data-id="menu"] .sub-menu .stk-link,
.ct-header [data-id="menu"] .sub-menu figure {
    border-radius: 20px !important;
}

.ct-header [data-id="menu"] .sub-menu .stk-img-wrapper,
.ct-header [data-id="menu"] .sub-menu .stk-link,
.ct-header [data-id="menu"] .sub-menu figure {
    overflow: hidden !important;
}

/* Mobile menu close icon */
.ct-toggle-close svg.ct-icon {
    fill: var(--theme-palette-color-5) !important;
}

/**
 * ==========================================================
 * UNIWERSALNE PRZYCISKI — WordPress / Blocksy / WooCommerce
 * ==========================================================
 */

/* 1. Bazowy styl przycisków */
:is(
    .button,
    a.button,
    .wp-element-button,
    .woocommerce-button,
    .woocommerce a.button,
    .woocommerce button.button,
    .woocommerce input.button,
    input[type="submit"],
    input[type="button"].button,
    input[type="reset"].button
):not(
    .dgwt-wcas-search-submit,
    .search-submit,
    .wp-block-search__button,

    .paese-hero-nav,

    .paese-reviews-filter-trigger,
    .paese-review-vote,

    .quantity .plus,
    .quantity .minus,

    .fc-swatch,

    .ct-icon-container,
    .ct-button-ghost,

    .yith-wcwl-add-button a,
    .yith-wcwl-add-to-wishlist a,
    .add_to_wishlist,

    .block-carousel__dot,
    .block-carousel__button,
    .splide__arrow,
    .splide__pagination__page,
    .swiper-button-prev,
    .swiper-button-next,
    .swiper-pagination-bullet,
    .flickity-button
) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;

    min-height: var(--theme-button-min-height);
    padding: var(--theme-button-padding);

    line-height: 1.2;
    text-align: center;
    text-decoration: none;

    color: var(--theme-button-text-initial-color);
    background-color: var(--theme-button-background-initial-color);
    border: var(--theme-button-border);
    border-radius: var(--theme-button-border-radius);
    box-shadow: var(--theme-button-shadow);

    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;

    transition:
            color 0.2s ease,
            background-color 0.2s ease,
            border-color 0.2s ease,
            box-shadow 0.2s ease,
            transform 0.2s ease;
}

/* 2. Hover / focus */
:is(
    .button,
    a.button,
    .wp-element-button,
    .woocommerce-button,
    .woocommerce a.button,
    .woocommerce button.button,
    .woocommerce input.button,
    input[type="submit"],
    input[type="button"].button,
    input[type="reset"].button
):not(
    .dgwt-wcas-search-submit,
    .search-submit,
    .wp-block-search__button,

    .paese-hero-nav,

    .paese-reviews-filter-trigger,
    .paese-review-vote,

    .quantity .plus,
    .quantity .minus,

    .fc-swatch,

    .ct-icon-container,
    .ct-button-ghost,

    .yith-wcwl-add-button a,
    .yith-wcwl-add-to-wishlist a,
    .add_to_wishlist,

    .block-carousel__dot,
    .block-carousel__button,
    .splide__arrow,
    .splide__pagination__page,
    .swiper-button-prev,
    .swiper-button-next,
    .swiper-pagination-bullet,
    .flickity-button
):is(:hover, :focus-visible) {
    color: var(--theme-button-text-hover-color);
    background-color: var(--theme-button-background-hover-color);
    border-color: var(--theme-button-border-hover-color);
    transform: var(--theme-button-transform);
    text-decoration: none;
}

/* 3. Stan disabled */
:is(
    .button,
    a.button,
    .wp-element-button,
    .woocommerce-button,
    .woocommerce a.button,
    .woocommerce button.button,
    .woocommerce input.button,
    input[type="submit"],
    input[type="button"].button,
    input[type="reset"].button
):disabled,
:is(
    .button,
    a.button,
    .wp-element-button,
    .woocommerce-button,
    .woocommerce a.button,
    .woocommerce button.button,
    .woocommerce input.button,
    input[type="submit"],
    input[type="button"].button,
    input[type="reset"].button
).disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

/* ======================================================
   PRODUCT DESCRIPTION / ACF DESCRIPTION
====================================================== */

#tab-description,
#tab-description p {
    font-size: 16px;
    line-height: 1.8;
}

#tab-description strong {
    font-weight: 700;
}

#tab-description ul {
    padding-left: 20px;
    margin: 16px 0;
}

#tab-description li {
    margin-bottom: 6px;
}

/* ======================================================
   RESPONSIVE
====================================================== */

@media (max-width: 768px) {
    .fc-contact-form {
        max-width: 100%;
    }

    .fc-contact-form .fc-form-info p {
        font-size: 11px;
    }
}

/* Cancel order page spacing */
.paese-cancel-order-page main.site-main {
    padding-top: 40px;
    padding-bottom: 40px;
}

.paese-cancel-order-page .paese-acp24-cancel-page {
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 767px) {
    .paese-cancel-order-page main.site-main {
        padding-top: 24px;
        padding-bottom: 24px;
    }
}

/* CF7 */

.fc-form-row {
    margin-bottom: 15px;
}

/* WISHLIST - Dodaj do koszyka jako przycisk */
.wishlist_table .product-add-to-cart a.add_to_cart_button,
.wishlist_table .product-add-to-cart a.product_type_simple {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    background: #b58b6a !important;
    color: #fff !important;

    padding: 12px 22px !important;
    border-radius: 8px !important;
    border: 0 !important;

    font-weight: 500;
    text-decoration: none !important;

    transition: background-color .2s ease, color .2s ease;
}

.wishlist_table .product-add-to-cart a.add_to_cart_button:hover,
.wishlist_table .product-add-to-cart a.product_type_simple:hover {
    background: #9f7658 !important;
    color: #fff !important;
}


/* WISHLIST - Usuń jako zwykły link */
.wishlist_table .product-add-to-cart a.remove_from_wishlist {
    display: inline !important;

    background: transparent !important;
    color: #222 !important;

    padding: 0 !important;
    margin: 10px 0 0 !important;

    border: 0 !important;
    border-radius: 0 !important;

    box-shadow: none !important;

    font-weight: 400 !important;
    text-decoration: underline !important;
    text-transform: none !important;
}

.wishlist_table .product-add-to-cart a.remove_from_wishlist:hover {
    color: #b58b6a !important;
    background: transparent !important;
}

.wishlist_table .product-add-to-cart {
    text-align: center;
}

.wishlist_table .product-add-to-cart a.add_to_cart_button {
    margin: 0 auto 10px !important;
}

.wishlist_table .product-add-to-cart a.remove_from_wishlist {
    display: block !important;
    width: fit-content;
    margin: 0 auto !important;
}

.wishlist_table tbody,
.wishlist_table tbody tr,
.wishlist_table tbody td {
    background-color: transparent !important;
}

.wishlist_table tbody tr {
    border-bottom: 1px solid #ddd;
}

.woocommerce table.shop_table.wishlist_table tr td {
    vertical-align: center;
}

.wishlist_table .product-add-to-cart a.add_to_cart_button {
    width: 145px !important;
    min-width: 145px !important;
    max-width: 145px !important;

    justify-content: center;
    text-align: center;
    white-space: nowrap;
}

/* ======================================================
   FLEXIBLE RETURNS / REFUNDS / PUBLIC FORM
====================================================== */

/* ------------------------------------------------------
   1. Formularz wyszukania zamówienia
------------------------------------------------------ */

.fr-refund-shortcode-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;

    width: 100%;
    max-width: 680px;

    margin: 0;
}

.fr-refund-shortcode-field-wrapper {
    display: flex;
    flex-direction: column;

    width: 100%;
    margin: 0;
}

.fr-refund-shortcode-label {
    display: block;

    margin: 0 0 8px;

    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;

    color: var(--theme-text-color);
}

.fr-refund-shortcode-field {
    display: block;

    width: 100%;
    min-height: 50px;

    margin: 0;
    padding: 12px 15px;

    font-size: 15px;
    line-height: 1.4;

    color: var(--theme-text-color);
    background-color: #fff;

    border: 1px solid var(--theme-form-field-border-initial-color);
    border-radius: var(--theme-form-field-border-radius, 8px);

    outline: none;

    transition:
            border-color 0.2s ease,
            box-shadow 0.2s ease;
}

.fr-refund-shortcode-field::placeholder {
    color: #7a7a7a;
    opacity: 1;
}

.fr-refund-shortcode-field:focus {
    border-color: var(--theme-form-field-border-focus-color);
    box-shadow: 0 0 0 1px var(--theme-form-field-border-focus-color);
}

.fr-refund-shortcode-field-wrapper:last-child {
    margin-top: 4px;
    align-items: flex-start;
}

.fr-refund-shortcode-submit {
    width: auto;
    min-width: 120px;

    margin: 0 !important;
}


/* ------------------------------------------------------
   2. Główny formularz zwrotu
------------------------------------------------------ */

.refund-front-form {
    width: 100%;
    margin: 0;
}

.refund-front-form .woocommerce-refund-details {
    width: 100%;
}

.refund-front-form .woocommerce-refund-details > h2 {
    margin: 0 0 12px;

    font-size: clamp(22px, 2vw, 28px);
    line-height: 1.3;
}

.refund-front-form .woocommerce-refund-details > h2 + p {
    margin: 0 0 24px;

    font-size: 14px;
    line-height: 1.6;
}


/* ------------------------------------------------------
   3. Komunikaty / błędy
------------------------------------------------------ */

#fr-front-refund-table-errors {
    margin: 0 0 20px;
}

#fr-front-refund-table-errors:empty {
    display: none;
}


/* ------------------------------------------------------
   4. Tabela produktów
------------------------------------------------------ */

.woocommerce-table-refund-details-wrapper {
    width: 100%;
    margin: 0 0 20px;

    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.woocommerce-table-refund-details {
    width: 100%;
    min-width: 820px;

    margin: 0;

    border-collapse: collapse;
    border-spacing: 0;
}

.woocommerce-table-refund-details th,
.woocommerce-table-refund-details td {
    padding: 14px 12px;

    font-size: 14px;
    line-height: 1.45;

    text-align: left;
    vertical-align: middle;

    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.woocommerce-table-refund-details thead th {
    font-weight: 600;
    white-space: nowrap;

    background: rgba(0, 0, 0, 0.025);
}

.woocommerce-table-refund-details .item-name {
    min-width: 240px;
}

.woocommerce-table-refund-details .item-name a {
    color: var(--theme-link-initial-color);
    font-weight: 500;
    text-decoration: none;
}

.woocommerce-table-refund-details .item-name a:hover {
    color: var(--theme-link-hover-color);
}

.woocommerce-table-refund-details .item-cost,
.woocommerce-table-refund-details .item-total {
    white-space: nowrap;
}

.woocommerce-table-refund-details .item-qty {
    min-width: 145px;
}


/* ------------------------------------------------------
   5. Ilość produktu
------------------------------------------------------ */

.woocommerce-table-refund-details .item-qty label {
    display: inline-block;
    margin: 0;
}

.woocommerce-table-refund-details .qty-input {
    width: 70px;
    min-height: 44px;

    margin: 0 8px 0 0;
    padding: 8px 10px;

    text-align: center;

    border: 1px solid var(--theme-form-field-border-initial-color);
    border-radius: var(--theme-form-field-border-radius, 8px);

    background: #fff;
}

.woocommerce-table-refund-details .qty-input:focus {
    border-color: var(--theme-form-field-border-focus-color);
    outline: none;
}

.woocommerce-table-refund-details .product-quantity {
    display: inline-block;
    white-space: nowrap;
}


/* ------------------------------------------------------
   6. Zaznacz wszystko
------------------------------------------------------ */

.refund-front-form .check-all-button {
    margin: 0 0 32px;
}

.refund-front-form .check-all-button .check {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;
    padding: 10px 18px;

    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;

    color: var(--theme-text-color);
    background: transparent;

    border: 1px solid var(--theme-form-field-border-initial-color);
    border-radius: var(--theme-button-border-radius);

    cursor: pointer;

    transition:
            color 0.2s ease,
            background-color 0.2s ease,
            border-color 0.2s ease;
}

.refund-front-form .check-all-button .check:hover,
.refund-front-form .check-all-button .check:focus-visible {
    color: var(--theme-button-text-initial-color);
    background: var(--theme-button-background-initial-color);
    border-color: var(--theme-button-background-initial-color);
}


/* ------------------------------------------------------
   7. Dane klienta / pola formularza
------------------------------------------------------ */

.refund-front-form .fr-request-form {
    display: flex;
    flex-direction: column;
    gap: 22px;

    width: 100%;
    max-width: 680px;

    margin-top: 8px;
}

.refund-front-form .fr-request-form .field-row {
    display: flex;
    flex-direction: column;

    width: 100%;
    margin: 0;
}

.refund-front-form .fr-request-form .field-row > label {
    display: block;

    margin: 0 0 8px;

    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;

    color: var(--theme-text-color);
}

.refund-front-form .fr-required-field.required {
    color: #b42318;
}

.refund-front-form .fr-request-form input[type="text"],
.refund-front-form .fr-request-form input[type="email"],
.refund-front-form .fr-request-form input[type="number"],
.refund-front-form .fr-request-form select,
.refund-front-form .fr-request-form textarea {
    display: block;

    width: 100%;

    margin: 0;
    padding: 12px 15px;

    font-size: 15px;
    line-height: 1.4;

    color: var(--theme-text-color);
    background-color: #fff;

    border: 1px solid var(--theme-form-field-border-initial-color);
    border-radius: var(--theme-form-field-border-radius, 8px);

    outline: none;

    transition:
            border-color 0.2s ease,
            box-shadow 0.2s ease;
}

.refund-front-form .fr-request-form input[type="text"],
.refund-front-form .fr-request-form input[type="email"],
.refund-front-form .fr-request-form input[type="number"],
.refund-front-form .fr-request-form select {
    min-height: 50px;
}

.refund-front-form .fr-request-form textarea {
    min-height: 140px;
    resize: vertical;
}

.refund-front-form .fr-request-form input:focus,
.refund-front-form .fr-request-form select:focus,
.refund-front-form .fr-request-form textarea:focus {
    border-color: var(--theme-form-field-border-focus-color);
    box-shadow: 0 0 0 1px var(--theme-form-field-border-focus-color);
}


/* ------------------------------------------------------
   8. Select
------------------------------------------------------ */

.refund-front-form .fr-request-form select {
    padding-right: 42px;

    cursor: pointer;
}


/* ------------------------------------------------------
   9. Walidacja
------------------------------------------------------ */

.refund-front-form .fr-required-field-notice {
    margin: 0;
}

.refund-front-form .fr-required-field-notice:not(:empty) {
    margin: 0 0 8px;

    font-size: 13px;
    line-height: 1.4;

    color: #b42318;
}


/* ------------------------------------------------------
   10. Przycisk wysłania formularza
------------------------------------------------------ */

.refund-front-form p.submit {
    margin: 28px 0 0;
}

.refund-front-form p.submit input[type="submit"] {
    width: auto;
    min-width: 160px;

    margin: 0;
}


/* ------------------------------------------------------
   11. Responsive
------------------------------------------------------ */

@media (max-width: 767px) {

    .fr-refund-shortcode-wrapper {
        gap: 18px;
        max-width: 100%;
    }

    .fr-refund-shortcode-field {
        min-height: 48px;
        font-size: 16px;
    }

    .fr-refund-shortcode-submit {
        width: 100%;
    }

    .refund-front-form .woocommerce-refund-details > h2 + p {
        margin-bottom: 20px;
    }

    .woocommerce-table-refund-details-wrapper {
        margin-left: 0;
        margin-right: 0;
    }

    .woocommerce-table-refund-details {
        min-width: 760px;
    }

    .woocommerce-table-refund-details th,
    .woocommerce-table-refund-details td {
        padding: 12px 10px;
        font-size: 13px;
    }

    .refund-front-form .check-all-button {
        margin-bottom: 28px;
    }

    .refund-front-form .check-all-button .check {
        width: 100%;
    }

    .refund-front-form .fr-request-form {
        gap: 18px;
        max-width: 100%;
    }

    .refund-front-form .fr-request-form input[type="text"],
    .refund-front-form .fr-request-form input[type="email"],
    .refund-front-form .fr-request-form input[type="number"],
    .refund-front-form .fr-request-form select,
    .refund-front-form .fr-request-form textarea {
        font-size: 16px;
    }

    .refund-front-form p.submit {
        margin-top: 24px;
    }

    .refund-front-form p.submit input[type="submit"] {
        width: 100%;
    }
}