/*
 * PolaroidPillanatok – WooCommerce v1.1.0
 */

body.ppwc-catalog,
    --ppwc-brown: #885F38;
    --ppwc-brown-dark: #6F4B2D;
    --ppwc-cream: #FFF9F0;
    --ppwc-cream-2: #F7EFE6;
    --ppwc-border: #E8D8C7;
    --ppwc-text: #17120E;
    --ppwc-muted: #776B61;
    --ppwc-radius: 14px;
}

/* ---------- fejléc kosár ---------- */

body.ppwc-catalog .ppwc-header-cart {
    position: relative;
    display: inline-flex;
    width: 64px;
    height: 58px;
    flex: 0 0 64px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: 1px solid var(--ppwc-brown);
    border-radius: 12px;
    background: var(--ppwc-brown);
    color: #fff;
    text-decoration: none;
    transition: transform .16s ease, background-color .16s ease, border-color .16s ease;
}

body.ppwc-catalog .ppwc-header-cart:hover,
body.ppwc-catalog .ppwc-header-cart:focus-visible {
    background: var(--ppwc-brown-dark);
    border-color: var(--ppwc-brown-dark);
    color: #fff;
    transform: translateY(-1px);
}

body.ppwc-catalog .ppwc-header-cart:focus-visible {
    outline: 3px solid rgba(136, 95, 56, .22);
    outline-offset: 3px;
}

body.ppwc-catalog .ppwc-header-cart svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.ppwc-catalog .ppwc-cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    display: grid;
    min-width: 23px;
    height: 23px;
    padding: 0 5px;
    place-items: center;
    box-sizing: border-box;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--ppwc-text);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

body.ppwc-catalog .ppwc-header-cart--floating {
    position: fixed;
    top: 18px;
    right: 28px;
    z-index: 9998;
}

body.admin-bar.ppwc-catalog .ppwc-header-cart--floating {
    top: 50px;
}

/* ---------- Shop / Termékek oldal ---------- */

body.ppwc-catalog.woocommerce-shop main,
body.ppwc-catalog.tax-product_cat main,
body.ppwc-catalog.tax-product_tag main {
    box-sizing: border-box;
    width: min(1180px, calc(100% - 48px));
    margin-inline: auto;
}

body.ppwc-catalog .woocommerce-products-header {
    margin: 34px 0 24px;
}

body.ppwc-catalog .woocommerce-products-header__title.page-title {
    margin: 0;
    color: var(--ppwc-text);
    font-size: clamp(38px, 5vw, 58px);
    font-weight: 800;
    line-height: .98;
    letter-spacing: -.035em;
}

body.ppwc-catalog .woocommerce-result-count {
    margin: 8px 0 24px;
    color: var(--ppwc-muted);
    font-size: 14px;
    line-height: 1.5;
}

body.ppwc-catalog .woocommerce-ordering {
    margin: 0 0 30px;
}

body.ppwc-catalog .woocommerce-ordering select {
    min-width: 250px;
    min-height: 48px;
    padding: 0 42px 0 15px;
    border: 1px solid var(--ppwc-border);
    border-radius: 10px;
    background-color: #fff;
    color: var(--ppwc-text);
    font: inherit;
    box-shadow: none;
    cursor: pointer;
}

body.ppwc-catalog .woocommerce-ordering select:focus {
    border-color: var(--ppwc-brown);
    outline: 3px solid rgba(136, 95, 56, .12);
}

/* A sablon markupjában nincs kötelező .woocommerce wrapper, ezért közvetlen selectorok. */
body.ppwc-catalog ul.products::before,
body.ppwc-catalog ul.products::after {
    display: none !important;
    content: none !important;
}

body.ppwc-catalog ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(270px, 320px));
    justify-content: center;
    align-items: stretch;
    gap: 28px;
    width: 100%;
    margin: 0 auto 64px !important;
    padding: 0 !important;
}

body.ppwc-catalog ul.products li.product {
    display: flex;
    float: none !important;
    flex-direction: column;
    width: 100% !important;
    max-width: 320px;
    margin: 0 !important;
    padding: 16px 16px 18px;
    box-sizing: border-box;
    border: 1px solid var(--ppwc-border);
    border-radius: var(--ppwc-radius);
    background: #fff;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

body.ppwc-catalog ul.products li.product:hover {
    transform: translateY(-2px);
    border-color: #D8C0A8;
    box-shadow: 0 10px 28px rgba(111, 75, 45, .08);
}

body.ppwc-catalog ul.products li.product a {
    text-decoration: none;
}

body.ppwc-catalog ul.products li.product a img {
    width: 100% !important;
    height: 286px !important;
    margin: 0 0 17px !important;
    border-radius: 10px;
    background: var(--ppwc-cream);
    object-fit: contain;
}

body.ppwc-catalog ul.products li.product .woocommerce-loop-product__title {
    margin: 0;
    padding: 0;
    color: var(--ppwc-text);
    font-size: 18px;
    font-weight: 750;
    line-height: 1.25;
}

body.ppwc-catalog ul.products li.product .price {
    display: block;
    margin: 7px 0 14px;
    color: var(--ppwc-brown);
    font-size: 16px;
    font-weight: 700;
}

body.ppwc-catalog ul.products li.product .button,
body.ppwc-catalog ul.products li.product a.button,
body.ppwc-catalog ul.products li.product .added_to_cart,
body.ppwc-catalog .ppwc-customize-button {
    display: inline-flex !important;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    margin: auto 0 0 !important;
    padding: 0 17px !important;
    box-sizing: border-box;
    border: 1px solid #885F38 !important;
    border-radius: 9px !important;
    background: #885F38 !important;
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    box-shadow: none !important;
    opacity: 1 !important;
    transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}

body.ppwc-catalog ul.products li.product .button:hover,
body.ppwc-catalog ul.products li.product a.button:hover,
body.ppwc-catalog ul.products li.product .added_to_cart:hover,
body.ppwc-catalog .ppwc-customize-button:hover:hover,
body.ppwc-catalog .ppwc-customize-button:focus-visible:focus-visible {
    background: #6F4B2D !important;
    border-color: #6F4B2D !important;
    color: #fff !important;
    transform: translateY(-1px);
}

/* A 183-as Instant fotónál a Testreszabás az egyetlen termék-CTA. */
body.ppwc-catalog li.product.post-183 .ppwc-customize-button {
    width: 100%;
}

/* Breadcrumb finomítása. */
body.ppwc-catalog .woocommerce-breadcrumb {
    margin: 18px 0 0;
    color: #9A8C80;
    font-size: 13px;
}

body.ppwc-catalog .woocommerce-breadcrumb a {
    color: var(--ppwc-muted);
    text-decoration: none;
}

body.ppwc-catalog .woocommerce-breadcrumb a:hover {
    color: var(--ppwc-brown);
}

/* ---------- reszponzív ---------- */

@media (max-width: 920px) {
    body.ppwc-catalog ul.products {
        grid-template-columns: repeat(2, minmax(250px, 310px));
        gap: 20px;
    }
}

@media (max-width: 640px) {
    body.ppwc-catalog.woocommerce-shop main,
    body.ppwc-catalog.tax-product_cat main,
    body.ppwc-catalog.tax-product_tag main {
        width: min(100% - 28px, 1180px);
    }

    body.ppwc-catalog .woocommerce-products-header {
        margin-top: 26px;
    }

    body.ppwc-catalog .woocommerce-result-count,
    body.ppwc-catalog .woocommerce-ordering {
        float: none;
        width: 100%;
    }

    body.ppwc-catalog .woocommerce-ordering select {
        width: 100%;
    }

    body.ppwc-catalog ul.products {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    body.ppwc-catalog ul.products li.product {
        max-width: 100%;
        padding: 13px 13px 16px;
    }

    body.ppwc-catalog ul.products li.product a img {
        height: auto !important;
        aspect-ratio: 1 / 1;
    }

    body.ppwc-catalog .ppwc-header-cart {
        width: 54px;
        height: 50px;
        flex-basis: 54px;
        border-radius: 10px;
    }

    body.ppwc-catalog .ppwc-header-cart svg {
        width: 24px;
        height: 24px;
    }

    body.ppwc-catalog .ppwc-header-cart--floating {
        top: 12px;
        right: 14px;
    }

    body.admin-bar.ppwc-catalog .ppwc-header-cart--floating {
        top: 58px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.ppwc-catalog .ppwc-header-cart,
    body.ppwc-catalog ul.products li.product,
    body.ppwc-catalog ul.products li.product .button,
    body.ppwc-catalog .ppwc-customize-button,
        transition: none;
    }
}
