/*
 * New in the rebuilt shop (not on the old site): the cart side panel, the cart buttons row and the
 * checkout additions. Colours and fonts are the storefront's own (all.css).
 */

.btn-gold-border {
    background-color: #fff;
    border: 1px solid #c8af84;
}

/* Cart page: "Continue shopping" and "Complete the order" side by side, as on the old site. */
.cart-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.cart-actions .btn-gold {
    margin: 0 0 80px;
}
@media only screen and (max-width: 767px) {
    /* 767, not 768: at exactly 768 px the old stylesheet's desktop margin (80 px) wins. */
    .cart-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .cart-actions .btn-gold {
        margin: 0;
    }
    .cart-actions .btn-gold:last-child {
        margin-bottom: 64px;
    }
}

/* Sold-out product: the add-to-cart button switched off, without the cart icon or hover colour. */
.single-product .add-to-cart.sold-out:before {
    background: none;  /* no cart icon, but the same height as the active button */
    width: 0;
    margin: 0;
    -webkit-margin-end: 0;
    margin-inline-end: 0;
}
.single-product .add-to-cart.sold-out:hover,
.single-product .add-to-cart.sold-out:focus {
    color: #fff;
}

/* Cart page row: name, then "Разфасовка: …" under it (screenshot 1). */
.cart-item .cell-1 > span {
    display: block;
}

/* Checkout: the phone and e-mail fields are text inputs with an input mode, styled like the rest. */
.checkout-container .checkout-form .form-shipping label {
    font-size: 14px;
    margin-bottom: 8px;
}
.checkout-container .checkout-form .shipping-title {
    display: block;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.1;
    margin-bottom: 8px;
}
.checkout-container .checkout-form .form-terms {
    margin: 24px 0;
}
.checkout-container .checkout-form .form-terms label {
    font-size: 14px;
}
.checkout-container .checkout-form .form-terms a {
    color: #0000ee;
}
.checkout-container .checkout-form .action-wrapper {
    text-align: right;
}
.checkout-container .checkout-form .action-wrapper .btn-gold {
    margin: 0 0 80px auto;
}
.checkout-error {
    margin-bottom: 12px;
}

/* Checkout, Econt (KRP-038): the place from Econt's list and the office; fields of other methods hide. */
.checkout-container .checkout-form [hidden] {
    display: none;
}
.checkout-container .checkout-form .form-courier_city {
    position: relative;
}
.checkout-container .checkout-form select {
    display: block;
    width: 100%;
    height: 46px;
    padding: 0 12px;
    border: 2px solid #c8af84;
    background-color: #fff;
    font: inherit;
}
.checkout-container .checkout-form select:focus,
.checkout-container .checkout-form select:hover {
    border-color: #9f7f47;
}
.courier-cities {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 20;
    max-height: 260px;
    overflow-y: auto;
    border: 2px solid #c8af84;
    border-top: 0;
    background-color: #fff;
}
.courier-cities li {
    padding: 10px 12px;
    font-size: 14px;
    cursor: pointer;
}
.courier-cities li[aria-selected="true"],
.courier-cities li:hover {
    background-color: #f4ede1;
}
.courier-cities li.courier-empty {
    cursor: default;
    color: #666;
}
/* Checkout (KRP-052): the summary's subtotal, delivery and payment as cards, the invoice fields, and
   „Общо“ right above the button. */
.checkout-container .checkout-subtotal {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin: 16px 25px 0 0;
    padding-top: 12px;
    border-top: 1px solid #e5e5e5;
    color: #00243c;
    font-weight: 600;
}
.checkout-container .checkout-vat {
    margin: 2px 25px 16px 0;
    color: #555;
    font-size: 13px;
    text-align: right;
}
.checkout-container .checkout-form .form-hint {
    display: block;
    margin-top: 4px;
    color: #555;
    font-size: 12px;
}
.checkout-container .checkout-form label.checkout-card,
.checkout-container .checkout-card {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-bottom: 8px;
    padding: 12px;
    border: 2px solid #e5e5e5;
    background-color: #fff;
    color: #00243c;
    font-size: 14px;
    line-height: 1.3;
    cursor: pointer;
}
.checkout-container .checkout-form label.checkout-card:has(input:checked),
.checkout-container .checkout-card.is-chosen {
    border-color: #c8af84;
    background-color: #fbf8f2;
}
.checkout-container .checkout-card.is-chosen {
    cursor: default;
}
.checkout-container .checkout-form label.checkout-card:has(input:focus-visible) {
    outline: 2px solid #00243c;
    outline-offset: 2px;
}
.checkout-container .checkout-card input[type=radio] {
    flex: 0 0 auto;
    width: 18px;
    margin: 0;
}
.checkout-card-text {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 2px;
}
.checkout-card-name {
    font-weight: 600;
}
.checkout-card-hint {
    color: #555;
    font-size: 12px;
}
.checkout-card .shipping-price {
    flex: 0 0 auto;
    font-weight: 600;
    white-space: nowrap;
}
.checkout-container .checkout-form label.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}
.checkout-container .checkout-form .form-check input {
    width: auto;
    margin: 0;
}
.checkout-container .checkout-form .invoice-fields {
    margin-top: 12px;
}
/* Without :has() (old browsers) the fields simply stay visible. */
.checkout-container .checkout-form .form-invoice:has(#invoice_company:not(:checked)) .invoice-fields {
    display: none;
}
.checkout-container .checkout-form .form-privacy {
    margin-top: 8px;
    font-size: 14px;
}
.checkout-container .checkout-form .form-privacy a {
    color: #0000ee;
}
.checkout-container .checkout-form .checkout-total {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 16px;
    margin: 0 0 16px;
    padding: 12px 16px;
    background-color: #00243c;
    color: #fff;
}
.checkout-total-label {
    font-size: 20px;
    font-weight: 600;
}
.checkout-total .primary-price {
    font-size: 25px;
    font-weight: 600;
}
.checkout-total-note {
    flex: 1 0 100%;
    font-size: 13px;
    text-align: right;
}
@media only screen and (max-width: 767px) {
    .checkout-container .checkout-subtotal,
    .checkout-container .checkout-vat {
        margin-right: 0;
    }
}
.cart-delivery {
    margin: 16px 0 24px;
    font-size: 14px;
}
/* „Благодарим“ (KRP-052) */
.order-done {
    max-width: 760px;
    padding: 64px 16px 0;
    color: #00243c;
}
.order-done-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}
.order-done-head .page-title {
    margin: 0;
}
.order-done-mark {
    position: relative;
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border: 2px solid #c8af84;
    border-radius: 50%;
}
.order-done-mark:after {
    content: "";
    position: absolute;
    top: 13px;
    left: 19px;
    width: 12px;
    height: 22px;
    border: solid #9f7f47;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}
.order-done-number {
    color: #555;
    font-size: 14px;
}
.order-done-box {
    margin-bottom: 32px;
    padding: 16px 20px;
    border: 2px solid #c8af84;
    background-color: #fbf8f2;
}
.order-done-box h3,
.order-done-title {
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 700;
}
.order-done-box p {
    margin-bottom: 4px;
}
.order-done-items li {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 4px 16px;
    padding: 8px 0;
    border-bottom: 1px solid #ebebeb;
    font-size: 14px;
}
.order-done-items .item-name {
    font-weight: 600;
}
.order-done-sum {
    font-weight: 600;
    text-align: right;
}
.order-done-sums {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 16px;
    margin: 12px 0 24px;
    font-size: 14px;
}
.order-done-sums dd {
    text-align: right;
}
.order-done-sums .order-done-total {
    font-size: 18px;
    font-weight: 700;
}
.order-done-data {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 48px;
    margin-bottom: 24px;
    font-size: 14px;
}
.order-done-data h4 {
    margin-bottom: 4px;
    font-weight: 700;
}
.order-done-help {
    margin-bottom: 24px;
}
.order-done a:not(.btn-gold) {
    color: #00243c;
    text-decoration: underline;
}
.order-done .btn-gold {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 320px;
    margin: 0 0 24px;
}
.order-done-legal {
    margin-bottom: 80px;
    font-size: 13px;
}
@media only screen and (max-width: 567px) {
    .order-done {
        padding-top: 40px;
    }
    .order-done-items li {
        grid-template-columns: 1fr auto;
    }
    .order-done-items li > span:first-child {
        grid-column: 1 / -1;
    }
}

/* The cart side panel (KRP-050): slides in from the right; full width on a phone. */
.cart-modal[hidden] {
    display: none;
}
.cart-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    justify-content: flex-end;
}
.cart-modal-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 36, 60, .6);
}
.cart-modal-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 440px;
    height: 100%;
    overflow-y: auto;
    background-color: #fff;
    padding: 24px;
    box-shadow: -12px 0 40px rgba(0, 0, 0, .25);
    outline: none;
    animation: cart-modal-in .25s ease-out;
}
@keyframes cart-modal-in {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
    .cart-modal-panel {
        animation: none;
    }
}
.cart-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}
.cart-modal .page-title {
    margin: 0;
}
.cart-modal-x {
    position: relative;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f2f2f2;
    cursor: pointer;
}
.cart-modal-x:before,
.cart-modal-x:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 2px;
    background-color: #00243c;
}
.cart-modal-x:before {
    transform: translate(-50%, -50%) rotate(45deg);
}
.cart-modal-x:after {
    transform: translate(-50%, -50%) rotate(-45deg);
}
.cart-modal-x:hover,
.cart-modal-x:focus {
    background-color: #e0e0e0;
}
/* The old stylesheet removes every focus ring; the panel is used from the keyboard, so it shows one. */
.cart-modal a:focus-visible,
.cart-modal button:focus-visible {
    outline: 2px solid #00243c;
    outline-offset: 2px;
}
.cart-modal-added {
    color: #00243c;
    margin-bottom: 8px;
}
.cart-modal-items {
    flex: 1 0 auto;
}
.cart-modal-item {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    grid-template-areas: "cover name remove" "cover qty sum";
    gap: 8px 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #ebebeb;
    color: #00243c;
}
.cart-modal-cover {
    grid-area: cover;
    align-self: start;
}
.cart-modal-cover img {
    display: block;
    width: 72px;
    height: 72px;
    object-fit: contain;
}
.cart-modal-name {
    grid-area: name;
    display: flex;
    flex-direction: column;
    font-size: 14px;
    line-height: 1.3;
}
.cart-modal-name .item-name {
    color: #00243c;
    font-weight: 600;
}
.cart-modal-price {
    color: #555;
}
.cart-modal-remove.item-delete {
    grid-area: remove;
    align-self: start;
    margin: -8px -8px 0 0;
    width: 40px;  /* the icon stays 24px, the tap target is as large as +/- */
    height: 40px;
    background-size: 24px 100px;
}
.cart-modal-qty {
    grid-area: qty;
    display: inline-flex;
    align-items: center;
    justify-self: start;
    border: 1px solid #c8af84;
}
.cart-modal-qty button {
    width: 40px;
    height: 40px;
    color: #00243c;
    font-size: 18px;
    line-height: 1;
}
.cart-modal-qty button:disabled {
    color: #b9b9b9;
    cursor: default;
}
.cart-modal-count {
    min-width: 28px;
    text-align: center;
    font-weight: 600;
}
.cart-modal-sum {
    grid-area: sum;
    font-weight: 700;
    white-space: nowrap;
}
.cart-modal-foot {
    position: sticky;
    bottom: -24px;
    margin: 16px -24px -24px;
    padding: 16px 24px 24px;
    background-color: #fff;
    border-top: 1px solid #ebebeb;
}
.cart-modal-total {
    display: flex;
    justify-content: space-between;
    color: #00243c;
    font-size: 18px;
    font-weight: 700;
}
.cart-modal-vat,
.cart-modal-note {
    font-size: 13px;
    color: #555;
}
.cart-modal-note {
    margin: 8px 0 16px;
}
.cart-modal-foot .btn-gold {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: none;
    margin: 0;
    color: #fff;
}
.cart-modal-continue {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 8px;
    color: #00243c;
    font-size: 14px;
    text-decoration: underline;
}
.cart-modal-empty {
    margin: 24px 0;
}
body.cart-modal-open {
    overflow: hidden;
}
@media only screen and (max-width: 568px) {
    .cart-modal-panel {
        max-width: none;
        padding: 16px;
    }
    .cart-modal-foot {
        bottom: -16px;
        margin: 16px -16px -16px;
        padding: 16px;
    }
    .cart-modal-item {
        grid-template-columns: 56px 1fr auto;
    }
    .cart-modal-cover img {
        width: 56px;
        height: 56px;
    }
}
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* „Въпроси и отговори“ (KRP-044): each question in bold above its answer, which keeps the page's text style. */
.faq h2 {
    color: #00243c;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 32px;
}

/* Contact form (KRP-052): the link to the privacy policy above the button. */
.contact-form .form-privacy {
    margin: 16px 0;
    font-size: 14px;
}
.contact-form .form-privacy a {
    color: #0000ee;
}
