/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #f4f6f9;
    --surface: #ffffff;
    --sidebar-bg: #0f172a;
    --sidebar-hover: #1e293b;
    --sidebar-active: #2563eb;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --success-bg: #dcfce7;
    --success-text: #166534;
    --error-bg: #fee2e2;
    --error-text: #991b1b;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
    font-size: 14px;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ==================== Auth / Login Page ==================== */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border-radius: 14px;
    padding: 36px 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.auth-brand {
    text-align: center;
    margin-bottom: 26px;
}

.brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.auth-brand .brand-icon {
    margin-bottom: 12px;
}

.auth-brand h1 {
    font-size: 22px;
    color: var(--text);
    margin-bottom: 4px;
}

.auth-brand p {
    color: var(--text-muted);
    font-size: 13px;
}

.auth-footer {
    margin-top: 22px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

/* ==================== Admin Layout ==================== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: var(--sidebar-bg);
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-title {
    font-weight: 700;
    font-size: 16px;
    color: #ffffff;
}

.brand-subtitle {
    font-size: 12px;
    color: #94a3b8;
}

.sidebar-nav {
    padding: 16px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    color: #cbd5e1;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
    background: var(--sidebar-hover);
    color: #ffffff;
    text-decoration: none;
}

.nav-link.active {
    background: var(--sidebar-active);
    color: #ffffff;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.admin-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #334155;
    color: #fff;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admin-meta {
    overflow: hidden;
}

.admin-name {
    font-weight: 600;
    font-size: 13px;
    color: #f8fafc;
}

.admin-email {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.page-title {
    font-size: 20px;
    font-weight: 700;
}

.content-wrapper {
    padding: 24px 28px;
    max-width: 1240px;
    width: 100%;
}

/* ==================== Stats Cards ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}

.stat-card.stat-success { border-left-color: #16a34a; }
.stat-card.stat-info    { border-left-color: #0284c7; }
.stat-card.stat-warning { border-left-color: #d97706; }

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 6px;
}

.stat-hint {
    font-size: 12px;
    color: var(--text-muted);
}

/* ==================== Cards & Tables ==================== */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 22px;
    overflow: hidden;
}

.date-filter-card {
    padding: 16px 20px;
}

.inline-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.date-result {
    background: #eff6ff;
    color: #1e40af;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
}

.card-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.card-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-bar .search-input {
    width: 240px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 13px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table th {
    background: #f8fafc;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    font-weight: 600;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.product-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.product-thumb.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
}

.product-title {
    font-weight: 600;
    color: var(--text);
}

.product-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.small-link {
    font-size: 12px;
    font-weight: 500;
}

.old-price {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 4px;
}

.tag {
    display: inline-block;
    background: #f1f5f9;
    color: #334155;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: var(--success-bg);
    color: var(--success-text);
}

.badge-muted {
    background: #e2e8f0;
    color: #475569;
}

.badge-info {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.text-muted {
    color: var(--text-muted);
}

.text-right {
    text-align: right;
}

.actions-cell {
    white-space: nowrap;
}

.inline-delete-form {
    display: inline-block;
    margin-left: 4px;
}

/* ==================== Forms ==================== */
.form-card {
    max-width: 860px;
}

.product-form {
    padding: 22px 24px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
    color: var(--text);
}

.label-hint {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 12px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="date"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.inline-form input[type="date"],
.filter-bar input,
.filter-bar select {
    width: auto;
    padding: 7px 10px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

textarea {
    resize: vertical;
}

.current-image-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 16px;
}

.image-preview {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    cursor: pointer;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

/* ==================== Buttons ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: var(--danger-hover);
}

.btn-outline-light {
    background: transparent;
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-link {
    background: transparent;
    color: var(--primary);
    padding: 6px 8px;
}

.btn-sm {
    padding: 7px 12px;
    font-size: 13px;
}

.btn-xs {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 6px;
}

.btn-block {
    width: 100%;
}

/* ==================== Alerts & Empty State ==================== */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 13px;
    font-weight: 500;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
}

.alert-error {
    background: var(--error-bg);
    color: var(--error-text);
}

.error-list {
    padding-left: 18px;
}

.empty-state {
    padding: 42px 20px;
    text-align: center;
    color: var(--text-muted);
}

.empty-state p {
    margin-bottom: 14px;
}

/* ==================== Categories Split Layout & Helpers ==================== */
.card-body {
    padding: 20px 24px;
}

.split-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 22px;
    align-items: start;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.label-row label {
    margin-bottom: 0;
}

.tag-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tag-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

.html-pill {
    display: inline-block;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: 0.03em;
}

/* ==================== HTML + Text Description Editor ==================== */
.editor-tabs {
    display: inline-flex;
    background: #f1f5f9;
    border-radius: 6px;
    padding: 2px;
    gap: 2px;
}

.editor-tab {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
}

.editor-tab.active {
    background: #ffffff;
    color: var(--text);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.html-editor {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

.editor-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 10px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
}

.toolbar-btn {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: var(--text);
    font-size: 12px;
    padding: 4px 9px;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.2;
}

.toolbar-btn:hover {
    background: #eff6ff;
    border-color: var(--primary);
    color: var(--primary);
}

.toolbar-sep {
    width: 1px;
    height: 18px;
    background: #cbd5e1;
    margin: 0 4px;
}

.editor-textarea {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.55;
    min-height: 170px;
}

.editor-preview {
    padding: 14px 16px;
    min-height: 170px;
    background: #ffffff;
}

.field-help {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.field-help code {
    background: #f1f5f9;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 11px;
    color: #334155;
}

/* Rendered HTML Content Styling */
.rendered-html h1,
.rendered-html h2,
.rendered-html h3,
.rendered-html h4 {
    margin: 0.7em 0 0.4em;
    color: var(--text);
}

.rendered-html p {
    margin-bottom: 0.75em;
}

.rendered-html ul,
.rendered-html ol {
    padding-left: 22px;
    margin-bottom: 0.75em;
}

.rendered-html li {
    margin-bottom: 4px;
}

.rendered-html blockquote {
    border-left: 3px solid var(--primary);
    padding-left: 12px;
    color: var(--text-muted);
    margin: 0.75em 0;
}

.rendered-html table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75em 0;
}

.rendered-html th,
.rendered-html td {
    border: 1px solid var(--border);
    padding: 8px 10px;
    text-align: left;
}

.rendered-html img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

/* ==================== Product Preview Page ==================== */
.product-detail-top {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.detail-image {
    width: 180px;
    height: 180px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.detail-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #94a3b8;
    font-weight: 600;
}

.detail-meta {
    flex: 1;
    min-width: 220px;
}

.detail-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.detail-price {
    font-size: 26px;
    margin-bottom: 8px;
}

.detail-dates {
    font-size: 13px;
}

.detail-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 22px 0;
}

.detail-description {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 18px;
}

/* ==================== Promotional Banners System ==================== */
.banner-top-grid {
    display: grid;
    grid-template-columns: 1fr 290px;
    gap: 20px;
    align-items: start;
}

.banner-editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.9fr);
    gap: 22px;
    align-items: start;
}

.banner-preview-sticky {
    position: sticky;
    top: 20px;
}

.form-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary);
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
    margin: 20px 0 14px;
}

.form-section-title:first-child {
    margin-top: 0;
}

.color-input {
    height: 40px;
    padding: 3px 6px !important;
    cursor: pointer;
}

.banner-mini-preview {
    width: 140px;
    height: 54px;
    object-fit: cover;
    border-radius: 7px;
    border: 1px solid var(--border);
}

.banner-table-thumb {
    width: 92px;
    height: 46px;
    border-radius: 7px;
    object-fit: cover;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.banner-table-thumb.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 100%);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
}

/* Preview Stage & Responsive Banner Canvas */
.preview-stage {
    width: 100%;
    margin: 0 auto;
    transition: max-width 0.25s ease;
}

.preview-stage.preview-desktop {
    max-width: 100%;
}

.preview-stage.preview-tablet {
    max-width: 720px;
    border: 6px solid #1e293b;
    border-radius: 18px;
    padding: 6px;
    background: #f8fafc;
}

.preview-stage.preview-mobile {
    max-width: 356px;
    border: 8px solid #0f172a;
    border-radius: 26px;
    padding: 8px;
    background: #f8fafc;
}

/* ==================== Professional Product Image Slider ==================== */
.pro-slider {
    position: relative;
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
    outline: none;
    user-select: none;
    -webkit-user-select: none;
}

.pro-slider-viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.pro-slider-track {
    display: flex;
    width: 100%;
    transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.pro-slide {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    min-height: 310px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Fade & Cinematic Zoom Transition Modes */
.pro-slider--fade .pro-slider-track,
.pro-slider--zoom .pro-slider-track {
    display: grid;
    transition: none;
}

.pro-slider--fade .pro-slide,
.pro-slider--zoom .pro-slide {
    grid-area: 1 / 1;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

.pro-slider--fade .pro-slide.is-active,
.pro-slider--zoom .pro-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

.pro-slider--zoom .pro-slide .pro-slide-bg {
    transform: scale(1.08);
    transition: transform 5.5s ease-out;
}

.pro-slider--zoom .pro-slide.is-active .pro-slide-bg {
    transform: scale(1);
}

.pro-slide-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

.pro-slide-scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.pro-slide-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 34px 56px 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.pro-slide-copy {
    max-width: 520px;
}

.pro-slide-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.pro-badge-glass {
    display: inline-block;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.pro-badge-accent {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #0f172a;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.pro-badge-cat {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 11px;
    font-weight: 600;
}

.pro-slide-title {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

.pro-slide-desc {
    font-size: 14px;
    line-height: 1.55;
    opacity: 0.94;
    margin-bottom: 20px;
    max-width: 470px;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.pro-slide-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.pro-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 10px;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
    transition: transform 0.18s ease, filter 0.18s ease;
}

.pro-cta:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
    text-decoration: none !important;
}

.pro-cta-arrow {
    transition: transform 0.18s ease;
}

.pro-cta:hover .pro-cta-arrow {
    transform: translateX(3px);
}

.pro-coupon-chip {
    background: rgba(15, 23, 42, 0.65);
    border: 1px dashed rgba(255, 255, 255, 0.55);
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 12px;
}

/* Floating Glassmorphic Live DB Product Cards on Slide */
.pro-slide-products {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.pro-product-card {
    width: 148px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    color: #ffffff !important;
    text-decoration: none !important;
    transition: transform 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.pro-product-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.5);
    text-decoration: none !important;
}

.pro-product-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #ffffff;
    overflow: hidden;
}

.pro-product-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pro-product-disc {
    position: absolute;
    top: 6px;
    left: 6px;
    background: #ef4444;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 5px;
}

.pro-product-info {
    padding: 8px 10px;
}

.pro-product-name {
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
    color: #f8fafc;
}

.pro-product-prices {
    display: flex;
    align-items: baseline;
    gap: 5px;
    flex-wrap: wrap;
}

.pro-product-now {
    font-size: 12.5px;
    font-weight: 800;
    color: #fbbf24;
}

.pro-product-was {
    font-size: 10.5px;
    color: #94a3b8;
    text-decoration: line-through;
}

/* Slider Controls: Arrows, Dots & Progress Bar */
.pro-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(6px);
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s ease, transform 0.18s ease;
}

.pro-nav:hover {
    background: rgba(15, 23, 42, 0.85);
    transform: translateY(-50%) scale(1.06);
}

.pro-nav-prev { left: 12px; }
.pro-nav-next { right: 12px; }

.pro-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 7px;
}

.pro-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
    padding: 0;
    transition: width 0.25s ease, background 0.25s ease;
}

.pro-dot.is-active {
    width: 26px;
    background: #ffffff;
}

.pro-progress-track {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.18);
    z-index: 6;
}

.pro-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #38bdf8, #fbbf24);
}

/* Mobile & Tablet Preview Stage Adjustments */
.preview-tablet .pro-slide-inner {
    padding: 26px 46px 36px;
}

.preview-tablet .pro-slide-title {
    font-size: 22px;
}

.preview-tablet .pro-product-card:nth-child(2) {
    display: none;
}

.preview-mobile .pro-slide {
    min-height: 255px;
}

.preview-mobile .pro-slide-inner {
    padding: 20px 18px 34px;
    flex-direction: column;
    align-items: flex-start;
}

.preview-mobile .pro-slide-title {
    font-size: 18px;
    margin-bottom: 6px;
}

.preview-mobile .pro-slide-desc {
    font-size: 12px;
    margin-bottom: 14px;
}

.preview-mobile .pro-cta {
    padding: 8px 15px;
    font-size: 12.5px;
}

.preview-mobile .pro-slide-products,
.preview-mobile .pro-nav {
    display: none;
}

@media (max-width: 920px) {
    .pro-slide-products {
        display: none;
    }

    .pro-slide-inner {
        padding: 26px 46px 38px;
    }

    .pro-slide-title {
        font-size: 22px;
    }
}

@media (max-width: 600px) {
    .pro-slide {
        min-height: 245px;
    }

    .pro-slide-inner {
        padding: 20px 18px 36px;
    }

    .pro-slide-title {
        font-size: 19px;
    }

    .pro-slide-desc {
        font-size: 12.5px;
        margin-bottom: 14px;
    }

    .pro-nav {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }
}

.carousel-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.promo-banner-canvas {
    position: relative;
    width: 100%;
    min-height: 220px;
    border-radius: 12px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
}

.preview-mobile .promo-banner-canvas {
    min-height: 195px;
    border-radius: 14px;
}

.carousel-slide {
    display: none;
    animation: bannerFade 0.35s ease;
}

.carousel-slide.active {
    display: flex;
}

@keyframes bannerFade {
    from { opacity: 0.45; }
    to   { opacity: 1; }
}

.promo-banner-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.promo-banner-content {
    position: relative;
    z-index: 2;
    padding: 24px 28px;
    max-width: 560px;
}

.preview-mobile .promo-banner-content {
    padding: 18px 16px;
}

.promo-banner-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.promo-pill {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.promo-discount {
    display: inline-block;
    background: #f59e0b;
    color: #0f172a;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.promo-banner-title {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 6px;
}

.preview-mobile .promo-banner-title {
    font-size: 17px;
}

.promo-banner-desc {
    font-size: 13px;
    opacity: 0.92;
    margin-bottom: 14px;
    line-height: 1.45;
}

.preview-mobile .promo-banner-desc {
    font-size: 12px;
    margin-bottom: 10px;
}

.promo-banner-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.promo-cta-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 8px;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

.promo-coupon {
    font-size: 12px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px dashed rgba(255, 255, 255, 0.5);
    padding: 5px 10px;
    border-radius: 6px;
}

.preview-meta {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    word-break: break-all;
}

/* Carousel Arrows & Dots */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(15, 23, 42, 0.55);
    color: #ffffff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-arrow:hover {
    background: rgba(15, 23, 42, 0.85);
}

.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }

.carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    gap: 6px;
}

.carousel-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    padding: 0;
}

.carousel-dot.active {
    background: #ffffff;
    width: 22px;
    border-radius: 999px;
}

/* Drag & Drop Order Controls */
.order-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.drag-handle {
    cursor: grab;
    color: #94a3b8;
    font-size: 15px;
    letter-spacing: -2px;
    user-select: none;
}

.draggable-row.dragging {
    opacity: 0.45;
    background: #eff6ff !important;
}

.order-num {
    font-weight: 700;
    font-size: 12px;
    color: var(--text-muted);
    min-width: 22px;
}

.order-arrows {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.arrow-btn {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    font-size: 9px;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 4px;
    cursor: pointer;
}

.arrow-btn:hover:not(:disabled) {
    background: #eff6ff;
    border-color: var(--primary);
    color: var(--primary);
}

.arrow-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ==================== Intelligent Product URL Importer ==================== */
.importer-card {
    border-top: 3px solid var(--primary);
}

.importer-input-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.importer-btn {
    height: 40px;
    white-space: nowrap;
}

.extract-progress {
    margin-top: 14px;
}

.progress-bar-track {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2563eb, #0ea5e9);
    border-radius: 999px;
    transition: width 0.35s ease;
}

.progress-step-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    font-weight: 500;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.extract-summary {
    margin-top: 14px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.summary-box {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
}

.summary-title {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
}

.text-success-strong { color: #166534; }
.text-warning-strong { color: #92400e; }

.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.status-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
}

.pill-ok {
    background: #dcfce7;
    color: #166534;
}

.pill-missing {
    background: #fef3c7;
    color: #92400e;
}

/* Gallery Image Manager */
.gallery-manager {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 18px;
}

.gallery-add-inline {
    display: flex;
    gap: 6px;
    align-items: center;
}

.gallery-add-inline input {
    width: 240px;
    padding: 5px 9px;
    font-size: 12px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.gallery-empty {
    grid-column: 1 / -1;
    font-size: 12px;
    padding: 10px 4px;
}

.gallery-item {
    background: #ffffff;
    border: 2px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.gallery-item.is-primary {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 98px;
    object-fit: cover;
    display: block;
    background: #f1f5f9;
}

.gallery-item-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    padding: 6px;
    background: #ffffff;
}

/* Dynamic Specifications & Mono Textarea */
.specs-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.spec-row {
    display: grid;
    grid-template-columns: 1fr 1.4fr auto;
    gap: 8px;
    align-items: center;
}

.mono-textarea {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
}

.price-preview-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 13px;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 6px 16px;
    margin-top: 10px;
    font-size: 13px;
}

/* ==================== Responsive ==================== */
@media (max-width: 1080px) {
    .banner-top-grid,
    .banner-editor-grid {
        grid-template-columns: 1fr;
    }

    .banner-preview-sticky {
        position: static;
    }
}

@media (max-width: 960px) {
    .split-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .content-wrapper,
    .topbar {
        padding: 16px;
    }

    .filter-bar .search-input {
        width: 100%;
    }
}
