:root {
    --ra4shop-ink: #191918;
    --ra4shop-muted: #6d6861;
    --ra4shop-paper: #f5f2ec;
    --ra4shop-white: #fffdfa;
    --ra4shop-line: rgba(25, 25, 24, .13);
    --ra4shop-blue: #087abb;
    --ra4shop-red: #e8322a;
    --ra4shop-yellow: #f4c515;
}

body.woocommerce-cart,
body.woocommerce-checkout,
body.woocommerce-account {
    background: #fbfaf7;
}

body.woocommerce-cart .woocommerce,
body.woocommerce-cart .woocommerce *,
body.woocommerce-checkout .woocommerce,
body.woocommerce-checkout .woocommerce *,
body.woocommerce-account .woocommerce,
body.woocommerce-account .woocommerce * {
    box-sizing: border-box;
}

body.woocommerce-cart .ra4-site-main,
body.woocommerce-checkout .ra4-site-main,
body.woocommerce-account .ra4-site-main {
    min-height: 58vh;
    padding: clamp(42px, 6vw, 88px) 0;
}

body.woocommerce-cart .ra4-site-main > .woocommerce,
body.woocommerce-checkout .ra4-site-main > .woocommerce,
body.woocommerce-account .ra4-site-main > .woocommerce,
body.woocommerce-cart .ra4-site-main > .wp-block-woocommerce-cart,
body.woocommerce-checkout .ra4-site-main > .wp-block-woocommerce-checkout {
    width: min(calc(100% - 64px), 1240px);
    margin-inline: auto;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
    color: var(--ra4shop-ink);
}

/* Általános WooCommerce elemek */
.woocommerce h1,
.woocommerce h2,
.woocommerce h3,
.wc-block-cart h2,
.wc-block-checkout h2 {
    color: var(--ra4shop-ink);
    letter-spacing: -.035em;
}

.woocommerce h2 { font-size: clamp(25px, 3vw, 38px); }
.woocommerce h3 { font-size: 18px; }

.woocommerce form .form-row { margin: 0 0 17px; padding: 0; }
.woocommerce form .form-row label { margin-bottom: 7px; color: var(--ra4shop-ink); font-size: 12px; font-weight: 750; letter-spacing: .035em; }
.woocommerce form .form-row .required { color: var(--ra4shop-red); }

.woocommerce form .input-text,
.woocommerce form select,
.woocommerce form textarea,
.woocommerce .select2-container .select2-selection--single,
.wc-block-components-text-input input,
.wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input {
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    border: 1px solid var(--ra4shop-line);
    border-radius: 5px;
    background: #fff;
    color: var(--ra4shop-ink);
    font: inherit;
    font-size: 14px;
    box-shadow: none;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.woocommerce form textarea { min-height: 120px; padding-block: 13px; }
.woocommerce form .input-text:focus,
.woocommerce form select:focus,
.woocommerce form textarea:focus { border-color: var(--ra4shop-blue); box-shadow: 0 0 0 3px rgba(8, 122, 187, .1); }

.woocommerce button.button,
.woocommerce a.button,
.woocommerce input.button,
.wc-block-components-button:not(.is-link) {
    min-height: 48px;
    padding: 0 21px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ra4shop-yellow) !important;
    border-radius: 5px !important;
    background: var(--ra4shop-yellow) !important;
    color: var(--ra4shop-ink) !important;
    font-size: 12px !important;
    font-weight: 780 !important;
    letter-spacing: .035em;
    text-decoration: none !important;
    text-transform: uppercase;
    transition: background .17s ease, border-color .17s ease, color .17s ease, transform .17s ease;
}

.woocommerce button.button:hover,
.woocommerce a.button:hover,
.woocommerce input.button:hover,
.wc-block-components-button:not(.is-link):hover {
    border-color: var(--ra4shop-ink) !important;
    background: var(--ra4shop-ink) !important;
    color: #fff !important;
    transform: translateY(-1px);
}

.woocommerce-info,
.woocommerce-message,
.woocommerce-error {
    margin: 0 0 25px !important;
    padding: 18px 20px 18px 50px !important;
    border: 1px solid var(--ra4shop-line) !important;
    border-top: 3px solid var(--ra4shop-blue) !important;
    border-radius: 6px;
    background: #fff;
    color: var(--ra4shop-ink);
    font-size: 13px;
}
.woocommerce-message { border-top-color: #438153 !important; }
.woocommerce-error { border-top-color: var(--ra4shop-red) !important; }

/* Saját, stabil állapotkártyák: kijelentkezett pénztár és üres kosár. */
.ra4-state-card {
    width: min(100%, 760px);
    margin: 0 auto;
    padding: clamp(34px, 6vw, 62px);
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--ra4shop-line);
    border-top: 5px solid var(--ra4shop-yellow);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(36, 28, 20, .08);
    text-align: center;
    font-family: Inter, "Helvetica Neue", Arial, sans-serif;
}
.ra4-state-card--login { border-top-color: var(--ra4shop-blue); }
.ra4-state-card__eyebrow {
    margin-bottom: 22px;
    color: var(--ra4shop-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.ra4-state-card__icon {
    width: 64px;
    height: 64px;
    margin-bottom: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--ra4shop-paper);
    color: var(--ra4shop-blue);
    font-size: 25px;
    font-weight: 850;
}
.ra4-state-card--empty .ra4-state-card__icon { color: var(--ra4shop-ink); }
.ra4-state-card h1 { margin: 0 0 14px; color: var(--ra4shop-ink); font-size: clamp(28px, 4vw, 44px); letter-spacing: -.045em; line-height: 1.08; }
.ra4-state-card p { max-width: 590px; margin: 0 0 28px; color: var(--ra4shop-muted); font-size: 15px; line-height: 1.75; }
.ra4-state-card__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.ra4-state-card__button {
    min-height: 50px;
    padding: 0 23px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ra4shop-yellow);
    border-radius: 5px;
    background: var(--ra4shop-yellow);
    color: var(--ra4shop-ink) !important;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-decoration: none !important;
    text-transform: uppercase;
}
.ra4-state-card__button:hover { border-color: var(--ra4shop-ink); background: var(--ra4shop-ink); color: #fff !important; }
.ra4-state-card__button--secondary { border-color: var(--ra4shop-line); background: #fff; }

/* Blokkos pénztár – a hivatalos Additional Checkout Fields API mezője. */
.wp-block-woocommerce-checkout .wc-block-components-checkbox {
    padding: 15px;
    border: 1px solid var(--ra4shop-line);
    border-radius: 5px;
    background: #fff;
}

/* A webshop nem használ vásárlói kuponokat. */
.woocommerce-cart td.actions .coupon,
.woocommerce-form-coupon-toggle,
form.checkout_coupon,
.wc-block-components-totals-coupon,
.wc-block-cart__coupons,
.wc-block-checkout__coupons { display: none !important; }

/* Kosár – klasszikus */
.woocommerce-cart .woocommerce-cart-form,
.woocommerce-cart .cart_totals,
.wp-block-woocommerce-cart .wc-block-cart-items,
.wp-block-woocommerce-cart .wc-block-cart__totals-title,
.wp-block-woocommerce-cart .wc-block-components-totals-wrapper {
    border-color: var(--ra4shop-line) !important;
}

.woocommerce-cart table.shop_table {
    overflow: hidden;
    border: 1px solid var(--ra4shop-line);
    border-radius: 7px;
    background: #fff;
    border-collapse: separate;
}
.woocommerce-cart table.shop_table th { padding: 15px 18px; background: var(--ra4shop-paper); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.woocommerce-cart table.shop_table td { padding: 17px 18px; border-top-color: var(--ra4shop-line); font-size: 14px; }
.woocommerce-cart table.shop_table .product-thumbnail img { width: 82px; border-radius: 4px; }
.woocommerce-cart table.shop_table .product-name a { color: var(--ra4shop-ink); font-weight: 700; text-decoration: none; }
.woocommerce-cart .quantity .qty { min-height: 42px; border: 1px solid var(--ra4shop-line); border-radius: 4px; }
.woocommerce-cart .cart-collaterals { margin-top: 35px; }
.woocommerce-cart .cart_totals { padding: 26px; border: 1px solid var(--ra4shop-line); border-radius: 7px; background: #fff; }
.woocommerce-cart .cart_totals h2 { margin-top: 0; }
.woocommerce-cart .cart_totals table { border-collapse: collapse; }
.woocommerce-cart .cart_totals th,
.woocommerce-cart .cart_totals td { padding: 14px 8px; border-top: 1px solid var(--ra4shop-line); }

/* Kosár – blokkos */
.wp-block-woocommerce-cart .wc-block-cart-items { background: #fff; }
.wc-block-cart-item__image img { border-radius: 5px; }
.wc-block-components-product-name { color: var(--ra4shop-ink); font-weight: 700; text-decoration: none; }
.wc-block-cart__sidebar { padding: 25px !important; border: 1px solid var(--ra4shop-line); border-radius: 7px; background: #fff; }

/* Pénztár */
.woocommerce-checkout form.checkout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr); gap: 48px; align-items: start; }
.woocommerce-checkout #customer_details { width: auto; }
.woocommerce-checkout #customer_details .col-1,
.woocommerce-checkout #customer_details .col-2 { width: 100%; float: none; }
.woocommerce-checkout #order_review_heading,
.woocommerce-checkout #order_review { width: auto; float: none; }
.woocommerce-checkout #order_review_heading { margin: 0 0 17px; }
.woocommerce-checkout #order_review { padding: 25px; border: 1px solid var(--ra4shop-line); border-radius: 7px; background: #fff; }
.woocommerce-checkout-review-order-table { border-collapse: collapse !important; }
.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td { padding: 14px 8px !important; border-color: var(--ra4shop-line) !important; }
.woocommerce-checkout #payment { border-radius: 6px; background: var(--ra4shop-paper); }
.woocommerce-checkout #payment ul.payment_methods { border-bottom-color: var(--ra4shop-line); }
.woocommerce-checkout #payment div.payment_box { background: #e8e3da; }
.woocommerce-checkout #place_order { width: 100%; min-height: 54px; }

.woocommerce-checkout .ra4-checkout-login {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 18px;
}
.woocommerce-checkout .ra4-checkout-login__icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--ra4shop-paper);
    color: var(--ra4shop-blue);
    font-size: 21px;
    font-weight: 800;
}
.woocommerce-checkout .ra4-checkout-login__copy {
    min-width: 0;
    flex: 1 1 auto;
    display: grid;
    gap: 3px;
}
.woocommerce-checkout .ra4-checkout-login__copy strong { font-size: 16px; }
.woocommerce-checkout .ra4-checkout-login__copy > span { color: var(--ra4shop-muted); line-height: 1.55; }
.woocommerce-checkout .ra4-checkout-login__button {
    min-height: 43px;
    padding: 0 18px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    border-radius: 5px;
    background: var(--ra4shop-yellow);
    color: var(--ra4shop-ink) !important;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .035em;
    text-decoration: none !important;
    text-transform: uppercase;
}
.woocommerce-checkout .ra4-checkout-terms {
    margin: 18px 0 !important;
    padding: 16px !important;
    border: 1px solid var(--ra4shop-line);
    border-radius: 5px;
    background: #fff;
}
.woocommerce-checkout .ra4-checkout-terms label {
    margin: 0 !important;
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    line-height: 1.55;
}
.woocommerce-checkout .ra4-checkout-terms input { width: 18px; height: 18px; margin: 1px 0 0; flex: 0 0 18px; accent-color: var(--ra4shop-blue); }
.woocommerce-checkout .ra4-checkout-terms a { color: var(--ra4shop-blue); text-underline-offset: 2px; }

.wp-block-woocommerce-checkout .wc-block-checkout__main { padding-right: clamp(20px, 4vw, 58px); }
.wp-block-woocommerce-checkout .wc-block-checkout__sidebar { padding: 25px !important; border: 1px solid var(--ra4shop-line); border-radius: 7px; background: #fff; }

/* Fiók – kijelentkezett, két ablak */
.woocommerce-account:not(.logged-in) .woocommerce > h2 { display: none; }
.woocommerce-account:not(.logged-in) .u-columns.col2-set {
    width: 100% !important;
    display: flex !important;
    align-items: stretch;
    gap: 32px !important;
}
.woocommerce-account:not(.logged-in) .u-columns.col2-set::before,
.woocommerce-account:not(.logged-in) .u-columns.col2-set::after,
.woocommerce-account.logged-in main.ra4-site-main .woocommerce::before,
.woocommerce-account.logged-in main.ra4-site-main .woocommerce::after {
    content: none !important;
    display: none !important;
}
.woocommerce-account:not(.logged-in) .u-column1,
.woocommerce-account:not(.logged-in) .u-column2 {
    width: calc(50% - 16px) !important;
    max-width: calc(50% - 16px) !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    float: none !important;
    padding: clamp(25px, 4vw, 42px);
    border: 1px solid var(--ra4shop-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(36, 28, 20, .06);
}
.woocommerce-account:not(.logged-in) .u-column1 { border-top: 4px solid var(--ra4shop-blue); }
.woocommerce-account:not(.logged-in) .u-column2 { border-top: 4px solid var(--ra4shop-yellow); }
.woocommerce-account:not(.logged-in) .u-column1 > h2,
.woocommerce-account:not(.logged-in) .u-column2 > h2 { margin: 0 0 24px; }
.woocommerce-account form.login,
.woocommerce-account form.register,
.woocommerce-account form.woocommerce-form-login,
.woocommerce-account form.woocommerce-form-register {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
.woocommerce-account:not(.logged-in) .u-column1 input,
.woocommerce-account:not(.logged-in) .u-column2 input,
.woocommerce-account:not(.logged-in) .u-column1 select,
.woocommerce-account:not(.logged-in) .u-column2 select {
    max-width: 100% !important;
}
.woocommerce-account form.login::before,
.woocommerce-account form.login::after,
.woocommerce-account form.register::before,
.woocommerce-account form.register::after { content: none !important; display: none !important; }
.woocommerce-account #account_display_name_description { display: none !important; }
.woocommerce-account .woocommerce-form-login__rememberme { display: block; margin-bottom: 15px; font-size: 13px; }
.woocommerce-account .woocommerce-LostPassword { margin: 17px 0 0; font-size: 13px; }
.woocommerce-account .woocommerce-LostPassword a { color: var(--ra4shop-blue); }

/* Fiók – belépett */
.woocommerce-account.logged-in main.ra4-site-main .woocommerce {
    display: grid !important;
    grid-template-columns: 245px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}
.woocommerce-account .woocommerce-MyAccount-navigation { width: 245px !important; max-width: 100%; float: none !important; }
.woocommerce-account .woocommerce-MyAccount-navigation ul { margin: 0; padding: 8px; list-style: none; border: 1px solid var(--ra4shop-line); border-radius: 7px; background: #fff; }
.woocommerce-account .woocommerce-MyAccount-navigation li { margin: 0; border-bottom: 1px solid var(--ra4shop-line); }
.woocommerce-account .woocommerce-MyAccount-navigation li:last-child { border-bottom: 0; }
.woocommerce-account .woocommerce-MyAccount-navigation a { min-height: 48px; padding: 0 13px; display: flex; align-items: center; border-radius: 4px; color: var(--ra4shop-muted); font-size: 13px; font-weight: 650; text-decoration: none; }
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation a:hover { background: var(--ra4shop-paper); color: var(--ra4shop-ink); box-shadow: inset 3px 0 var(--ra4shop-yellow); }
.woocommerce-account .woocommerce-MyAccount-content { width: 100% !important; min-width: 0 !important; float: none !important; padding: clamp(24px, 4vw, 38px); border: 1px solid var(--ra4shop-line); border-radius: 7px; background: #fff; }
.woocommerce-account .woocommerce-MyAccount-content > :first-child { margin-top: 0; }
.woocommerce-account .woocommerce-MyAccount-content a { color: var(--ra4shop-blue); }
.woocommerce-account .woocommerce-MyAccount-content .button,
.woocommerce-account .woocommerce-MyAccount-content button,
.woocommerce-account .woocommerce-MyAccount-content input[type="submit"] {
    width: auto !important;
    min-width: 150px;
    height: auto !important;
    min-height: 48px !important;
    padding: 10px 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1.2 !important;
    white-space: normal !important;
    text-align: center !important;
}
.woocommerce-account table.shop_table { border-color: var(--ra4shop-line); border-radius: 6px; border-collapse: separate; }
.woocommerce-account table.shop_table th { background: var(--ra4shop-paper); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.woocommerce-account table.shop_table th,
.woocommerce-account table.shop_table td { padding: 14px 13px; border-color: var(--ra4shop-line); }
.woocommerce-account .woocommerce-Addresses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.woocommerce-account .woocommerce-Addresses::before,
.woocommerce-account .woocommerce-Addresses::after { content: none !important; display: none !important; }
.woocommerce-account .woocommerce-Addresses .col-1,
.woocommerce-account .woocommerce-Addresses .col-2 { width: auto; float: none; padding: 21px; border: 1px solid var(--ra4shop-line); border-radius: 6px; background: var(--ra4shop-paper); }
.woocommerce-account .woocommerce-Address-title h3 { margin-top: 0; }
.woocommerce-account address { color: var(--ra4shop-muted); font-size: 14px; line-height: 1.75; }

@media (max-width: 900px) {
    .woocommerce-checkout form.checkout { grid-template-columns: 1fr; gap: 30px; }
    .woocommerce-account.logged-in main.ra4-site-main .woocommerce { grid-template-columns: 1fr; gap: 24px; }
    .woocommerce-account .woocommerce-MyAccount-navigation { width: 100% !important; }
    .woocommerce-account .woocommerce-MyAccount-navigation ul { display: flex; flex-wrap: wrap; gap: 4px; }
    .woocommerce-account .woocommerce-MyAccount-navigation li { flex: 1 1 190px; border: 0; }
}

@media (max-width: 700px) {
    body.woocommerce-cart .ra4-site-main > .woocommerce,
    body.woocommerce-checkout .ra4-site-main > .woocommerce,
    body.woocommerce-account .ra4-site-main > .woocommerce,
    body.woocommerce-cart .ra4-site-main > .wp-block-woocommerce-cart,
    body.woocommerce-checkout .ra4-site-main > .wp-block-woocommerce-checkout { width: calc(100% - 36px); }

    .woocommerce-account:not(.logged-in) .u-columns.col2-set,
    .woocommerce-account .woocommerce-Addresses { grid-template-columns: 1fr; }
    .woocommerce-account:not(.logged-in) .u-columns.col2-set { flex-direction: column; }
    .woocommerce-account:not(.logged-in) .u-column1,
    .woocommerce-account:not(.logged-in) .u-column2 { width: 100% !important; max-width: 100% !important; }
    .woocommerce-checkout .ra4-checkout-login { align-items: flex-start; flex-wrap: wrap; }
    .woocommerce-checkout .ra4-checkout-login__button { width: 100%; justify-content: center; }
    .ra4-state-card { padding: 30px 22px; }
    .ra4-state-card__actions,
    .ra4-state-card__button { width: 100%; }
    .woocommerce-cart table.shop_table td { padding: 13px 10px; }
    .woocommerce-cart .cart_totals { padding: 19px; }
    .wp-block-woocommerce-checkout .wc-block-checkout__main { padding-right: 0; }
}
