/* Add-to-cart success modal — vitrine + boutique */
.ci-atc-modal {
    position: fixed;
    inset: 0;
    z-index: 2400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 12px 24px;
    overflow-y: auto;
}
.ci-atc-modal[hidden] {
    display: none !important;
}
.ci-atc-modal__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 17, 17, 0.45);
}
.ci-atc-modal__card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 920px;
    margin: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
    padding: 22px 24px 20px;
}
.ci-atc-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #111;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    border-radius: 999px;
}
.ci-atc-modal__close:hover {
    background: #f3f3f3;
}
.ci-atc-modal__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 36px 18px 0;
}
.ci-atc-modal__check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #111;
    color: #fff;
    font-size: 14px;
    flex-shrink: 0;
}
.ci-atc-modal__title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: #111;
    letter-spacing: -0.02em;
}
.ci-atc-modal__product {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) 220px;
    gap: 16px 20px;
    align-items: center;
}
.ci-atc-modal__img-wrap {
    width: 96px;
    height: 96px;
    border-radius: 10px;
    overflow: hidden;
    background: #f4f4f4;
    border: 1px solid #ececec;
}
.ci-atc-modal__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ci-atc-modal__name {
    font-weight: 700;
    font-size: 1.05rem;
    color: #111;
    line-height: 1.3;
}
.ci-atc-modal__sub {
    margin-top: 4px;
    font-size: 0.85rem;
    color: #555;
}
.ci-atc-modal__price {
    margin-top: 8px;
    font-weight: 800;
    font-size: 1.05rem;
    color: #111;
}
.ci-atc-modal__price s {
    color: #888;
    font-weight: 500;
    margin-right: 8px;
}
.ci-atc-modal__cta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ci-atc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    border: 2px solid transparent;
    cursor: pointer;
}
.ci-atc-btn--primary {
    background: #111;
    color: #fff;
}
.ci-atc-btn--primary:hover {
    background: #000;
    color: #fff;
}
.ci-atc-btn--ghost {
    background: #fff;
    color: #111;
    border-color: #d9d9d9;
}
.ci-atc-btn--ghost:hover {
    border-color: #111;
    color: #111;
}
.ci-atc-recs {
    margin-top: 22px;
    padding-top: 8px;
}
.ci-atc-recs__title {
    margin: 0 0 12px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #111;
}
.ci-atc-recs__row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
    padding-bottom: 6px;
}
.ci-atc-rec {
    min-width: 0;
    height: 100%;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ci-atc-rec__main {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
}
.ci-atc-rec__img {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #f4f4f4;
    border: 1px solid #ececec;
}
.ci-atc-rec__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ci-atc-rec__name {
    margin-top: 8px;
    font-size: 0.8rem;
    line-height: 1.3;
    height: calc(1.3em * 2);
    max-height: calc(1.3em * 2);
    color: #111;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.ci-atc-rec__price {
    margin-top: 4px;
    min-height: 1.2em;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ci-atc-rec__price s {
    font-weight: 500;
    color: #888;
    margin-right: 4px;
}
.ci-atc-rec__atc {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: auto;
    min-height: 34px;
    padding: 0 8px;
    border-radius: 999px;
    background: #fff;
    color: #111;
    border: 2px solid #d9d9d9;
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    line-height: 1.2;
    box-sizing: border-box;
}
.ci-atc-rec__atc-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    display: block;
}
.ci-atc-rec__atc:hover {
    background: #fff;
    color: #111;
    border-color: #111;
}
.ci-atc-skel {
    background: linear-gradient(90deg, #eaeaea 0%, #f5f5f5 45%, #eaeaea 100%);
    background-size: 200% 100%;
    animation: ciAtcShimmer 1.4s ease-in-out infinite;
    border-radius: 8px;
}
.ci-atc-skel--img { width: 100%; height: 100%; }
.ci-atc-skel--title { height: 18px; width: 72%; margin-top: 4px; }
.ci-atc-skel--line { height: 12px; width: 48%; margin-top: 8px; }
.ci-atc-skel--price { height: 16px; width: 36%; margin-top: 10px; }
.ci-atc-skel--btn { height: 48px; width: 100%; border-radius: 999px; }
.ci-atc-skel--rec,
.ci-atc-rec-skel {
    width: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, #eaeaea 0%, #f5f5f5 45%, #eaeaea 100%);
    background-size: 200% 100%;
    animation: ciAtcShimmer 1.4s ease-in-out infinite;
}
.ci-atc-rec-skel--img,
.ci-atc-skel--rec {
    aspect-ratio: 1 / 1;
    height: auto;
    flex-shrink: 0;
}
.ci-atc-rec-skel--name {
    height: calc(1.3em * 2);
    border-radius: 6px;
}
.ci-atc-rec-skel--price {
    height: 1.2em;
    width: 42%;
    border-radius: 6px;
}
.ci-atc-rec-skel--btn {
    margin-top: auto;
    min-height: 34px;
    border-radius: 999px;
}
@keyframes ciAtcShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.ci-atc-modal.is-loading .ci-atc-real { display: none !important; }
.ci-atc-modal:not(.is-loading) .ci-atc-skel { display: none !important; }
.ci-atc-modal.is-loading .ci-atc-modal__check,
.ci-atc-modal.is-loading .ci-atc-modal__title {
    visibility: hidden;
}
.ci-atc-modal.is-loading .ci-atc-modal__head {
    position: relative;
}
.ci-atc-modal.is-loading .ci-atc-modal__head::after {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    width: 220px;
    height: 22px;
    border-radius: 8px;
    background: linear-gradient(90deg, #eaeaea 0%, #f5f5f5 45%, #eaeaea 100%);
    background-size: 200% 100%;
    animation: ciAtcShimmer 1.4s ease-in-out infinite;
}
body.ci-atc-open { overflow: hidden; }

@media (min-width: 769px) {
    .ci-atc-recs__row {
        gap: 9px;
    }
    .ci-atc-rec {
        width: 75%;
        justify-self: center;
        gap: 6px;
    }
    .ci-atc-rec__img {
        border-radius: 8px;
    }
    .ci-atc-rec__name {
        margin-top: 6px;
        font-size: 0.6rem;
    }
    .ci-atc-rec__price {
        margin-top: 3px;
        font-size: 0.585rem;
    }
    .ci-atc-rec__atc {
        min-height: 26px;
        padding: 0 6px;
        font-size: 0.54rem;
        gap: 4px;
    }
    .ci-atc-rec__atc-icon {
        width: 11px;
        height: 11px;
    }
    .ci-atc-rec-skel--name {
        height: calc(1.3em * 2);
    }
    .ci-atc-rec-skel--btn {
        min-height: 26px;
    }
}

@media (max-width: 768px) {
    .ci-atc-modal {
        padding: 0;
        align-items: flex-end;
    }
    .ci-atc-modal__card {
        margin: 0;
        max-width: none;
        border-radius: 16px 16px 0 0;
        padding: 18px 16px 20px;
        max-height: 92vh;
        overflow-y: auto;
    }
    .ci-atc-modal__product {
        grid-template-columns: 84px minmax(0, 1fr);
    }
    .ci-atc-modal__cta {
        grid-column: 1 / -1;
    }
    .ci-atc-btn--ghost {
        background: transparent;
        border: 0;
        min-height: 36px;
        text-decoration: underline;
        font-weight: 700;
        color: #111;
    }
    .ci-atc-modal__img-wrap,
    .ci-atc-modal__img-wrap .ci-atc-skel--img {
        width: 84px;
        height: 84px;
    }
    .ci-atc-recs__row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: visible;
    }
    .ci-atc-rec,
    .ci-atc-skel--rec,
    .ci-atc-rec-skel {
        width: auto;
    }
    .ci-atc-rec__img {
        width: 100%;
        height: auto;
    }
    .ci-atc-recs__row .ci-atc-rec:nth-child(n+3),
    .ci-atc-recs__row .ci-atc-skel--rec:nth-child(n+3),
    .ci-atc-recs__row .ci-atc-rec-skel:nth-child(n+3) {
        display: none;
    }
}
