/**
 * Cukiernia Wadowice – WooCommerce CSS
 * Mobile-first. Tablet: 600px. Desktop: 992px.
 */

/* ===== RESET WOO DEFAULTS ===== */
.woocommerce-page .woocommerce,
.woocommerce {
    width: 100%;
}

/* ===== CART & CHECKOUT PAGE TITLES ===== */
.woo-page-title {
    font-size: 40px !important;
    line-height: 1.2;
    text-transform: uppercase;
}

/* ===== CART & CHECKOUT PAGE LAYOUT ===== */
/*
 * Koszyk i Zamówienie to zwykłe strony WP z blokami WooCommerce (wp-block-woocommerce-cart/checkout).
 * Bloki mają alignwide/alignfull więc rozciągają się poza .entry-content.
 * Wymuszamy ograniczenie do szerokości containera i dodajemy padding strony.
 */
.woocommerce-cart .entry-content,
.woocommerce-checkout .entry-content {
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--gap-section-mobile) 15px;
    box-sizing: border-box;
    overflow-x: hidden;
}

.woocommerce-cart .wp-block-woocommerce-cart,
.woocommerce-checkout .wp-block-woocommerce-checkout {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.woocommerce-page main {
    border-top: 1px solid #dadada;
}

/* Klasyczny shortcode fallback */
.woo-content {
    padding: var(--gap-section-mobile) 0;
    overflow-x: hidden;
}

.woo-content .woocommerce {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.woo-content table {
    width: 100%;
    max-width: 100%;
    table-layout: auto;
}

.woo-content .col2-set {
    display: flex;
    flex-direction: column;
    gap: 32px;
    width: 100%;
}

/* ===== NOTICES ===== */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    font-family: var(--font-body);
    font-size: 15px;
    padding: 14px 20px;
    margin-bottom: 24px;
    border-left: 4px solid var(--black);
    background: #f9f9f9;
    list-style: none;
}

.woocommerce-error { border-color: #c00; }
.woocommerce-info  { border-color: var(--pink); }

.woocommerce-message a.button,
.woocommerce-info a.button {
    float: right;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    color: var(--black);
    border: 1px solid var(--black);
    padding: 6px 14px;
    transition: background var(--transition), color var(--transition);
}

.woocommerce-message a.button:hover,
.woocommerce-info a.button:hover {
    background: var(--black);
    color: var(--white);
}


/* ===== ARCHIVE ===== */
.shop-archive {
    padding: var(--gap-section-mobile) 0;
}

/* Grid: 1 col mobile → 2 tablet → 3 desktop */
.shop-archive__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

.shop-archive__more-wrap {
    text-align: center;
    padding-top: 8px;
}

.shop-archive__empty {
    font-family: var(--font-body);
    font-size: var(--fs-body);
    color: var(--grey);
}


/* ===== PRODUCT CARD ===== */
.product-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.product-card.is-visible {
    opacity: 1;
}

.product-card__image {
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--white);
    display: block;
    transition: transform 0.4s ease;
}

.product-card:hover .product-card__image img {
    transform: scale(1.04);
}

.product-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 16px 0 0;
    gap: 10px;
}

.product-card__link {
    text-decoration: none;
    color: inherit;
}

.product-card__link h3 {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 20px;
    line-height: 1.2;
    color: var(--black);
    margin: 0;
    transition: color var(--transition);
}

.product-card__link:hover h3 {
    color: var(--pink);
}

.product-card__price {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
    color: var(--black);
}

.product-card__price del {
    color: var(--grey);
    font-weight: 400;
    margin-right: 6px;
}

.product-card__price ins {
    text-decoration: none;
    color: #c00;
}

.product-card__btn {
    align-self: flex-start;
    margin-top: auto;
    font-size: 14px;
    padding: 9px 24px;
}


/* ===== SINGLE PRODUCT ===== */
.shop-single__breadcrumbs {
    margin-bottom: 24px;
}

.shop-single__crumbs {
    justify-content: flex-start;
}

.shop-single {
    padding: 20px 0 0;
}

.shop-single__product {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.shop-single__image {
    width: 100%;
    overflow: hidden;
}

.shop-single__image img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.shop-single__image a {
    display: block;
    overflow: hidden;
}

.shop-single__image a:hover img {
    transform: scale(1.03);
}

.shop-single__summary {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.shop-single__summary h1 {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 40px;
    line-height: 1.2;
    color: var(--black);
    margin: 0;
}

.shop-single__price {
    font-family: var(--font-body);
    font-size: 26px;
    font-weight: 700;
    color: var(--black);
}

.shop-single__price del {
    color: var(--grey);
    font-weight: 400;
    font-size: 18px;
    margin-right: 8px;
}

.shop-single__price ins {
    text-decoration: none;
    color: #c00;
}

.shop-single__desc {
    font-family: var(--font-body);
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    color: var(--grey);
}

.shop-single__form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.shop-single__qty .quantity {
    display: flex;
    align-items: center;
}

.shop-single__qty input[type="number"] {
    width: 70px;
    padding: 12px;
    font-family: var(--font-body);
    font-size: 16px;
    text-align: center;
    border: 1px solid var(--grey-border, #ddd);
    outline: none;
    border-radius: 0;
    -moz-appearance: textfield;
}

.shop-single__qty input[type="number"]::-webkit-inner-spin-button,
.shop-single__qty input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.shop-single__out-of-stock {
    font-family: var(--font-body);
    font-size: var(--fs-body);
    color: var(--grey);
    margin: 0;
}

.shop-single__meta {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--grey);
    border-top: 1px solid var(--grey-border, #ddd);
    padding-top: 16px;
}

.shop-single__meta span {
    font-weight: 700;
    color: var(--black);
}

.shop-single__meta a {
    color: var(--black);
    text-decoration: none;
    transition: color var(--transition);
}

.shop-single__meta a:hover {
    color: var(--pink);
}


/* ===== RELATED – Polecamy również ===== */
.shop-related {
    margin-top: 56px;
    padding-top: 48px;
    border-top: 1px solid var(--grey-border, #ddd);
}

.shop-related h2 {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 40px;
    color: var(--black);
    margin: 0 0 28px;
    text-transform: uppercase;
}

.shop-related__swiper {
    overflow: hidden;
}

.shop-related .swiper-button-prev,
.shop-related .swiper-button-next {
    color: var(--black);
}

.shop-related .swiper-button-prev::after,
.shop-related .swiper-button-next::after {
    font-size: 20px;
}


/* ===== WOO GLOBAL BUTTONS ===== */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 32px;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 15px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--black);
    background: transparent;
    border: 1px solid var(--black);
    border-radius: var(--radius-btn, 50px);
    text-decoration: none;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
    line-height: 1.2;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover {
    background: var(--pink);
    border-color: var(--pink);
    color: var(--white);
}


/* ===== BREADCRUMB ===== */
.woocommerce-breadcrumb {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--grey);
    margin-bottom: 24px;
}

.woocommerce-breadcrumb a {
    color: var(--grey);
    text-decoration: none;
    transition: color var(--transition);
}

.woocommerce-breadcrumb a:hover {
    color: var(--black);
}


/* ===== ORDERING ===== */
.woocommerce-ordering {
    margin-bottom: 24px;
}

.woocommerce-ordering select {
    padding: 10px 36px 10px 14px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--black);
    background: var(--white);
    border: 1px solid var(--grey-border, #ddd);
    border-radius: 0;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23333' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
}

.woocommerce-result-count {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--grey);
    margin-bottom: 16px;
}


/* ===== CART ===== */

.woocommerce-cart h1,
.woocommerce-checkout h1 {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: var(--fs-h1);
    color: var(--black);
    margin: 0 0 32px;
}

table.shop_table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-body);
    font-size: 15px;
}

table.shop_table th {
    font-weight: 700;
    text-align: left;
    padding: 12px 8px;
    border-bottom: 2px solid var(--black);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table.shop_table td {
    padding: 16px 8px;
    border-bottom: 1px solid var(--grey-border, #ddd);
    vertical-align: middle;
}

table.shop_table .product-thumbnail img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    display: block;
}

table.shop_table .product-name a {
    font-weight: 700;
    color: var(--black);
    text-decoration: none;
}

table.shop_table .product-name a:hover {
    text-decoration: underline;
}

table.shop_table .product-remove a {
    font-size: 20px;
    color: var(--grey);
    text-decoration: none;
    transition: color var(--transition);
}

table.shop_table .product-remove a:hover {
    color: #c00;
}

table.shop_table input[type="number"] {
    width: 60px;
    padding: 8px;
    border: 1px solid var(--grey-border, #ddd);
    text-align: center;
    font-family: var(--font-body);
    font-size: 15px;
}

.cart-collaterals {
    margin-top: 32px;
}

.cart_totals h2 {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 24px;
    color: var(--black);
    margin-bottom: 16px;
}

.cart_totals table.shop_table {
    margin-bottom: 24px;
}


/* ===== CHECKOUT ===== */

.woocommerce h3, .woocommerce-checkout h3 {
    font-family: var(--font-heading);
    font-weight: 900;
    color: var(--black);
}

.woocommerce form .form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.woocommerce form .form-row label {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    color: var(--black);
}

.woocommerce form .form-row .required {
    color: #c00;
    text-decoration: none;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--black);
    background: var(--white);
    border: 1px solid var(--grey-border, #ddd);
    border-radius: 0;
    outline: none;
    transition: border-color var(--transition);
    box-sizing: border-box;
    appearance: none;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
    border-color: var(--black);
}

.woocommerce form .form-row textarea {
    min-height: 100px;
    resize: vertical;
}

#order_review_heading {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 22px;
    color: var(--black);
    margin-bottom: 20px;
}

#order_review table.shop_table {
    margin-bottom: 24px;
}

#payment {
    background: #f9f9f9;
    padding: 24px;
    margin-top: 24px;
}

#payment .payment_methods {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

#payment .payment_methods li {
    padding: 12px 0;
    border-bottom: 1px solid var(--grey-border, #ddd);
    font-family: var(--font-body);
    font-size: 15px;
}

#payment .payment_methods li:last-child {
    border-bottom: none;
}

#payment .payment_methods li label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 700;
    color: var(--black);
}

#payment .payment_box {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--grey);
    padding: 10px 0 4px;
}


/* ===== ORDER RECEIVED ===== */
.woocommerce-order {
    font-family: var(--font-body);
    font-size: var(--fs-body);
    line-height: var(--lh-body);
}

.woocommerce-order .woocommerce-thankyou-order-received {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: var(--fs-h2);
    color: var(--black);
    margin-bottom: 24px;
}

.woocommerce-order-overview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    list-style: none;
    padding: 24px;
    background: #f9f9f9;
    margin-bottom: 32px;
}

.woocommerce-order-overview li {
    font-size: 14px;
    color: var(--grey);
}

.woocommerce-order-overview li strong {
    display: block;
    font-size: 16px;
    color: var(--black);
    font-weight: 700;
    margin-top: 4px;
}


/* ===== MY ACCOUNT ===== */
.woocommerce-MyAccount-navigation {
    margin-bottom: 32px;
}

.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid var(--grey-border, #ddd);
}

.woocommerce-MyAccount-navigation ul li {
    border-bottom: 1px solid var(--grey-border, #ddd);
}

.woocommerce-MyAccount-navigation ul li:last-child {
    border-bottom: none;
}

.woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--black);
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
}

.woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-MyAccount-navigation ul li a:hover {
    background: var(--black);
    color: var(--white);
}


/* ===== TABLET (600px) ===== */
@media (min-width: 600px) {

    .shop-archive__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ===== DESKTOP (992px) ===== */
@media (min-width: 992px) {

    .shop-archive {
        padding: var(--gap-section) 0;
    }

    .shop-archive__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
    }

    .shop-single {
        padding: 20px 0 0px;
    }

    .shop-single__product {
        flex-direction: row;
        align-items: flex-start;
        gap: 56px;
    }

    .shop-single__image {
        width: 50%;
        flex-shrink: 0;
    }

    .shop-single__summary {
        flex: 1;
    }

    .woo-content {
        padding: var(--gap-section) 0;
    }

    .woo-content .col2-set {
        flex-direction: row;
        align-items: flex-start;
    }

    .woo-content .col2-set .col-1,
    .woo-content .col2-set .col-2 {
        flex: 1;
    }

    .woocommerce-order-overview {
        grid-template-columns: repeat(4, 1fr);
    }

    .woocommerce-account .woocommerce {
        display: grid;
        grid-template-columns: 220px 1fr;
        gap: 40px;
        align-items: flex-start;
    }

    .woocommerce-MyAccount-navigation {
        margin-bottom: 0;
    }
    .woo-page-title {
        font-size: 60px !important;
    }
}
