/* AutoPoint modern VirtueMart checkout ------------------------------------ */
.com_virtuemart.view-cart #t3-content {
    padding-top: 28px;
    padding-bottom: 48px;
}

.com_virtuemart.view-cart .vm-cart-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 0 0 22px;
    padding: 0 0 16px;
    border-bottom: 1px solid #e7e7e7;
}

.com_virtuemart.view-cart .vm-cart-header,
.com_virtuemart.view-cart .vm-continue-shopping {
    float: none;
    width: auto;
}

.com_virtuemart.view-cart .vm-cart-header h1 {
    margin: 0;
    color: #202022;
    font-size: 33px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.4px;
}

.com_virtuemart.view-cart .vm-continue-shopping .continue_link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid #dedede;
    border-radius: 4px;
    background: #fff;
    color: #555;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color .18s ease, color .18s ease, background .18s ease;
}

.com_virtuemart.view-cart .vm-continue-shopping .continue_link:hover {
    border-color: #ffa31a;
    background: #fff9ef;
    color: #202022;
}

.com_virtuemart.view-cart .ap-checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 22px;
}

.com_virtuemart.view-cart .ap-checkout-customer-column,
.com_virtuemart.view-cart .ap-checkout-order-column {
    min-width: 0;
}

.com_virtuemart.view-cart .ap-checkout-customer-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 16px;
}

.com_virtuemart.view-cart .ap-checkout-fields {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    max-width: none;
    margin: 0;
}

.com_virtuemart.view-cart .ap-checkout-contact-card {
    box-sizing: border-box;
    width: 100%;
}

.com_virtuemart.view-cart .billto-shipto {
    display: none !important;
}

.com_virtuemart.view-cart .ap-checkout-fields {
    display: grid;
    gap: 14px;
}

.com_virtuemart.view-cart .ap-checkout-card,
.com_virtuemart.view-cart .ap-checkout-consent-card,
.com_virtuemart.view-cart .billto-shipto,
.com_virtuemart.view-cart .vm-fieldset-pricelist {
    position: relative;
    margin: 0;
    padding: 18px;
    border: 1px solid #e4e4e4;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 7px 24px rgba(24, 24, 26, .045);
}

.com_virtuemart.view-cart .ap-checkout-card::before,
.com_virtuemart.view-cart .vm-fieldset-pricelist::before {
    position: absolute;
    top: -1px;
    right: 22px;
    left: 22px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: #ffa31a;
    content: "";
}

.com_virtuemart.view-cart .ap-checkout-card-header,
.com_virtuemart.view-cart .ap-invoice-toggle-copy {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 16px;
}

.com_virtuemart.view-cart .ap-checkout-card-header-compact {
    margin-bottom: 10px;
}

.com_virtuemart.view-cart .ap-checkout-step {
    display: inline-flex;
    flex: 0 0 28px;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #202022;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.com_virtuemart.view-cart .ap-checkout-card h2 {
    margin: 0;
    color: #202022;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.25;
}

.com_virtuemart.view-cart .ap-checkout-card-header p,
.com_virtuemart.view-cart .ap-invoice-toggle-copy p {
    margin: 3px 0 0;
    color: #777;
    font-size: 13px;
    line-height: 1.4;
}

.com_virtuemart.view-cart .ap-checkout-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px 12px;
}

.com_virtuemart.view-cart .ap-checkout-field,
.com_virtuemart.view-cart .ap-checkout-field > div {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

/* Joomla may add invalid to the fieldset itself; never show its legacy red box. */
.com_virtuemart.view-cart fieldset.ap-checkout-field,
.com_virtuemart.view-cart fieldset.ap-checkout-field.invalid,
.com_virtuemart.view-cart .ap-checkout-field > .cart,
.com_virtuemart.view-cart .ap-checkout-field > .cart.invalid {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: inherit;
    box-shadow: none !important;
}

.com_virtuemart.view-cart .ap-checkout-field-wide,
.com_virtuemart.view-cart .vm-fieldset-address-1,
.com_virtuemart.view-cart .vm-fieldset-company-invoice-address {
    grid-column: 1 / -1;
}

.com_virtuemart.view-cart .ap-checkout-label {
    display: block;
    margin: 0 0 6px;
    color: #454545;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
}

.com_virtuemart.view-cart .ap-checkout-field input[type="text"],
.com_virtuemart.view-cart .ap-checkout-field input[type="email"],
.com_virtuemart.view-cart .ap-checkout-field input[type="tel"],
.com_virtuemart.view-cart .ap-checkout-field select,
.com_virtuemart.view-cart .ap-checkout-field textarea,
.com_virtuemart.view-cart .vmshipment-econt input[type="text"],
.com_virtuemart.view-cart .vmshipment-econt input[type="search"],
.com_virtuemart.view-cart .vmshipment-econt textarea {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    min-height: 43px;
    margin: 0;
    padding: 9px 11px;
    border: 1px solid #d9dce0;
    border-radius: 4px;
    background: #fafafa;
    box-shadow: none;
    color: #202022;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.35;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.com_virtuemart.view-cart .ap-checkout-field input:focus,
.com_virtuemart.view-cart .ap-checkout-field select:focus,
.com_virtuemart.view-cart .ap-checkout-field textarea:focus,
.com_virtuemart.view-cart .vmshipment-econt input:focus,
.com_virtuemart.view-cart .vmshipment-econt textarea:focus {
    border-color: #ffa31a;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 163, 26, .14);
    outline: none;
}

/* Neutralise VirtueMart's solid red box; our wrapper controls the state. */
.com_virtuemart.view-cart .ap-checkout-field input.invalid,
.com_virtuemart.view-cart .ap-checkout-field select.invalid,
.com_virtuemart.view-cart .ap-checkout-field textarea.invalid {
    border-color: #d9dce0 !important;
    background-color: #fafafa !important;
    color: #333;
    box-shadow: none;
}

.com_virtuemart.view-cart .ap-checkout-field.has-error input,
.com_virtuemart.view-cart .ap-checkout-field.has-error select,
.com_virtuemart.view-cart .ap-checkout-field.has-error textarea {
    border-color: #dc3545 !important;
    background-color: #fff7f8 !important;
    color: #333;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, .11);
}

.com_virtuemart.view-cart .ap-checkout-field.has-error .ap-checkout-label {
    color: #b42332;
}

.com_virtuemart.view-cart .ap-checkout-field.has-error .ap-checkout-label::after {
    margin-left: 7px;
    color: #b42332;
    content: "Проверете полето";
    font-size: 10px;
    font-weight: 600;
}

.com_virtuemart.view-cart .ap-checkout-validation-summary {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-left: 3px solid #dc3545;
    border-radius: 3px;
    background: #fff7f8;
    color: #9f1f2e;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

.com_virtuemart.view-cart .ap-checkout-field.is-valid input:not([type="checkbox"]),
.com_virtuemart.view-cart .ap-checkout-field.is-valid select,
.com_virtuemart.view-cart .ap-checkout-field.is-valid textarea {
    border-color: #a9d2b8 !important;
    background-color: #fbfffc;
    box-shadow: inset 3px 0 0 #52a874;
}

.com_virtuemart.view-cart .ap-checkout-field.is-valid input.invalid,
.com_virtuemart.view-cart .ap-checkout-field.is-valid select.invalid,
.com_virtuemart.view-cart .ap-checkout-field.is-valid textarea.invalid {
    border-color: #a9d2b8 !important;
    background-color: #fbfffc !important;
    box-shadow: inset 3px 0 0 #52a874;
}

.com_virtuemart.view-cart .ap-checkout-field.is-valid .ap-checkout-label::after {
    margin-left: 6px;
    color: #3b9760;
    content: "✓";
    font-size: 12px;
    font-weight: 700;
}

.com_virtuemart.view-cart .ap-checkout-note-card textarea {
    min-height: 76px;
    resize: vertical;
}

.com_virtuemart.view-cart .ap-checkout-note-card .ap-checkout-label {
    position: absolute;
    overflow: hidden;
    width: 1px;
    height: 1px;
    clip: rect(0 0 0 0);
}

.com_virtuemart.view-cart .ap-invoice-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.com_virtuemart.view-cart .ap-invoice-toggle-copy {
    margin: 0;
}

.com_virtuemart.view-cart .ap-checkout-field-toggle {
    flex: 0 0 auto;
}

.com_virtuemart.view-cart .ap-checkout-field-toggle .ap-checkout-label {
    position: absolute;
    overflow: hidden;
    width: 1px;
    height: 1px;
    clip: rect(0 0 0 0);
}

.com_virtuemart.view-cart #invoice_required_field {
    position: relative;
    width: 50px;
    height: 28px;
    margin: 0;
    border: 0;
    border-radius: 20px;
    background: #cfd2d5;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: background .2s ease;
}

.com_virtuemart.view-cart #invoice_required_field::after {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .22);
    content: "";
    transition: transform .2s ease;
}

.com_virtuemart.view-cart #invoice_required_field:checked {
    background: #ffa31a;
}

.com_virtuemart.view-cart #invoice_required_field:checked::after {
    transform: translateX(22px);
}

.com_virtuemart.view-cart #invoice_required_field:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 163, 26, .25);
    outline: none;
}

.com_virtuemart.view-cart .ap-invoice-fields {
    display: none;
    margin-top: 17px;
    padding-top: 17px;
    border-top: 1px solid #ececec;
}

.com_virtuemart.view-cart .ap-invoice-fields.is-visible {
    display: grid;
    animation: apCheckoutReveal .22s ease both;
}

/* CSS fallback: invoice fields still work even if checkout JavaScript is unavailable. */
.com_virtuemart.view-cart .ap-checkout-invoice-card:has(#invoice_required_field:checked) .ap-invoice-fields {
    display: grid;
}

@keyframes apCheckoutReveal {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.com_virtuemart.view-cart .ap-checkout-consent-card {
    padding: 14px 16px;
    background: #f7f7f7;
    box-shadow: none;
}

.com_virtuemart.view-cart .ap-checkout-final-consent {
    margin-top: 14px;
}

.com_virtuemart.view-cart .ap-checkout-final-fields {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.com_virtuemart.view-cart .ap-checkout-final-fields .ap-checkout-final-consent {
    margin-top: 0;
}

.com_virtuemart.view-cart .ap-checkout-consent-card .ap-checkout-label {
    display: none;
}

.com_virtuemart.view-cart .ap-checkout-consent-card .cart.tos {
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

.com_virtuemart.view-cart .ap-checkout-consent-card input[type="checkbox"] {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: #ffa31a;
}

.com_virtuemart.view-cart .ap-checkout-consent-card .ap-checkout-legal-checkbox {
    display: block !important;
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    appearance: auto;
    -webkit-appearance: checkbox;
}

.com_virtuemart.view-cart .ap-checkout-consent-card .terms-of-service {
    margin: 0;
    color: #555;
    font-size: 13px;
    line-height: 1.45;
}

.com_virtuemart.view-cart .ap-checkout-consent-card .ap-checkout-legal-consent-text {
    cursor: pointer;
}

.com_virtuemart.view-cart .ap-checkout-consent-card .ap-checkout-legal-link {
    color: #b90012;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.com_virtuemart.view-cart .ap-checkout-consent-card .ap-checkout-legal-link:hover,
.com_virtuemart.view-cart .ap-checkout-consent-card .ap-checkout-legal-link:focus {
    color: #e0001b;
}

.com_virtuemart.view-cart .ap-checkout-consent-card #full-tos {
    display: none;
}

/* Existing billing/shipping address block */
.com_virtuemart.view-cart .billto-shipto {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px 18px;
}

.com_virtuemart.view-cart .billto-shipto > .width50 {
    float: none;
    width: 100%;
    min-width: 0;
    padding: 0;
}

.com_virtuemart.view-cart .billto-shipto > .width50 > span:first-child {
    display: block;
    margin-bottom: 7px;
    color: #202022;
    font-size: 15px;
    font-weight: 700;
}

.com_virtuemart.view-cart .billto-shipto .details {
    display: inline-flex;
    margin-top: 7px;
    color: #c8101e;
    font-size: 13px;
    font-weight: 700;
}

.com_virtuemart.view-cart .billto-shipto .output-billto,
.com_virtuemart.view-cart .billto-shipto .output-shipto {
    color: #666;
    font-size: 13px;
    line-height: 1.45;
}

/* Order table and summary */
.com_virtuemart.view-cart .vm-fieldset-pricelist {
    position: relative;
    overflow: visible;
    padding: 18px;
}

.com_virtuemart.view-cart .ap-order-summary-heading {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 16px;
}

.com_virtuemart.view-cart .ap-order-summary-heading h2 {
    margin: 0;
    color: #202022;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.25;
}

.com_virtuemart.view-cart .ap-order-summary-heading p {
    margin: 3px 0 0;
    color: #777;
    font-size: 13px;
    line-height: 1.4;
}

.com_virtuemart.view-cart .ap-order-table-wrap {
    width: 100%;
    overflow: hidden;
    border-radius: 5px;
    scrollbar-color: #c8c8c8 #f2f2f2;
    scrollbar-width: thin;
}

.com_virtuemart.view-cart table.cart-summary {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    color: #444;
    font-size: 12px;
    table-layout: fixed;
}

.com_virtuemart.view-cart table.cart-summary .vm-cart-item-name { width: 50%; }
.com_virtuemart.view-cart table.cart-summary .vm-cart-item-sku {
    width: 12%;
    white-space: nowrap;
}
.com_virtuemart.view-cart table.cart-summary .vm-cart-item-quantity { width: 15%; }
.com_virtuemart.view-cart table.cart-summary .vm-cart-item-discount { width: 10%; }
.com_virtuemart.view-cart table.cart-summary .vm-cart-item-total { width: 13%; }

.com_virtuemart.view-cart table.cart-summary > tbody > tr:first-child > th {
    padding: 10px 4px;
    border: 0;
    background: #202022;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .15px;
    text-transform: uppercase;
}

.com_virtuemart.view-cart table.cart-summary > tbody > tr:first-child > th:first-child {
    border-radius: 4px 0 0 4px;
}

.com_virtuemart.view-cart table.cart-summary > tbody > tr:first-child > th:last-child {
    border-radius: 0 4px 4px 0;
}

.com_virtuemart.view-cart table.cart-summary td {
    padding: 10px 4px;
    border-width: 0 0 1px;
    border-style: solid;
    border-color: #ececec;
    vertical-align: middle;
    overflow-wrap: anywhere;
}

.com_virtuemart.view-cart table.cart-summary .cart-images img {
    width: 46px;
    max-width: 46px;
    height: 46px;
    margin-right: 6px;
    border: 1px solid #ececec;
    border-radius: 4px;
    object-fit: contain;
}

.com_virtuemart.view-cart table.cart-summary .vm-cart-item-name > a {
    color: #333;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

/* Keep the product-row prices visually level with the product name. */
.com_virtuemart.view-cart table.cart-summary .ap-product-row > .vm-cart-item-discount,
.com_virtuemart.view-cart table.cart-summary .ap-product-row > .vm-cart-item-total,
.com_virtuemart.view-cart table.cart-summary .ap-product-row > .vm-cart-item-discount .PricesalesPrice,
.com_virtuemart.view-cart table.cart-summary .ap-product-row > .vm-cart-item-discount .PricediscountAmount,
.com_virtuemart.view-cart table.cart-summary .ap-product-row > .vm-cart-item-total .PricesalesPrice {
    font-size: 14px;
    line-height: 1.35;
}

.com_virtuemart.view-cart table.cart-summary .quantity-input {
    width: 43px;
    min-height: 34px;
    padding: 5px;
    border: 1px solid #d8d8d8;
    border-radius: 3px;
    text-align: center;
}

.com_virtuemart.view-cart table.cart-summary .coupon {
    width: min(230px, 65%);
    min-height: 40px;
    padding: 8px 11px;
    border: 1px solid #d9dce0;
    border-radius: 4px 0 0 4px;
    background: #fafafa;
}

.com_virtuemart.view-cart table.cart-summary input.details-button {
    min-height: 40px;
    margin-left: -1px;
    padding: 8px 14px;
    border: 1px solid #202022;
    border-radius: 0 4px 4px 0;
    background: #202022;
    color: #fff;
    font-weight: 700;
}

/* Coupon override */
.com_virtuemart.view-cart .ap-coupon-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    padding: 12px;
    border: 1px dashed #d5d8dc;
    border-radius: 5px;
    background: #fafafa;
}

.com_virtuemart.view-cart .ap-coupon-copy {
    flex: 0 1 auto;
    min-width: 125px;
}

.com_virtuemart.view-cart .ap-coupon-copy strong,
.com_virtuemart.view-cart .ap-coupon-copy span {
    display: block;
}

.com_virtuemart.view-cart .ap-coupon-copy strong {
    color: #292929;
    font-size: 14px;
}

.com_virtuemart.view-cart .ap-coupon-copy span {
    margin-top: 2px;
    color: #777;
    font-size: 11px;
}

.com_virtuemart.view-cart .ap-coupon-controls {
    display: flex;
    flex: 1 1 320px;
    justify-content: flex-end;
    max-width: 390px;
}

.com_virtuemart.view-cart .ap-coupon-controls .coupon {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    margin: 0;
    border-radius: 4px 0 0 4px;
    background: #fff;
}

.com_virtuemart.view-cart .ap-coupon-controls .ap-coupon-button {
    flex: 0 0 auto;
    min-height: 40px;
    margin: 0 0 0 -1px;
    padding: 8px 16px;
    border: 1px solid #202022;
    border-radius: 0 4px 4px 0;
    background: #202022;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.com_virtuemart.view-cart table.cart-summary tr.vm-shipment-row > td:first-child,
.com_virtuemart.view-cart table.cart-summary tr.vm-payment-row > td:first-child,
.com_virtuemart.view-cart table.cart-summary tr[style*="vertical-align:top"] > td[colspan="4"] {
    padding: 18px 14px;
    background: #f8f8f8;
}

.com_virtuemart.view-cart table.cart-summary h3,
.com_virtuemart.view-cart table.cart-summary h4,
.com_virtuemart.view-cart .vm-payment-header-selected,
.com_virtuemart.view-cart .vm-shipment-header-selected {
    margin: 0 0 10px;
    color: #202022;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

.com_virtuemart.view-cart .vm-payment-header-selected,
.com_virtuemart.view-cart .vm-shipment-header-selected {
    margin-top: 12px;
    color: #777;
    font-size: 12px;
    letter-spacing: .25px;
    text-transform: uppercase;
}

/* Payment and shipment option cards */
.com_virtuemart.view-cart .vm-payment-shipment-select {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    border: 0;
}

.com_virtuemart.view-cart .vm-payment-plugin-single,
.com_virtuemart.view-cart .vm-shipment-plugin-single {
    position: relative;
    margin: 0;
}

.com_virtuemart.view-cart .vm-payment-plugin-single > input[type="radio"],
.com_virtuemart.view-cart .vm-shipment-plugin-single > input[type="radio"] {
    position: absolute;
    overflow: hidden;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.com_virtuemart.view-cart .vm-payment-plugin-single > label,
.com_virtuemart.view-cart .vm-shipment-plugin-single > label {
    position: relative;
    display: flex;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    align-items: center;
    min-height: 52px;
    margin: 0;
    padding: 10px 42px 10px 13px;
    border: 1px solid #dcdfe2;
    border-radius: 5px;
    background: #fff;
    color: #333;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.com_virtuemart.view-cart .vm-payment-plugin-single > label::after,
.com_virtuemart.view-cart .vm-shipment-plugin-single > label::after {
    position: absolute;
    top: 50%;
    right: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 2px solid #c8c8c8;
    border-radius: 50%;
    color: transparent;
    content: "✓";
    font-size: 13px;
    transform: translateY(-50%);
}

.com_virtuemart.view-cart .vm-payment-plugin-single > input:checked + label,
.com_virtuemart.view-cart .vm-shipment-plugin-single > input:checked + label {
    border-color: #ffa31a;
    background: #fff9ef;
    box-shadow: 0 0 0 2px rgba(255, 163, 26, .12);
}

.com_virtuemart.view-cart .vm-payment-plugin-single > input:checked + label::after,
.com_virtuemart.view-cart .vm-shipment-plugin-single > input:checked + label::after {
    border-color: #ffa31a;
    background: #ffa31a;
    color: #fff;
}

.com_virtuemart.view-cart .vmpayment_name,
.com_virtuemart.view-cart .vmshipment_name {
    color: #252525;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.com_virtuemart.view-cart .vmpayment_description,
.com_virtuemart.view-cart .vmshipment_description {
    display: block;
    margin-top: 2px;
    color: #777;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
}

.com_virtuemart.view-cart .vmshipment,
.com_virtuemart.view-cart .vmpayment {
    min-width: 0;
}

/* Shipment and payment prices are presented once, in the common summary row
   below each selector. Keep the plugin cards focused on choosing a method. */
.com_virtuemart.view-cart .vmshipment-econt__price,
.com_virtuemart.view-cart .vm-payment-plugin-single .vmpayment_cost {
    display: none !important;
}

/* The dual-currency helper appends the BGN equivalent directly to the label,
   outside .vmpayment_cost. Hide that inline copy as well; the common payment
   summary row below the selector still shows both EUR and BGN. */
.com_virtuemart.view-cart .vm-payment-plugin-single > label .ap-dual-price {
    display: none !important;
}

/* Econt selection */
.com_virtuemart.view-cart .vmshipment-econt__method-logo {
    width: 54px !important;
    height: 42px !important;
    margin: 0 10px 6px 0;
    object-fit: contain;
}

.com_virtuemart.view-cart .vmshipment-econt__options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto auto;
    gap: 8px;
    margin-top: 10px;
}

.com_virtuemart.view-cart .vmshipment-econt__inline:nth-of-type(1) {
    grid-column: 1;
    grid-row: 1;
}

.com_virtuemart.view-cart .vmshipment-econt__inline:nth-of-type(2) {
    grid-column: 2;
    grid-row: 1;
}

.com_virtuemart.view-cart .vmshipment-econt__inline:nth-of-type(3) {
    grid-column: 3;
    grid-row: 1;
}

.com_virtuemart.view-cart .vmshipment-econt__inline {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #dcdfe2;
    border-radius: 4px;
    background: #fff;
    color: #444;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.com_virtuemart.view-cart .vmshipment-econt__inline input[type="radio"] {
    position: absolute;
    overflow: hidden;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.com_virtuemart.view-cart .vmshipment-econt__inline:has(input:checked) {
    border-color: #ffa31a;
    background: #fff9ef;
    box-shadow: 0 0 0 2px rgba(255, 163, 26, .12);
    color: #202022;
}

.com_virtuemart.view-cart .vmshipment-econt__door,
.com_virtuemart.view-cart [data-econt-office-fields] {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-top: 4px;
}

.com_virtuemart.view-cart .vmshipment-econt__address-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.com_virtuemart.view-cart .vmshipment-econt__address-row,
.com_virtuemart.view-cart .vmshipment-econt__office {
    margin-bottom: 9px;
}

.com_virtuemart.view-cart .vmshipment-econt__field-label,
.com_virtuemart.view-cart .vmshipment-econt__address-grid label > span,
.com_virtuemart.view-cart .vmshipment-econt__office-label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-size: 12px;
    font-weight: 700;
}

.com_virtuemart.view-cart .vmshipment-econt__combo-toggle {
    width: 100%;
    min-height: 44px;
    padding: 8px 36px 8px 11px;
    border: 1px solid #d9dce0;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
}

.com_virtuemart.view-cart .vmshipment-econt.ap-econt-has-error .vmshipment-econt__options {
    border-color: #ff9f1a;
    box-shadow: 0 0 0 3px rgba(255, 159, 26, 0.12);
}

.com_virtuemart.view-cart .ap-econt-validation-summary {
    margin: 0 0 14px;
    padding: 11px 14px;
    color: #5a3a00;
    font-weight: 600;
    line-height: 1.45;
    background: #fff7e8;
    border-left: 3px solid #ff9f1a;
    border-radius: 3px;
}

.com_virtuemart.view-cart .vmshipment-econt .ap-econt-invalid {
    border-color: #ff9f1a !important;
    box-shadow: 0 0 0 3px rgba(255, 159, 26, 0.12) !important;
}

/* Selected office/locker, search field and dropdown results use one size. */
.com_virtuemart.view-cart .vmshipment-econt__combo-panel input,
.com_virtuemart.view-cart .vmshipment-econt__suggestion {
    font-size: 14px;
    line-height: 1.4;
}

.com_virtuemart.view-cart .vmshipment-econt__combo-arrow {
    position: relative;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f1f2f3;
    color: transparent;
    font-size: 0;
}

.com_virtuemart.view-cart .vmshipment-econt__combo-arrow::before {
    position: absolute;
    top: 8px;
    left: 9px;
    width: 8px;
    height: 8px;
    border-right: 2px solid #555;
    border-bottom: 2px solid #555;
    content: "";
    transform: rotate(45deg);
    transition: top .18s ease, transform .18s ease;
}

.com_virtuemart.view-cart .vmshipment-econt__combo-toggle[aria-expanded="true"] .vmshipment-econt__combo-arrow::before {
    top: 11px;
    transform: rotate(225deg);
}

.com_virtuemart.view-cart .sectiontableentry2 .PricebillTotal,
.com_virtuemart.view-cart table.cart-summary tr:last-of-type .PricebillTotal {
    color: #c8101e;
    font-size: 21px;
    font-weight: 700;
}

.com_virtuemart.view-cart .ap-checkout-submit {
    margin: 14px 0 0;
    text-align: right;
}

.com_virtuemart.view-cart .ap-checkout-submit #checkoutFormSubmit,
.com_virtuemart.view-cart .ap-checkout-submit .vm-button-correct,
.com_virtuemart.view-cart .ap-checkout-submit button,
.com_virtuemart.view-cart .ap-checkout-submit input[type="submit"] {
    width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 13px 20px;
    border: 0;
    border-radius: 5px;
    background: #c8101e;
    box-shadow: 0 8px 20px rgba(200, 16, 30, .18);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .15px;
    text-transform: uppercase;
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.com_virtuemart.view-cart .ap-checkout-submit #checkoutFormSubmit:hover,
.com_virtuemart.view-cart .ap-checkout-submit button:hover,
.com_virtuemart.view-cart .ap-checkout-submit input[type="submit"]:hover {
    background: #a90d19;
    box-shadow: 0 10px 24px rgba(200, 16, 30, .25);
    transform: translateY(-1px);
}

@media (max-width: 1199px) {
    .com_virtuemart.view-cart .ap-checkout-layout {
        grid-template-columns: 1fr;
    }

    .com_virtuemart.view-cart .ap-checkout-customer-column {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 767px) {
    /* The template gives #cart-view another 20px padding and a border on top
       of the Bootstrap column. Remove that redundant mobile frame so the
       checkout can use the available screen width. */
    .com_virtuemart.view-cart #cart-view {
        padding-right: 0;
        padding-left: 0;
        border-right: 0;
        border-left: 0;
        box-shadow: none;
    }

    .com_virtuemart.view-cart #t3-content {
        padding-top: 12px;
        padding-right: 6px;
        padding-bottom: 24px;
        padding-left: 6px;
    }

    .com_virtuemart.view-cart .vm-cart-header-container {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 14px;
        padding-bottom: 10px;
    }

    .com_virtuemart.view-cart .vm-cart-header h1 {
        font-size: 26px;
    }

    .com_virtuemart.view-cart .vm-continue-shopping .continue_link {
        min-height: 36px;
        padding: 6px 11px;
    }

    .com_virtuemart.view-cart .ap-checkout-customer-column {
        display: grid;
        grid-template-columns: 1fr;
    }

    .com_virtuemart.view-cart .ap-checkout-fields,
    .com_virtuemart.view-cart .billto-shipto {
        grid-column: 1;
        grid-row: auto;
    }

    .com_virtuemart.view-cart .ap-checkout-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .com_virtuemart.view-cart .ap-checkout-contact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px 8px;
    }

    .com_virtuemart.view-cart .ap-checkout-contact-grid .vm-fieldset-address-1 {
        grid-column: 1 / -1;
    }

    .com_virtuemart.view-cart .ap-checkout-layout {
        gap: 14px;
    }

    .com_virtuemart.view-cart .ap-checkout-customer-column,
    .com_virtuemart.view-cart .ap-checkout-fields,
    .com_virtuemart.view-cart .ap-checkout-final-fields {
        gap: 10px;
    }

    .com_virtuemart.view-cart .ap-checkout-field-wide,
    .com_virtuemart.view-cart .vm-fieldset-address-1,
    .com_virtuemart.view-cart .vm-fieldset-company-invoice-address {
        grid-column: auto;
    }

    .com_virtuemart.view-cart .ap-checkout-card,
    .com_virtuemart.view-cart .ap-checkout-consent-card,
    .com_virtuemart.view-cart .billto-shipto {
        padding: 12px;
    }

    /* On phones the order summary itself is the page content. Keeping a card
       around all of its inner cards wastes roughly 30px of usable width. */
    .com_virtuemart.view-cart .vm-fieldset-pricelist {
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .com_virtuemart.view-cart .vm-fieldset-pricelist::before {
        right: 0;
        left: 0;
    }

    .com_virtuemart.view-cart .vm-fieldset-pricelist .ap-order-summary-heading {
        margin-bottom: 10px;
        padding-top: 12px;
    }

    .com_virtuemart.view-cart .ap-checkout-card-header,
    .com_virtuemart.view-cart .ap-checkout-card-header-compact {
        margin-bottom: 10px;
    }

    .com_virtuemart.view-cart .ap-invoice-toggle-copy {
        margin-bottom: 0;
    }

    .com_virtuemart.view-cart .ap-checkout-card-header p,
    .com_virtuemart.view-cart .ap-invoice-toggle-copy p,
    .com_virtuemart.view-cart .ap-order-summary-heading p {
        display: none;
    }

    .com_virtuemart.view-cart .ap-invoice-toggle {
        align-items: flex-start;
    }

    .com_virtuemart.view-cart .ap-invoice-fields {
        margin-top: 12px;
        padding-top: 12px;
    }

    .com_virtuemart.view-cart .ap-checkout-label {
        margin-bottom: 4px;
        font-size: 12px;
    }

    .com_virtuemart.view-cart .ap-checkout-field input[type="text"],
    .com_virtuemart.view-cart .ap-checkout-field input[type="email"],
    .com_virtuemart.view-cart .ap-checkout-field input[type="tel"],
    .com_virtuemart.view-cart .ap-checkout-field select,
    .com_virtuemart.view-cart .ap-checkout-field textarea,
    .com_virtuemart.view-cart .vmshipment-econt input[type="text"],
    .com_virtuemart.view-cart .vmshipment-econt input[type="search"],
    .com_virtuemart.view-cart .vmshipment-econt textarea {
        min-height: 40px;
        padding: 8px 9px;
        font-size: 14px;
    }

    .com_virtuemart.view-cart table.cart-summary {
        display: block;
        width: 100%;
        min-width: 0;
        table-layout: auto;
    }

    .com_virtuemart.view-cart .ap-order-table-wrap {
        overflow: visible;
    }

    .com_virtuemart.view-cart table.cart-summary > tbody {
        display: block;
        width: 100%;
    }

    .com_virtuemart.view-cart table.cart-summary > tbody > tr:first-child {
        display: none;
    }

    .com_virtuemart.view-cart table.cart-summary .ap-product-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 0 10px;
        width: 100%;
        margin-bottom: 8px;
        padding: 10px;
        border: 1px solid #e2e2e2;
        border-radius: 6px;
        background: #fff;
        box-shadow: 0 5px 15px rgba(0, 0, 0, .04);
    }

    .com_virtuemart.view-cart table.cart-summary .ap-product-row > td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
        width: auto !important;
        min-width: 0;
        padding: 6px 0;
        border-color: #ededed;
        text-align: right;
    }

    .com_virtuemart.view-cart table.cart-summary .ap-product-row > td[data-label]::before,
    .com_virtuemart.view-cart table.cart-summary .ap-summary-row > td[data-label]::before {
        flex: 0 1 auto;
        color: #777;
        content: attr(data-label);
        font-size: 11px;
        font-weight: 700;
        line-height: 1.25;
        text-align: left;
        text-transform: uppercase;
    }

    .com_virtuemart.view-cart table.cart-summary .ap-product-row > .vm-cart-item-name {
        display: flex;
        grid-column: 1 / -1;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: wrap;
        width: 100% !important;
        padding-top: 0;
        padding-bottom: 8px;
        text-align: left;
    }

    .com_virtuemart.view-cart table.cart-summary .ap-product-row .cart-images {
        flex: 0 0 52px;
    }

    .com_virtuemart.view-cart table.cart-summary .ap-product-row .cart-images img {
        width: 48px;
        max-width: 48px;
        height: 48px;
        margin-right: 4px;
    }

    .com_virtuemart.view-cart table.cart-summary .ap-product-row > .vm-cart-item-name > a {
        flex: 1 1 160px;
        min-width: 0;
    }

    .com_virtuemart.view-cart table.cart-summary .ap-product-row > .vm-cart-item-quantity {
        display: grid;
        grid-template-columns: minmax(38px, 1fr) 34px 34px;
        align-items: center;
        gap: 4px;
        min-width: 0 !important;
    }

    .com_virtuemart.view-cart table.cart-summary .ap-product-row > .vm-cart-item-quantity::before {
        grid-column: 1 / -1;
        padding-bottom: 1px;
    }

    .com_virtuemart.view-cart table.cart-summary .ap-product-row .quantity-input {
        box-sizing: border-box;
        width: 100% !important;
        height: 34px !important;
        min-height: 34px;
        margin: 0 !important;
    }

    .com_virtuemart.view-cart table.cart-summary .ap-product-row .vm2-add_quantity_cart,
    .com_virtuemart.view-cart table.cart-summary .ap-product-row .vm2-remove_from_cart {
        box-sizing: border-box;
        width: 34px !important;
        height: 34px !important;
        margin: 0 !important;
        border: 1px solid #dedede;
        border-radius: 4px;
        line-height: 32px !important;
    }

    .com_virtuemart.view-cart table.cart-summary .ap-product-row .vm2-add_quantity_cart {
        background: #fff8eb !important;
        color: #9a5b00;
    }

    .com_virtuemart.view-cart table.cart-summary .ap-product-row .vm2-remove_from_cart {
        background: #fff3f3 !important;
        color: #b3262e;
    }

    .com_virtuemart.view-cart table.cart-summary .ap-product-row > .vm-cart-item-total {
        margin: 3px -6px -2px;
        padding: 9px 6px;
        border: 0;
        border-radius: 4px;
        background: #fff7e9;
        color: #202022;
        font-weight: 700;
    }

    .com_virtuemart.view-cart table.cart-summary .ap-summary-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        margin: 0;
        border-bottom: 1px solid #e7e7e7;
        background: #fff;
    }

    .com_virtuemart.view-cart table.cart-summary .ap-summary-row > td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: auto !important;
        min-width: 0;
        padding: 6px 8px;
        border: 0;
        text-align: right !important;
    }

    .com_virtuemart.view-cart table.cart-summary .ap-summary-row > .ap-summary-label {
        justify-content: flex-start;
        padding-top: 8px;
        padding-bottom: 5px;
        color: #292929;
        font-weight: 700;
        text-align: left !important;
    }

    .com_virtuemart.view-cart table.cart-summary .ap-summary-row > .ap-summary-main {
        display: block;
        width: 100% !important;
        padding: 8px 0;
    }

    .com_virtuemart.view-cart table.cart-summary .ap-summary-row > .ap-summary-empty {
        display: none;
    }

    .com_virtuemart.view-cart table.cart-summary .ap-coupon-row {
        margin: 8px 0;
        border: 0;
    }

    .com_virtuemart.view-cart table.cart-summary .ap-coupon-row > .ap-summary-main {
        padding: 0;
    }

    .com_virtuemart.view-cart table.cart-summary .ap-shipment-row,
    .com_virtuemart.view-cart table.cart-summary .ap-payment-row {
        margin-top: 12px;
        border: 0;
        border-radius: 0;
        overflow: visible;
        background: transparent;
    }

    .com_virtuemart.view-cart table.cart-summary .ap-shipment-row > .ap-summary-main,
    .com_virtuemart.view-cart table.cart-summary .ap-payment-row > .ap-summary-main {
        box-sizing: border-box;
        width: 100% !important;
        padding: 0 !important;
    }

    .com_virtuemart.view-cart .vmshipment-econt {
        box-sizing: border-box;
        margin-right: 0;
        margin-bottom: 0;
        margin-left: 0;
        padding: 8px;
    }

    .com_virtuemart.view-cart table.cart-summary .ap-grand-total-row {
        margin-top: 8px;
        padding: 3px;
        border: 2px solid #ffa31a;
        border-radius: 6px;
        background: #fffaf1;
    }

    .com_virtuemart.view-cart table.cart-summary .ap-grand-total-row > .ap-grand-total-heading,
    .com_virtuemart.view-cart table.cart-summary .ap-grand-total-row > .ap-grand-total-discount {
        display: none;
    }

    .com_virtuemart.view-cart table.cart-summary .ap-grand-total-row > .ap-grand-total-amount {
        padding: 10px 8px;
    }

    .com_virtuemart.view-cart table.cart-summary .ap-grand-total-row > td:last-child {
        color: #c8101e;
        font-size: 19px;
    }

    .com_virtuemart.view-cart .vmshipment-econt,
    .com_virtuemart.view-cart .vmshipment-econt__options,
    .com_virtuemart.view-cart .vm-payment-shipment-select {
        width: 100%;
        min-width: 0;
    }

    .com_virtuemart.view-cart .vmshipment-econt__address-grid {
        grid-template-columns: 1fr;
    }

    .com_virtuemart.view-cart .vm-payment-header-selected,
    .com_virtuemart.view-cart .vm-shipment-header-selected {
        display: none;
    }

    .com_virtuemart.view-cart table.cart-summary h3,
    .com_virtuemart.view-cart table.cart-summary h4 {
        margin-bottom: 6px;
        font-size: 16px;
    }

    .com_virtuemart.view-cart .vm-payment-shipment-select {
        gap: 6px;
    }

    .com_virtuemart.view-cart .vm-payment-plugin-single > label,
    .com_virtuemart.view-cart .vm-shipment-plugin-single > label {
        min-height: 46px;
        padding: 8px 38px 8px 11px;
    }

    .com_virtuemart.view-cart .vmshipment-econt__options {
        gap: 6px;
        margin-top: 8px;
    }

    .com_virtuemart.view-cart .vmshipment-econt__inline {
        min-height: 40px;
        padding: 6px;
        font-size: 14px;
    }

    .com_virtuemart.view-cart .vmshipment-econt__method-logo {
        width: 44px !important;
        height: 34px !important;
        margin: 0 7px 3px 0;
    }

    .com_virtuemart.view-cart .vmshipment-econt__address-row,
    .com_virtuemart.view-cart .vmshipment-econt__office {
        margin-bottom: 6px;
    }

    .com_virtuemart.view-cart .ap-checkout-note-card textarea {
        min-height: 60px;
    }

    .com_virtuemart.view-cart .ap-checkout-consent-card,
    .com_virtuemart.view-cart .ap-checkout-final-consent,
    .com_virtuemart.view-cart .ap-checkout-final-fields {
        margin-top: 10px;
    }

    .com_virtuemart.view-cart .ap-checkout-submit {
        margin-top: 10px;
    }

    .com_virtuemart.view-cart .ap-checkout-submit #checkoutFormSubmit,
    .com_virtuemart.view-cart .ap-checkout-submit .vm-button-correct,
    .com_virtuemart.view-cart .ap-checkout-submit button,
    .com_virtuemart.view-cart .ap-checkout-submit input[type="submit"] {
        min-height: 48px;
        padding: 11px 16px;
    }

    .com_virtuemart.view-cart .ap-coupon-box {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
        padding: 10px;
    }

    .com_virtuemart.view-cart .ap-coupon-controls {
        align-items: stretch;
        flex-basis: auto;
        max-width: none;
    }

    .com_virtuemart.view-cart .ap-coupon-controls .coupon,
    .com_virtuemart.view-cart .ap-coupon-controls .ap-coupon-button {
        box-sizing: border-box;
        height: 42px !important;
        min-height: 42px !important;
    }

    .com_virtuemart.view-cart .ap-coupon-controls .ap-coupon-button {
        padding-top: 0;
        padding-bottom: 0;
        line-height: 40px;
    }

}

@media (prefers-reduced-motion: reduce) {
    .com_virtuemart.view-cart *,
    .com_virtuemart.view-cart *::before,
    .com_virtuemart.view-cart *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* Econt's address/office controls belong only to the selected shipment card.
   Hide the complete plugin block so it cannot leave an empty bordered row
   between the available shipment methods. */
.com_virtuemart.view-cart [data-econt-block]:not(.ap-econt-selected) {
    display: none !important;
}

/* A summary fallback and the editable selector must never be displayed or
   submitted together. JavaScript applies this class only when both exist. */
.com_virtuemart.view-cart .ap-econt-duplicate-summary {
    display: none !important;
}

.com_virtuemart.view-cart .ap-checkout-method-prompt {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-left: 3px solid #ffa31a;
    background: #fff9ef;
    color: #555;
    font-size: 14px;
    line-height: 1.45;
}

.com_virtuemart.view-cart .ap-method-selection-error .ap-checkout-method-prompt {
    border-left-color: #d71920;
    background: #fff1f1;
    color: #a40000;
}
