/* ════════════════════════════════════════════════════════
   MercaFácil · main.css
   ════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────── */
:root {
  --primary:       #1a237e;
  --primary-dark:  #0d1654;
  --primary-light: #283593;
  --accent:        #fdd835;
  --accent-dark:   #f9a825;
  --green:         #2e7d32;
  --green-bg:      #e8f5e9;
  --red:           #c62828;
  --red-bg:        #ffebee;
  --blue-light:    #e8eaf6;
  --blue-mid:      #e3f2fd;
  --gray-bg:       #f0f2f5;
  --gray-card:     #f5f6fa;
  --gray-border:   #e0e0e0;
  --gray-text:     #777;
  --gray-light:    #999;
  --white:         #ffffff;
  --text:          #1a1a2e;

  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  20px;
  --radius-pill: 40px;

  --shadow-sm:  0 2px 8px rgba(0,0,0,.06);
  --shadow-md:  0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.14);
  --shadow-pri: 0 4px 20px rgba(26,35,126,.25);

  --header-h: 110px; /* header + cat-nav */
  --bottom-h: 64px;
  --font: 'Nunito', 'Segoe UI', sans-serif;
  --transition: .2s ease;
}

/* ── Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font); background: var(--gray-bg); color: var(--text);
       padding-bottom: var(--bottom-h); min-height: 100vh; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: var(--font); cursor: pointer; border: none; }
input, select, textarea { font-family: var(--font); }
::-webkit-scrollbar { width: 6px; height: 4px; }
::-webkit-scrollbar-thumb { background: rgba(26,35,126,.25); border-radius: 4px; }

/* ── Toast ──────────────────────────────────────────── */
.toast {
  position: fixed; top: 20px; right: 20px; z-index: 9999;
  background: var(--green); color: var(--white);
  padding: 14px 22px; border-radius: var(--radius-md);
  font-weight: 700; font-size: 14px;
  box-shadow: var(--shadow-lg);
  transform: translateX(120%); opacity: 0;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), opacity .35s;
  max-width: calc(100vw - 40px);
  pointer-events: none;
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast.error { background: var(--red); }

/* ── Header ─────────────────────────────────────────── */
.header {
  background: var(--primary);
  box-shadow: var(--shadow-pri);
  position: sticky; top: 0; z-index: 200;
}
.header-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 10px 20px;
  display: flex; align-items: center; gap: 14px;
}
.logo { display: flex; align-items: center; gap: 8px; cursor: pointer;
        flex-shrink: 0; user-select: none; }
.logo-icon { font-size: 26px; }
.logo-text { color: var(--white); font-weight: 900; font-size: 20px;
             letter-spacing: -.5px; white-space: nowrap; }

/* Search */
.search-bar { flex: 1; display: flex; border-radius: var(--radius-md);
              overflow: hidden; max-width: 640px; min-width: 0; }
.search-input { flex: 1; padding: 11px 16px; border: none; font-size: 15px;
                outline: none; min-width: 0; background: var(--white); }
.search-btn { background: var(--accent); border: none; padding: 0 18px;
              font-size: 18px; flex-shrink: 0;
              transition: background var(--transition); }
.search-btn:hover { background: var(--accent-dark); }

/* Header actions */
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.btn-avatar { display: flex; align-items: center; gap: 8px;
              background: rgba(255,255,255,.12); border: none;
              border-radius: var(--radius-sm); padding: 6px 12px;
              color: var(--white); transition: background var(--transition); }
.btn-avatar:hover { background: rgba(255,255,255,.2); }
.avatar-circle { background: var(--accent); color: var(--primary);
                 border-radius: 50%; width: 30px; height: 30px;
                 display: flex; align-items: center; justify-content: center;
                 font-weight: 800; font-size: 11px; flex-shrink: 0; }
.user-name { color: var(--white); font-weight: 600; font-size: 14px;
             max-width: 100px; overflow: hidden; text-overflow: ellipsis;
             white-space: nowrap; }
.btn-cart-header { position: relative; background: rgba(255,255,255,.12);
                   border: none; color: var(--white); font-size: 20px;
                   padding: 7px 13px; border-radius: var(--radius-sm);
                   transition: background var(--transition); }
.btn-cart-header:hover { background: rgba(255,255,255,.2); }
.cart-badge { position: absolute; top: 2px; right: 2px;
              background: var(--red); color: var(--white);
              border-radius: var(--radius-pill); padding: 1px 5px;
              font-size: 10px; font-weight: 800; min-width: 18px;
              text-align: center; }
.btn-logout { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28);
              color: var(--white); padding: 7px 14px; border-radius: var(--radius-sm);
              font-size: 13px; font-weight: 600;
              transition: background var(--transition); }
.btn-logout:hover { background: rgba(255,255,255,.22); }
.btn-login  { background: transparent; border: 1px solid rgba(255,255,255,.45);
              color: var(--white); padding: 7px 16px; border-radius: var(--radius-sm);
              font-size: 14px; transition: background var(--transition); }
.btn-login:hover { background: rgba(255,255,255,.12); }
.btn-register { background: var(--accent); border: none; color: var(--primary);
                padding: 7px 16px; border-radius: var(--radius-sm);
                font-size: 14px; font-weight: 800;
                transition: background var(--transition); }
.btn-register:hover { background: var(--accent-dark); }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; background: none;
             border: none; padding: 6px; flex-shrink: 0; }
.hamburger span { display: block; width: 22px; height: 2px;
                  background: var(--white); border-radius: 2px;
                  transition: transform .3s, opacity .3s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu { display: none; background: var(--primary-dark);
               padding: 16px 20px; flex-direction: column; gap: 8px; }
.mobile-menu.open { display: flex; }
.mobile-menu a, .mobile-menu button {
  color: var(--white); background: none; border: none;
  padding: 12px 0; font-size: 16px; font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,.1);
  text-align: left; width: 100%;
}

/* Category nav */
.cat-nav { background: var(--primary-light); overflow: hidden; }
.cat-nav-inner { max-width: 1280px; margin: 0 auto;
                 display: flex; gap: 0; overflow-x: auto; padding: 6px 16px;
                 -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.cat-nav-inner::-webkit-scrollbar { display: none; }
.cat-chip { color: rgba(255,255,255,.8); font-size: 13px; padding: 5px 14px;
            cursor: pointer; white-space: nowrap; border-radius: var(--radius-pill);
            border: none; background: none; font-family: var(--font);
            transition: all var(--transition); font-weight: 600; }
.cat-chip:hover, .cat-chip.active { background: rgba(255,255,255,.18); color: var(--white); }

/* ── Main / Layout ──────────────────────────────────── */
.app-main { max-width: 1280px; margin: 0 auto;
            padding: 20px 20px 32px; min-height: 60vh; }

/* ── Hero ───────────────────────────────────────────── */
.hero { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 55%, #0d47a1 100%);
        border-radius: var(--radius-xl); padding: 48px 44px;
        display: flex; justify-content: space-between; align-items: center;
        margin-bottom: 24px; overflow: hidden; position: relative; }
.hero-content { max-width: 520px; }
.hero-title { color: var(--white); font-size: 38px; font-weight: 900;
              line-height: 1.2; margin-bottom: 12px; }
.hero-sub { color: #90caf9; font-size: 16px; margin-bottom: 24px; line-height: 1.5; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-emoji { font-size: 100px; opacity: .85; flex-shrink: 0; }

/* ── Buttons ────────────────────────────────────────── */
.btn-primary { background: var(--accent); color: var(--primary); border: none;
               padding: 13px 26px; border-radius: var(--radius-md);
               font-weight: 800; font-size: 15px; cursor: pointer;
               transition: background var(--transition), transform var(--transition); }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-secondary { background: rgba(255,255,255,.15); color: var(--white);
                 border: 2px solid rgba(255,255,255,.35);
                 padding: 11px 26px; border-radius: var(--radius-md);
                 font-weight: 700; font-size: 15px; cursor: pointer;
                 transition: background var(--transition); }
.btn-secondary:hover { background: rgba(255,255,255,.25); }
.btn-full { width: 100%; }
.btn-danger { background: var(--red-bg); color: var(--red); border: none;
              padding: 9px 16px; border-radius: var(--radius-sm);
              font-weight: 700; cursor: pointer; }

/* ── Stats row ──────────────────────────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr);
             gap: 14px; margin-bottom: 24px; }
.stat-card { background: var(--white); border-radius: var(--radius-lg);
             padding: 18px 14px; text-align: center; box-shadow: var(--shadow-sm);
             display: flex; flex-direction: column; gap: 4px; }
.stat-icon  { font-size: 26px; }
.stat-val   { font-weight: 900; font-size: 20px; color: var(--primary); }
.stat-label { color: var(--gray-text); font-size: 12px; }

/* ── Section ────────────────────────────────────────── */
.section-header { display: flex; justify-content: space-between;
                  align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.section-title { font-size: 22px; font-weight: 800; color: var(--primary); }
.section-link  { color: var(--primary); font-weight: 700; font-size: 14px;
                 background: none; border: none; cursor: pointer; }

/* ── Product Grid ───────────────────────────────────── */
.product-grid { display: grid;
                grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
                gap: 18px; }

/* ── Product Card ───────────────────────────────────── */
.product-card { background: var(--white); border-radius: var(--radius-lg);
                overflow: hidden; box-shadow: var(--shadow-sm);
                cursor: pointer; display: flex; flex-direction: column;
                transition: transform var(--transition), box-shadow var(--transition);
                position: relative; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-img-wrap { position: relative; }
.card-img { background: linear-gradient(135deg, var(--blue-light), #f3f4fd);
            height: 155px; display: flex; align-items: center;
            justify-content: center; font-size: 68px; }
.card-badge-free { position: absolute; top: 8px; left: 8px;
                   background: var(--green-bg); color: var(--green);
                   font-size: 10px; font-weight: 800;
                   padding: 3px 8px; border-radius: var(--radius-pill); }
.card-body { padding: 13px 14px 14px; display: flex; flex-direction: column;
             gap: 5px; flex: 1; }
.card-category { font-size: 11px; color: var(--gray-light);
                 text-transform: uppercase; letter-spacing: .5px; }
.card-title { font-size: 13px; font-weight: 700; line-height: 1.35;
              color: var(--text); display: -webkit-box;
              -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-rating { color: #ffa000; font-size: 12px; }
.card-price  { font-size: 21px; font-weight: 900; color: var(--primary); }
.btn-add-cart { margin-top: auto; width: 100%; background: var(--primary);
                color: var(--white); border: none; padding: 9px;
                border-radius: var(--radius-sm); font-weight: 700; font-size: 13px;
                transition: background var(--transition); }
.btn-add-cart:hover { background: var(--primary-dark); }

/* ── Filters bar ────────────────────────────────────── */
.filters-bar { background: var(--white); border-radius: var(--radius-lg);
               padding: 14px 16px; margin-bottom: 18px; box-shadow: var(--shadow-sm);
               display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.filter-select { border: 2px solid var(--gray-border); border-radius: var(--radius-sm);
                 padding: 8px 12px; font-size: 13px; background: var(--white);
                 color: var(--text); cursor: pointer; outline: none; }
.filter-select:focus { border-color: var(--primary); }
.filter-label { font-size: 13px; font-weight: 700; color: var(--gray-text); }

/* ── Empty state ────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--gray-text);
               display: flex; flex-direction: column; align-items: center; gap: 16px; }
.empty-icon  { font-size: 60px; }
.empty-title { font-size: 18px; font-weight: 700; }

/* ── Product detail ─────────────────────────────────── */
.btn-back { background: none; border: none; color: var(--primary);
            font-weight: 700; font-size: 15px; cursor: pointer; padding: 0;
            margin-bottom: 20px; display: flex; align-items: center; gap: 6px; }
.product-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 36px;
                  background: var(--white); border-radius: var(--radius-xl);
                  padding: 36px; box-shadow: var(--shadow-md); }
.product-img-box { background: linear-gradient(135deg, var(--blue-light), #f3f4fd);
                   border-radius: var(--radius-lg); display: flex;
                   align-items: center; justify-content: center;
                   min-height: 280px; font-size: 120px; }
.condition-tag  { display: inline-block; background: var(--blue-mid); color: #1565c0;
                  padding: 4px 13px; border-radius: var(--radius-pill);
                  font-size: 12px; font-weight: 700; }
.product-title  { font-size: 24px; font-weight: 800; margin: 10px 0 8px;
                  line-height: 1.3; }
.product-rating { color: #ffa000; font-size: 14px; margin-bottom: 12px; }
.product-price  { font-size: 36px; font-weight: 900; color: var(--primary);
                  margin-bottom: 10px; }
.ship-free { color: var(--green); font-weight: 700; margin-bottom: 6px; }
.ship-cost { color: var(--gray-text); font-size: 14px; margin-bottom: 6px; }
.stock-info { color: var(--gray-text); font-size: 14px; margin-bottom: 16px; }
.product-desc { color: #555; line-height: 1.75; margin-bottom: 24px; font-size: 15px; }
.buy-box { display: flex; flex-direction: column; gap: 12px; }
.qty-row { display: flex; align-items: center; gap: 12px; }
.qty-btn { background: var(--blue-light); border: none; width: 36px; height: 36px;
           border-radius: var(--radius-sm); font-size: 20px; font-weight: 700;
           color: var(--primary); cursor: pointer;
           transition: background var(--transition); }
.qty-btn:hover { background: #c5cae9; }
.qty-val { font-weight: 800; font-size: 18px; min-width: 28px; text-align: center; }
.btn-buy-now { background: var(--accent); color: var(--primary); border: none;
               padding: 14px; border-radius: var(--radius-md);
               font-weight: 800; font-size: 16px; cursor: pointer;
               transition: background var(--transition); }
.btn-buy-now:hover { background: var(--accent-dark); }
.btn-add-to-cart-lg { background: var(--primary); color: var(--white); border: none;
                      padding: 14px; border-radius: var(--radius-md);
                      font-weight: 700; font-size: 16px; cursor: pointer;
                      transition: background var(--transition); }
.btn-add-to-cart-lg:hover { background: var(--primary-dark); }

/* ── Cart ───────────────────────────────────────────── */
.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; }
.cart-item { background: var(--white); border-radius: var(--radius-lg);
             padding: 18px; display: flex; align-items: center;
             gap: 14px; box-shadow: var(--shadow-sm); margin-bottom: 12px; }
.cart-item-img   { font-size: 44px; flex-shrink: 0; }
.cart-item-info  { flex: 1; min-width: 0; }
.cart-item-title { font-weight: 700; font-size: 15px; margin-bottom: 3px;
                   white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-price { color: var(--gray-text); font-size: 13px; }
.cart-item-total { font-weight: 900; color: var(--primary); font-size: 17px;
                   flex-shrink: 0; }
.btn-remove { background: var(--red-bg); color: var(--red); border: none;
              width: 32px; height: 32px; border-radius: var(--radius-sm);
              font-weight: 700; font-size: 14px; flex-shrink: 0;
              transition: background var(--transition); }
.btn-remove:hover { background: #ffcdd2; }
.cart-summary { background: var(--white); border-radius: var(--radius-lg);
                padding: 22px; box-shadow: var(--shadow-md);
                height: fit-content; position: sticky; top: 120px; }
.summary-title { font-size: 19px; font-weight: 800; color: var(--primary);
                 margin-bottom: 18px; }
.summary-row { display: flex; justify-content: space-between;
               margin-bottom: 12px; font-size: 15px; }
.summary-divider { border-top: 2px dashed var(--gray-border); margin: 16px 0; }
.summary-total { font-weight: 900; font-size: 20px; }
.btn-checkout { width: 100%; background: linear-gradient(135deg, var(--primary), var(--primary-light));
                color: var(--white); border: none; padding: 15px;
                border-radius: var(--radius-md); font-weight: 800; font-size: 17px;
                cursor: pointer; margin-top: 18px;
                transition: opacity var(--transition); }
.btn-checkout:hover { opacity: .9; }
.secure-note { text-align: center; color: var(--gray-text); font-size: 12px;
               margin-top: 10px; }

/* ── Auth ───────────────────────────────────────────── */
.auth-card { max-width: 430px; margin: 24px auto; background: var(--white);
             border-radius: 24px; padding: 38px; box-shadow: var(--shadow-lg); }
.auth-logo  { text-align: center; font-size: 22px; font-weight: 900;
              color: var(--primary); margin-bottom: 22px; }
.auth-tabs  { display: flex; background: var(--gray-card); border-radius: var(--radius-md);
              padding: 4px; margin-bottom: 22px; }
.auth-tab   { flex: 1; background: none; border: none; padding: 10px;
              border-radius: var(--radius-sm); font-weight: 600; color: var(--gray-text);
              font-size: 14px; transition: all var(--transition); }
.auth-tab.active { background: var(--white); color: var(--primary); font-weight: 800;
                   box-shadow: var(--shadow-sm); }
.input-field { width: 100%; padding: 12px 15px; border: 2px solid var(--blue-light);
               border-radius: var(--radius-md); font-size: 15px; outline: none;
               margin-bottom: 13px; transition: border-color var(--transition);
               background: var(--white); color: var(--text); }
.input-field:focus { border-color: var(--primary); }
.role-select { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 13px; }
.role-opt { border: 2px solid var(--blue-light); border-radius: var(--radius-md);
            padding: 12px; text-align: center; cursor: pointer;
            font-weight: 600; font-size: 14px; color: #555;
            transition: all var(--transition); background: none; }
.role-opt.active { border-color: var(--primary); background: var(--blue-light);
                   color: var(--primary); font-weight: 800; }
.btn-auth   { width: 100%; background: linear-gradient(135deg, var(--primary), var(--primary-light));
              color: var(--white); border: none; padding: 14px;
              border-radius: var(--radius-md); font-weight: 800; font-size: 16px;
              cursor: pointer; transition: opacity var(--transition); }
.btn-auth:hover { opacity: .9; }
.error-msg  { background: var(--red-bg); color: var(--red);
              padding: 10px 14px; border-radius: var(--radius-sm);
              margin-bottom: 14px; font-size: 14px; font-weight: 600; }
.demo-box   { background: var(--gray-card); border-radius: var(--radius-sm);
              padding: 12px 15px; margin-top: 18px; font-size: 13px;
              color: #555; line-height: 1.75; }
.demo-box strong { color: var(--primary); }

/* ── Dashboard ──────────────────────────────────────── */
.dash-header { display: flex; align-items: center; gap: 18px; margin-bottom: 24px;
               flex-wrap: wrap; }
.dash-avatar { background: var(--primary); color: var(--white); width: 60px; height: 60px;
               border-radius: 18px; display: flex; align-items: center;
               justify-content: center; font-size: 20px; font-weight: 900;
               flex-shrink: 0; }
.dash-name   { font-size: 24px; font-weight: 900; margin-bottom: 4px; }
.role-badge  { background: var(--blue-light); color: var(--primary);
               padding: 4px 12px; border-radius: var(--radius-pill);
               font-size: 12px; font-weight: 800; }
.dash-tabs   { display: flex; gap: 4px; background: var(--gray-card);
               border-radius: var(--radius-md); padding: 4px;
               margin-bottom: 22px; width: fit-content; flex-wrap: wrap; }
.dash-tab    { background: none; border: none; padding: 10px 18px;
               border-radius: var(--radius-sm); font-weight: 600;
               color: var(--gray-text); font-size: 14px; cursor: pointer;
               transition: all var(--transition); }
.dash-tab.active { background: var(--white); color: var(--primary); font-weight: 800;
                   box-shadow: var(--shadow-sm); }

/* Form card */
.form-card { background: var(--white); border-radius: var(--radius-lg);
             padding: 24px; margin-bottom: 20px; box-shadow: var(--shadow-md); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-title { font-size: 17px; font-weight: 800; color: var(--primary);
              margin-bottom: 16px; }
.emoji-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.emoji-opt  { width: 40px; height: 40px; display: flex; align-items: center;
              justify-content: center; border-radius: var(--radius-sm);
              cursor: pointer; font-size: 20px; background: var(--gray-card);
              border: 2px solid transparent; transition: all var(--transition); }
.emoji-opt.active { background: var(--blue-light); border-color: var(--primary); }
.btn-publish { background: var(--primary); color: var(--white); border: none;
               padding: 11px 22px; border-radius: var(--radius-md);
               font-weight: 700; font-size: 14px; cursor: pointer;
               transition: background var(--transition); }
.btn-publish:hover { background: var(--primary-dark); }
.btn-cancel  { background: var(--gray-card); color: #555; border: none;
               padding: 11px 22px; border-radius: var(--radius-md);
               font-weight: 700; font-size: 14px; cursor: pointer; }

/* Product row (seller list) */
.product-row { background: var(--white); border-radius: var(--radius-md);
               padding: 14px 18px; display: flex; align-items: center;
               gap: 14px; box-shadow: var(--shadow-sm); margin-bottom: 10px; }
.product-row-img   { font-size: 34px; flex-shrink: 0; }
.product-row-info  { flex: 1; min-width: 0; }
.product-row-title { font-weight: 700; font-size: 14px; margin-bottom: 2px;
                     white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-row-meta  { color: var(--gray-text); font-size: 12px; }
.product-row-price { font-weight: 900; color: var(--primary); flex-shrink: 0; }
.btn-edit   { background: var(--blue-light); border: none; width: 34px; height: 34px;
              border-radius: var(--radius-sm); cursor: pointer; font-size: 15px; }
.btn-delete { background: var(--red-bg); border: none; width: 34px; height: 34px;
              border-radius: var(--radius-sm); cursor: pointer; font-size: 15px; }

/* Orders */
.order-card { background: var(--white); border-radius: var(--radius-lg);
              padding: 20px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.order-header { display: flex; justify-content: space-between; align-items: center;
                margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.order-id   { color: var(--gray-text); font-size: 13px; }
.status-badge { padding: 4px 12px; border-radius: var(--radius-pill);
                font-size: 12px; font-weight: 800; }
.status-Confirmado { background: var(--green-bg); color: var(--green); }
.status-Enviado    { background: #e3f2fd; color: #1565c0; }
.status-Entregado  { background: var(--blue-light); color: var(--primary); }
.status-Pendiente  { background: #fff8e1; color: #f57f17; }
.status-Cancelado  { background: var(--red-bg); color: var(--red); }
.order-item { display: flex; gap: 12px; align-items: center;
              padding: 8px 0; border-bottom: 1px solid var(--gray-border); }
.order-item:last-child { border-bottom: none; }
.order-item-img   { font-size: 26px; flex-shrink: 0; }
.order-item-title { flex: 1; font-size: 14px; font-weight: 600; }
.order-item-qty   { color: var(--gray-text); font-size: 13px; }
.order-item-price { font-weight: 700; color: var(--primary); }
.order-total { text-align: right; margin-top: 10px; font-weight: 900;
               color: var(--primary); font-size: 17px; }

/* Profile card */
.profile-card   { background: var(--white); border-radius: var(--radius-xl);
                  padding: 28px; box-shadow: var(--shadow-md); }
.profile-avatar { background: var(--primary); color: var(--white); width: 68px; height: 68px;
                  border-radius: 20px; display: flex; align-items: center;
                  justify-content: center; font-size: 24px; font-weight: 900; }
.profile-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.profile-field  { background: var(--gray-card); border-radius: var(--radius-md);
                  padding: 14px; }
.profile-field label { display: block; font-size: 11px; color: var(--gray-text);
                       font-weight: 700; text-transform: uppercase; margin-bottom: 4px; }
.profile-field span  { font-weight: 700; font-size: 15px; }

/* ── Loader ─────────────────────────────────────────── */
.loader { display: flex; justify-content: center; padding: 48px;
          font-size: 32px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Page title ─────────────────────────────────────── */
.page-title { font-size: 26px; font-weight: 900; color: var(--primary);
              margin-bottom: 22px; }

/* ── Mobile bottom bar ──────────────────────────────── */
.bottom-bar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 150;
              background: var(--white); border-top: 1px solid var(--gray-border);
              display: flex; box-shadow: 0 -4px 16px rgba(0,0,0,.08); }
.bottom-btn { flex: 1; display: flex; flex-direction: column; align-items: center;
              justify-content: center; gap: 3px; padding: 8px 4px;
              background: none; border: none; color: var(--gray-text);
              font-size: 11px; font-weight: 700; cursor: pointer;
              transition: color var(--transition); min-height: 58px; }
.bottom-btn.active { color: var(--primary); }
.bb-icon  { font-size: 20px; position: relative; line-height: 1; }
.bb-label { font-size: 10px; }
.cart-badge-mobile { position: absolute; top: -4px; right: -8px;
                     background: var(--red); color: var(--white);
                     border-radius: var(--radius-pill); padding: 1px 5px;
                     font-size: 9px; font-weight: 900; min-width: 16px;
                     text-align: center; }

/* ── Spinner overlay ────────────────────────────────── */
.spinner-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.35);
                   z-index: 500; display: flex; align-items: center;
                   justify-content: center; }
.spinner { width: 44px; height: 44px; border: 5px solid rgba(255,255,255,.3);
           border-top-color: var(--white); border-radius: 50%;
           animation: spin .8s linear infinite; }

/* ── Utilities ──────────────────────────────────────── */
.hidden   { display: none !important; }
.mt-8     { margin-top: 8px; }
.mt-12    { margin-top: 12px; }
.mt-16    { margin-top: 16px; }
.mb-16    { margin-bottom: 16px; }
.flex     { display: flex; }
.gap-8    { gap: 8px; }
.gap-12   { gap: 12px; }
.flex-wrap { flex-wrap: wrap; }
.text-center { text-align: center; }
.fw-700   { font-weight: 700; }
.color-primary { color: var(--primary); }
.textarea-field { width: 100%; padding: 12px 15px; border: 2px solid var(--blue-light);
                  border-radius: var(--radius-md); font-size: 14px; outline: none;
                  min-height: 85px; resize: vertical; transition: border-color var(--transition);
                  font-family: var(--font); }
.textarea-field:focus { border-color: var(--primary); }

/* ── Photo Uploader ─────────────────────────────────── */
.photo-uploader { margin-bottom: 16px; }
.photo-drop-zone {
  border: 2px dashed var(--gray-border); border-radius: var(--radius-lg);
  padding: 24px 16px; text-align: center; cursor: pointer;
  transition: all var(--transition); background: var(--gray-card);
  position: relative;
}
.photo-drop-zone:hover, .photo-drop-zone.drag-over {
  border-color: var(--primary); background: var(--blue-light);
}
.photo-drop-zone input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.drop-icon  { font-size: 36px; margin-bottom: 8px; }
.drop-text  { font-weight: 700; color: var(--primary); font-size: 15px; }
.drop-sub   { color: var(--gray-text); font-size: 12px; margin-top: 4px; }

.photo-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 12px;
}
.photo-thumb {
  position: relative; border-radius: var(--radius-sm); overflow: hidden;
  aspect-ratio: 1; border: 2px solid var(--gray-border);
  background: var(--gray-card);
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb.is-principal { border-color: var(--primary); }
.photo-thumb-actions {
  position: absolute; inset: 0; background: rgba(0,0,0,.5);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; opacity: 0; transition: opacity var(--transition);
}
.photo-thumb:hover .photo-thumb-actions { opacity: 1; }
.photo-action-btn {
  background: rgba(255,255,255,.9); border: none; border-radius: var(--radius-sm);
  padding: 4px 8px; font-size: 11px; font-weight: 700; cursor: pointer; color: var(--text);
  width: 90%; text-align: center;
}
.photo-action-btn.danger { background: rgba(198,40,40,.85); color: var(--white); }
.photo-principal-badge {
  position: absolute; top: 4px; left: 4px; background: var(--primary);
  color: var(--white); font-size: 9px; font-weight: 800; padding: 2px 6px;
  border-radius: var(--radius-pill);
}
.photo-adding { opacity: .5; pointer-events: none; }
.photo-count  { font-size: 12px; color: var(--gray-text); margin-top: 6px; }

/* ── Product detail gallery ─────────────────────────── */
.gallery-wrap { background: linear-gradient(135deg, var(--blue-light), #f3f4fd);
                border-radius: var(--radius-lg); overflow: hidden; }
.gallery-main { min-height: 280px; display: flex; align-items: center;
                justify-content: center; cursor: zoom-in; }
.gallery-main img { width: 100%; height: 300px; object-fit: contain; }
.gallery-main .gallery-emoji { font-size: 110px; }
.gallery-thumbs { display: flex; gap: 6px; padding: 8px; background: rgba(0,0,0,.04);
                  overflow-x: auto; -webkit-overflow-scrolling: touch; }
.gallery-thumb { width: 56px; height: 56px; border-radius: var(--radius-sm);
                 border: 2px solid transparent; overflow: hidden; cursor: pointer;
                 flex-shrink: 0; transition: border-color var(--transition); background: var(--white); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.active { border-color: var(--primary); }

/* ── Card photo ─────────────────────────────────────── */
.card-img img { width: 100%; height: 100%; object-fit: cover; }

/* ── WhatsApp button ────────────────────────────────── */
.btn-whatsapp {
  display: inline-flex; align-items: center; gap: 8px;
  background: #25D366; color: var(--white); border: none;
  padding: 13px 22px; border-radius: var(--radius-md);
  font-weight: 800; font-size: 15px; cursor: pointer; text-decoration: none;
  transition: background var(--transition);
}
.btn-whatsapp:hover { background: #1ebe5d; }
.btn-whatsapp-sm {
  display: inline-flex; align-items: center; gap: 6px;
  background: #25D366; color: var(--white); border: none;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 13px; cursor: pointer; text-decoration: none;
}
.whatsapp-section {
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: var(--radius-lg);
  padding: 20px; margin-top: 16px;
}
.whatsapp-section h3 { color: #15803d; font-size: 16px; margin-bottom: 12px; }
.whatsapp-item { display: flex; justify-content: space-between; align-items: center;
                 padding: 10px 0; border-bottom: 1px solid #d1fae5; flex-wrap: wrap; gap: 8px; }
.whatsapp-item:last-child { border-bottom: none; }

/* ── Phone input ────────────────────────────────────── */
.phone-wrap { position: relative; }
.phone-flag { position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
              font-size: 16px; pointer-events: none; }
.phone-wrap .input-field { padding-left: 38px; }

/* ── Checkout success ───────────────────────────────── */
.checkout-success {
  background: var(--white); border-radius: var(--radius-xl); padding: 40px;
  text-align: center; box-shadow: var(--shadow-md);
}
.success-icon  { font-size: 72px; margin-bottom: 16px; }
.success-title { font-size: 26px; font-weight: 900; color: var(--primary); margin-bottom: 8px; }
.success-sub   { color: var(--gray-text); font-size: 15px; margin-bottom: 28px; }

@media (max-width: 640px) {
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-main img { height: 220px; }
  .gallery-thumb { width: 46px; height: 46px; }
}

/* ── Share + Visits ─────────────────────────────────── */
.share-visits-row {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-top: 20px;
  padding-top: 16px; border-top: 1px solid var(--gray-border);
}
.visits-badge {
  background: var(--blue-light); color: var(--primary);
  padding: 6px 14px; border-radius: var(--radius-pill);
  font-weight: 700; font-size: 14px;
}
.share-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--radius-md);
  font-weight: 700; font-size: 13px; text-decoration: none;
  transition: opacity var(--transition); border: none; cursor: pointer;
}
.share-btn:hover { opacity: .85; }
.share-wa { background: #25D366; color: #fff; }
.share-fb { background: #1877F2; color: #fff; }

/* ── Banners ────────────────────────────────────────── */
.banner-single, .banner-carousel {
  border-radius: var(--radius-xl); overflow: hidden; position: relative;
  min-height: 160px; display: flex; align-items: center;
  margin-bottom: 24px; padding: 0;
}
.banner-bg-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .25;
}
.banner-content {
  position: relative; z-index: 1; padding: 36px 44px; max-width: 600px;
}
.banner-title { font-size: 28px; font-weight: 900; margin: 0 0 8px; line-height: 1.2; }
.banner-sub   { font-size: 15px; opacity: .9; margin: 0 0 16px; }
.banner-btn   {
  display: inline-block; padding: 10px 24px; border-radius: var(--radius-md);
  font-weight: 800; font-size: 14px; text-decoration: none; cursor: pointer;
  border: none; transition: opacity .2s;
}
.banner-btn:hover { opacity: .88; }
.banner-dots  {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px;
}
.banner-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.5); cursor: pointer; transition: background .2s;
}
.banner-dot.active { background: #fff; }
.banner-prev, .banner-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,.35); color: #fff; border: none;
  width: 36px; height: 36px; border-radius: 50%;
  font-size: 20px; cursor: pointer; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.banner-prev:hover, .banner-next:hover { background: rgba(0,0,0,.55); }
.banner-prev { left: 12px; }
.banner-next { right: 12px; }

/* ── Admin panel tweaks ──────────────────────────────── */
.admin-badge {
  background: #fdd835; color: #1a237e; padding: 3px 10px;
  border-radius: var(--radius-pill); font-size: 11px; font-weight: 800;
}

@media (max-width: 640px) {
  .banner-content { padding: 24px 20px; }
  .banner-title   { font-size: 20px; }
  .banner-sub     { font-size: 13px; }
  .share-visits-row { flex-direction: column; align-items: flex-start; }
}

/* ── Seller card in product detail ──────────────────── */
.seller-card {
  background: var(--gray-card); border-radius: var(--radius-lg);
  padding: 18px; margin-top: 20px; margin-bottom: 4px;
  border: 1px solid var(--gray-border);
}
.seller-card-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
}
.seller-avatar {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 16px; flex-shrink: 0;
}
.seller-card-info { flex: 1; min-width: 0; }
.seller-card-name { font-weight: 800; font-size: 15px; }
.seller-card-meta { font-size: 12px; color: var(--green); font-weight: 600; margin-top: 2px; }
.seller-card-stats {
  display: flex; gap: 0; border-top: 1px solid var(--gray-border);
  border-bottom: 1px solid var(--gray-border); padding: 10px 0; margin-bottom: 12px;
}
.seller-stat {
  flex: 1; text-align: center; display: flex; flex-direction: column; gap: 2px;
  border-right: 1px solid var(--gray-border);
}
.seller-stat:last-child { border-right: none; }
.seller-stat-val   { font-weight: 800; font-size: 14px; color: var(--primary); }
.seller-stat-label { font-size: 11px; color: var(--gray-text); }

/* Seller reviews */
.seller-review {
  padding: 8px 0; border-bottom: 1px solid var(--gray-border);
}
.seller-review:last-child { border-bottom: none; }
.seller-review-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.seller-review-avatar { font-size: 16px; }
.seller-review-name   { font-weight: 700; font-size: 13px; flex: 1; }
.seller-review-stars  { color: #ffa000; font-size: 12px; }
.seller-review-text   { font-size: 13px; color: #555; line-height: 1.5; margin: 0; }

/* ── Rating notification banner ─────────────────────── */
@keyframes slideUp {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);    opacity: 1; }
}

/* ── Star picker in modal ───────────────────────────── */
.star-pick:hover { transform: scale(1.2) !important; }

@media (max-width: 640px) {
  .seller-card-stats { flex-wrap: wrap; }
  .seller-stat { min-width: 33%; }
}

/* ── Profile photo upload ───────────────────────────── */
.avatar-circle img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.btn-avatar img {
  border-radius: 8px; border: 2px solid rgba(255,255,255,.3);
}

/* ── Seller store page ──────────────────────────────── */
.btn-ver-tienda { transition: background var(--transition), transform var(--transition); }
.btn-ver-tienda:hover { background: var(--primary) !important; color: #fff !important; transform: translateY(-1px); }

@media (max-width: 480px) {
  .seller-card-header { flex-wrap: wrap; }
  .btn-ver-tienda { width: 100%; text-align: center; margin-top: 8px; }
}
