/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/
 /* ---------- Metode de livrare ca și carduri (checkout + coș) ---------- */
.woocommerce-shipping-totals.shipping { display: block; }
.woocommerce-shipping-totals.shipping th { display: block; padding-bottom: 8px !important; border: 0 !important; }
.woocommerce-shipping-totals.shipping td { display: block; width: 100%; padding-top: 0 !important; text-align: left !important; }

#shipping_method.woocommerce-shipping-methods {
    --ks-accent: var(--wd-primary-color, #e4002b);
    display: grid; gap: 10px; margin: 0; padding: 0; list-style: none;
}
#shipping_method li {
    position: relative; margin: 0 !important; padding: 0 !important;
    list-style: none; text-align: left;
}
/* radio-ul real rămâne accesibil, dar invizibil, peste tot cardul */
#shipping_method li input.shipping_method {
    position: absolute; inset: 0; width: 100%; height: 100%;
    margin: 0; opacity: 0; cursor: pointer; z-index: 2;
}
#shipping_method li label {
    display: flex !important; align-items: center; gap: 14px;
    margin: 0 !important; padding: 14px 16px 14px 14px;
    border: 2px solid #e6e6e6; border-radius: 12px; background: #fff;
    line-height: 1.3; cursor: pointer;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}
/* iconița */
#shipping_method li label::before {
    content: ""; flex: 0 0 44px; height: 44px; border-radius: 10px;
    background: #f3f3f3 center / 24px no-repeat;
    transition: background-color .2s;
}
#shipping_method li input[value^="local_pickup"] + label::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l1.5-5h15L21 9'/%3E%3Cpath d='M3 9h18v2a3 3 0 0 1-6 0 3 3 0 0 1-6 0 3 3 0 0 1-6 0z'/%3E%3Cpath d='M5 13v8h14v-8'/%3E%3Cpath d='M10 21v-5h4v5'/%3E%3C/svg%3E");
}
#shipping_method li input[value^="flat_rate"] + label::before,
#shipping_method li input[value^="free_shipping"] + label::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 6h13v10H1z'/%3E%3Cpath d='M14 9h4l3 3v4h-7z'/%3E%3Ccircle cx='5.5' cy='17.5' r='2'/%3E%3Ccircle cx='17.5' cy='17.5' r='2'/%3E%3C/svg%3E");
}
/* bifa din dreapta */
#shipping_method li label::after {
    content: ""; flex: 0 0 22px; height: 22px; margin-left: 4px;
    border: 2px solid #cfcfcf; border-radius: 50%; background: #fff center / 12px no-repeat;
    transition: all .2s;
}
.ks-ship-text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.ks-ship-name { font-weight: 700; font-size: 15px; color: #222; }
.ks-ship-desc { font-size: 12.5px; color: #777; font-weight: 400; }
.ks-ship-price { font-weight: 700; font-size: 15px; color: #222; white-space: nowrap; }
.ks-ship-free { color: #1a9b4b; }

/* hover / focus */
#shipping_method li:hover label { border-color: #bdbdbd; }
#shipping_method li input:focus-visible + label { box-shadow: 0 0 0 3px rgba(0,0,0,.15); }

/* selectat */
#shipping_method li input:checked + label {
    border-color: var(--ks-accent);
    background: color-mix(in srgb, var(--ks-accent) 5%, #fff);
    box-shadow: 0 6px 18px -10px color-mix(in srgb, var(--ks-accent) 70%, transparent);
}
#shipping_method li input:checked + label::before {
    background-color: color-mix(in srgb, var(--ks-accent) 12%, #fff);
}
#shipping_method li input:checked + label::after {
    border-color: var(--ks-accent);
    background-color: var(--ks-accent);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E");
}

/* când e o singură metodă (fără radio) */
#shipping_method li:only-child label { cursor: default; }

@media (max-width: 480px) {
    #shipping_method li label { padding: 12px; gap: 10px; }
    #shipping_method li label::before { flex-basis: 38px; height: 38px; background-size: 20px; }
    .ks-ship-desc { font-size: 12px; }
}