/*
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;
}
