.sdipack-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.sdipack-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
}

.trigger-pack-builder-js {
    cursor: pointer;
}

.sdipack-modal__container {
    position: relative;
    width: 100%;
    max-width: 760px;
    max-height: 92vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    padding: 36px 32px 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
    animation: sdipack-fadein .25s ease;
}

@keyframes sdipack-fadein {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.sdipack-modal__close {
    position: absolute;
    top: 14px; right: 14px;
    width: 36px; height: 36px;
    border: none;
    background: #f4f4f4;
    border-radius: 50%;
    font-size: 16px;
    color: #201C26;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.sdipack-modal__close:hover { background: #e0e0e0; }

.sdipack-modal__banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(90deg, #c32d32, #e34a4f);
    color: #fff;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 22px;
}
.sdipack-modal__banner i { font-size: 16px; }
.sdipack-modal__banner strong { font-weight: 700; }

.sdipack-modal__progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 26px;
}
.sdipack-modal__progress-step {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #e8e8e8;
    color: #999;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .3s, color .3s;
}
.sdipack-modal__progress-step.is-active,
.sdipack-modal__progress-step.is-completed {
    background: #c32d32;
    color: #fff;
}
.sdipack-modal__progress-line {
    flex: 1;
    height: 3px;
    max-width: 60px;
    background: #e8e8e8;
    transition: background .3s;
}
.sdipack-modal__progress-line.is-completed { background: #c32d32; }

.sdipack-modal__step {
    display: none;
    text-align: center;
}
.sdipack-modal__step.is-active {
    display: block;
    animation: sdipack-slidein .3s ease;
}
@keyframes sdipack-slidein {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}
.sdipack-modal__title {
    font-size: 22px;
    font-weight: 700;
    color: #201C26;
    margin: 0 0 8px;
}
.sdipack-modal__desc {
    font-size: 14px;
    color: #777;
    margin: 0 0 22px;
}

.sdipack-modal__tacos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 560px;
    margin: 0 auto;
}
.sdipack-modal__taco-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 14px;
    border: 2px solid #e8e8e8;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color .2s, background .2s, transform .15s;
    text-align: center;
}
.sdipack-modal__taco-card:hover {
    border-color: #c32d32;
    background: #fdf5f5;
}
.sdipack-modal__taco-card.is-selected {
    border-color: #c32d32;
    background: #fdf5f5;
}
.sdipack-modal__taco-image {
    width: 100%;
    aspect-ratio: 1;
    background: #f4f7f9;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sdipack-modal__taco-image img {
    width: 100%; height: 100%;
    object-fit: contain;
    border-radius: 10px;
    mix-blend-mode: multiply;
}
.sdipack-modal__taco-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 4px 0 6px;
    color: #201C26;
}

.sdipack-modal__price-block,
.sdipack-product-card__price,
.sdipack-modal__summary-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}
.sdipack-modal__price-old,
.sdipack-product-card__price-old,
.sdipack-modal__summary-old {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
}
.sdipack-modal__price-new,
.sdipack-product-card__price-new,
.sdipack-modal__summary-new {
    font-size: 15px;
    font-weight: 700;
    color: #c32d32;
}

.sdipack-modal__search {
    position: relative;
    max-width: 480px;
    margin: 0 auto 18px;
}
.sdipack-modal__search i {
    position: absolute;
    top: 50%; left: 14px;
    transform: translateY(-50%);
    color: #999;
}
.sdipack-modal__search-input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border: 1.5px solid #e0e0e0;
    border-radius: 50px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
}
.sdipack-modal__search-input:focus {
    border-color: #c32d32;
}

.sdipack-modal__results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    min-height: 200px;
}

.sdipack-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 2px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    text-align: left;
    padding: 0;
    transition: border-color .2s, transform .15s, box-shadow .2s;
}
.sdipack-product-card:hover {
    border-color: #c32d32;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .08);
}
.sdipack-product-card.is-selected {
    border-color: #c32d32;
    background: #fdf5f5;
}
.sdipack-product-card__image {
    width: 100%;
    aspect-ratio: 1;
    background: #f4f7f9;
    overflow: hidden;
}
.sdipack-product-card__image img {
    width: 100%; height: 100%;
    object-fit: contain;
    border-radius: 10px;
    mix-blend-mode: multiply;
}
.sdipack-product-card__info {
    padding: 8px 10px 12px;
}
.sdipack-product-card__name {
    font-size: 12px;
    font-weight: 500;
    color: #201C26;
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}
.sdipack-product-card__check {
    position: absolute;
    top: 8px; right: 8px;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: #c32d32;
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}
.sdipack-product-card.is-selected .sdipack-product-card__check {
    display: flex;
}

.sdipack-modal__pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
}
.sdipack-modal__page-btn {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1.5px solid #e0e0e0;
    background: #fff;
    cursor: pointer;
    color: #201C26;
    transition: background .2s, border-color .2s;
}
.sdipack-modal__page-btn:hover:not(:disabled) {
    background: #f4f4f4;
    border-color: #ccc;
}
.sdipack-modal__page-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}
.sdipack-modal__page-info {
    font-size: 13px;
    color: #777;
}

.sdipack-modal__summary {
    text-align: left;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 18px;
}
.sdipack-modal__summary-row {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
}
.sdipack-modal__summary-row:last-child { border-bottom: none; }
.sdipack-modal__summary-img {
    width: 56px; height: 56px;
    background: #f4f7f9;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sdipack-modal__summary-img img {
    width: 100%; height: 100%;
    object-fit: contain;
    background: #f4f7f9;
    border-radius: 8px;
    mix-blend-mode: multiply;
}
.sdipack-modal__summary-name {
    font-size: 13px;
    color: #201C26;
    font-weight: 500;
}
.sdipack-modal__summary-price {
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.sdipack-modal__totals {
    text-align: left;
    margin-bottom: 10px;
}
.sdipack-modal__totals-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 4px;
    font-size: 14px;
    color: #444;
}
.sdipack-modal__totals-row--discount {
    color: #c32d32;
    font-weight: 600;
}
.sdipack-modal__totals-row--total {
    border-top: 2px solid #eee;
    padding-top: 10px;
    margin-top: 4px;
    font-size: 16px;
    font-weight: 700;
    color: #201C26;
}

.sdipack-modal__error {
    background: #fdecec;
    color: #c32d32;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    margin-top: 8px;
}

.sdipack-modal__loading {
    text-align: center;
    padding: 30px 20px;
    color: #777;
    grid-column: 1 / -1;
}
.sdipack-modal__loading p { margin: 12px 0 0; font-size: 14px; }
.sdipack-modal__no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px 0;
    color: #999;
    font-size: 14px;
}
.sdipack-modal__spinner {
    width: 36px; height: 36px;
    margin: 0 auto;
    border: 4px solid #e8e8e8;
    border-top-color: #c32d32;
    border-radius: 50%;
    animation: sdipack-spin .7s linear infinite;
}
@keyframes sdipack-spin { to { transform: rotate(360deg); } }

.sdipack-modal__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
}
.sdipack-modal__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1.5px solid #e0e0e0;
    border-radius: 50px;
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    color: #201C26;
    cursor: pointer;
    transition: background .2s, border-color .2s, opacity .2s;
}
.sdipack-modal__btn:hover:not(:disabled) {
    background: #f4f4f4;
    border-color: #ccc;
}
.sdipack-modal__btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}
.sdipack-modal__btn--primary,
.sdipack-modal__btn--next {
    background: #c32d32;
    color: #fff;
    border-color: #c32d32;
}
.sdipack-modal__btn--primary:hover:not(:disabled),
.sdipack-modal__btn--next:hover:not(:disabled) {
    background: #a82428;
    border-color: #a82428;
    color: #fff;
}
.sdipack-modal__btn--back {
    margin-right: auto;
}
.sdipack-modal__btn--add {
    margin-left: auto;
}

@media (max-width: 576px) {
    .sdipack-modal__container { padding: 24px 16px 20px; }
    .sdipack-modal__tacos { grid-template-columns: 1fr; }
    .sdipack-modal__results-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .sdipack-modal__title { font-size: 18px; }
    .sdipack-modal__summary-row {
        grid-template-columns: 48px 1fr;
        grid-template-rows: auto auto;
    }
    .sdipack-modal__summary-price {
        grid-column: 2; grid-row: 2;
        align-items: flex-start;
        flex-direction: row;
        gap: 8px;
    }
}
