/* ROOT */

:root{
  --fm-green:#00A73A;
  --fm-green-dark:#008a2f;
  --fm-text:#111111;
  --fm-muted:#6b7280;
  --fm-bg:#f6f6f4;
  --fm-soft:#f5f5f5;
  --fm-card:#ffffff;
  --fm-border:#e9e9e7;
  --container:1440px;
}

*{ box-sizing:border-box; }

body{
  margin:0;
  background:var(--fm-bg);
  color:var(--fm-text);
  font-family:'Inter', sans-serif;
  -webkit-font-smoothing:antialiased;
}

/* CONTAINER */

.container-premium{
  max-width:var(--container);
  margin:auto;
  padding:0 28px;
}

/* NAVBAR */

.navbar-james,
.navbar-fm{
  background:#fff;
  border-bottom:1px solid var(--fm-border);
  padding:12px 0;
}

.navbar-james{ min-height:82px; }
.navbar-fm{ padding:16px 0; }

.nav-inner{
  min-height:58px;
  display:flex;
  align-items:center;
  gap:36px;
}

.logo{
  font-size:2.2rem;
  font-weight:700;
  text-decoration:none;
  color:#111;
  letter-spacing:-1px;
}

.logo span{ color:var(--fm-green); }

.nav-hamburger{
  display:none;
  margin-left:auto;
  background:none;
  border:none;
  font-size:1.6rem;
  line-height:1;
  cursor:pointer;
  padding:4px 6px;
  color:#111;
}

.nav-collapsible{
  display:flex;
  flex:1;
  align-items:center;
  gap:36px;
}

.search-wrapper{ width:480px; }

.search-box{
  height:46px;
  border:1px solid var(--fm-border);
  border-radius:999px;
  overflow:hidden;
  display:flex;
  align-items:center;
  background:#fff;
}

.search-box input{
  flex:1;
  border:none;
  outline:none;
  padding:0 20px;
  font-size:.95rem;
}

.search-box button{
  width:56px;
  height:100%;
  border:none;
  background:none;
  color:#111;
  font-size:1rem;
}

.nav-right{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:24px;
}

.nav-link-clean{
  text-decoration:none;
  color:#111;
  font-size:.92rem;
  font-weight:500;
}

.nav-link-clean:hover{ color:var(--fm-green); }

.btn-sell{
  height:44px;
  border:none;
  background:var(--fm-green);
  color:#fff;
  border-radius:999px;
  padding:0 22px;
  font-weight:600;
  transition:.2s;
}

.btn-sell:hover{ background:var(--fm-green-dark); }

/* NAV STATE LABEL (solo elementos.html) */

.nav-state-label{
  background:#f0f0ee;
  color:#888;
  font-size:.75rem;
  font-weight:600;
  letter-spacing:.8px;
  text-transform:uppercase;
  padding:6px 28px;
}

.nav-state-label--logged{
  background:#f0fdf4;
  color:var(--fm-green);
}

/* NAV USER (logueado) */

.nav-user-btn{
  display:flex;
  align-items:center;
  gap:9px;
  background:none;
  border:1.5px solid var(--fm-border);
  border-radius:999px;
  padding:5px 14px 5px 6px;
  cursor:pointer;
  transition:.2s;
  color:#111;
  font-size:.9rem;
  font-weight:500;
}

.nav-user-btn:hover{ border-color:#aaa; background:#fafafa; }

.nav-avatar{
  width:30px;
  height:30px;
  border-radius:50%;
  background:var(--fm-green);
  color:#fff;
  font-size:.75rem;
  font-weight:700;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
}

.nav-username{ white-space:nowrap; }

/* HERO */

.hero{ padding:30px 0 20px; }

.hero-eyebrow{
  margin:0;
  font-size:.78rem;
  font-weight:600;
  letter-spacing:2px;
  text-transform:uppercase;
  color:var(--fm-green);
  line-height:1.2;
}

/* SECTION */

.section{ padding-bottom:60px; }

.breadcrumb-bar{ padding:16px 0 20px; background:var(--fm-bg); }

.section-header{
  display:flex;
  justify-content:space-between;
  align-items:end;
  margin-bottom:28px;
}

.section-title{
  font-size:1.8rem;
  font-weight:500;
  letter-spacing:-1px;
}

.section-link{ text-decoration:none; color:#111; font-size:.92rem; }

/* GALERÍA (usado en la ficha de producto) */

.gallery-arrow{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:42px;
  height:42px;
  border-radius:50%;
  background:rgba(255,255,255,.95);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}

.gallery-arrow.left{ left:18px; }
.gallery-arrow.right{ right:18px; }

/* MACHINE GRID */

.machine-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:22px;
}

.machine-card{ transition:.25s; text-decoration:none; color:inherit; display:block; }
.machine-card:hover{ transform:translateY(-3px); }

.machine-image{
  aspect-ratio:1/1;
  overflow:hidden;
  margin-bottom:16px;
  background:#efefef;
}

.machine-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .4s ease;
}

.machine-card:hover img{ transform:scale(1.03); }

.machine-title{
  font-size:.98rem;
  line-height:1.45;
  font-weight:500;
  margin-bottom:6px;
}

.machine-meta{ color:var(--fm-muted); font-size:.88rem; margin-bottom:8px; }
.machine-price{ font-size:1.05rem; font-weight:600; color:var(--fm-green); }

/* FOOTER */

footer{
  border-top:1px solid var(--fm-border);
  margin-top:80px;
  padding:54px 0;
}

.footer-grid{
  display:flex;
  justify-content:space-between;
  gap:40px;
}

.footer-brand{ max-width:460px; }
.footer-brand p{ color:var(--fm-muted); line-height:1.9; }
.footer-links{ display:flex; gap:70px; }

.footer-links h6{
  font-size:.85rem;
  text-transform:uppercase;
  letter-spacing:1px;
  margin-bottom:18px;
}

.footer-links a{
  display:block;
  text-decoration:none;
  color:var(--fm-muted);
  margin-bottom:10px;
  font-size:.92rem;
}

/* PRODUCT PAGE */

.product-page{ padding:15px 0 80px; }

.ficha-breadcrumb{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:.94rem;
  color:var(--fm-muted);
  margin-bottom:8px;
  flex-wrap:wrap;
}
.ficha-breadcrumb a{
  color:var(--fm-muted);
  text-decoration:none;
}
.ficha-breadcrumb a:hover{ color:var(--fm-green); }
.ficha-breadcrumb-sep{ color:#ccc; }
.ficha-breadcrumb-current{
  color:#aaa;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:320px;
}

.product-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 390px;
  gap:34px;
  align-items:start;
}

.gallery-panel{
  background:#fff;
  border:1px solid var(--fm-border);
  border-radius:18px;
  overflow:hidden;
}

.main-image{
  position:relative;
  overflow:hidden;
  background:#eee;
  border-radius:12px;
}

.main-image img{ width:100%; height:auto; display:block; }

.gallery-panel .gallery-arrow{ width:48px; height:48px; font-size:1.1rem; }
.gallery-panel .gallery-arrow.left{ left:22px; }
.gallery-panel .gallery-arrow.right{ right:22px; }

.thumb-row{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  gap:12px;
  padding:18px;
}

.thumb{
  aspect-ratio:1;
  border-radius:10px;
  overflow:hidden;
  cursor:pointer;
  border:2px solid transparent;
  transition:.2s;
}

.thumb.active{ border-color:var(--fm-green); }
.thumb img{ width:100%; height:100%; object-fit:cover; }

.content-panel{
  background:#fff;
  border:1px solid var(--fm-border);
  border-radius:18px;
  padding:34px;
  margin-top:28px;
}

.product-title{
  font-size:2.2rem;
  line-height:1.05;
  letter-spacing:-2px;
  font-weight:500;
  margin-bottom:22px;
}

.product-meta{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-bottom:34px;
}

.meta-pill{
  height:36px;
  display:flex;
  align-items:center;
  padding:0 14px;
  border-radius:999px;
  background:#f6f6f4;
  color:#444;
  font-size:.9rem;
}

.price-row{
  display:flex;
  align-items:end;
  gap:18px;
  margin-bottom:34px;
}

.price{
  font-size:2.7rem;
  font-weight:600;
  letter-spacing:-1px;
  color:var(--fm-green);
}

.price-note{ color:var(--fm-muted); margin-bottom:8px; }

.description{
  font-size:1.05rem;
  line-height:2;
  color:#333;
  margin-bottom:44px;
}

.spec-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px;
}

.spec-card{
  background:#fafafa;
  border:1px solid var(--fm-border);
  border-radius:14px;
  padding:20px;
}

.spec-label{
  font-size:.8rem;
  text-transform:uppercase;
  letter-spacing:1px;
  color:var(--fm-muted);
  margin-bottom:8px;
}

.spec-value{ font-size:1.05rem; font-weight:600; }

.contact-panel{
  position:sticky;
  top:24px;
  background:#fff;
  border:1px solid var(--fm-border);
  border-radius:18px;
  padding:28px;
}

.contact-header{ margin-bottom:26px; }

.contact-header h3{
  font-size:1.5rem;
  font-weight:500;
  margin-bottom:10px;
}

.contact-header p{ color:var(--fm-muted); line-height:1.7; margin:0; }

.form-control{
  height:52px;
  border-radius:12px;
  border:1px solid var(--fm-border);
  padding:0 16px;
  box-shadow:none !important;
}

textarea.form-control{ height:140px; padding-top:16px; resize:none; }

.btn-contact{
  width:100%;
  height:54px;
  border:none;
  background:#111;
  color:#fff;
  border-radius:999px;
  font-weight:600;
  margin-top:6px;
  transition:.2s;
}

.btn-contact:hover{ background:var(--fm-green); }

.seller-box{
  margin-top:22px;
  padding-top:22px;
  border-top:1px solid var(--fm-border);
}

.seller-top{
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom:16px;
}

.seller-avatar{
  width:52px;
  height:52px;
  border-radius:50%;
  background:#f3f3f3;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:600;
}

.seller-name{ font-weight:600; }
.seller-rating{ font-size:.9rem; color:var(--fm-muted); }

.details-section{
  margin-top:28px;
  background:#fff;
  border:1px solid var(--fm-border);
  border-radius:18px;
  padding:36px;
}

.detail-text{ color:#444; line-height:2; font-size:1.02rem; }

/* AUTH */

.auth-page{ padding:32px 0 80px; }

.auth-card{
  width:100%;
  max-width:460px;
  margin:0 auto;
  background:#fff;
  border:1px solid var(--fm-border);
  border-radius:24px;
  padding:44px 40px;
}

.auth-logo{ display:block; text-align:center; margin-bottom:32px; }

.auth-title{
  font-size:1.9rem;
  font-weight:500;
  letter-spacing:-1px;
  text-align:center;
  margin-bottom:8px;
}

.auth-sub{
  color:var(--fm-muted);
  font-size:.95rem;
  text-align:center;
  margin-bottom:28px;
}

.btn-oauth{
  width:100%;
  height:52px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  border:1.5px solid var(--fm-border);
  border-radius:999px;
  background:#fff;
  color:#111;
  font-size:.95rem;
  font-weight:500;
  transition:.2s;
  cursor:pointer;
}

.btn-oauth:hover{ border-color:#aaa; background:#fafafa; }
.btn-oauth i{ font-size:1.15rem; }

.auth-divider{
  display:flex;
  align-items:center;
  gap:14px;
  margin:24px 0;
}

.auth-divider::before,
.auth-divider::after{
  content:'';
  flex:1;
  height:1px;
  background:var(--fm-border);
}

.auth-divider span{ color:var(--fm-muted); font-size:.85rem; white-space:nowrap; }

.auth-field{ margin-bottom:14px; }

.auth-label{
  display:block;
  font-size:.85rem;
  font-weight:500;
  margin-bottom:6px;
}

.auth-input{
  width:100%;
  height:52px;
  border:1.5px solid var(--fm-border);
  border-radius:12px;
  padding:0 16px;
  font-size:.95rem;
  font-family:inherit;
  outline:none;
  transition:.2s;
}

.auth-input:focus{ border-color:var(--fm-green); }
.auth-input-group{ position:relative; }
.auth-input-group .auth-input{ padding-right:48px; }

.auth-input-toggle{
  position:absolute;
  right:16px;
  top:50%;
  transform:translateY(-50%);
  background:none;
  border:none;
  color:var(--fm-muted);
  cursor:pointer;
  font-size:1rem;
  padding:0;
}

.auth-forgot{
  display:block;
  text-align:right;
  font-size:.85rem;
  color:var(--fm-muted);
  text-decoration:none;
  margin-top:-6px;
  margin-bottom:20px;
}

.auth-forgot:hover{ color:#111; }

.btn-auth{
  width:100%;
  height:54px;
  border:none;
  background:#111;
  color:#fff;
  border-radius:999px;
  font-size:1rem;
  font-weight:600;
  margin-top:8px;
  transition:.2s;
  cursor:pointer;
}

.btn-auth:hover{ background:var(--fm-green); }
.btn-auth-green{ background:var(--fm-green); }
.btn-auth-green:hover{ background:var(--fm-green-dark); }

.auth-switch{
  text-align:center;
  margin-top:22px;
  font-size:.9rem;
  color:var(--fm-muted);
}

.auth-switch a{ color:#111; font-weight:500; text-decoration:none; }
.auth-switch a:hover{ color:var(--fm-green); }

.auth-terms{
  font-size:.82rem;
  color:var(--fm-muted);
  text-align:center;
  margin-top:16px;
  line-height:1.6;
}

.auth-terms a{ color:#111; text-decoration:none; }

/* FORM PANEL */

.form-page{ padding:48px 0 80px; }

.form-panel{
  width:100%;
  max-width:680px;
  margin:0 auto;
  background:#fff;
  border:1px solid var(--fm-border);
  border-radius:24px;
  padding:44px 48px;
}

.form-panel-title{
  font-size:1.7rem;
  font-weight:500;
  letter-spacing:-1px;
  margin-bottom:34px;
}

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

.form-label{
  display:block;
  font-size:.85rem;
  font-weight:500;
  margin-bottom:8px;
}

.form-input{
  width:100%;
  height:52px;
  border:1.5px solid var(--fm-border);
  border-radius:12px;
  padding:0 16px;
  font-size:.95rem;
  font-family:inherit;
  color:var(--fm-text);
  outline:none;
  transition:border-color .2s;
  background:#fff;
}

.form-input:focus{ border-color:var(--fm-green); }

.form-textarea{
  height:140px;
  padding:14px 16px;
  resize:vertical;
  line-height:1.7;
}

.form-select{
  appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 16px center;
  padding-right:44px;
  cursor:pointer;
}

.photo-upload-area{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  height:160px;
  border:2px dashed var(--fm-border);
  border-radius:16px;
  cursor:pointer;
  transition:.2s;
  color:var(--fm-muted);
}

.photo-upload-area:hover{ border-color:#aaa; background:#fafafa; }

.photo-upload-area.dragover{
  border-color:var(--fm-green);
  background:#f0fdf4;
  color:var(--fm-green);
}

.photo-upload-area i{ font-size:1.8rem; }
.photo-upload-area span{ font-size:.95rem; font-weight:500; }
.photo-hint{ font-size:.82rem !important; font-weight:400 !important; }

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

.photo-thumb{
  position:relative;
  aspect-ratio:1;
  border-radius:10px;
  overflow:hidden;
  border:1px solid var(--fm-border);
}

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

.photo-remove{
  position:absolute;
  top:5px;
  right:5px;
  width:22px;
  height:22px;
  border-radius:50%;
  background:rgba(0,0,0,.55);
  color:#fff;
  border:none;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:.75rem;
  cursor:pointer;
  line-height:1;
}

.form-check{
  display:flex;
  align-items:center;
  gap:12px;
  cursor:pointer;
  user-select:none;
}

.form-check-input{
  appearance:none;
  width:20px;
  height:20px;
  min-width:20px;
  border:1.5px solid var(--fm-border);
  border-radius:6px;
  cursor:pointer;
  transition:.15s;
  position:relative;
}

.form-check-input:checked{
  background:var(--fm-green);
  border-color:var(--fm-green);
}

.form-check-input:checked::after{
  content:'';
  position:absolute;
  top:3px;
  left:6px;
  width:5px;
  height:9px;
  border:2px solid #fff;
  border-top:none;
  border-left:none;
  transform:rotate(45deg);
}

.form-check-label{ font-size:.93rem; line-height:1.5; }

.form-actions{
  display:flex;
  justify-content:flex-end;
  gap:12px;
  margin-top:32px;
  padding-top:28px;
  border-top:1px solid var(--fm-border);
}

.btn-form-cancel{
  display:inline-flex;
  align-items:center;
  height:48px;
  border:1.5px solid var(--fm-border);
  border-radius:999px;
  background:#fff;
  color:#111;
  padding:0 24px;
  font-size:.95rem;
  font-weight:500;
  cursor:pointer;
  transition:.2s;
  text-decoration:none;
  font-family:inherit;
}

.btn-form-cancel:hover{ border-color:#aaa; }

.btn-form-save{
  height:48px;
  border:none;
  border-radius:999px;
  background:var(--fm-green);
  color:#fff;
  padding:0 28px;
  font-size:.95rem;
  font-weight:600;
  cursor:pointer;
  transition:.2s;
}

.btn-form-save:hover{ background:var(--fm-green-dark); }

/* DASHBOARD */

.dashboard-section{ padding-top:20px; }

.dashboard-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:20px;
}

.dashboard-card{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  background:#fff;
  border:1px solid var(--fm-border);
  border-radius:20px;
  padding:28px 28px 26px;
  text-decoration:none;
  color:var(--fm-text);
  transition:.22s;
}

.dashboard-card:hover{
  transform:translateY(-3px);
  box-shadow:0 8px 32px rgba(0,0,0,.07);
  border-color:#d4d4d4;
}

.dashboard-icon{
  width:54px;
  height:54px;
  border-radius:14px;
  background:#f0fdf4;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.55rem;
  color:var(--fm-green);
  margin-bottom:18px;
  transition:.22s;
}

.dashboard-card:hover .dashboard-icon{ background:var(--fm-green); color:#fff; }
.dashboard-card-title{ font-size:1.05rem; font-weight:600; margin-bottom:7px; }
.dashboard-card-desc{ font-size:.88rem; line-height:1.6; color:var(--fm-muted); }

.dashboard-card--logout .dashboard-icon{ background:#fff5f5; color:#e53935; }
.dashboard-card--logout:hover{ border-color:#fecaca; }
.dashboard-card--logout:hover .dashboard-icon{ background:#e53935; color:#fff; }

/* ADMIN VARIANT */

.dashboard-card--admin .dashboard-icon{ background:#fffbeb; color:#d97706; }
.dashboard-card--admin:hover{ border-color:#fde68a; }
.dashboard-card--admin:hover .dashboard-icon{ background:#d97706; color:#fff; }

.admin-badge{
  display:inline-block;
  font-size:.75rem;
  font-weight:600;
  letter-spacing:.5px;
  text-transform:uppercase;
  color:#d97706;
  background:#fffbeb;
  border:1px solid #fde68a;
  border-radius:999px;
  padding:3px 12px;
  margin-left:14px;
  vertical-align:middle;
}

/* TABLE PANEL */

.table-section{ padding-bottom:60px; }

/* MENSAJES */
.msg-ficha-grupo{
  background:#fff;
  border:1px solid #e8e8e8;
  border-radius:12px;
  overflow:hidden;
  margin-bottom:16px;
}
.msg-ficha-header{
  display:flex;
  align-items:center;
  gap:14px;
  padding:14px 18px;
  background:#f9f9f7;
  border-bottom:1px solid #efefef;
  text-decoration:none;
  color:inherit;
}
.msg-ficha-header:hover{ background:#f3f3f0; }
.msg-ficha-thumb{
  width:52px;height:52px;border-radius:8px;overflow:hidden;
  background:#eee;flex-shrink:0;display:flex;align-items:center;justify-content:center;
}
.msg-ficha-thumb img{ width:100%;height:100%;object-fit:cover; }
.msg-ficha-title{ font-weight:600;font-size:.95rem;color:#111;line-height:1.3; }
.msg-ficha-sub{ font-size:.8rem;color:var(--fm-muted);margin-top:2px; }
.msg-lead-row{
  padding:14px 18px;
  border-bottom:1px solid #f3f3f0;
}
.msg-lead-row:last-child{ border-bottom:none; }
.msg-lead--unread{ background:#fafff8; }
.msg-lead-meta{
  display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:6px;
}
.msg-lead-name{ font-weight:600;font-size:.9rem; }
.msg-lead-empresa{ font-size:.82rem;color:var(--fm-muted); }
.msg-lead-date{ font-size:.78rem;color:#aaa;margin-left:auto; }
.msg-badge-new{
  font-size:.72rem;font-weight:700;background:var(--fm-green);color:#fff;
  padding:2px 8px;border-radius:20px;
}
.msg-lead-text{ font-size:.88rem;color:#444;line-height:1.5;margin-bottom:8px; }
.msg-lead-contact{
  display:flex;gap:16px;flex-wrap:wrap;
}
.msg-lead-contact a{
  font-size:.82rem;color:var(--fm-green);text-decoration:none;
}
.msg-lead-contact a:hover{ text-decoration:underline; }

.table-panel{
  background:#fff;
  border:1px solid var(--fm-border);
  border-radius:20px;
  overflow:visible;
}
.fm-table-wrap{
  overflow:visible;
  border-radius:0 0 19px 19px;
}
.fm-table thead tr th:first-child{ border-radius:0; }
.fm-table thead tr th:last-child{ border-radius:0; }
.fm-table tbody tr:last-child td:first-child{ border-bottom-left-radius:19px; }
.fm-table tbody tr:last-child td:last-child{ border-bottom-right-radius:19px; }

.table-panel-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:24px 28px;
  border-bottom:1px solid var(--fm-border);
}

.table-panel-title{
  font-size:1.15rem;
  font-weight:600;
}

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

.fm-table th{
  font-size:.78rem;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.6px;
  color:var(--fm-muted);
  padding:12px 16px;
  text-align:left;
  background:#fafafa;
  border-bottom:1px solid var(--fm-border);
  white-space:nowrap;
}

.fm-table td{
  padding:14px 16px;
  border-bottom:1px solid var(--fm-border);
  vertical-align:middle;
  font-size:.93rem;
}

.fm-table tr:last-child td{ border-bottom:none; }
.fm-table tbody tr:hover td{ background:#fafafa; }

.machine-preview{
  display:flex;
  align-items:center;
  gap:14px;
}

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

.machine-name{
  font-weight:500;
  margin-bottom:3px;
  line-height:1.3;
}

.machine-cat{
  font-size:.83rem;
  color:var(--fm-muted);
}

.machine-code{
  font-size:.78rem;
  color:#bbb;
  margin-top:2px;
  font-variant-numeric:tabular-nums;
}

.status-badge{
  display:inline-block;
  font-size:.78rem;
  font-weight:600;
  padding:3px 10px;
  border-radius:999px;
  white-space:nowrap;
}

.status-badge--publicada{ background:#f0fdf4; color:#16a34a; }
.status-badge--pendiente{ background:#f0fdf4; color:#16a34a; }
.status-badge--pausada{   background:#fffbeb; color:#d97706; }
.status-badge--vendida{   background:#eff6ff; color:#2563eb; }
.status-badge--baneada{   background:#fff1f2; color:#e11d48; }

.machine-thumb--empty{
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f5f5f5;
}

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

.btn-table-edit{
  display:inline-flex;
  align-items:center;
  height:36px;
  padding:0 16px;
  border:1.5px solid var(--fm-border);
  border-radius:999px;
  background:#fff;
  color:#111;
  font-size:.85rem;
  font-weight:500;
  cursor:pointer;
  transition:.2s;
  white-space:nowrap;
  text-decoration:none;
  font-family:inherit;
}

.btn-table-edit:hover{ border-color:#aaa; color:#111; }

.dropdown-wrap{ position:relative; }

.btn-table-more{
  height:36px;
  padding:0 12px;
  border:1.5px solid var(--fm-border);
  border-radius:999px;
  background:#fff;
  color:#111;
  font-size:.85rem;
  font-weight:500;
  cursor:pointer;
  transition:.2s;
  display:flex;
  align-items:center;
  gap:6px;
  white-space:nowrap;
}

.btn-table-more:hover{ border-color:#aaa; }

.dropdown-fm{
  display:none;
  position:absolute;
  right:0;
  top:calc(100% + 6px);
  min-width:180px;
  background:#fff;
  border:1px solid var(--fm-border);
  border-radius:12px;
  box-shadow:0 8px 24px rgba(0,0,0,.09);
  z-index:100;
  overflow:hidden;
}

.dropdown-fm.open{ display:block; }
.table-actions .dropdown-fm{ top:calc(100% + 6px); bottom:auto; }
.table-panel{ padding-bottom:160px; margin-bottom:-160px; }

.dropdown-fm a{
  display:block;
  padding:10px 16px;
  font-size:.9rem;
  color:#111;
  text-decoration:none;
  transition:.15s;
}

.dropdown-fm a:hover{ background:#f5f5f5; }

.dropdown-fm-divider{
  height:1px;
  background:var(--fm-border);
  margin:4px 0;
}

.dropdown-fm a.danger{ color:#e53935; }
.dropdown-fm a.danger:hover{ background:#fff5f5; }

@media(max-width:900px){
  .col-hide{ display:none; }
}

/* RESPONSIVE */

@media(max-width:1200px){
  .machine-grid{ grid-template-columns:repeat(3,1fr); }
  .product-grid{ grid-template-columns:1fr; }
  .contact-panel{ position:relative; top:auto; }
}

@media(max-width:992px){
  .nav-hamburger{ display:flex; align-items:center; }
  .nav-inner{ flex-wrap:wrap; height:auto; gap:0; padding:12px 0; }
  .nav-collapsible{
    display:none;
    width:100%;
    flex-direction:column;
    gap:14px;
    padding:16px 0 6px;
    border-top:1px solid var(--fm-border);
    margin-top:10px;
  }
  .nav-collapsible.open{ display:flex; }
  .search-wrapper{ width:100%; }
  .nav-right{ width:100%; flex-direction:column; align-items:flex-start; gap:16px; }
  .machine-grid{ grid-template-columns:repeat(2,1fr); }
  .thumb-row{ grid-template-columns:repeat(4,1fr); }
  .spec-grid{ grid-template-columns:repeat(2,1fr); }
  .product-title{ font-size:2.2rem; }
  .dashboard-grid{ grid-template-columns:repeat(2,1fr); }
}

@media(max-width:768px){
  .machine-grid{ grid-template-columns:1fr; }
  .spec-grid{ grid-template-columns:1fr; }
  .thumb-row{ grid-template-columns:repeat(3,1fr); }
}

@media(max-width:600px){
  .form-panel{ border:none; border-radius:0; padding:32px 20px; }
  .form-actions{ flex-direction:column-reverse; }
  .btn-form-cancel, .btn-form-save{ width:100%; }
}

@media(max-width:520px){
  .auth-card{ border:none; border-radius:0; padding:32px 20px; }
  .dashboard-grid{ grid-template-columns:1fr; }
}

/* FORM PAGE WIDE */

.form-page-h1{
  font-size:1.8rem;
  font-weight:600;
  letter-spacing:-1px;
  margin:0 auto 28px;
  max-width:860px;
}

.form-panel--wide{ max-width:860px; }

.form-section{
  padding-bottom:28px;
  margin-bottom:28px;
  border-bottom:1px solid var(--fm-border);
}

.form-section:last-of-type{ border-bottom:none; }

.form-section-title{
  font-size:1rem;
  font-weight:600;
  margin-bottom:20px;
  display:flex;
  align-items:baseline;
  gap:6px;
}

.form-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}

.form-req{ color:#e53935; font-weight:600; }
.form-label-opt{ font-size:.82rem; font-weight:400; color:var(--fm-muted); }
.form-hint{ font-size:.8rem; color:var(--fm-muted); margin-top:6px; line-height:1.5; }

/* Price field */

.price-input-wrap{ position:relative; }
.price-input-wrap .form-input{ padding-right:44px; }
.price-currency{
  position:absolute;
  right:16px;
  top:50%;
  transform:translateY(-50%);
  font-size:.93rem;
  color:var(--fm-muted);
  pointer-events:none;
}

/* Tipo precio radio group */

.tipo-precio-opts{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.tipo-precio-opt{
  display:flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
  padding:10px 18px;
  border:1.5px solid var(--fm-border);
  border-radius:999px;
  font-size:.9rem;
  font-weight:500;
  transition:.15s;
  user-select:none;
}

.tipo-precio-opt:hover{ border-color:#aaa; }

.tipo-precio-opt input[type="radio"]{ accent-color:var(--fm-green); }

.tipo-precio-opt:has(input:checked){
  border-color:var(--fm-green);
  background:#f0fdf4;
  color:#111;
}

/* Photo grid extras */

.photo-thumb--loading{
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f5f5f5;
}

.photo-spinner{
  width:24px;
  height:24px;
  border:2.5px solid var(--fm-border);
  border-top-color:var(--fm-green);
  border-radius:50%;
  animation:spin .7s linear infinite;
}

@keyframes spin{ to{ transform:rotate(360deg); } }

.photo-main-label{
  position:absolute;
  bottom:6px;
  left:6px;
  font-size:.7rem;
  font-weight:600;
  background:var(--fm-green);
  color:#fff;
  padding:2px 8px;
  border-radius:999px;
  pointer-events:none;
}

#photoCountBar{
  font-size:.82rem;
  color:var(--fm-muted);
  margin-top:10px;
}

.upload-error-msg{
  font-size:.85rem;
  color:#e53935;
  background:#fff5f5;
  border:1px solid #fecaca;
  border-radius:8px;
  padding:8px 12px;
  margin-top:8px;
}

/* Flash messages */

.flash-msg{
  max-width:860px;
  margin:0 auto 24px;
  padding:14px 18px;
  border-radius:12px;
  font-size:.92rem;
  line-height:1.6;
}

.flash-msg--error{
  background:#fff5f5;
  border:1px solid #fecaca;
  color:#b91c1c;
}

.flash-msg--success{
  background:#f0fdf4;
  border:1px solid #86efac;
  color:#166534;
}

/* Draft button */

.btn-form-draft{
  height:48px;
  border:1.5px solid var(--fm-border);
  border-radius:999px;
  background:#fff;
  color:#111;
  padding:0 24px;
  font-size:.95rem;
  font-weight:500;
  cursor:pointer;
  transition:.2s;
}

.btn-form-draft:hover{ border-color:#aaa; }

@media(max-width:700px){
  .form-row{ grid-template-columns:1fr; }
  .form-panel--wide{ border:none; border-radius:0; padding:32px 20px; }
  .tipo-precio-opts{ flex-direction:column; }
}
