/* ========== BOOM MODAS - CMS ADMIN DESIGN SYSTEM ========== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg-main: #0a0a0a;
  --bg-sidebar: #0e0e0e;
  --bg-card: #141414;
  --bg-card-hover: #1a1a1a;
  --bg-input: #080808;
  --yellow: #FFE500;
  --yellow-glow: rgba(255, 229, 0, 0.15);
  --yellow-hover: #e6ce00;
  --white: #ffffff;
  --gray-100: #e0e0e0;
  --gray-300: #a0a0a0;
  --gray-500: #666666;
  --gray-700: #2a2a2a;
  --border: rgba(255, 255, 255, 0.08);
  --border-active: rgba(255, 229, 0, 0.4);
  --danger: #ff4757;
  --danger-bg: rgba(255, 71, 87, 0.12);
  --success: #2ed573;
  --success-bg: rgba(46, 213, 115, 0.12);
  --warning: #ffa502;
  --warning-bg: rgba(255, 165, 2, 0.12);
  --info: #1e90ff;
  --info-bg: rgba(30, 144, 255, 0.12);

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--white);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

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

/* Sidebar */
.admin-sidebar {
  width: 270px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  transition: var(--transition);
}

.sidebar-header {
  padding: 1.2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  flex: 1;
  min-width: 0;
}

.admin-sidebar-logo {
  height: 38px;
  width: 38px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  flex-shrink: 0;
  border: 1px solid rgba(255, 229, 0, 0.2);
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-brand-name {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-brand-sub {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--yellow);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.badge-cms {
  background: var(--yellow-glow);
  color: var(--yellow);
  border: 1px solid rgba(255, 229, 0, 0.3);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  text-transform: uppercase;
}

.sidebar-menu {
  flex: 1;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.2rem;
  color: var(--gray-300);
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  width: 100%;
  text-align: left;
}

.menu-item i {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
  transition: var(--transition);
}

.menu-item:hover {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--white);
}

.menu-item.active {
  background-color: var(--yellow);
  color: #000;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(255, 229, 0, 0.2);
}

.menu-item.active i {
  color: #000;
}

.sidebar-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.api-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--gray-300);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray-500);
}

.status-dot.online {
  background: var(--success);
  box-shadow: 0 0 10px rgba(46, 213, 115, 0.6);
}

.btn-store-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.7rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--gray-100);
  font-weight: 600;
  transition: var(--transition);
}

.btn-store-preview:hover {
  background: var(--yellow-glow);
  color: var(--yellow);
  border-color: rgba(255, 229, 0, 0.3);
}

/* Main Content Area */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-main);
  padding-bottom: 3rem;
}

/* Topbar */
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2.5rem;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.sidebar-toggle {
  display: none;
  font-size: 1.3rem;
  color: var(--white);
}

.page-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.page-subtitle {
  font-size: 0.85rem;
  color: var(--gray-300);
}

/* Tabs */
.tab-pane {
  display: none;
  padding: 2rem 2.5rem;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--yellow);
  color: #000;
  font-weight: 700;
}

.btn-primary:hover {
  background-color: var(--yellow-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 229, 0, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.btn-danger-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(255, 71, 87, 0.3);
  border-radius: 6px;
  transition: var(--transition);
}

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

.btn-edit-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: var(--transition);
}

.btn-edit-sm:hover {
  background: var(--yellow);
  color: #000;
  border-color: var(--yellow);
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.stat-icon.yellow { background: var(--yellow-glow); color: var(--yellow); }
.stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-icon.red { background: var(--danger-bg); color: var(--danger); }
.stat-icon.blue { background: var(--info-bg); color: var(--info); }

.stat-info { display: flex; flex-direction: column; }
.stat-label { font-size: 0.8rem; color: var(--gray-300); font-weight: 500; }
.stat-value { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 800; }

/* Toolbars & Inputs */
.toolbar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 250px;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
}

.admin-input, .admin-select, .admin-textarea {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--white);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.search-input-wrap .admin-input {
  padding-left: 2.6rem;
}

.admin-input:focus, .admin-select:focus, .admin-textarea:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 2px var(--yellow-glow);
}

.toolbar-filters {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.toolbar-filters .admin-select {
  width: auto;
  min-width: 160px;
}

/* Tables */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

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

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th {
  background: rgba(255, 255, 255, 0.02);
  padding: 1rem 1.2rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--gray-300);
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.9rem;
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Strict 4:3 Table Thumbnail */
.table-img-cell {
  width: 68px;
  height: 51px;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: hidden;
  background: #111;
  border: 1px solid var(--border);
}

.table-img-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-cell-name {
  font-weight: 600;
  color: var(--white);
}

.product-cell-id {
  font-size: 0.75rem;
  color: var(--gray-500);
}

.badge-tag {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-tag.oferta { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(255, 71, 87, 0.3); }
.badge-tag.nuevo { background: var(--success-bg); color: var(--success); border: 1px solid rgba(46, 213, 115, 0.3); }
.badge-tag.popular { background: var(--yellow-glow); color: var(--yellow); border: 1px solid rgba(255, 229, 0, 0.3); }
.badge-tag.pack { background: var(--info-bg); color: var(--info); border: 1px solid rgba(30, 144, 255, 0.3); }
.badge-tag.custom { background: rgba(255, 255, 255, 0.08); color: var(--gray-100); }

.stock-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.stock-indicator.in { color: var(--success); }
.stock-indicator.low { color: var(--warning); }
.stock-indicator.out { color: var(--danger); }

.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.table-loading, .table-empty {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--gray-300);
}

.table-empty i {
  font-size: 2.5rem;
  color: var(--gray-500);
  margin-bottom: 0.8rem;
  display: block;
}

/* Hero & Banners Management Grid */
.hero-management-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 2rem;
}

.hero-uploader-box {
  margin-bottom: 1rem;
}

.hero-thumbs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1rem;
  margin-top: 0.8rem;
}

.hero-thumb-card {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
  background: #000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: var(--transition);
}

.hero-thumb-card:hover {
  border-color: var(--yellow);
  transform: translateY(-2px);
}

.hero-thumb-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-thumb-card .btn-delete-slide {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(255, 71, 87, 0.85);
  color: #fff;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: var(--transition);
}

.hero-thumb-card .btn-delete-slide:hover {
  background: var(--danger);
  transform: scale(1.1);
}

.hero-thumb-card .slide-index-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.75);
  color: var(--yellow);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 229, 0, 0.3);
}

.subheading-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-100);
}

/* Promotions Engine Cards */
.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.yellow-text { color: var(--yellow); }
.card-desc { font-size: 0.85rem; color: var(--gray-300); margin-top: 0.2rem; }
.card-body { padding: 1.5rem; }

.form-group {
  margin-bottom: 1.2rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-100);
  margin-bottom: 0.4rem;
}

.required { color: var(--danger); }
.form-hint { font-size: 0.75rem; color: var(--gray-500); margin-top: 0.3rem; display: block; }

.form-row {
  display: flex;
  gap: 1rem;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

/* Switch Slider */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--gray-700);
  transition: .4s;
}
.slider:before {
  position: absolute; content: "";
  height: 18px; width: 18px; left: 4px; bottom: 4px;
  background-color: white; transition: .4s;
}
input:checked + .slider { background-color: var(--yellow); }
input:checked + .slider:before { transform: translateX(22px); background-color: #000; }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

/* Announcement Live Preview Bar */
.announcement-live-preview {
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}

.preview-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--gray-500);
  font-weight: 700;
  display: block;
  margin-bottom: 0.6rem;
}

.announcement-preview-bar {
  background: var(--yellow);
  color: #000;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(255, 229, 0, 0.2);
}

.card-actions-right {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

/* Combos Section */
.combos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1.5rem;
}

.section-heading { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 800; }
.section-subheading { font-size: 0.85rem; color: var(--gray-300); }

.combos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.combo-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.combo-card:hover {
  border-color: rgba(255, 229, 0, 0.3);
  transform: translateY(-4px);
}

.combo-card-img {
  aspect-ratio: 4 / 3;
  width: 100%;
  position: relative;
  background: #111;
  overflow: hidden;
}

.combo-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.combo-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--yellow);
  color: #000;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.combo-card-body {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.combo-card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.combo-card-desc {
  font-size: 0.85rem;
  color: var(--gray-300);
  margin-bottom: 1rem;
  flex: 1;
}

.combo-card-pricing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.combo-price-current {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--yellow);
}

.combo-price-original {
  font-size: 0.9rem;
  color: var(--gray-500);
  text-decoration: line-through;
  margin-left: 0.4rem;
}

/* Modals */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  padding: 1.5rem;
}

.admin-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.admin-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  transform: scale(0.95);
  transition: var(--transition);
}

.admin-modal-overlay.active .admin-modal {
  transform: scale(1);
}

.admin-modal-header {
  padding: 1.4rem 1.8rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.modal-close-btn {
  font-size: 1.2rem;
  color: var(--gray-300);
  transition: var(--transition);
}

.modal-close-btn:hover { color: var(--yellow); }

.admin-modal-body {
  padding: 1.8rem;
}

.admin-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}

/* Cloudflare R2 Upload Dropzone */
.r2-upload-container {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 0.8rem;
}

.dropzone {
  flex: 1;
  border: 2px dashed var(--gray-700);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 140px;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--yellow);
  background: var(--yellow-glow);
}

.file-input-hidden {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone-icon {
  font-size: 2rem;
  color: var(--yellow);
  margin-bottom: 0.5rem;
}

.dropzone-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
}

.dropzone-text span {
  color: var(--yellow);
  text-decoration: underline;
}

.dropzone-sub {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-top: 0.3rem;
}

.upload-progress-bar {
  width: 90%;
  height: 24px;
  background: #000;
  border: 1px solid var(--border);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--yellow), #ffa502);
  transition: width 0.3s ease;
}

.progress-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Image Preview Container (Strict 4:3) */
.image-preview-wrapper {
  width: 160px;
  flex-shrink: 0;
}

.image-preview-box.aspect-4-3 {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  background: #000;
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.image-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.empty-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--gray-500);
  font-size: 0.75rem;
}

.empty-preview-placeholder i { font-size: 1.5rem; }

.image-url-toggle { margin-top: 0.4rem; }

/* Settings View */
.settings-container {
  max-width: 700px;
}

.settings-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.8rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* Toast Notifications */
.admin-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.admin-toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  animation: slideInRight 0.3s ease;
}

.admin-toast.success { border-color: rgba(46, 213, 115, 0.4); }
.admin-toast.success i { color: var(--success); }
.admin-toast.error { border-color: rgba(255, 71, 87, 0.4); }
.admin-toast.error i { color: var(--danger); }

/* Keyframes */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Admin Logout Button */
.btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.65rem;
  background: rgba(255, 71, 87, 0.08);
  border: 1px solid rgba(255, 71, 87, 0.25);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--danger);
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  width: 100%;
}

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

/* ========== ADMIN AUTHENTICATION GATE / LOGIN SCREEN ========== */
.admin-auth-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, #1a1600 0%, #080808 70%);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.admin-auth-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.admin-auth-card {
  background: #121212;
  border: 1px solid rgba(255, 229, 0, 0.25);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 229, 0, 0.1);
  animation: authCardEntrance 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

@keyframes authCardEntrance {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.auth-brand {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
}

.auth-logo-img {
  height: 72px;
  width: 72px;
  object-fit: cover;
  border-radius: 16px;
  display: block;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 229, 0, 0.25);
}

.auth-icon-badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--yellow-glow);
  border: 1px solid rgba(255, 229, 0, 0.3);
  color: var(--yellow);
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.2rem auto;
}

.auth-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.auth-desc {
  font-size: 0.85rem;
  color: var(--gray-300);
  margin-bottom: 1.8rem;
  line-height: 1.5;
}

.auth-form {
  text-align: left;
}

.auth-input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 1.1rem;
  color: var(--gray-500);
  font-size: 1rem;
}

.auth-pin-input {
  padding-left: 2.8rem;
  padding-right: 2.8rem;
  font-size: 1.1rem;
  letter-spacing: 2px;
  background: #080808;
  border: 1.5px solid var(--border);
  height: 48px;
}

.auth-pin-input:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px var(--yellow-glow);
}

.btn-toggle-pwd {
  position: absolute;
  right: 1rem;
  color: var(--gray-500);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-toggle-pwd:hover {
  color: var(--yellow);
}

.auth-error-msg {
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.auth-remember-row {
  margin: 1rem 0 1.5rem 0;
}

.remember-label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--gray-300);
  cursor: pointer;
}

.remember-label input[type="checkbox"] {
  accent-color: var(--yellow);
  width: 16px;
  height: 16px;
}

.btn-auth-submit {
  width: 100%;
  height: 48px;
  font-size: 1rem;
}

.auth-footer-hint {
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--gray-500);
  line-height: 1.4;
}

.auth-footer-hint strong {
  color: var(--yellow);
}

/* ========== RESPONSIVE DESIGN (CMS MOBILE, TABLETS & PCS) ========== */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 95;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

@media (max-width: 1024px) {
  .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--white);
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
  }

  .sidebar-toggle:hover {
    background: var(--yellow-glow);
    color: var(--yellow);
    border-color: rgba(255, 229, 0, 0.3);
  }

  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 10px 0 35px rgba(0, 0, 0, 0.85);
  }

  .admin-sidebar.open {
    transform: translateX(0);
  }

  .admin-topbar {
    padding: 1.2rem 1.5rem;
  }

  .admin-content {
    padding: 1.5rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-management-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .admin-topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1rem;
  }

  .topbar-left {
    width: 100%;
    justify-content: space-between;
  }

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .page-title {
    font-size: 1.3rem;
  }

  .page-subtitle {
    font-size: 0.8rem;
  }

  .tab-pane {
    padding: 1rem 0.8rem;
  }

  .admin-content {
    padding: 1rem;
  }

  .table-header-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
  }

  .table-search-box {
    max-width: 100%;
    width: 100%;
  }

  .table-filters {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .table-filters select {
    flex: 1;
    min-width: 120px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-icon {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .stat-value {
    font-size: 1.3rem;
  }

  .form-grid-2, .form-grid-3 {
    grid-template-columns: 1fr !important;
  }

  .admin-modal-card {
    padding: 1.5rem 1rem;
    max-height: 94vh;
  }

  .image-upload-flex {
    flex-direction: column;
  }

  .image-preview-wrapper {
    width: 100%;
  }

  .admin-auth-card {
    padding: 2rem 1.2rem;
  }

  .table-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-table {
    min-width: 600px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .admin-topbar {
    padding: 0.8rem;
  }

  .admin-content {
    padding: 0.8rem;
  }

  .admin-table th, .admin-table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.8rem;
  }
}

/* ========== ADMIN PWA INSTALL BANNER ========== */
.admin-pwa-install-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1050;
  max-width: 440px;
  width: calc(100% - 48px);
  background: rgba(14, 14, 14, 0.96);
  border: 1.5px solid rgba(255, 229, 0, 0.4);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.85), 0 0 25px rgba(255, 229, 0, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  transform: translateY(100px);
  visibility: hidden;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease, visibility 0.4s ease;
}

.admin-pwa-install-banner.show {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.admin-pwa-install-banner .pwa-banner-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-pwa-install-banner .pwa-banner-logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-pwa-install-banner .pwa-banner-info {
  flex: 1;
  min-width: 180px;
}

.admin-pwa-install-banner .pwa-banner-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  color: var(--yellow);
  margin-bottom: 0.2rem;
}

.admin-pwa-install-banner .pwa-banner-desc {
  font-size: 0.8rem;
  color: var(--gray-300);
  line-height: 1.35;
}

.admin-pwa-install-banner .pwa-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-pwa-install-banner .btn-pwa-install {
  flex: 1;
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  justify-content: center;
}

.admin-pwa-install-banner .btn-pwa-dismiss {
  color: var(--gray-500);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.65rem 1rem;
  cursor: pointer;
  background: none;
  border: none;
  transition: var(--transition);
}

.admin-pwa-install-banner .btn-pwa-dismiss:hover {
  color: var(--white);
}

@media (max-width: 480px) {
  .admin-pwa-install-banner {
    bottom: 12px;
    right: 12px;
    left: 12px;
    width: calc(100% - 24px);
    padding: 1rem;
  }
}

/* ==========================================
   TOGGLE SWITCH (Oferta Explosiva & otros)
========================================== */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .3s;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: rgba(255, 255, 255, 0.5);
  transition: .3s;
}

input:checked + .slider {
  background-color: var(--yellow);
  border-color: var(--yellow);
}

input:checked + .slider:before {
  transform: translateX(22px);
  background-color: #000;
}

.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

/* Promo card header with switch */
.promo-card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Exchange rate preview helper */
.exchange-rate-preview i { margin-right: 0.3rem; }


