.customize-page {
    background: #f7f8fa;
    min-height: 60vh;
    padding-bottom: 3rem;
}

/* ── Üst başlık ── */
.customize-header {
    background: #004AAB;
    color: #fff;
    padding: 1.1rem 0;
}

.customize-header h1 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.customize-header .breadcrumb-bar {
    font-size: .82rem;
    opacity: .75;
    margin-top: .2rem;
}

.customize-header .breadcrumb-bar a {
    color: #fff;
    text-decoration: none;
}

.customize-header .breadcrumb-bar a:hover {
    text-decoration: underline;
}

/* ── Tek sütun layout ── */
.customize-layout {
    padding-top: 1.5rem;
}

/* ── Ürün bilgi barı (yatay, üstte) ── */
.cz-product-bar {
    background: #fff;
    border: 1px solid #e2e6ea;
    border-radius: 4px;
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cz-product-bar__img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}

.cz-product-bar__info {
    flex: 1;
    min-width: 0;
}

.cz-product-bar__name {
    font-weight: 700;
    font-size: 1rem;
    margin: 0 0 .15rem;
    color: #1a1a2e;
}

.cz-product-bar__cat {
    font-size: .78rem;
    color: #777;
    margin: 0;
}

.cz-product-bar__options {
    display: flex;
    gap: .75rem;
    align-items: center;
    flex-wrap: wrap;
}

.cz-product-bar__options select {
    font-size: .82rem;
    padding: .3rem .6rem;
    border-radius: 3px;
    border: 1px solid #d0d6e0;
}

.cz-product-bar__price {
    font-size: .85rem;
    color: #004AAB;
    font-weight: 700;
    white-space: nowrap;
}

.cz-product-bar__price small {
    font-weight: 400;
    color: #888;
    font-size: .75rem;
}

/* ── Kart fiyat sütunu ── */
.cz-table th.cz-th-price,
.cz-table td.cz-td-price {
    width: 100px;
    text-align: right;
    white-space: nowrap;
}

.cz-td-price {
    font-weight: 600;
    color: #004AAB;
    font-size: .82rem;
}

/* ── Toplam fiyat barı ── */
.cz-total-bar {
    background: #f8f9ff;
    border: 1px solid #e2e6ea;
    border-radius: 4px;
    padding: .85rem 1.2rem;
    margin-top: .75rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cz-total-bar__item {
    font-size: .82rem;
    color: #666;
}

.cz-total-bar__item strong {
    color: #1a1a2e;
}

.cz-total-bar__grand {
    font-size: 1.15rem;
    font-weight: 700;
    color: #004AAB;
}

/* ── Ana tablo alanı ── */
.cz-table-card {
    background: #fff;
    border: 1px solid #e2e6ea;
    border-radius: 4px;
    overflow: hidden;
}

.cz-table-card__header {
    background: #fff;
    border-bottom: 2px solid #004AAB;
    padding: .85rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
}

.cz-table-card__title {
    font-weight: 700;
    font-size: 1rem;
    color: #1a1a2e;
    margin: 0;
}

.cz-table-card__count {
    font-size: .8rem;
    background: #004AAB;
    color: #fff;
    padding: .2rem .7rem;
    border-radius: 20px;
    font-weight: 600;
}

/* ── Tablo ── */
.cz-table-wrapper {
    overflow-x: auto;
}

.cz-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .87rem;
}

.cz-table thead tr {
    background: #f0f4ff;
    border-bottom: 2px solid #004AAB;
}

.cz-table th {
    padding: .65rem .9rem;
    font-weight: 700;
    color: #004AAB;
    text-align: left;
    white-space: nowrap;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.cz-table th.cz-th-no {
    width: 50px;
    text-align: center;
}

.cz-table th.cz-th-check {
    width: 40px;
    text-align: center;
}

.cz-table th.cz-th-actions {
    width: 120px;
    text-align: center;
}

.cz-table tbody tr {
    border-bottom: 1px solid #eef0f4;
    transition: background .15s;
}

.cz-table tbody tr:hover {
    background: #f9fbff;
}

.cz-table td {
    padding: .55rem .9rem;
    vertical-align: middle;
}

.cz-table td.cz-td-no {
    text-align: center;
    color: #888;
    font-weight: 600;
    font-size: .8rem;
}

.cz-table td.cz-td-check {
    text-align: center;
}

.cz-table td.cz-td-actions {
    text-align: center;
    white-space: nowrap;
}

.cz-table .form-control,
.cz-table .form-select {
    border-radius: 3px;
    border: 1px solid #d0d6e0;
    font-size: .83rem;
    padding: .32rem .6rem;
    min-width: 120px;
    transition: border-color .15s, box-shadow .15s;
}

.cz-table .form-control:focus,
.cz-table .form-select:focus {
    border-color: #004AAB;
    box-shadow: 0 0 0 2px rgba(0, 74, 171, .12);
    outline: none;
}

.cz-table textarea.form-control {
    min-height: 56px;
    resize: vertical;
}

.cz-table .form-control.is-invalid {
    border-color: #dc3545;
}

.cz-table .form-control[readonly] {
    background: #f9f9f9;
    color: #666;
    cursor: default;
}

/* ── Satır tipleri ── */
.cz-row-ordered {
    background: #fffbea !important;
}

.cz-row-ordered:hover {
    background: #fff8d6 !important;
}

.cz-row-draft {
    background: #ffffff !important;
}

.cz-row-draft:hover {
    background: #f9fbff !important;
}

/* ── Bölücü satır ── */
.cz-section-divider td {
    padding: .4rem 1rem;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    border: none !important;
}

.cz-section-divider.ordered td {
    background: #fef9c3;
    color: #854d0e;
    border-left: 4px solid #fbbf24 !important;
}

.cz-section-divider.draft td {
    background: #dcfce7;
    color: #166534;
    border-left: 4px solid #22c55e !important;
}

.cz-section-divider.new td {
    background: #eff6ff;
    color: #1e40af;
    border-left: 4px solid #3b82f6 !important;
}

/* ── Aksiyon butonları ── */
.cz-btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background .15s, transform .1s;
    background: transparent;
    font-size: .85rem;
}

.cz-btn-action:hover {
    transform: scale(1.1);
}

.cz-btn-copy {
    color: #004AAB;
    background: #e8eeff;
}

.cz-btn-copy:hover {
    background: #c6d4ff;
}

.cz-btn-preview {
    color: #0a7a4b;
    background: #e6f9f0;
}

.cz-btn-preview:hover {
    background: #b6ecd6;
}

.cz-btn-delete {
    color: #dc3545;
    background: #fff0f1;
}

.cz-btn-delete:hover {
    background: #ffd6d9;
}

/* ── Önizleme Modal ── */
.cz-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, .65);
    align-items: center;
    justify-content: center;
}

.cz-modal-overlay.active {
    display: flex;
}

.cz-modal {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .3);
    width: 90vw;
    max-width: 960px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cz-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .85rem 1.2rem;
    border-bottom: 1px solid #eee;
    background: #f8f9ff;
}

.cz-modal__title {
    font-weight: 700;
    font-size: .95rem;
    color: #1a1a2e;
    margin: 0;
}

.cz-modal__row-badge {
    font-size: .75rem;
    background: #004AAB;
    color: #fff;
    border-radius: 20px;
    padding: 2px 10px;
    margin-left: .5rem;
}

.cz-modal__close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}

.cz-modal__close:hover {
    background: #e0e0e0;
}

.cz-modal__body {
    flex: 1;
    overflow: auto;
    padding: 1.2rem;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: #f0f2f7;
}

.cz-modal__loader {
    text-align: center;
    padding: 3rem;
    color: #888;
    font-size: .9rem;
}

.cz-modal__loader::before {
    content: '';
    display: block;
    width: 36px;
    height: 36px;
    border: 3px solid #ddd;
    border-top-color: #004AAB;
    border-radius: 50%;
    animation: czSpin .7s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes czSpin {
    to {
        transform: rotate(360deg);
    }
}

.cz-preview-page-wrap {
    width: 100%;
}

.cz-preview-page-label {
    text-align: center;
    font-size: .75rem;
    font-weight: 700;
    color: #888;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: .45rem;
}

.cz-preview-page-label span {
    background: #e2e8f0;
    border-radius: 20px;
    padding: 2px 12px;
}

.cz-preview-page-canvas {
    max-width: 100%;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
    box-shadow: 0 2px 16px rgba(0, 0, 0, .18);
}

.cz-modal__no-template {
    text-align: center;
    padding: 3rem 2rem;
    color: #888;
}

.cz-modal__vars {
    padding: .65rem 1.2rem;
    border-top: 1px solid #eee;
    background: #fafbff;
    font-size: .78rem;
    color: #555;
    display: flex;
    flex-wrap: wrap;
    gap: .4rem .9rem;
}

.cz-modal__var-chip {
    background: #e8eeff;
    color: #004AAB;
    border-radius: 4px;
    padding: 2px 8px;
    font-weight: 600;
}

/* ── Slider Navigation ── */
.cz-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #004AAB;
    background: #fff;
    color: #004AAB;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    flex-shrink: 0;
}

.cz-slider-nav:hover:not(:disabled) {
    background: #004AAB;
    color: #fff;
    transform: translateY(-50%) scale(1.1);
}

.cz-slider-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.cz-slider-nav-prev {
    left: 10px;
}

.cz-slider-nav-next {
    right: 10px;
}

.cz-preview-slider-container {
    position: relative;
    padding: 0 60px;
}

/* ── Görsel Upload Zone ── */
.cz-img-zone {
    position: relative;
    width: 100px;
    height: 100px;
    border: 2px dashed #c8d4ee;
    border-radius: 6px;
    cursor: pointer;
    background: #f8f9ff;
    transition: border-color .2s, background .2s;
    overflow: hidden;
    flex-shrink: 0;
}

.cz-img-zone:hover {
    border-color: #004AAB;
    background: #f0f4ff;
}

.cz-img-zone.drag-over {
    border-color: #004AAB;
    background: #e5edff;
}

.cz-img-zone.has-error {
    border-color: #dc3545;
    background: #fff5f5;
}

.cz-img-zone.readonly {
    cursor: default;
}

.cz-img-zone.readonly:hover {
    border-color: #c8d4ee;
    background: #f8f9ff;
}

.cz-img-zone__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: .85rem .5rem;
    gap: .3rem;
    color: #7a8bb5;
    text-align: center;
}

.cz-img-zone__empty svg {
    opacity: .55;
}

.cz-img-zone__empty span {
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.2;
}

.cz-img-zone__empty small {
    font-size: .65rem;
    color: #aab;
}

.cz-img-zone__preview {
    position: relative;
    width: 100%;
}

.cz-img-zone__preview img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    border-radius: 4px;
}

.cz-img-zone__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    opacity: 0;
    transition: opacity .18s;
    border-radius: 4px;
}

.cz-img-zone__preview:hover .cz-img-zone__overlay {
    opacity: 1;
}

.cz-img-zone__overlay button {
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: .7rem;
    font-weight: 700;
    padding: 4px 8px;
    line-height: 1;
}

.cz-img-zone__change-btn {
    background: #fff;
    color: #004AAB;
}

.cz-img-zone__remove-btn {
    background: #dc3545;
    color: #fff;
}

.cz-img-zone__loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    gap: .5rem;
    color: #7a8bb5;
    font-size: .75rem;
}

.cz-img-zone__loading::before {
    content: '';
    display: block;
    width: 22px;
    height: 22px;
    border: 2px solid #dde;
    border-top-color: #004AAB;
    border-radius: 50%;
    animation: czSpin .7s linear infinite;
}

.cz-img-zone__error-msg {
    font-size: .68rem;
    color: #dc3545;
    padding: .2rem .4rem 0;
    text-align: center;
}

/* ── Alt toolbar ── */
.cz-table-footer {
    padding: .9rem 1.2rem;
    border-top: 1px solid #eef0f4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
}

.btn-add-row {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: #f0f4ff;
    color: #004AAB;
    border: 1.5px dashed #7ba3e0;
    border-radius: 4px;
    padding: .42rem 1rem;
    font-size: .87rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.btn-add-row:hover {
    background: #dce7ff;
    border-color: #004AAB;
}

.btn-add-row svg {
    flex-shrink: 0;
}

/* ── Sepete Ekle butonu ── */
.cz-submit-bar {
    background: #fff;
    border: 1px solid #e2e6ea;
    border-radius: 4px;
    padding: 1rem 1.2rem;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
}

.cz-submit-info {
    font-size: .85rem;
    color: #555;
}

.cz-submit-info strong {
    color: #1a1a2e;
}

.btn-sepete-ekle {
    background: #004AAB;
    color: #fff;
    border: none;
    padding: .65rem 2rem;
    font-size: .95rem;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    transition: background .15s, transform .1s;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

.btn-sepete-ekle:hover {
    background: #003585;
    transform: translateY(-1px);
}

.btn-sepete-ekle:disabled {
    background: #90a8d4;
    cursor: not-allowed;
    transform: none;
}

/* ── Boş tablo mesajı ── */
.cz-empty-row td {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #999;
    font-size: .9rem;
}

/* ── Checkbox ── */
.cz-table input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #004AAB;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .cz-product-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 576px) {

    .cz-table th,
    .cz-table td {
        padding: .45rem .55rem;
    }

    .cz-table .form-control,
    .cz-table .form-select {
        min-width: 90px;
    }
}
