/* Ania Category Gallery */

.acg-wrap {
    position: relative;
    width: 100%;
    font-family: inherit;
}

.acg-inner {
    position: relative;
    width: min(var(--acg-max-width, 1180px), calc(100vw - 48px));

    /*
     * Blocksy często umieszcza shortcode w wąskim kontenerze treści.
     * Poniższe dwie linie centrują galerię względem całego viewportu,
     * dzięki czemu siatka nie "ucieka" w prawo.
     */
    left: 50%;
    transform: translateX(-50%);
    margin-inline: 0;
}

.acg-heading {
    margin-bottom: 28px;
	display : none !important;
}

.acg-heading h2 {
    margin: 0;
    font: inherit;
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 700;
    line-height: 1.08;
    color: inherit;
	display : none !important;
}

.acg-description {
    margin-top: 12px;
    max-width: 720px;
    opacity: .72;
}

.acg-description p:last-child {
    margin-bottom: 0;
}


/* Filters */

.acg-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 32px;
}

.acg-filter {
    appearance: none;
    border: 1px solid rgba(20, 20, 20, .12);
    background: #fff;
    color: #252120;
    border-radius: 999px;
    padding: 11px 18px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition:
        background-color .2s ease,
        color .2s ease,
        border-color .2s ease,
        transform .2s ease;
}

.acg-filter:hover {
    transform: translateY(-1px);
    border-color: rgba(168, 18, 26, .42);
}

.acg-filter.is-active {
    background: #a8121a;
    color: #fff;
    border-color: #a8121a;
}


/* Grid */

.acg-grid {
    display: grid;
    grid-template-columns: repeat(var(--acg-columns, 3), minmax(0, 1fr));
    gap: 28px;
}

.acg-item {
    min-width: 0;
    transition:
        opacity .22s ease,
        transform .22s ease;
}

.acg-item.is-hidden {
    display: none;
}

.acg-media {
    display: block;
    overflow: hidden;
    border-radius: 24px;
    background: #f5f1ed;
}

.acg-media img {
    display: block;
    width: 100%;
    aspect-ratio: var(--acg-ratio, 4 / 5);
    height: auto;
    object-fit: cover;
    transition: transform .35s ease;
}

.acg-item:hover .acg-media img {
    transform: scale(1.018);
}

.acg-product-name {
    margin: 12px 2px 0;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    color: #252120;
}

.acg-product-name a {
    color: inherit;
    text-decoration: none;
}

.acg-empty-filter,
.acg-message {
    margin: 24px 0 0;
    opacity: .7;
}


/* Tablet */

@media (max-width: 900px) {
    .acg-inner {
        width: min(var(--acg-max-width, 1180px), calc(100vw - 32px));
        left: 50%;
        transform: translateX(-50%);
    }

    .acg-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}


/* Mobile */

@media (max-width: 560px) {
    .acg-inner {
        width: calc(100vw - 28px);
        left: 50%;
        transform: translateX(-50%);
    }

    .acg-heading {
        margin-bottom: 20px;
    }

    .acg-filters {
        gap: 8px;
        margin-bottom: 24px;
    }

    .acg-filter {
        padding: 10px 14px;
        font-size: 13px;
    }

    .acg-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .acg-media {
        border-radius: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .acg-filter,
    .acg-item,
    .acg-media img {
        transition: none;
    }
}


/* Product information */

.acg-product-info {
    padding: 0 2px;
}

.acg-product-name {
    margin-bottom: 0;
}

.acg-price {
    margin-top: 7px;
    color: #a8121a;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
}

.acg-price del {
    margin-right: 6px;
    color: #7b7370;
    font-size: .9em;
    font-weight: 500;
    opacity: .75;
}

.acg-price ins {
    color: #a8121a;
    text-decoration: none;
}

.acg-price .woocommerce-Price-amount {
    font-weight: inherit;
}


/* Add to cart */

.acg-actions {
    margin-top: 14px;
}

.acg-add-to-cart.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin: 0;
    padding: 12px 20px;

    border: 1px solid #a8121a;
    border-radius: 999px;

    background: #a8121a;
    color: #fff;

    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;

    text-decoration: none;
    box-shadow: none;
    cursor: pointer;

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

.acg-add-to-cart.button:hover,
.acg-add-to-cart.button:focus {
    background: #8c0d14;
    border-color: #8c0d14;
    color: #fff;
    transform: translateY(-1px);
}

.acg-add-to-cart.button.loading {
    opacity: .7;
    pointer-events: none;
}

.acg-add-to-cart.button.added {
    background: #252120;
    border-color: #252120;
}

/* WooCommerce może dodać link "Zobacz koszyk" po AJAX. */
.acg-actions .added_to_cart {
    display: inline-block;
    margin-left: 10px;
    color: #a8121a;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

@media (max-width: 560px) {
    .acg-add-to-cart.button {
        width: 100%;
    }

    .acg-actions .added_to_cart {
        display: block;
        margin: 10px 0 0;
        text-align: center;
    }
}


/* Center CTA under each product */
.acg-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.acg-add-to-cart.button {
    margin-inline: auto;
}

.acg-actions .added_to_cart {
    width: 100%;
    margin: 0;
    text-align: center;
}


/* Toolbar: filters + sorting */

.acg-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 32px;
}

.acg-toolbar .acg-filters {
    margin: 0;
    flex: 1 1 auto;
}

.acg-sort-wrap {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 0 0 auto;
}

.acg-sort-label {
    color: #6e6460;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.acg-sort {
    min-height: 42px;
    padding: 9px 38px 9px 14px;

    border: 1px solid rgba(20, 20, 20, .12);
    border-radius: 999px;

    background-color: #fff;
    color: #252120;

    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;

    cursor: pointer;
    outline: none;
}

.acg-sort:hover,
.acg-sort:focus {
    border-color: rgba(168, 18, 26, .45);
}

@media (max-width: 760px) {
    .acg-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .acg-sort-wrap {
        justify-content: space-between;
        width: 100%;
    }

    .acg-sort {
        min-width: 210px;
    }
}

@media (max-width: 480px) {
    .acg-sort-wrap {
        align-items: stretch;
        flex-direction: column;
        gap: 7px;
    }

    .acg-sort {
        width: 100%;
        min-width: 0;
    }
}


/* =========================================================
   PRODUCT SLIDER
========================================================= */

.acg-product-slider-shell {
    --acg-slider-visible: 4;
    position: relative;
    width: min(var(--acg-max-width, 1180px), calc(100vw - 48px));
    left: 50%;
    transform: translateX(-50%);
    margin-block: 24px 36px;
}

.acg-product-slider-nav {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 16px;
}

.acg-product-slider-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;
    padding: 0;

    border: 1px solid rgba(37, 33, 32, .14);
    border-radius: 999px;

    background: #fff;
    color: #252120;

    font: inherit;
    font-size: 21px;
    line-height: 1;

    cursor: pointer;
}

.acg-product-slider-arrow:disabled {
    opacity: .35;
    cursor: default;
}

.acg-product-slider-track {
    --acg-product-slider-gap: clamp(18px, 2vw, 28px);

    display: flex;
    gap: var(--acg-product-slider-gap);

    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;

    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;

    scrollbar-width: none;

    padding-bottom: 4px;
}

.acg-product-slider-track::-webkit-scrollbar {
    display: none;
}

.acg-product-slider-card {
    flex: 0 0 calc(
        (100% - (var(--acg-slider-visible) - 1) * var(--acg-product-slider-gap))
        / var(--acg-slider-visible)
    );

    min-width: 0;
    scroll-snap-align: start;
}

@media (max-width: 900px) {

    .acg-product-slider-shell {
        width: min(var(--acg-max-width, 1180px), calc(100vw - 32px));
    }

    .acg-product-slider-card {
        flex-basis: calc((100% - var(--acg-product-slider-gap)) / 2);
    }
}

@media (max-width: 560px) {

    .acg-product-slider-shell {
        width: calc(100vw - 28px);
    }

    .acg-product-slider-nav {
        margin-bottom: 12px;
    }

    .acg-product-slider-arrow {
        width: 40px;
        height: 40px;
    }

    .acg-product-slider-track {
        padding-right: 12%;
    }

    .acg-product-slider-card {
        flex-basis: 84%;
    }
}


/* =========================================================
   PRODUCT SLIDER v1.5
   Strzałki po bokach + autoplay
========================================================= */

.acg-product-slider-shell {
    position: relative;
}

.acg-product-slider-nav {
    position: absolute;
    inset: 0;
    z-index: 5;

    display: flex;
    align-items: center;
    justify-content: space-between;

    margin: 0;
    padding: 0;

    pointer-events: none;
}

.acg-product-slider-arrow {
    position: relative;

    width: 48px;
    height: 48px;
    flex: 0 0 48px;

    border: 1px solid rgba(255,255,255,.45);
    border-radius: 999px;

    background: rgba(20,20,20,.72);
    color: #fff;

    box-shadow: 0 4px 16px rgba(0,0,0,.16);

    pointer-events: auto;

    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.acg-product-slider-arrow:first-child {
    transform: translateX(-50%);
}

.acg-product-slider-arrow:last-child {
    transform: translateX(50%);
}

.acg-product-slider-arrow:hover,
.acg-product-slider-arrow:focus-visible {
    background: #8C0D14;
    border-color: #8C0D14;
    color: #fff;
}

.acg-product-slider-track {
    position: relative;
}

@media (max-width: 560px) {
    .acg-product-slider-nav {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .acg-product-slider-track {
        scroll-behavior: auto;
    }
}


/* =========================================================
   PRODUCT SLIDER v1.6
   Stała szerokość kart + poprawne 1/2/3 elementy
========================================================= */

.acg-product-slider-shell {
    --acg-card-width: 260px;

    left: auto !important;
    max-width: none !important;

    width: auto;
}

.acg-product-slider-card {
    flex: 0 0 var(--acg-card-width) !important;
}

.acg-product-slider-nav.is-hidden {
    display: none !important;
}

@media (max-width: 560px) {
    .acg-product-slider-shell {
        width: calc(100vw - 28px) !important;
        transform: none !important;
    }

    .acg-product-slider-card {
        flex: 0 0 84% !important;
    }
}


/* =========================================================
   PRODUCT SLIDER v1.7
   Poprawka overflow na telefonach
========================================================= */

.acg-product-slider-track {
    box-sizing: border-box;
    max-width: 100%;
}

@media (max-width: 768px) {

    .acg-product-slider-shell {
        position: relative;

        left: auto !important;
        right: auto !important;

        width: 100% !important;
        max-width: 100% !important;

        margin-left: 0 !important;
        margin-right: 0 !important;

        transform: none !important;

        overflow: hidden;
        box-sizing: border-box;
    }

    .acg-product-slider-nav {
        display: none !important;
    }

    .acg-product-slider-track {
        width: 100% !important;
        max-width: 100% !important;

        margin: 0 !important;

        padding-left: 0;
        padding-right: 12%;

        overflow-x: auto;
        overflow-y: hidden;

        box-sizing: border-box;
    }

    .acg-product-slider-card {
        flex: 0 0 84% !important;
        max-width: 84%;
        min-width: 0;
    }
}

@media (max-width: 420px) {

    .acg-product-slider-track {
        padding-right: 9%;
    }

    .acg-product-slider-card {
        flex-basis: 88% !important;
        max-width: 88%;
    }
}
