.shop-table-card,
.shop-form-card {
    background: #fff;
    border: 1px solid #e6edf5;
    border-radius: 1rem;
}

.shop-section-card {
    border: 1px solid #e6edf5;
    border-radius: 1rem;
    background: #fff;
    overflow: hidden;
}

.shop-section-card__header {
    padding: 1.25rem 1.25rem 0;
}

.shop-section-card__header h1,
.shop-section-card__header h2,
.shop-section-card__header h3,
.shop-section-card__header h4,
.shop-section-card__header h5,
.shop-section-card__header h6 {
    color: var(--jiris-primary);
    font-weight: 700;
}

.shop-section-card__header p,
.shop-form-card .text-muted,
.shop-image-card .text-muted,
.shop-empty-variant-state,
.shop-variant-list-item .text-muted,
.shop-media-builder-preview .text-muted,
.shop-variant-media-editor .text-muted {
    color: var(--jiris-primary) !important;
    font-weight: 400;
    opacity: 0.82;
}

.shop-inline-current-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 0;
    padding: 0;
    margin: 0.25rem 0 0.55rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.shop-inline-current-file__content {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex: 1 1 auto;
    width: auto;
    overflow: hidden;
}

.shop-inline-current-file__link {
    display: inline-block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #0d6efd;
    font-size: 0.98rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.shop-inline-current-file__actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
    flex-shrink: 0;
}

.shop-inline-current-file__checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.shop-inline-current-file__trash {
    width: 34px;
    height: 34px;
    min-width: 34px;
}

.shop-inline-current-file-source {
    display: none !important;
}

.js-media-image-col,
.js-media-video-col {
    min-width: 0;
}

.js-media-image-col input[type="file"],
.js-media-video-col input[type="file"] {
    width: 100%;
    max-width: 100%;
}

.shop-testimonial-inline-builder .js-media-image-col input[type="checkbox"],
.shop-testimonial-inline-builder .js-media-video-col input[type="checkbox"],
.shop-testimonial-inline-builder .js-media-image-col input[type="checkbox"] + label,
.shop-testimonial-inline-builder .js-media-video-col input[type="checkbox"] + label {
    display: none !important;
}

.shop-section-card__body {
    padding: 1.25rem;
}

.shop-required-summary {
    background: #fff5f5;
    color: #7f1d1d;
}

.shop-required-summary__mark {
    align-items: center;
    background: #dc3545;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.35rem;
    font-weight: 900;
    height: 2.2rem;
    justify-content: center;
    line-height: 1;
    width: 2.2rem;
}

.shop-required-summary h2 {
    color: #7f1d1d;
    font-weight: 800;
}

.shop-required-field-mark {
    color: #dc3545;
    font-size: 1.15em;
    font-weight: 900;
    line-height: 1;
}

.shop-admin-accordion .accordion-item {
    border: 1px solid #e6edf5;
    border-radius: 1rem;
    overflow: hidden;
}

.shop-admin-accordion .accordion-button {
    color: var(--jiris-primary);
    font-weight: 700;
    background: #fff;
}

.shop-admin-accordion .accordion-button:not(.collapsed) {
    color: var(--jiris-primary);
    background: #f7fbff;
    box-shadow: none;
}

.shop-admin-accordion .accordion-body {
    padding: 1.25rem;
    background: #fff;
}

.shop-table-card .table,
.shop-table-card .table-responsive {
    margin-bottom: 0;
}

.shop-section-header {
    gap: 1rem;
}

.shop-status-badge {
    min-width: 88px;
}

.shop-delete-btn {
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
}

.shop-delete-btn svg {
    display: block;
}

.shop-image-card {
    border: 1px solid #e6edf5;
    border-radius: 1rem;
    background: #f8fbff;
}

.shop-media-card-actions {
    flex-shrink: 0;
}

.shop-variant-card {
    border: 1px solid #dce8f5;
    border-radius: 1rem;
    background: #fbfdff;
}

.shop-variant-list-item {
    border: 1px solid #dce8f5;
    border-radius: 1rem;
    background: #fbfdff;
}

.shop-icon-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.shop-list-thumb-wrapper {
    width: 56px;
    height: 56px;
}

.shop-empty-variant-state {
    border: 1px dashed #c7d8ea;
    border-radius: 1rem;
    background: #f9fbfe;
}

.shop-variant-media-frame {
    display: block;
    width: 100%;
    min-height: 78vh;
    border: 0;
    background: #fff;
}

.shop-popup-layout {
    min-height: 100vh;
}

.shop-image-preview {
    width: 120px;
    height: 120px;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid #d8e3f1;
}

.shop-image-preview--small {
    width: 64px;
    height: 64px;
    border-radius: 0.75rem;
}

.shop-image-preview img,
.shop-image-preview video,
.shop-list-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-list-thumb {
    width: 56px;
    height: 56px;
    border-radius: 0.85rem;
    display: block;
}

.shop-list-thumb--placeholder {
    display: grid;
    place-items: center;
    color: var(--jiris-text-primary);
    background: linear-gradient(145deg, #eef4fb, #dce8f5);
    font-weight: 700;
}

.shop-media-builder-preview {
    border: 1px solid #e6edf5;
    border-radius: 1rem;
    background: #f8fbff;
}

.shop-testimonial-inline-builder .alert {
    margin-bottom: 0.9rem;
}

.shop-testimonial-inline-toolbar {
    margin-bottom: 0.9rem !important;
}

.shop-testimonial-builder-grid {
    --bs-gutter-y: 0.9rem;
}

.shop-testimonial-inline-builder .mb-3 {
    margin-bottom: 0.85rem !important;
}

.shop-testimonial-media-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.shop-testimonial-media-meta__content {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: nowrap;
}

.shop-testimonial-media-meta__title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
    color: var(--jiris-text-primary);
}

.shop-media-builder-stage {
    height: clamp(320px, 62vh, 620px);
    min-height: 320px;
    border-radius: 0.85rem;
    overflow: hidden;
    border: 1px solid #d8e3f1;
    background: #eef4fb;
    position: relative;
    display: block;
    touch-action: none;
}

.shop-media-builder-stage--inline {
    height: clamp(220px, 38vh, 360px);
    min-height: 220px;
}

.shop-media-builder-preview-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    will-change: transform, object-position;
}

.shop-media-builder-stage.is-draggable {
    cursor: grab;
}

.shop-media-builder-stage.is-dragging {
    cursor: grabbing;
}

.shop-media-builder-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: #2f5e91;
    box-shadow: 0 0 0 2px rgba(47, 94, 145, 0.2);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 3;
}

.shop-media-builder-empty {
    color: #6c7d90;
    font-size: 0.9rem;
}

.shop-mini-toast {
    position: absolute;
    right: 1rem;
    top: 1rem;
    z-index: 1057;
    padding: 0.45rem 0.7rem;
    border-radius: 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: rgba(31, 53, 80, 0.92);
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.shop-mini-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

#product-media-builder-fields-host .js-media-builder-fields {
    border: 1px solid #e6edf5;
    border-radius: 1rem;
    padding: 1rem;
    background: #fff;
}

.shop-variant-media-editor {
    border-top: 1px solid #e6edf5;
    padding-top: 1rem;
}

.js-toggle-variant-media-editor .js-variant-media-chevron {
    transition: transform 0.2s ease;
}

.js-toggle-variant-media-editor.is-open .js-variant-media-chevron {
    transform: rotate(180deg);
}

.js-media-caption {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shop-variant-media-editor .shop-current-file-link {
    max-width: 140px;
}

.shop-variant-media-editor .js-variant-media-builder-fields {
    border: 1px solid #e6edf5;
    border-radius: 1rem;
    padding: 1rem;
    background: #fff;
}

#product-media-builder-fields-host .js-media-builder-fields .mb-3 {
    margin-bottom: 0 !important;
}

.shop-current-file-chip {
    display: inline-block;
    margin-right: 0.35rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #2f5e91;
    background: #e8f1fb;
    vertical-align: middle;
}

.shop-current-file-link {
    vertical-align: middle;
}

.shop-clear-toggle {
    display: none !important;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.5rem;
    max-width: 100%;
    white-space: nowrap;
    vertical-align: middle;
}

.shop-clear-toggle label {
    margin: 0;
    font-size: 0.9rem;
}

@media (max-width: 767.98px) {
    .shop-clear-toggle {
        display: flex;
        width: 100%;
        margin-left: 0;
        margin-top: 0.35rem;
    }

    .shop-admin-accordion .accordion-body,
    .shop-section-card__body {
        padding: 1rem;
    }

    .shop-testimonial-inline-toolbar {
        margin-bottom: 0.75rem !important;
    }

    .shop-testimonial-media-meta {
        gap: 0.5rem;
        margin-bottom: 0.65rem;
    }

    .shop-testimonial-media-meta__content {
        gap: 0.45rem;
    }

    .shop-inline-current-file {
        padding: 0;
        margin-top: 0.2rem;
    }

    .shop-inline-current-file__content {
        width: 100%;
    }

    .shop-inline-current-file__link {
        max-width: 100%;
        font-size: 0.9rem;
    }

    .shop-media-builder-preview {
        padding: 0.9rem !important;
    }

    .shop-testimonial-builder-grid > [class*="col-"] {
        min-width: 0;
    }

    .shop-testimonial-media-meta {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .shop-testimonial-media-meta__content {
        width: 100%;
    }

    .shop-media-builder-stage--inline {
        height: clamp(200px, 42vh, 300px);
        min-height: 200px;
    }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    .shop-testimonial-builder-grid {
        --bs-gutter-y: 1rem;
    }

    .shop-media-builder-stage--inline {
        height: clamp(240px, 34vh, 320px);
    }
}

@media (min-width: 1200px) {
    .shop-testimonial-inline-builder .accordion-body,
    .shop-testimonial-inline-builder {
        --testimonial-inline-gap: 0.95rem;
    }

    .shop-media-builder-stage--inline {
        height: clamp(260px, 34vh, 360px);
    }
}

.shop-product-drag-handle {
    cursor: grab;
    color: #6c757d;
    touch-action: none;
}

.shop-product-drag-handle:active {
    cursor: grabbing;
}

[data-product-row].is-dragging {
    opacity: 0.45;
}

[data-product-row].is-drag-over {
    box-shadow: inset 0 3px 0 var(--bs-primary);
}

/* ── CKEditor size-guide table styles (admin editor) ──────────────────── */
.shop-form-card .ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw,
.shop-form-card .ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw {
    right: auto;
    left: 0;
}

.ck-content figure.table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0.75rem 0;
}

.ck-content .table table {
    width: 100%;
    min-width: 24rem;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.ck-content .table table th,
.ck-content .table table td {
    padding: 0.45rem 0.75rem;
    border: 1px solid rgba(41, 84, 131, 0.2);
    text-align: left;
    vertical-align: middle;
}

.ck-content .table table thead th {
    background: rgba(41, 84, 131, 0.08);
    color: #183b61;
    font-weight: 700;
}

/* ── CKEditor custom toolbar button label ─────────────────────────────── */
.ck.ck-button .ck-button__label {
    display: inline !important;
    overflow: visible !important;
    width: auto !important;
    font-size: 0.8rem;
    font-weight: 500;
    color: inherit;
    white-space: nowrap;
}
