/* ======================================================
   Produktkort: custom styling til Yootheme Pro / UIKit
   Scope: .woocommerce ul.products li.product
   ====================================================== */

/* --- Grid: overstyr WooCommerce's standard layout --- */
.woocommerce ul.products {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(3, 1fr);
    list-style: none;
    padding: 0;
    margin: 0;
}
@media (max-width: 959px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 639px) {
    .woocommerce ul.products {
        grid-template-columns: 1fr;
    }
}

/* --- Kort: nulstil WooCommerce/YooTheme margins+padding, aktiver flex-column --- */
.woocommerce ul.products li.product.uk-card {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0 !important;
    width: auto !important;
    float: none !important;
}

.product-card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

/* Billede: sikrer 1:1 format og fuld bredde */
.woocommerce ul.products li.product .el-image {
    aspect-ratio: 1 / 1;
    width: 100%;
    object-fit: cover;
    display: block;
}

/* Short description: begræns til 3 linjer */
.woocommerce ul.products li.product .product-description {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Udsalgspris-styling */
.woocommerce ul.products li.product del.product-regular-price {
    color: #999;
    font-weight: normal;
    font-size: 0.85em;
    margin-right: 4px;
}
.woocommerce ul.products li.product ins.product-sale-price {
    text-decoration: none;
    font-weight: bold;
    color: inherit;
}
a.uk-badge.uk-badge-secondary {
    background-color: #39404E;
	color:#ffffff !important;
}

/* ======================================================
   Kurv: Samlet beløb & forsendelse
   Scope: .cart_totals
   ====================================================== */

/* --- Samlet beløb tabel: mere luft mellem rækker --- */
.cart_totals .shop_table th,
.cart_totals .shop_table td {
    padding: 16px 0;
    vertical-align: top;
}

/* --- Skjul Forsendelse-label --- */
.cart_totals .woocommerce-shipping-totals th {
    display: none;
}

.cart_totals .woocommerce-shipping-totals td {
    padding-left: 0 !important;
}

/* Forsendelsesrækken (JS sætter colspan, CSS styler) */
.cart_totals .woocommerce-shipping-totals td {
    padding: 8px 0 !important;
}

/* --- Forsendelsesmetoder: tab-stil som checkout --- */
.woocommerce-shipping-methods {
    list-style: none !important;
    padding: 4px !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 0 !important;
    width: 100% !important;
    box-sizing: border-box;
    background: #f5f5f5;
    border-radius: 8px;
}

.woocommerce-shipping-methods li {
    flex: 1;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border-radius: 6px;
    position: relative;
    text-align: center;
}

/* --- Skjul radio-knapper visuelt --- */
.woocommerce-shipping-methods li input[type="radio"] {
    position: absolute !important;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* --- Labels som tabs --- */
.woocommerce-shipping-methods li label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 0 !important;
    padding: 12px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    line-height: 1.3;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    color: #666;
}

/* --- Aktiv tab --- */
.woocommerce-shipping-methods li input[type="radio"]:checked + label {
    background: #fff;
    border-color: #ddd;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    color: #222;
}

/* --- Ikoner via pseudo-element --- */
.woocommerce-shipping-methods li label::before {
    display: block;
    width: 24px;
    height: 24px;
    content: "";
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-bottom: 2px;
    opacity: 0.6;
}

.woocommerce-shipping-methods li input[type="radio"]:checked + label::before {
    opacity: 1;
}

/* Fragt-ikon (lastbil) */
.woocommerce-shipping-methods li label[for*="shipmondo"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1' y='3' width='15' height='13' rx='1'/%3E%3Cpolygon points='16 8 20 8 23 11 23 16 16 16 16 8'/%3E%3Ccircle cx='5.5' cy='18.5' r='2.5'/%3E%3Ccircle cx='18.5' cy='18.5' r='2.5'/%3E%3C/svg%3E");
}

/* Afhentning-ikon (butik) */
.woocommerce-shipping-methods li label[for*="pickup_location"]::before,
.woocommerce-shipping-methods li label[for*="local_pickup"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3h18v5H3z'/%3E%3Cpath d='M3 8v12a2 2 0 002 2h14a2 2 0 002-2V8'/%3E%3Cpath d='M10 22V14h4v8'/%3E%3C/svg%3E");
}

/* --- Pris og by-info under label-tekst --- */
.woocommerce-shipping-methods li label .woocommerce-Price-amount,
.woocommerce-shipping-methods li label .pickup-city {
    display: block;
    font-size: 0.85em;
    color: #999;
    margin-top: 2px;
}

/* --- Skjul hjælpetekst og <br> i tab-visning --- */
.woocommerce-shipping-methods li br,
.woocommerce-shipping-methods li .shipping_pickup_cart {
    display: none;
}

/* --- Din ordre overskrift i kortet --- */
.woocommerce-checkout-review-order #order_review_heading {
    margin: 0 0 20px 0;
    font-size: 1.4em;
}

/* --- Skjul Forsendelse-label på kasse-siden --- */
.woocommerce-checkout .woocommerce-shipping-totals th {
    display: none;
}

.woocommerce-checkout .woocommerce-shipping-totals td {
    padding: 8px 0 !important;
}

/* --- Skjul forsendelsesdestination-tekst --- */
.woocommerce-cart .woocommerce-shipping-destination {
    display: none;
}

/* --- Total-række: fremhæv visuelt --- */
.cart_totals .order-total th,
.cart_totals .order-total td {
    padding-top: 20px;
    font-size: 1.1em;
}

.cart_totals .order-total .includes_tax {
    display: block;
    font-size: 0.78em;
    color: #777;
    margin-top: 2px;
}

/* --- Gå til kassen-knap --- */
.wc-proceed-to-checkout .checkout-button {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px 24px;
    font-size: 1em;
    border-radius: 4px;
    margin-bottom: 10px;
}

/* --- Express checkout knapper: luft --- */
#wc-stripe-express-checkout-element {
    margin-top: 10px !important;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* --- Responsiv: stack tabs på meget små skærme --- */
@media (max-width: 400px) {
    .woocommerce-shipping-methods {
        flex-direction: column !important;
        gap: 4px !important;
    }
}


/* ======================================================
   Kasse: Betalingssektion (Stripe)
   ====================================================== */

/* --- Fjern venstre-margin på betalingsboksen --- */
.woocommerce-checkout-payment .payment_box {
    padding-left: 0 !important;
}

/* --- Hvid baggrund + afrunding på Stripe-modulet --- */
.woocommerce-checkout-payment .payment_box .wc-upe-form,
.woocommerce-checkout-payment .payment_box .wc-payment-form {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 16px;
}

/* --- Font-match: tving Manrope ind i Stripe-labels --- */
.woocommerce-checkout-payment,
.woocommerce-checkout-payment label,
.woocommerce-checkout-payment .payment_method_stripe,
.woocommerce-checkout-payment .wc_payment_methods {
    font-family: Manrope, sans-serif !important;
}

/* --- Betalingsmetode-label styling --- */
.woocommerce-checkout-payment label[for="payment_method_stripe"] {
    font-size: 1.05em;
    font-weight: 500;
}

/* --- Fjern unødig padding på payment list --- */
.woocommerce-checkout-payment .wc_payment_methods {
    list-style: none !important;
    padding: 0 !important;
}


/* ======================================================
   Shipmondo pakkeshop-vælger: vis under tabs
   ====================================================== */

/* Pakkeshop-vælger: flyttet under tabs via JS, fuld bredde */
.bs-moved {
    width: 100% !important;
    box-sizing: border-box;
    margin-top: 12px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 12px;
    font-size: 0.9em;
    color: #555;
    clear: both;
}

.bs-moved .shipmondo_service_point_selection {
    margin: 0;
    padding: 0;
}

.shipmondo_service_point_selection .service_points_dropdown .service_point .header .name {
    text-align: left;
}

.service_points_dropdown {
    margin-top: 0px !important;
}

.shipmondo-modal_footer {
    display: none;
}


/* --- Skjul landefeltet på checkout --- */
#billing_country_field.hidden-field {
    display: none !important;
}


/* --- Checkout felter side om side --- */
#billing_postcode_field,
#billing_phone_field {
    width: 48% !important;
    float: left !important;
    clear: left !important;
}

#billing_city_field,
#billing_email_field {
    width: 48% !important;
    float: right !important;
    clear: none !important;
}

/* Clear efter feltpar */
#billing_city_field::after,
#billing_email_field::after {
    content: "";
    display: table;
    clear: both;
}


/* --- Skjul tom shipping-fields container --- */
.woocommerce-shipping-fields:empty,
.woocommerce-shipping-fields:not(:has(*:not(br):not(hr))) {
    display: none !important;
}

/* --- Yderligere information: venstrestil og clear floats --- */
.woocommerce-additional-fields {
    clear: both !important;
    text-align: left !important;
}

.woocommerce-additional-fields h3 {
    display: none !important;
}

.woocommerce-additional-fields {
    margin-top: 20px !important;
}
