/* ===================================================
   BOOTSTRAP ICONS — GLOBAL FIX
   The Mazer theme overrides the default inline-block to block,
   which breaks icon alignment inside buttons, badges, and text.
   =================================================== */
.bi::before,
[class^="bi-"]::before,
[class*=" bi-"]::before {
    display: block !important;
}

/* ===================================================
   PRODUCT CREATE / EDIT PAGE — COMPLETE DESIGN SYSTEM
   =================================================== */

/* ---------- Product Section Card ---------- */
.product-section {
    background: #fff;
    border: 1.5px solid #e8ecf0;
    border-radius: 16px;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.04);
    transition: box-shadow .2s;
}
.product-section:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.07), 0 8px 24px rgba(0,0,0,.06);
}
.product-section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    background: #fafbfc;
    border-bottom: 1.5px solid #e8ecf0;
}
.product-section-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
}
.section-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a202c;
    letter-spacing: -.01em;
}
.section-subtitle {
    font-size: 12.5px;
    color: #6b7280;
}
.product-section-body {
    padding: 24px;
}

/* ---------- Form Submit Bar ---------- */
.form-submit-bar {
    position: sticky;
    bottom: 0;
    z-index: 100;
    background: #fff;
    border-top: 1.5px solid #e8ecf0;
    padding: 14px 24px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    box-shadow: 0 -4px 16px rgba(0,0,0,.06);
    border-radius: 0 0 12px 12px;
}

/* ---------- File Upload Widget ---------- */
.file-upload-wrap {
    position: relative;
    border: 2px dashed #d0d9e4;
    border-radius: 10px;
    background: #f8fafc;
    padding: 20px 14px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    overflow: hidden;
}
.file-upload-wrap:hover {
    border-color: #6366f1;
    background: #f5f3ff;
}
.file-upload-wrap input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.fuw-icon {
    font-size: 24px;
    color: #94a3b8;
    margin-bottom: 6px;
}
.file-upload-wrap:hover .fuw-icon { color: #6366f1; }
.fuw-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}
.fuw-hint {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 2px;
}
.fuw-selected {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    word-break: break-word;
}
.fuw-preview {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 10px;
}
.fuw-preview-thumb {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    display: block;
}

/* ---------- Product Gallery ---------- */
.product-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 10px;
}
.gallery-thumb {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
}
.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gallery-thumb .btn {
    position: absolute;
    top: 4px;
    right: 4px;
    padding: 2px 6px;
    font-size: 11px;
    opacity: 0;
    transition: opacity .15s;
    border-radius: 6px;
}
.gallery-thumb:hover .btn { opacity: 1; }

/* ---------- Settings Grid (Settings & Status) ---------- */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

/* ---------- Setting Card (toggle card) ---------- */
.setting-card {
    position: relative;
}
.setting-toggle {
    display: block;
    cursor: pointer;
    margin: 0;
    height: 100%;
}
/* Hide the native checkbox */
.setting-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
/* The visible panel */
.setting-card-panel {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    transition: border-color .18s, background .18s, box-shadow .18s;
    height: 100%;
    min-height: 130px;
    cursor: pointer;
    user-select: none;
}
.setting-card-panel:hover {
    border-color: #a5b4fc;
    box-shadow: 0 0 0 3px rgba(99,102,241,.08);
}
/* Active (checked) state */
.setting-toggle input:checked ~ .setting-card-panel {
    border-color: #6366f1;
    background: #f5f3ff;
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}

/* Top row: icon + pill switch */
.setting-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2px;
}
.setting-icon-badge {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f1f5f9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #64748b;
    transition: background .18s, color .18s;
    flex-shrink: 0;
}
.setting-toggle input:checked ~ .setting-card-panel .setting-icon-badge {
    background: #ede9fe;
    color: #6366f1;
}

/* Pill toggle switch */
.setting-switch {
    width: 40px;
    height: 22px;
    border-radius: 999px;
    background: #d1d5db;
    position: relative;
    flex-shrink: 0;
    transition: background .18s;
    display: inline-block;
}
.setting-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.18);
    transition: transform .18s cubic-bezier(.4,0,.2,1);
}
.setting-toggle input:checked ~ .setting-card-panel .setting-switch {
    background: #6366f1;
}
.setting-toggle input:checked ~ .setting-card-panel .setting-switch::after {
    transform: translateX(18px);
}

/* Text */
.setting-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.3;
}
.setting-toggle input:checked ~ .setting-card-panel .setting-title {
    color: #4f46e5;
}
.setting-description {
    font-size: 11.5px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
    flex: 1;
}

/* Category chip */
.setting-status-chip {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    letter-spacing: .02em;
    text-transform: uppercase;
    margin-top: auto;
    width: fit-content;
    transition: background .18s, color .18s;
}
.setting-toggle input:checked ~ .setting-card-panel .setting-status-chip {
    background: #ede9fe;
    color: #6366f1;
}
.setting-error {
    display: block;
    font-size: 11px;
    margin-top: 3px;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .settings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 767.98px) {
    .settings-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .product-section-body {
        padding: 16px;
    }
    .setting-card-panel {
        min-height: auto;
        padding: 12px;
    }
}
@media (max-width: 480px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================================
   END PRODUCT DESIGN SYSTEM
   =================================================== */

.border-shadow-1{
    box-shadow: 0px 0px 2px 0px #ccc;
}
.search-box{
    padding: 15px;
    margin-bottom: 20px;
}
nav .pagination{
    margin: 0px;
}
nav p{
    margin: 0px;
}
.select2-container .select2-selection--single{
    height: 38px !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered{
    line-height: 37px !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow{
    height: 36px !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered{
    color: #a0adbb !important;
}
.select2-container--default .select2-selection--single{
    border: 1px solid #dce7f1 !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow b{
    border-color: #dce7f1 transparent transparent transparent;
}
.modal .modal-header .close{
    background: #888;
    color: #fff;
}
.courier-order-container .item-box{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    grid-gap: 10px;
    align-items: center;
}
