/* ============================================================
   COTIZADOR B2B - ESTILOS PRINCIPALES
   Diseño industrial moderno: azul, gris, blanco
   ============================================================ */

:root {
  --primary: #1a3a5c;
  --primary-dark: #0f2540;
  --primary-light: #2d6a9f;
  --accent: #e87722;
  --accent-hover: #d06010;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-500: #adb5bd;
  --gray-700: #495057;
  --gray-900: #212529;
  --white: #ffffff;
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow: 0 2px 12px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.15);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: .2s ease;
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  color: var(--gray-900);
  background: var(--gray-100);
  line-height: 1.6;
}
a { color: var(--primary-light); text-decoration: none; }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-top {
  background: var(--primary-dark);
  padding: 6px 0;
  font-size: 12px;
}
.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header-top a { color: var(--gray-300); }
.header-top a:hover { color: var(--white); }
.header-main { padding: 14px 0; }
.header-main .container {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon {
  width: 44px; height: 44px;
  background: var(--accent);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: white;
}
.logo-text { line-height: 1.2; }
.logo-text strong { display: block; font-size: 17px; color: white; }
.logo-text span { font-size: 11px; color: var(--gray-300); text-transform: uppercase; letter-spacing: 1px; }
.header-search { flex: 1; min-width: 200px; max-width: 460px; position: relative; }
.header-search input {
  width: 100%;
  padding: 10px 44px 10px 16px;
  border: none;
  border-radius: 50px;
  background: rgba(255,255,255,.12);
  color: white;
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}
.header-search input::placeholder { color: rgba(255,255,255,.6); }
.header-search input:focus { background: rgba(255,255,255,.2); }
.header-search .btn-search {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: rgba(255,255,255,.7); cursor: pointer; font-size: 15px;
}
.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.btn-cotizacion {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  transition: var(--transition);
  position: relative;
}
.btn-cotizacion:hover { background: var(--accent-hover); transform: translateY(-1px); }
.cart-badge {
  background: var(--primary-dark);
  color: white;
  border-radius: 50%;
  width: 20px; height: 20px;
  font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.header-nav {
  background: var(--primary-dark);
  border-top: 1px solid rgba(255,255,255,.08);
}
.header-nav ul { list-style: none; display: flex; gap: 0; }
.header-nav a {
  display: block;
  padding: 11px 18px;
  color: rgba(255,255,255,.8);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.header-nav a:hover, .header-nav a.active { color: white; background: rgba(255,255,255,.1); }
.header-nav a i { margin-right: 6px; }

/* ============================================================
   CONTAINER
   ============================================================ */
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ============================================================
   HERO / BANNER
   ============================================================ */
.hero-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 52px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
}
.hero-banner .container { position: relative; }
.hero-banner h1 { font-size: 2.2rem; font-weight: 700; margin-bottom: 12px; }
.hero-banner p { font-size: 1.1rem; opacity: .85; margin-bottom: 24px; }
.hero-search {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  background: white;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero-search input {
  flex: 1;
  padding: 14px 22px;
  border: none;
  outline: none;
  font-size: 15px;
  color: var(--gray-900);
}
.hero-search button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 14px 28px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: var(--transition);
}
.hero-search button:hover { background: var(--accent-hover); }

/* ============================================================
   CATEGORIES BAR
   ============================================================ */
.categories-bar {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  padding: 12px 0;
  overflow-x: auto;
}
.categories-bar .container { display: flex; gap: 8px; flex-wrap: nowrap; min-width: max-content; }
.cat-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px;
  border: 1.5px solid var(--gray-300);
  border-radius: 50px;
  background: white;
  color: var(--gray-700);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.cat-btn:hover, .cat-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}
.cat-btn i { font-size: 13px; }

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.main-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  padding: 28px 0 48px;
}
@media (max-width: 900px) {
  .main-layout { grid-template-columns: 1fr; }
}

/* ============================================================
   SIDEBAR FILTROS
   ============================================================ */
.sidebar { }
.filter-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}
.filter-card h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--primary);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.filter-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--gray-700);
  font-size: 14px;
}
.filter-item:hover { background: var(--gray-100); color: var(--primary); }
.filter-item.active { background: var(--primary); color: white; }
.filter-badge {
  background: var(--gray-200);
  color: var(--gray-700);
  border-radius: 50px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 600;
}
.filter-item.active .filter-badge { background: rgba(255,255,255,.25); color: white; }

/* ============================================================
   PRODUCT GRID
   ============================================================ */
.products-area { }
.products-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.products-count { color: var(--gray-700); font-size: 14px; }
.products-count strong { color: var(--primary); }
.toolbar-actions { display: flex; gap: 10px; align-items: center; }
.sort-select {
  padding: 8px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 13px;
  background: white;
  color: var(--gray-700);
  cursor: pointer;
  outline: none;
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

/* ============================================================
   PRODUCT CARD
   ============================================================ */
.product-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: var(--transition);
  display: flex; flex-direction: column;
  position: relative;
}
.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--primary-light);
}
.product-badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: .5px;
  z-index: 1;
}
.product-badge.featured { background: var(--primary); }
.product-img {
  height: 180px;
  background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  position: relative;
}
.product-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.product-card:hover .product-img img { transform: scale(1.05); }
.product-img .no-img {
  font-size: 48px;
  color: var(--gray-300);
}
.product-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; }
.product-category {
  font-size: 11px;
  color: var(--primary-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 4px;
}
.product-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 6px;
  line-height: 1.4;
}
.product-desc {
  font-size: 12.5px;
  color: var(--gray-700);
  margin-bottom: 10px;
  flex: 1;
  line-height: 1.5;
}
.product-meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.product-meta span { display: flex; align-items: center; gap: 4px; }
.product-footer { padding: 12px 16px; border-top: 1px solid var(--gray-200); }
.btn-add {
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  padding: 9px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-add:hover { background: var(--primary-light); }
.btn-add.added { background: var(--success); }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  background: white;
  color: var(--gray-700);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(26,58,92,.05); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: white; }
.page-btn.disabled { opacity: .4; pointer-events: none; }

/* ============================================================
   COTIZACIÓN PANEL (SIDEBAR DERECHO / MODAL)
   ============================================================ */
.quote-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 2000;
  display: none;
  align-items: stretch;
  justify-content: flex-end;
}
.quote-overlay.open { display: flex; }
.quote-panel {
  width: 440px;
  max-width: 100vw;
  background: white;
  display: flex; flex-direction: column;
  height: 100%;
  box-shadow: -4px 0 30px rgba(0,0,0,.2);
  animation: slideInRight .25s ease;
}
@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.quote-header {
  background: var(--primary);
  color: white;
  padding: 18px 22px;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.quote-header h2 { font-size: 16px; font-weight: 700; }
.btn-close-panel {
  background: none; border: none; color: rgba(255,255,255,.7);
  font-size: 22px; cursor: pointer; line-height: 1;
  transition: var(--transition);
}
.btn-close-panel:hover { color: white; }
.quote-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}
.quote-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-500);
}
.quote-empty i { font-size: 52px; margin-bottom: 14px; display: block; }
.quote-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  background: var(--gray-100);
  border-radius: var(--radius);
  margin-bottom: 10px;
  border: 1px solid var(--gray-200);
}
.quote-item-img {
  width: 56px; height: 56px;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--gray-200);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.quote-item-img img { width: 100%; height: 100%; object-fit: cover; }
.quote-item-img i { font-size: 22px; color: var(--gray-400); }
.quote-item-info { min-width: 0; }
.quote-item-name { font-size: 13px; font-weight: 600; color: var(--gray-900); margin-bottom: 2px; }
.quote-item-meta { font-size: 11px; color: var(--gray-500); margin-bottom: 8px; }
.qty-control {
  display: flex; align-items: center; gap: 6px;
}
.qty-btn {
  width: 26px; height: 26px;
  border: 1.5px solid var(--gray-300);
  border-radius: 4px;
  background: white;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.qty-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.qty-input {
  width: 44px;
  text-align: center;
  border: 1.5px solid var(--gray-300);
  border-radius: 4px;
  padding: 3px 4px;
  font-size: 13px;
  font-weight: 600;
  outline: none;
}
.btn-remove-item {
  background: none; border: none;
  color: var(--gray-500);
  cursor: pointer;
  font-size: 16px;
  transition: var(--transition);
  padding: 4px;
  flex-shrink: 0;
}
.btn-remove-item:hover { color: var(--danger); }
.quote-footer { padding: 16px; border-top: 1px solid var(--gray-200); flex-shrink: 0; }
.quote-form { margin-bottom: 14px; }
.form-group { margin-bottom: 10px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--gray-700); margin-bottom: 4px; }
.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--gray-900);
  outline: none;
  transition: var(--transition);
}
.form-control:focus { border-color: var(--primary); }
.form-control textarea { resize: vertical; min-height: 60px; }
.btn-wa {
  width: 100%;
  background: #25D366;
  color: white;
  border: none;
  padding: 13px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: var(--transition);
  margin-bottom: 8px;
}
.btn-wa:hover { background: #1ebe57; transform: translateY(-1px); }
.btn-clear {
  width: 100%;
  background: none;
  border: 1.5px solid var(--gray-300);
  color: var(--gray-700);
  padding: 9px;
  border-radius: var(--radius);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}
.btn-clear:hover { border-color: var(--danger); color: var(--danger); }

/* ============================================================
   SEARCH SUGGESTIONS
   ============================================================ */
.search-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
  z-index: 500;
  display: none;
  max-height: 320px;
  overflow-y: auto;
}
.suggestion-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
}
.suggestion-item:hover { background: var(--gray-100); }
.suggestion-item img { width: 36px; height: 36px; border-radius: 4px; object-fit: cover; }
.suggestion-item .no-img-icon { width: 36px; height: 36px; background: var(--gray-200); border-radius: 4px; display:flex;align-items:center;justify-content:center; color: var(--gray-500); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,.7);
  padding: 40px 0 20px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}
.footer-col h4 { color: white; font-size: 14px; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .8px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: rgba(255,255,255,.6); font-size: 13px; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 20px;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,.4);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: var(--radius); font-size: 14px; font-weight: 600; cursor: pointer; transition: var(--transition); border: none; text-decoration: none; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-light); color: white; }
.btn-secondary { background: var(--gray-200); color: var(--gray-700); }
.btn-secondary:hover { background: var(--gray-300); }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-icon { padding: 7px 10px; }

/* ============================================================
   ADMIN STYLES
   ============================================================ */
.admin-body { background: #f0f2f5; min-height: 100vh; }
.admin-topbar {
  background: var(--primary);
  color: white;
  padding: 0 24px;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow);
}
.admin-brand { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.admin-brand i { color: var(--accent); }
.admin-user { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.admin-user a { color: rgba(255,255,255,.7); font-size: 13px; }
.admin-user a:hover { color: white; }
.admin-layout { display: flex; min-height: calc(100vh - 60px); }
.admin-sidebar {
  width: 240px;
  background: var(--primary-dark);
  flex-shrink: 0;
  padding: 20px 0;
}
.admin-menu { list-style: none; }
.admin-menu-item a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 22px;
  color: rgba(255,255,255,.65);
  font-size: 14px;
  transition: var(--transition);
  border-left: 3px solid transparent;
}
.admin-menu-item a:hover { color: white; background: rgba(255,255,255,.07); }
.admin-menu-item a.active { color: white; background: rgba(255,255,255,.1); border-left-color: var(--accent); }
.admin-menu-item a i { width: 18px; text-align: center; }
.admin-menu-separator {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,.3);
  padding: 16px 22px 6px;
}
.admin-content { flex: 1; padding: 28px; overflow-x: hidden; }
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap; gap: 12px;
}
.page-header h1 { font-size: 22px; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: 10px; }
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}
.card-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: space-between;
}
.card-header h3 { font-size: 15px; font-weight: 700; color: var(--gray-900); }
.card-body { padding: 22px; }
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  display: flex; align-items: center; gap: 16px;
}
.stat-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.stat-icon.blue { background: rgba(26,58,92,.1); color: var(--primary); }
.stat-icon.orange { background: rgba(232,119,34,.1); color: var(--accent); }
.stat-icon.green { background: rgba(40,167,69,.1); color: var(--success); }
.stat-icon.purple { background: rgba(102,16,242,.1); color: #6610f2; }
.stat-info h3 { font-size: 26px; font-weight: 800; color: var(--gray-900); line-height: 1; margin-bottom: 4px; }
.stat-info p { font-size: 13px; color: var(--gray-500); }

/* TABLE */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
  background: var(--gray-100);
  padding: 11px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--gray-700);
  border-bottom: 2px solid var(--gray-200);
}
.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-900);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--gray-100); }
.data-table .img-thumb { width: 44px; height: 44px; border-radius: var(--radius); object-fit: cover; border: 1px solid var(--gray-200); }
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
}
.badge-success { background: rgba(40,167,69,.12); color: var(--success); }
.badge-danger { background: rgba(220,53,69,.12); color: var(--danger); }
.badge-primary { background: rgba(26,58,92,.1); color: var(--primary); }
.badge-warning { background: rgba(255,193,7,.15); color: #856404; }
.actions-cell { display: flex; gap: 6px; align-items: center; }

/* FORM ADMIN */
.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 5px; }
.form-label .req { color: var(--danger); }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--gray-900);
  outline: none;
  transition: var(--transition);
  background: white;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,58,92,.08); }
.form-textarea { resize: vertical; min-height: 90px; }
.form-check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.form-check input { width: 17px; height: 17px; cursor: pointer; accent-color: var(--primary); }
.img-preview-box {
  width: 120px; height: 120px;
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  background: var(--gray-100);
}
.img-preview-box:hover { border-color: var(--primary); }
.img-preview-box img { width: 100%; height: 100%; object-fit: cover; }
.img-preview-box i { font-size: 36px; color: var(--gray-400); }
.gallery-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.gallery-thumb {
  width: 90px; height: 90px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  border: 2px solid var(--gray-200);
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb .btn-del-img {
  position: absolute; top: 4px; right: 4px;
  background: rgba(220,53,69,.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 22px; height: 22px;
  font-size: 12px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* ALERT */
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 14px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.alert-success { background: rgba(40,167,69,.1); color: #1e7e34; border: 1px solid rgba(40,167,69,.25); }
.alert-danger { background: rgba(220,53,69,.1); color: #bd2130; border: 1px solid rgba(220,53,69,.25); }
.alert-warning { background: rgba(255,193,7,.12); color: #856404; border: 1px solid rgba(255,193,7,.3); }
.alert-info { background: rgba(26,58,92,.08); color: var(--primary); border: 1px solid rgba(26,58,92,.2); }

/* LOGIN */
.login-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.login-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.login-card .login-logo { font-size: 44px; color: var(--accent); margin-bottom: 8px; }
.login-card h1 { font-size: 22px; color: var(--primary); margin-bottom: 6px; }
.login-card p { color: var(--gray-500); font-size: 14px; margin-bottom: 28px; }

/* MOBILE */
@media (max-width: 768px) {
  .header-main .container { gap: 12px; }
  .header-search { order: 3; max-width: 100%; width: 100%; }
  .hero-banner h1 { font-size: 1.5rem; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 14px; }
  .admin-sidebar { display: none; }
  .quote-panel { width: 100vw; }
}
@media (max-width: 480px) {
  .main-layout { padding: 16px 0 32px; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
}

/* LOADER */
.spinner { display: inline-block; width: 20px; height: 20px; border: 3px solid rgba(255,255,255,.3); border-top-color: white; border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* BREADCRUMB */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gray-500); margin-bottom: 20px; list-style: none; }
.breadcrumb li + li::before { content: '/'; color: var(--gray-400); margin-right: 6px; }
.breadcrumb a { color: var(--primary-light); }
.breadcrumb span { color: var(--gray-700); }

/* TOAST */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--primary-dark);
  color: white;
  padding: 13px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px;
  animation: fadeInUp .3s ease;
  min-width: 260px;
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--primary-light); }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* PRODUCT DETAIL */
.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 768px) { .product-detail-grid { grid-template-columns: 1fr; } }
.product-gallery { position: sticky; top: 80px; }
.main-image { width: 100%; height: 380px; object-fit: cover; border-radius: var(--radius-lg); border: 1px solid var(--gray-200); background: var(--gray-100); }
.thumbnail-strip { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.thumb-img { width: 68px; height: 68px; border-radius: var(--radius); object-fit: cover; cursor: pointer; border: 2px solid var(--gray-200); transition: var(--transition); }
.thumb-img.active, .thumb-img:hover { border-color: var(--primary); }
