/* =========================================================
   KHOJA – Cart page redesign
   Da incollare in FONDO a style.css (dopo contact-redesign.css)
   Tutte le classi hanno prefisso .kcart- per non toccare il resto del sito
   ========================================================= */

.kcart {
    --kc-brand: #6F3619;
    --kc-brand-dark: #55290f;
    --kc-brand-soft: #f3e9e2;
    --kc-ink: #1b1512;
    --kc-muted: #7b6f68;
    --kc-line: #e9e2dc;
    --kc-card: #ffffff;
    --kc-field: #faf7f4;
    --kc-radius: 20px;
    --kc-shadow: 0 1px 2px rgba(40, 20, 8, .04), 0 12px 32px -14px rgba(40, 20, 8, .14);
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: clamp(24px, 4vw, 56px) clamp(16px, 5vw, 80px) clamp(48px, 6vw, 96px);
}

/* reset locale: il sito ha font-weight 700 su tutto e margini sui <p> */
.kcart *,
.kcart *::before,
.kcart *::after {
    font-weight: 400;
}
.kcart p,
.kcart h2,
.kcart h3 {
    margin: 0;
}
.kcart a {
    text-decoration: none;
    color: inherit;
}
.kcart button {
    font-family: inherit;
}

/* ---------- LAYOUT ---------- */
.kcart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 410px);
    gap: clamp(20px, 3vw, 40px);
    align-items: start;
}
.kcart-layout.is-empty,
.kcart-layout:has(> #cart-add[style*="display: none"]) {
    grid-template-columns: minmax(0, 1fr);
}

/* neutralizza le vecchie regole #cart / #cart-add / #coupon / #subtotal1 (larghezze 50%) */
.kcart #coupon,
.kcart #subtotal1 {
    width: 100%;
    margin: 0;
}
.kcart #cart {
    overflow: visible;
    padding: 0;
}
.kcart #cart-add {
    display: block;
}

/* ---------- LISTA ARTICOLI ---------- */
.kcart-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.kcart-item {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr) auto auto;
    gap: 10px 28px;
    align-items: center;
    padding: 18px;
    background: var(--kc-card);
    border: 1px solid var(--kc-line);
    border-radius: var(--kc-radius);
    box-shadow: var(--kc-shadow);
    transition: border-color .25s ease, box-shadow .25s ease;
}
.kcart-item:hover {
    border-color: #d9cdc4;
}

.kcart-item__media {
    display: block;
    width: 112px;
    aspect-ratio: 4 / 5;
    border-radius: 14px;
    overflow: hidden;
    background: #efe9e3;
}
.kcart-item__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}
.kcart-item:hover .kcart-item__media img {
    transform: scale(1.05);
}

.kcart-item__info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.kcart-item__title {
    font-size: 18px;
    line-height: 1.25;
    color: var(--kc-ink);
    font-weight: 700;
}
.kcart-item__title a:hover {
    color: var(--kc-brand);
}
.kcart-item__price {
    font-size: 14px;
    color: var(--kc-muted);
}

.kcart-label {
    display: block;
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--kc-muted);
    margin-bottom: 8px;
}

/* taglie */
.kcart-size {
    margin-top: 10px;
}
.kcart-size.is-hidden {
    display: none;
}
.kcart-size__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.kcart .kcart-size__btn {
    min-width: 42px;
    height: 38px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--kc-ink);
    background: #fff;
    border: 1.5px solid var(--kc-line);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, color .2s ease, transform .15s ease;
}
.kcart .kcart-size__btn:hover {
    border-color: var(--kc-brand);
}
.kcart .kcart-size__btn.selected {
    background: var(--kc-brand);
    border-color: var(--kc-brand);
    color: #fff;
}
.kcart .kcart-size__btn:active {
    transform: scale(.95);
}

/* quantità */
.kcart-qty {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.kcart-qty__control {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: var(--kc-field);
    border: 1.5px solid var(--kc-line);
    border-radius: 999px;
}
.kcart .kcart-qty__btn {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    font-size: 17px;
    line-height: 1;
    color: var(--kc-ink);
    background: #fff;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(40, 20, 8, .12);
    transition: background .2s ease, color .2s ease, opacity .2s ease;
}
.kcart .kcart-qty__btn:hover:not(:disabled) {
    background: var(--kc-brand);
    color: #fff;
}
.kcart .kcart-qty__btn:disabled {
    opacity: .35;
    box-shadow: none;
}
.kcart-qty__value {
    min-width: 30px;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--kc-ink);
}

/* totale + rimuovi */
.kcart-item__end {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    min-width: 92px;
}
.kcart-item__total {
    font-size: 21px;
    font-weight: 900;
    color: var(--kc-ink);
    letter-spacing: -.01em;
}
.kcart .kcart-remove {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    font-size: 14px;
    color: var(--kc-muted);
    background: transparent;
    border: 1.5px solid var(--kc-line);
    border-radius: 50%;
    cursor: pointer;
    transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.kcart .kcart-remove:hover {
    color: #b3261e;
    background: #fdecea;
    border-color: #f3c6c2;
}
.kcart .kcart-remove i {
    font-weight: 400;
}

/* ---------- AZIONI SOTTO LA LISTA ---------- */
.kcart-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
}
.kcart-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--kc-brand);
    transition: gap .2s ease;
}
.kcart-link:hover {
    gap: 14px;
}
.kcart .kcart-clear {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
    color: var(--kc-muted);
    background: transparent;
    border: 1.5px solid var(--kc-line);
    border-radius: 999px;
    cursor: pointer;
    transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.kcart .kcart-clear:hover {
    color: #b3261e;
    border-color: #f3c6c2;
    background: #fdecea;
}
.kcart #result {
    flex: 1 1 auto;
    text-align: center;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--kc-brand);
    background: var(--kc-brand-soft);
    border-radius: 999px;
}
.kcart #result:empty {
    display: none;
}

/* ---------- CARRELLO VUOTO ---------- */
.kcart .kcart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    text-align: center;
    padding: clamp(40px, 8vw, 90px) 20px;
    background: var(--kc-card);
    border: 1px dashed #d9cdc4;
    border-radius: 24px;
}
.kcart-empty__icon {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    font-size: 32px;
    color: var(--kc-brand);
    background: var(--kc-brand-soft);
    border-radius: 50%;
}
.kcart-empty__icon i {
    font-weight: 400;
}
.kcart-empty__text {
    font-size: 20px;
    font-weight: 700;
    color: var(--kc-ink);
    max-width: 30ch;
    line-height: 1.3;
}

/* ---------- SIDEBAR ---------- */
.kcart-side {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.kcart .kcart-card {
    background: var(--kc-card);
    border: 1px solid var(--kc-line);
    border-radius: var(--kc-radius);
    box-shadow: var(--kc-shadow);
    padding: clamp(20px, 2.5vw, 28px);
    width: 100%;
    margin: 0;
}
.kcart-card__title {
    font-size: 13px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--kc-brand);
    font-weight: 700;
    margin-bottom: 14px !important;
    padding: 0 !important;
}
.kcart-block + .kcart-block {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--kc-line);
}

/* selezione paese */
.kcart-side .form-group label {
    display: block;
    font-size: 13px;
    color: var(--kc-muted);
    margin-bottom: 8px;
}
.kcart #selectCountryBtn {
    width: 100%;
    display: flex !important;
    align-items: center;
    justify-content: flex-start !important;
    gap: 10px;
    margin: 0 !important;
    padding: 12px 16px !important;
    font-size: 15px;
    font-weight: 700;
    text-align: left;
    background: var(--kc-field);
    border: 1.5px solid transparent;
    border-radius: 14px;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}
.kcart #selectCountryBtn::after {
    content: "\f107";
    font-family: "Font Awesome 5 Pro";
    font-weight: 900;
    margin-left: auto;
    color: var(--kc-muted);
}
.kcart #selectCountryBtn:hover {
    border-color: var(--kc-brand);
    background: #fff;
}
.kcart #selectCountryBtn img {
    width: 28px;
    height: 28px;
    margin: 0;
}
.kcart .selectCountryP {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}
.kcart .kcart-notice {
    margin-top: 12px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
    color: #8a2a02;
    background: #fff3ec;
    border-radius: 12px;
}
.kcart .kcart-hint {
    margin-top: 12px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--kc-muted);
}

/* coupon */
.kcart .kcart-coupon {
    display: flex;
    gap: 8px;
}
.kcart #coupon .kcart-coupon__input {
    flex: 1;
    min-width: 0;
    width: auto;
    margin: 0;
    padding: 13px 16px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--kc-ink);
    background: var(--kc-field);
    border: 1.5px solid transparent;
    border-radius: 14px;
    outline: none;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.kcart #coupon .kcart-coupon__input::placeholder {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    color: var(--kc-muted);
}
.kcart #coupon .kcart-coupon__input:focus {
    background: #fff;
    border-color: var(--kc-brand);
    box-shadow: 0 0 0 4px rgba(111, 54, 25, .12);
}
.kcart #coupon .kcart-coupon__btn {
    padding: 0 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #fff;
    background: var(--kc-ink);
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    transition: background .2s ease;
}
.kcart #coupon .kcart-coupon__btn:hover {
    background: var(--kc-brand);
}

.kcart #couponBox {
    margin-top: 14px;
}
.kcart #couponBox h3 {
    padding: 0 !important;
    margin-bottom: 8px !important;
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--kc-muted);
}
.kcart #coupon .couponUsed {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px 10px 14px;
    background: var(--kc-brand-soft);
    border: 1px dashed var(--kc-brand);
    border-radius: 14px;
}
.kcart #coupon .couponUsed .couponDetails {
    display: flex;
    align-items: center;
    gap: 10px;
    width: auto;
}
.kcart #coupon .couponUsed .couponDetails span {
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
    font-size: 14px;
}
.kcart #couponCode {
    font-weight: 900 !important;
    letter-spacing: .06em;
    color: var(--kc-brand);
}
.kcart #couponDiscount {
    font-weight: 700 !important;
    color: var(--kc-ink);
}
.kcart #coupon .couponUsed button {
    width: 30px;
    height: 30px;
    padding: 0;
    margin: 0;
    display: grid;
    place-items: center;
    font-size: 12px;
    color: var(--kc-muted);
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: color .2s ease, background .2s ease;
}
.kcart #coupon .couponUsed button:hover {
    color: #fff;
    background: #b3261e;
}

/* riepilogo */
.kcart #subtotal1 {
    border: 1px solid var(--kc-line);
    padding: clamp(20px, 2.5vw, 28px);
}
.kcart .kcart-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 0;
    font-size: 15px;
    color: var(--kc-muted);
}
.kcart .kcart-row > span:last-child {
    color: var(--kc-ink);
    font-weight: 700;
}
.kcart .kcart-row--total {
    margin-top: 8px;
    padding-top: 18px;
    border-top: 1px solid var(--kc-line);
    font-size: 17px;
    color: var(--kc-ink);
}
.kcart .kcart-row--total > span:first-child {
    font-weight: 700;
}
.kcart .kcart-row--total > span:last-child {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -.01em;
}

.kcart #subtotal1 .kcart-cta {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    padding: 18px 28px;
    font-size: 15px;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 700;
    color: #fff;
    background: var(--kc-brand);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 12px 24px -10px rgba(111, 54, 25, .65);
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.kcart #subtotal1 .kcart-cta i {
    font-size: 13px;
    transition: transform .2s ease;
}
.kcart #subtotal1 .kcart-cta:hover {
    background: var(--kc-brand-dark);
    transform: translateY(-2px);
    box-shadow: 0 16px 28px -10px rgba(111, 54, 25, .7);
}
.kcart #subtotal1 .kcart-cta:hover i {
    transform: translateX(4px);
}
.kcart #subtotal1 .kcart-cta:focus-visible {
    outline: 3px solid rgba(111, 54, 25, .35);
    outline-offset: 3px;
}
.kcart .kcart-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    font-size: 12px;
    color: var(--kc-muted);
}
.kcart .kcart-secure i {
    color: var(--kc-brand);
    font-weight: 900;
}

/* ---------- STATO "NEGOZIO CHIUSO" ---------- */
body.cart-shop-locked .kcart #coupon,
body.cart-shop-locked .kcart #subtotal1 {
    pointer-events: none;
    filter: blur(3px);
    user-select: none;
}
.kcart #cart-locked-banner {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    border-radius: 24px;
    background: rgba(27, 21, 18, .8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    pointer-events: auto;
}
.kcart #cart-locked-banner h2 {
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 8px;
    color: #fff;
}
.kcart #cart-locked-banner p {
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 18px;
    color: #fff;
    opacity: .85;
}
.kcart #countdown-overlay {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
}
.kcart .countdown-block {
    flex: 1;
    min-width: 0;
    padding: 12px 4px;
    border-radius: 12px;
}
.kcart .countdown-block span:first-child {
    font-size: 1.5rem;
    font-weight: 900;
}
.kcart .countdown-block span:last-child {
    font-size: .62rem;
    letter-spacing: .08em;
    font-weight: 700;
}
.kcart #early-access-box p {
    margin-bottom: 10px;
}
.kcart #early-access-form {
    display: flex;
    gap: 8px;
}
.kcart #earlyAccessInput {
    flex: 1;
    min-width: 0;
    width: auto;
    border-radius: 10px;
}
.kcart #earlyAccessBtn {
    border-radius: 10px;
    font-weight: 700;
}

/* ---------- POPUP SCELTA PAESE ---------- */
.kcart .country-popup {
    background: rgba(27, 21, 18, .55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.kcart .country-popup-content {
    position: relative;
    max-width: 680px;
    margin: 6vh auto;
    padding: clamp(22px, 4vw, 36px);
    border: 0;
    border-radius: 24px;
    text-align: left;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .5);
}
.kcart .country-popup-content h2 {
    font-size: 22px;
    font-weight: 900;
    color: var(--kc-ink);
    margin: 0 44px 20px 0;
}
.kcart .close-popup {
    position: absolute;
    top: 18px;
    right: 18px;
    float: none;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    font-size: 22px;
    line-height: 1;
    font-weight: 400;
    color: var(--kc-muted);
    background: var(--kc-field);
    border-radius: 50%;
    transition: background .2s ease, color .2s ease;
}
.kcart .close-popup:hover {
    background: var(--kc-brand);
    color: #fff;
}
.kcart #countryList {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.kcart .country-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--kc-ink);
    background: var(--kc-field);
    border: 1.5px solid transparent;
    border-radius: 12px;
    transition: border-color .2s ease, background .2s ease;
}
.kcart .country-item:hover {
    transform: none;
    background: #fff;
    border-color: var(--kc-brand);
}
.kcart .country-item img {
    width: 26px;
    height: 26px;
    margin-right: 12px;
}
/* ===== POPUP SELEZIONE PAESE ===== */
#countryPopup.country-popup {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 20px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.58);

    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

/* Finestra centrale */
#countryPopup .country-popup-content {
    position: relative;
    width: 100%;
    max-width: 620px;
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);

    box-sizing: border-box;
    margin: auto;
    padding: 32px 24px 24px;

    background: #fff;
    color: #222;
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);

    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

/* Titolo */
#countryPopup .country-popup-content h2 {
    margin: 0 40px 24px;
    text-align: center;
    font-size: clamp(20px, 3vw, 27px);
    line-height: 1.35;
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* Pulsante X */
#countryPopup .close-popup {
    position: absolute;
    top: 10px;
    right: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;
    padding: 0;

    border: none;
    border-radius: 50%;
    background: #f3f3f3;
    color: #333;

    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

#countryPopup .close-popup:hover {
    background: #6F3619;
    color: #fff;
}

#countryPopup .close-popup:focus-visible {
    outline: 2px solid #6F3619;
    outline-offset: 3px;
}

/* Lista dei paesi */
#countryPopup .country-columns {
    width: 100%;
    min-width: 0;
}

#countryPopup #countryList {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;

    list-style: none;
    padding: 0;
    margin: 0;
}

#countryPopup .country-item {
    display: flex;
    align-items: center;
    gap: 10px;

    min-width: 0;
    min-height: 60px;
    padding: 10px 12px;
    box-sizing: border-box;

    border: 1px solid #e5e5e5;
    border-radius: 10px;
    background: #fff;

    font-size: 15px;
    line-height: 1.35;
    overflow-wrap: anywhere;
    cursor: pointer;

    transition: border-color 0.2s ease, background 0.2s ease;
}

#countryPopup .country-item:hover {
    border-color: #6F3619;
    background: #faf6f3;
}

#countryPopup .country-item:focus-visible {
    outline: 2px solid #6F3619;
    outline-offset: 2px;
}

#countryPopup .country-item img {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    object-fit: contain;
}

/* ---------- ANIMAZIONE INGRESSO ---------- */
@media (prefers-reduced-motion: no-preference) {
    .kcart-item,
    .kcart .kcart-card,
    .kcart .kcart-empty {
        animation: kcartRise .55s cubic-bezier(.2, .7, .2, 1) both;
    }
    .kcart-item:nth-child(2) { animation-delay: .06s; }
    .kcart-item:nth-child(3) { animation-delay: .12s; }
    .kcart-item:nth-child(n+4) { animation-delay: .16s; }
}
@keyframes kcartRise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

/* ---------- RESPONSIVE ---------- */
@media (min-width: 961px) and (min-height: 880px) {
    .kcart-side {
        position: sticky;
        top: 140px;
    }
}
@media (max-width: 960px) {
    .kcart-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}
@media (max-width: 720px) {
    .kcart-item {
        grid-template-columns: 88px minmax(0, 1fr);
        grid-template-areas:
            "media info"
            "qty   end";
        gap: 14px 16px;
        padding: 16px;
    }
    .kcart-item__media { grid-area: media; width: 88px; }
    .kcart-item__info  { grid-area: info; }
    .kcart-qty         { grid-area: qty; align-items: flex-start; }
    .kcart-item__end   {
        grid-area: end;
        flex-direction: row-reverse;
        align-items: center;
        justify-content: space-between;
        min-width: 0;
    }
    .kcart-item__title { font-size: 16px; }
    .kcart-item__total { font-size: 19px; }
    .kcart-actions { flex-direction: column; align-items: stretch; }
    .kcart-link, .kcart .kcart-clear { justify-content: center; }
}
/* Tablet e smartphone */
@media (max-width: 600px) {
    #countryPopup.country-popup {
        padding: 12px;
    }

    #countryPopup .country-popup-content {
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
        padding: 30px 14px 16px;
        border-radius: 12px;
    }

    #countryPopup .country-popup-content h2 {
        margin: 0 36px 20px;
        font-size: 21px;
    }

    #countryPopup .close-popup {
        top: 7px;
        right: 7px;
        width: 40px;
        height: 40px;
    }

    #countryPopup #countryList {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    #countryPopup .country-item {
        min-height: 54px;
        padding: 9px 10px;
        font-size: 15px;
    }
}

@media (max-width: 520px) {
    .kcart #countryList {
        grid-template-columns: 1fr;
    }
    .kcart .kcart-coupon {
        flex-direction: column;
    }
    .kcart #coupon .kcart-coupon__btn {
        padding: 14px;
    }
}

/* Telefoni molto piccoli */
@media (max-width: 360px) {
    #countryPopup.country-popup {
        padding: 8px;
    }

    #countryPopup .country-popup-content {
        max-height: calc(100vh - 16px);
        max-height: calc(100dvh - 16px);
        padding: 28px 10px 12px;
    }

    #countryPopup .country-popup-content h2 {
        font-size: 19px;
    }
}
