/**
 * Entdeckerweine — WooCommerce Global Styles
 * Applies the wine-burgundy brand palette across all WooCommerce pages:
 * mini-cart, cart, checkout, my-account, notices, buttons, forms.
 */

:root {
    --ew-wine: #8A121F;
    --ew-wine-dark: #6b0c16;
    --ew-wine-darker: #4a0a10;
    --ew-wine-light: #f9eaeb;
    --ew-dark: #2d0007;
    --ew-text: #333;
    --ew-text-muted: #666;
    --ew-border: #e0e0e0;
    --ew-bg-light: #f5f3f3;
    --ew-bg-white: #fff;
    --ew-green: #388e3c;
    --ew-red: #d32f2f;
    --ew-radius: 12px;
    --ew-radius-sm: 8px;
}

/* ========================================
   Global Buttons
   ======================================== */

.woocommerce .button,
.woocommerce .button.alt,
.woocommerce button.button,
.woocommerce button.button.alt,
.woocommerce input.button,
.woocommerce input.button.alt,
.woocommerce a.button,
.woocommerce a.button.alt,
.woocommerce #respond input#submit,
.woocommerce #respond input#submit.alt {
    background-color: var(--ew-wine);
    color: #fff;
    border: none;
    border-radius: var(--ew-radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
    transition: background-color 0.2s ease, transform 0.15s ease;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    line-height: 1.4;
}

.woocommerce .button:hover,
.woocommerce .button.alt:hover,
.woocommerce button.button:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button:hover,
.woocommerce input.button.alt:hover,
.woocommerce a.button:hover,
.woocommerce a.button.alt:hover,
.woocommerce #respond input#submit:hover,
.woocommerce #respond input#submit.alt:hover {
    background-color: var(--ew-wine-dark);
    color: #fff;
}

.woocommerce .button:focus,
.woocommerce .button.alt:focus,
.woocommerce button.button:focus,
.woocommerce button.button.alt:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(138, 18, 31, 0.25);
}

.woocommerce .button.disabled,
.woocommerce .button:disabled,
.woocommerce button.button:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
}

/* Outline / secondary button variant (e.g. "View cart") */
.woocommerce .button:not(.alt):not(.checkout),
.woocommerce a.button:not(.alt):not(.checkout) {
    background-color: var(--ew-bg-light);
    color: var(--ew-text);
    border: 1.5px solid var(--ew-border);
}

.woocommerce .button:not(.alt):not(.checkout):hover,
.woocommerce a.button:not(.alt):not(.checkout):hover {
    background-color: var(--ew-wine);
    color: #fff;
    border-color: var(--ew-wine);
}

/* Checkout / primary action buttons stay filled */
.woocommerce .button.alt,
.woocommerce .button.checkout,
.woocommerce button.button.alt,
.woocommerce a.button.alt,
.woocommerce a.button.checkout,
.woocommerce #place_order,
.woocommerce .checkout-button {
    background-color: var(--ew-wine) !important;
    color: #fff !important;
    border: none !important;
}

.woocommerce .button.alt:hover,
.woocommerce .button.checkout:hover,
.woocommerce button.button.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce a.button.checkout:hover,
.woocommerce #place_order:hover,
.woocommerce .checkout-button:hover {
    background-color: var(--ew-wine-dark) !important;
    color: #fff !important;
}

/* ========================================
   Elementor Menu Cart Widget (header icon + dropdown)
   ======================================== */

/* Cart icon in the header */
.elementor-menu-cart__toggle .elementor-button {
    color: #fff !important;
    fill: #fff !important;
}

.elementor-menu-cart__toggle .elementor-button:hover {
    color: var(--ew-wine-light) !important;
    fill: var(--ew-wine-light) !important;
}

.elementor-menu-cart__toggle .elementor-button-icon svg {
    fill: currentColor;
}

/* Cart dropdown container */
.elementor-menu-cart__container {
    border-radius: var(--ew-radius);
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.elementor-menu-cart__main {
    padding: 1.5rem;
}

/* Products in dropdown */
.elementor-menu-cart__product-name {
    color: var(--ew-wine) !important;
    font-weight: 600 !important;
}

.elementor-menu-cart__product-name:hover {
    color: var(--ew-wine-dark) !important;
}

.elementor-menu-cart__product-price {
    color: var(--ew-text-muted) !important;
}

.elementor-menu-cart__product {
    border-bottom: 1px solid var(--ew-border) !important;
}

/* Subtotal */
.elementor-menu-cart__subtotal {
    font-weight: 700 !important;
    color: var(--ew-dark) !important;
    border-top: 2px solid var(--ew-wine-light) !important;
    padding: 1rem 0 !important;
}

.elementor-menu-cart__subtotal .woocommerce-Price-amount {
    color: var(--ew-wine) !important;
}

/* Footer buttons (View cart + Checkout) */
.elementor-menu-cart__footer-buttons {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.5rem;
}

.elementor-menu-cart__footer-buttons .elementor-button {
    flex: 1;
    text-align: center;
    padding: 0.75rem 1rem !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    border-radius: var(--ew-radius-sm) !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    display: inline-block;
    line-height: 1.4;
}

/* View Cart button (outline) */
.elementor-menu-cart__footer-buttons .elementor-button--view-cart {
    background: var(--ew-bg-light) !important;
    color: var(--ew-text) !important;
    border: 1.5px solid var(--ew-border) !important;
}

.elementor-menu-cart__footer-buttons .elementor-button--view-cart:hover {
    background: var(--ew-wine) !important;
    color: #fff !important;
    border-color: var(--ew-wine) !important;
}

/* Checkout button (filled) */
.elementor-menu-cart__footer-buttons .elementor-button--checkout {
    background: var(--ew-wine) !important;
    color: #fff !important;
    border: none !important;
}

.elementor-menu-cart__footer-buttons .elementor-button--checkout:hover {
    background: var(--ew-wine-dark) !important;
}

/* Remove item button */
.elementor-menu-cart__product .remove {
    color: var(--ew-text-muted) !important;
    transition: color 0.2s ease;
}

.elementor-menu-cart__product .remove:hover {
    color: var(--ew-red) !important;
}

/* Close button */
.elementor-menu-cart__close-button {
    color: var(--ew-text-muted) !important;
}

.elementor-menu-cart__close-button:hover {
    color: var(--ew-dark) !important;
}

/* ========================================
   Mini-Cart Widget (standard/sidebar)
   ======================================== */

.widget_shopping_cart_content,
.woocommerce-mini-cart__empty-message {
    padding: 1.5rem;
    padding-top: 80px;
}

.woocommerce-mini-cart {
    padding: 0;
    margin: 0;
    list-style: none;
}

.woocommerce-mini-cart .mini_cart_item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--ew-border);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.woocommerce-mini-cart .mini_cart_item:last-child {
    border-bottom: none;
}

.woocommerce-mini-cart .mini_cart_item a:not(.remove) {
    color: var(--ew-wine);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.3;
}

.woocommerce-mini-cart .mini_cart_item a:not(.remove):hover {
    color: var(--ew-wine-dark);
}

/* Hide verbose item meta in mini-cart */
.woocommerce-mini-cart .mini_cart_item dl.variation {
    display: none;
}

.woocommerce-mini-cart .mini_cart_item .quantity {
    color: var(--ew-text-muted);
    font-size: 0.8rem;
    display: block;
}

.woocommerce-mini-cart .mini_cart_item .remove {
    color: var(--ew-red) !important;
    font-size: 1.2rem;
    text-decoration: none;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.woocommerce-mini-cart .mini_cart_item .remove:hover {
    opacity: 1;
}

.woocommerce-mini-cart__total {
    padding: 1rem 0;
    border-top: 2px solid var(--ew-wine-light);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ew-dark);
    text-align: center;
}

.woocommerce-mini-cart__total .amount {
    color: var(--ew-wine);
}

.woocommerce-mini-cart__buttons {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.5rem;
}

.woocommerce-mini-cart__buttons .button {
    flex: 1;
    text-align: center;
    padding: 0.7rem 1rem !important;
    font-size: 0.85rem !important;
    border-radius: var(--ew-radius-sm);
    white-space: nowrap;
    box-sizing: border-box;
}

/* "Warenkorb anzeigen" as outlined button */
.woocommerce-mini-cart__buttons .button:not(.checkout) {
    background: transparent !important;
    color: var(--ew-wine) !important;
    border: 1.5px solid var(--ew-wine) !important;
}

.woocommerce-mini-cart__buttons .button:not(.checkout):hover {
    background: var(--ew-wine-light) !important;
}

/* ========================================
   Notices (success, error, info)
   ======================================== */

/* Base notice style — extra specificity to override theme/Elementor */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce .woocommerce-message,
.woocommerce .woocommerce-info,
.woocommerce .woocommerce-error,
.elementor-widget-container .woocommerce-message,
.elementor-widget-container .woocommerce-info,
.elementor-widget-container .woocommerce-error,
body .woocommerce-message,
body .woocommerce-info,
body .woocommerce-error {
    border: none !important;
    border-top: none !important;
    border-right: none !important;
    border-bottom: none !important;
    border-left: none !important;
    border-radius: var(--ew-radius) !important;
    padding: 1rem 1.5rem !important;
    margin: 1rem auto 1.5rem !important;
    max-width: 1140px;
    font-size: 0.9rem;
    line-height: 1.5;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

/* Hide the broken WooCommerce font icon */
.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before,
body .woocommerce-message::before,
body .woocommerce-info::before,
body .woocommerce-error::before {
    display: none !important;
    content: none !important;
}

/* Success notice */
.woocommerce-message,
.woocommerce .woocommerce-message,
body .woocommerce-message {
    background: var(--ew-wine, #8A121F) !important;
    color: #fff !important;
}

.woocommerce-message .button,
body .woocommerce-message .button {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
    padding: 0.45rem 1.1rem;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1.5px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 6px;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.woocommerce-message .button:hover,
body .woocommerce-message .button:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    color: #fff !important;
}

/* Info notice */
.woocommerce-info,
.woocommerce .woocommerce-info,
body .woocommerce-info {
    background: var(--ew-bg-light, #f5f3f3) !important;
    color: var(--ew-text, #333) !important;
}

/* Error notice */
.woocommerce-error,
.woocommerce .woocommerce-error,
body .woocommerce-error {
    background: #fdeaea !important;
    color: #5a1010 !important;
}

/* ========================================
   Cart Page
   ======================================== */

.woocommerce-cart .woocommerce {
    padding: 3rem 0 4rem;
}

.woocommerce table.shop_table {
    border-collapse: collapse;
    border: none;
    border-radius: var(--ew-radius);
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.woocommerce table.shop_table thead {
    background: var(--ew-wine);
    color: #fff;
}

.woocommerce table.shop_table thead th {
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: none;
    color: #fff;
}

.woocommerce table.shop_table td {
    padding: 1.25rem;
    border-bottom: 1px solid var(--ew-border);
    vertical-align: middle;
    color: var(--ew-text);
}

.woocommerce table.shop_table tbody tr:last-child td {
    border-bottom: none;
}

.woocommerce table.shop_table .product-name a {
    color: var(--ew-wine);
    text-decoration: none;
    font-weight: 600;
}

.woocommerce table.shop_table .product-name a:hover {
    color: var(--ew-wine-dark);
}

.woocommerce table.shop_table .product-remove a.remove {
    color: var(--ew-red) !important;
    font-size: 1.3rem;
    background: none;
    width: auto;
    height: auto;
    display: inline;
}

.woocommerce table.shop_table .product-remove a.remove:hover {
    background: none;
    color: #a01818 !important;
}

/* Mini gift card thumbnail in cart */
.ew-gc-mini-thumb {
    width: 70px;
    border-radius: var(--ew-radius-sm);
    overflow: hidden;
    font-size: 0;
    line-height: 1;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.ew-gc-mini-thumb__header {
    background: linear-gradient(135deg, var(--ew-wine-dark, #6b0c16), var(--ew-wine, #8A121F));
    padding: 6px 8px;
    text-align: center;
}

.ew-gc-mini-thumb__logo {
    width: 48px !important;
    height: auto !important;
    display: inline-block;
}

.ew-gc-mini-thumb__body {
    background: linear-gradient(135deg, #fdf6f0, #fef9f3);
    padding: 5px 6px 7px;
    text-align: center;
}

.ew-gc-mini-thumb__label {
    display: block;
    font-size: 7px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ew-text-muted, #666);
    margin-bottom: 2px;
}

.ew-gc-mini-thumb__amount {
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: var(--ew-wine, #8A121F);
}

.woocommerce table.shop_table .product-thumbnail img {
    border-radius: var(--ew-radius-sm);
    width: 70px;
    height: auto;
}

/* Quantity input in cart */
.woocommerce table.shop_table .quantity .qty,
.woocommerce .quantity .qty {
    border: 1.5px solid var(--ew-border);
    border-radius: 6px;
    padding: 0.5rem;
    font-size: 1rem;
    text-align: center;
    width: 70px;
    transition: border-color 0.2s ease;
}

.woocommerce table.shop_table .quantity .qty:focus,
.woocommerce .quantity .qty:focus {
    border-color: var(--ew-wine);
    outline: none;
    box-shadow: 0 0 0 3px rgba(138, 18, 31, 0.1);
}

/* Cart totals */
.woocommerce .cart_totals,
.woocommerce-page .cart_totals {
    background: var(--ew-bg-white);
    border-radius: var(--ew-radius);
    padding: 1.5rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.woocommerce .cart_totals h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--ew-dark);
    margin: 0 0 1rem;
}

.woocommerce .cart_totals table {
    border: none;
}

.woocommerce .cart_totals table th {
    font-weight: 600;
    color: var(--ew-text-muted);
    padding: 0.75rem 1rem;
    border: none;
    border-bottom: 1px solid var(--ew-border);
}

.woocommerce .cart_totals table td {
    padding: 0.75rem 1rem;
    border: none;
    border-bottom: 1px solid var(--ew-border);
    color: var(--ew-text);
}

.woocommerce .cart_totals .order-total th,
.woocommerce .cart_totals .order-total td {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ew-dark);
    border-bottom: none;
}

.woocommerce .cart_totals .order-total .amount {
    color: var(--ew-wine);
    font-size: 1.25rem;
}

.woocommerce .cart_totals .wc-proceed-to-checkout {
    padding-top: 1.25rem;
}

.woocommerce .cart_totals .wc-proceed-to-checkout .checkout-button {
    width: 100%;
    text-align: center;
    padding: 1rem;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: var(--ew-radius-sm);
}

/* Coupon field */
.woocommerce .cart .coupon {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.woocommerce .cart .coupon #coupon_code {
    border: 1.5px solid var(--ew-border);
    border-radius: 6px;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

.woocommerce .cart .coupon #coupon_code:focus {
    border-color: var(--ew-wine);
    outline: none;
    box-shadow: 0 0 0 3px rgba(138, 18, 31, 0.1);
}

/* Update cart button */
.woocommerce .cart button[name="update_cart"] {
    background-color: var(--ew-bg-light);
    color: var(--ew-text);
    border: 1.5px solid var(--ew-border);
}

.woocommerce .cart button[name="update_cart"]:hover {
    background-color: var(--ew-wine);
    color: #fff;
    border-color: var(--ew-wine);
}

/* ========================================
   Checkout Page
   ======================================== */

.woocommerce-checkout .woocommerce {
    padding: 2rem 0 4rem;
}

/* --- Two-column layout (order/payment left, address right) --- */
.woocommerce-checkout form.woocommerce-checkout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 0 2rem;
    align-items: start;
}

/* Right column: billing + additional fields */
.woocommerce-checkout .col2-set {
    grid-column: 2;
    grid-row: 1 / 20;
}

.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2 {
    padding: 0;
    width: 100%;
    float: none;
}

/* Left column: heading + order review + payment */
.woocommerce-checkout #order_review_heading {
    grid-column: 1;
    margin-bottom: 0.75rem;
}

.woocommerce-checkout #order_review {
    grid-column: 1;
}

/* Coupon bar sits full-width above the grid */
.woocommerce form.checkout_coupon,
.woocommerce form.login,
.woocommerce form.register {
    border: 1.5px solid var(--ew-border);
    border-radius: var(--ew-radius);
    padding: 1rem 1.5rem;
    background: var(--ew-bg-white);
    margin-bottom: 1rem;
}

.woocommerce-checkout .woocommerce-info {
    margin-bottom: 1rem;
}

/* --- Section cards --- */
.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2 {
    background: var(--ew-bg-white);
    border: 1.5px solid var(--ew-border);
    border-radius: var(--ew-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

/* Section titles */
.woocommerce-checkout h3,
.woocommerce-checkout .woocommerce-billing-fields h3,
.woocommerce-checkout .woocommerce-shipping-fields h3,
.woocommerce-checkout .woocommerce-additional-fields h3,
.woocommerce-checkout #order_review_heading {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ew-dark);
    margin: 0 0 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 2px solid var(--ew-wine-light);
}

/* Form fields */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-page form .form-row input.input-text,
.woocommerce-page form .form-row textarea,
.woocommerce-page form .form-row select {
    border: 1.5px solid var(--ew-border);
    border-radius: 6px;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    color: var(--ew-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: var(--ew-bg-white);
    width: 100%;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
    border-color: var(--ew-wine);
    outline: none;
    box-shadow: 0 0 0 3px rgba(138, 18, 31, 0.1);
}

.woocommerce form .form-row label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--ew-text);
    margin-bottom: 0.25rem;
}

.woocommerce form .form-row .required {
    color: var(--ew-wine);
}

/* Select2 dropdowns */
.woocommerce .select2-container--default .select2-selection--single {
    border: 1.5px solid var(--ew-border);
    border-radius: 6px;
    height: auto;
    padding: 0.4rem 0.75rem;
}

.woocommerce .select2-container--default .select2-selection--single:focus,
.woocommerce .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--ew-wine);
    box-shadow: 0 0 0 3px rgba(138, 18, 31, 0.1);
}

.woocommerce .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--ew-wine);
    color: #fff;
}

/* --- Order review sidebar --- */
.woocommerce-checkout #order_review {
    background: var(--ew-bg-light);
    border: none;
    border-radius: var(--ew-radius);
    padding: 1.25rem;
}

.woocommerce-checkout #order_review table.shop_table {
    box-shadow: none;
    margin-bottom: 0;
    border: none;
    border-collapse: collapse;
}

/* Hide table header row entirely */
.woocommerce-checkout #order_review table.shop_table thead {
    display: none;
}

/* Items as clean rows */
.woocommerce-checkout #order_review table.shop_table tbody tr,
.woocommerce-checkout #order_review table.shop_table tfoot tr {
    border: none;
}

.woocommerce-checkout #order_review table.shop_table td,
.woocommerce-checkout #order_review table.shop_table th {
    padding: 0.5rem 0;
    font-size: 0.85rem;
    vertical-align: middle;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: none;
}

.woocommerce-checkout #order_review table.shop_table td.product-total {
    text-align: right;
    font-weight: 700;
    color: var(--ew-wine);
    white-space: nowrap;
    padding-left: 1rem;
}

/* Hide verbose item meta in checkout sidebar — customer already entered it */
.woocommerce-checkout #order_review .wc-item-meta,
.woocommerce-checkout #order_review dl.variation {
    display: none;
}

/* Product name in order review */
.woocommerce-checkout #order_review .product-name {
    line-height: 1.4;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Quantity indicator */
.woocommerce-checkout #order_review .product-name strong.product-quantity {
    color: var(--ew-text-muted);
    font-weight: 600;
}

/* Totals rows */
.woocommerce-checkout #order_review table.shop_table tfoot th,
.woocommerce-checkout #order_review table.shop_table tfoot td {
    font-size: 0.85rem;
    padding: 0.5rem 0;
    border: none;
    border-bottom: none;
}

.woocommerce-checkout #order_review table.shop_table tfoot td {
    text-align: right;
}

/* Subtotal row — separator above */
.woocommerce-checkout #order_review table.shop_table tfoot tr:first-child th,
.woocommerce-checkout #order_review table.shop_table tfoot tr:first-child td {
    padding-top: 0.75rem;
    border-top: 2px solid rgba(0, 0, 0, 0.08);
}

/* Total row */
.woocommerce-checkout .order-total th,
.woocommerce-checkout .order-total td {
    border-top: 2px solid var(--ew-wine-light) !important;
    padding-top: 0.75rem !important;
    border-bottom: none !important;
}

.woocommerce-checkout .order-total th {
    font-size: 1rem !important;
    font-weight: 700;
}

.woocommerce-checkout .order-total .amount {
    color: var(--ew-wine);
    font-size: 1.15rem;
    font-weight: 800;
}

/* --- Payment methods --- */
.woocommerce-checkout #payment {
    background: var(--ew-bg-light);
    border-radius: var(--ew-radius);
    padding: 1.25rem;
    margin-top: 1rem;
}

.woocommerce-checkout #payment ul.payment_methods {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    border: none;
}

.woocommerce-checkout #payment ul.payment_methods li {
    padding: 0.75rem 1rem;
    margin-bottom: 0.4rem;
    background: var(--ew-bg-white);
    border-radius: var(--ew-radius-sm);
    border: 1.5px solid var(--ew-border);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.woocommerce-checkout #payment ul.payment_methods li:has(input[type="radio"]:checked) {
    border-color: var(--ew-wine);
    box-shadow: 0 0 0 3px rgba(138, 18, 31, 0.08);
}

.woocommerce-checkout #payment ul.payment_methods li:last-child {
    margin-bottom: 0;
}

.woocommerce-checkout #payment ul.payment_methods li label {
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}

.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method input[type="radio"]:checked + label {
    color: var(--ew-wine);
    font-weight: 700;
}

/* Payment box (expanded content) */
.woocommerce-checkout #payment ul.payment_methods .payment_box {
    background: transparent;
    padding: 0.75rem 0 0;
    margin: 0;
    color: var(--ew-text-muted);
    font-size: 0.85rem;
}

.woocommerce-checkout #payment ul.payment_methods .payment_box::before {
    display: none;
}

.woocommerce-checkout #payment .payment_method_paypal .about_paypal {
    color: var(--ew-wine);
}

/* Stripe Payment Element */
.woocommerce-checkout #payment ul.payment_methods li.payment_method_stripe .payment_box {
    background: transparent;
    border: none;
    padding: 0.75rem 0 0;
}

.woocommerce-checkout .wc-stripe-elements-field,
.woocommerce-checkout .wc-stripe-upe-element,
.woocommerce-checkout #wc-stripe-payment-element,
.woocommerce-checkout #stripe-payment-element {
    background: #fff;
    border-radius: 6px;
}

/* Place order button */
.woocommerce-checkout #payment .place-order {
    padding-top: 1rem;
}

.woocommerce-checkout #payment #place_order {
    width: 100%;
    padding: 0.9rem;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: var(--ew-radius-sm);
    letter-spacing: 0.02em;
}

/* Terms & conditions */
.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper {
    margin-bottom: 0.75rem;
    font-size: 0.82rem;
    color: var(--ew-text-muted);
}

.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper a {
    color: var(--ew-wine);
}

/* --- Checkout responsive --- */
@media (max-width: 992px) {
    .woocommerce-checkout form.woocommerce-checkout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .woocommerce-checkout .col2-set {
        grid-column: 1;
        grid-row: auto;
    }

    .woocommerce-checkout #order_review_heading,
    .woocommerce-checkout #order_review {
        grid-column: 1;
        grid-row: auto;
    }

    .woocommerce-checkout #order_review {
        position: static;
        max-height: none;
        overflow-y: visible;
    }
}

/* ========================================
   My Account Page
   ======================================== */

.woocommerce-account .woocommerce {
    padding: 3rem 0 4rem;
}

.woocommerce-account .woocommerce-MyAccount-navigation {
    background: var(--ew-bg-white);
    border-radius: var(--ew-radius);
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li {
    border-bottom: 1px solid var(--ew-border);
}

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

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 0.85rem 1.25rem;
    color: var(--ew-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
    background: var(--ew-wine-light);
    color: var(--ew-wine);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
    background: var(--ew-wine);
    color: #fff;
    font-weight: 700;
}

/* ========================================
   Price Styling
   ======================================== */

.woocommerce .price,
.woocommerce .amount,
.woocommerce p.price,
.woocommerce span.price {
    color: var(--ew-wine);
    font-weight: 700;
}

.woocommerce del .amount {
    color: var(--ew-text-muted);
    font-weight: 400;
}

.woocommerce ins .amount {
    color: var(--ew-wine);
    font-weight: 700;
    text-decoration: none;
}

/* ========================================
   Star Ratings
   ======================================== */

.woocommerce .star-rating span::before,
.woocommerce .star-rating::before {
    color: var(--ew-wine);
}

/* ========================================
   Product Loop (shop page)
   ======================================== */

/* Equal-height product cards */
.woocommerce ul.products {
    display: flex;
    flex-wrap: wrap;
}

.woocommerce ul.products li.product {
    display: flex;
    flex-direction: column;
}

.woocommerce ul.products li.product a.woocommerce-LoopProduct-link {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    flex: 1;
}

/* Elementor product widget equal-height cards */
.elementor-widget-woocommerce-products .products,
.elementor-widget-wc-products .products {
    display: flex;
    flex-wrap: wrap;
}

.elementor-widget-woocommerce-products .products li.product,
.elementor-widget-wc-products .products li.product {
    display: flex;
    flex-direction: column;
}

/* Elementor Posts / Portfolio widget cards */
.elementor-posts-container {
    display: flex;
    flex-wrap: wrap;
}

.elementor-posts-container .elementor-post {
    display: flex;
    flex-direction: column;
}

.elementor-posts-container .elementor-post__card,
.elementor-posts-container .elementor-post__text {
    display: flex;
    flex-direction: column;
    flex: 1;
}


.woocommerce ul.products li.product .woocommerce-loop-product__title {
    color: var(--ew-dark);
    font-weight: 700;
}

.woocommerce ul.products li.product a:hover .woocommerce-loop-product__title {
    color: var(--ew-wine);
}

.woocommerce ul.products li.product .onsale {
    background-color: var(--ew-wine);
    color: #fff;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
    min-height: auto;
    min-width: auto;
    line-height: 1.4;
}

.woocommerce span.onsale {
    background-color: var(--ew-wine);
    color: #fff;
}

/* ========================================
   Pagination
   ======================================== */

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    border-radius: 6px;
    border: 1.5px solid var(--ew-border);
    color: var(--ew-text);
    transition: all 0.2s ease;
}

.woocommerce nav.woocommerce-pagination ul li a:hover {
    background: var(--ew-wine);
    color: #fff;
    border-color: var(--ew-wine);
}

.woocommerce nav.woocommerce-pagination ul li span.current {
    background: var(--ew-wine);
    color: #fff;
    border-color: var(--ew-wine);
}

/* ========================================
   Breadcrumb (hidden by plugin, kept for safety)
   ======================================== */

.woocommerce .woocommerce-breadcrumb {
    color: var(--ew-text-muted);
    font-size: 0.85rem;
}

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

/* ========================================
   Loading / Overlay
   ======================================== */

/* Force all blockUI overlays to stay within their parent container */
.blockUI.blockOverlay {
    position: absolute !important;
    background-color: rgba(255, 255, 255, 0.7) !important;
    opacity: 1 !important;
    z-index: 9 !important;
    cursor: wait !important;
}

.blockUI.blockOverlay::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 28px !important;
    height: 28px !important;
    margin: -14px 0 0 -14px !important;
    border: 3px solid rgba(138, 18, 31, 0.2) !important;
    border-top-color: var(--ew-wine, #8A121F) !important;
    border-radius: 50% !important;
    background: transparent !important;
    animation: ew-spin 0.7s linear infinite !important;
}

@keyframes ew-spin {
    to { transform: rotate(360deg); }
}

/* Hide the duplicate blockMsg element (WC creates both overlay + msg) */
.blockUI.blockMsg,
.blockUI.blockMsg.blockElement {
    display: none !important;
}

/* ========================================
   Tabs (product page)
   ======================================== */

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
    color: var(--ew-wine);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover {
    color: var(--ew-wine);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
    .woocommerce-cart .woocommerce,
    .woocommerce-checkout .woocommerce,
    .woocommerce-account .woocommerce {
        padding: 1.5rem 0 3rem;
    }

    .woocommerce-checkout form.woocommerce-checkout {
        grid-template-columns: 1fr;
    }

    .woocommerce-checkout #order_review_heading {
        grid-column: 1;
        grid-row: auto;
    }

    .woocommerce-checkout #order_review {
        grid-column: 1;
        grid-row: auto;
        position: static;
    }

    .woocommerce-checkout .woocommerce-billing-fields,
    .woocommerce-checkout .woocommerce-additional-fields {
        padding: 1rem;
    }

    .woocommerce table.shop_table thead th {
        font-size: 0.78rem;
        padding: 0.6rem;
    }

    .woocommerce table.shop_table td {
        padding: 0.6rem;
    }

    .woocommerce-checkout #order_review,
    .woocommerce .cart_totals {
        padding: 1rem;
    }

    .woocommerce-checkout #payment {
        padding: 1rem;
    }
}
