/* NGGARAGE · Stock visual y menú inferior · solo presentación, 2026-11-05 */
/* Fotografías reales existentes, nunca imágenes inventadas. */
#stockTable .stock-compact-table{min-width:1090px!important;table-layout:fixed!important}
#stockTable .stock-compact-table th:nth-child(1){width:11%!important}
#stockTable .stock-compact-table th:nth-child(2){width:28%!important}
#stockTable .stock-compact-table th:nth-child(3){width:5%!important}
#stockTable .stock-compact-table th:nth-child(4){width:9%!important}
#stockTable .stock-compact-table th:nth-child(5){width:13%!important}
#stockTable .stock-compact-table th:nth-child(6){width:8%!important}
#stockTable .stock-compact-table th:nth-child(7){width:10%!important}
#stockTable .stock-compact-table th:nth-child(8){width:9%!important}
#stockTable .stock-compact-table th:nth-child(9){width:7%!important}
#stockTable .stock-compact-table .stock-main-row td{padding-top:5px!important;padding-bottom:5px!important;height:82px}
#stockTable .stock-compact-table .gg-stock-vehicle{display:flex!important;flex-direction:row!important;align-items:center!important;gap:12px!important;min-width:0!important}
#stockTable .stock-compact-table .gg-stock-thumb{display:flex!important;position:relative;flex:0 0 114px!important;width:114px!important;height:70px!important;border:1px solid #d8e2ed;border-radius:9px;background:linear-gradient(145deg,#e7edf4,#f5f7fa);align-items:center;justify-content:center;overflow:hidden;padding:0;cursor:pointer}
#stockTable .gg-stock-photo-placeholder{display:flex;align-items:center;justify-content:center;color:#8a9aad;width:100%;height:100%}
#stockTable .gg-stock-thumb img{position:absolute;inset:0;display:block!important;width:100%!important;height:100%!important;object-fit:cover!important;border:0!important;border-radius:8px}
#stockTable .gg-stock-thumb img.gg-stock-photo-error{display:none!important}
#stockTable .gg-stock-thumb:hover{outline:2px solid #93c5fd;outline-offset:1px}
#stockTable .gg-stock-vehicle-text{min-width:0;flex:1}
#stockTable .gg-stock-name{font-size:14px!important;font-weight:800!important;line-height:1.25!important}
#stockTable .gg-stock-sub{font-size:10.5px!important;line-height:1.35!important;white-space:normal!important;max-height:30px;overflow:hidden}
#stockTable .gg-stock-actions{gap:3px!important}
#stockTable .gg-stock-iconbtn{min-width:25px!important}
@media(max-width:1100px){#stockTable .stock-compact-table{min-width:1030px!important}#stockTable .stock-compact-table .gg-stock-thumb{flex-basis:90px!important;width:90px!important;height:60px!important}#stockTable .stock-compact-table .gg-stock-vehicle{gap:7px!important}}
/* Los accesos de cuenta y agenda sustituyen al menú superior, sin duplicados. */
.top-nav>.gg-sidebar-bottom{width:100%!important;flex:0 0 auto!important;margin-top:auto!important;padding:12px 0 4px!important;border-top:1px solid rgba(148,163,184,.28)!important;position:relative!important;display:block!important}
.top-nav .gg-sidebar-account.user-bar{display:flex!important;position:relative;align-items:center!important;justify-content:space-around!important;gap:6px!important;width:100%;background:transparent!important;border:0!important;padding:0!important;flex-wrap:nowrap!important}
.top-nav .gg-sidebar-icon{width:43px;height:43px;flex:0 0 43px;display:grid;place-items:center;cursor:pointer;border:1px solid transparent;border-radius:50%;color:#edf4fc;background:rgba(255,255,255,.055);padding:0;transition:background .15s ease}
.top-nav .gg-sidebar-icon .icon{width:21px!important;height:21px!important;flex:none!important}
.top-nav .gg-sidebar-icon:hover,.top-nav .gg-sidebar-icon:focus-visible,.top-nav .gg-sidebar-icon.active{background:#304256;border-color:#54779e;outline:none}
.top-nav .gg-account-card{position:absolute;left:0;bottom:calc(100% + 10px);min-width:190px;max-width:100%;background:#243448;color:#fff;border:1px solid #50627b;border-radius:9px;padding:11px 13px;box-shadow:0 10px 22px #0005;z-index:50;font-size:13px}
.top-nav .gg-account-card.hidden{display:none!important}
.top-nav .gg-account-card b{display:block;overflow-wrap:anywhere}
.top-nav .gg-account-card span{display:block;color:#b8c6d8;font-size:11px;margin-top:3px}
@media(max-width:768px){.top-nav>.gg-sidebar-bottom{padding:8px 4px!important}.top-nav .gg-sidebar-icon{width:38px;height:38px;flex-basis:38px}.top-nav .gg-sidebar-account.user-bar{justify-content:center!important;gap:8px!important}}

/* 05/11/2026 · Foto directa y Stock adaptado a móvil. */
#stockTable .gg-stock-photo-wrap{position:relative;flex:0 0 114px;width:114px;height:70px;min-width:0}
#stockTable .gg-stock-photo-wrap .gg-stock-thumb{width:100%!important;height:100%!important;flex:initial!important}
#stockTable .gg-stock-camera{position:absolute;right:3px;bottom:3px;z-index:2;display:grid;place-items:center;width:29px;height:29px;padding:0;border:1px solid #e2e8f0;border-radius:8px;background:#fff;color:#0f172a;box-shadow:0 1px 5px #0004;cursor:pointer}
#stockTable .gg-stock-camera:hover,#stockTable .gg-stock-camera:focus-visible{background:#dbeafe;outline:2px solid #60a5fa}
#stockTable .gg-stock-camera:disabled{opacity:.5;cursor:wait}
/* Tablets: desplazar la tabla dentro del panel, nunca ensanchar toda la página. */
@media (min-width:901px) and (max-width:1150px){
  #stockTable{max-width:100%!important;overflow-x:auto!important;overscroll-behavior-x:contain}
  #stockTable .stock-compact-table{min-width:1020px!important}
  #stockTable .gg-stock-photo-wrap{flex-basis:90px;width:90px;height:60px}
}
/* Móvil: cada fila pasa a ser una tarjeta con todos los datos accesibles. */
@media (max-width:900px){
  #stock{min-width:0!important;max-width:100%!important;overflow-x:hidden!important}
  #stock .panel,#stock .panel-head,#stock .toolbar{min-width:0!important;max-width:100%!important}
  #stockTable{display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;overflow:visible!important;padding:0!important}
  #stockTable .stock-compact-table,#stockTable .stock-compact-table tbody{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;table-layout:auto!important;border:0!important}
  #stockTable .stock-compact-table thead{display:none!important}
  #stockTable .stock-compact-table tr.stock-main-row{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;grid-template-rows:auto!important;gap:9px 12px!important;align-items:center!important;width:100%!important;min-width:0!important;max-width:100%!important;margin:10px 0!important;padding:12px!important;border:1px solid #dbe3ee!important;border-radius:13px!important;background:#fff!important;box-shadow:0 2px 8px #0f172a0a!important;box-sizing:border-box!important}
  #stockTable .stock-compact-table tr.stock-main-row>td{display:block!important;width:auto!important;min-width:0!important;max-width:100%!important;height:auto!important;min-height:0!important;padding:0!important;margin:0!important;border:0!important;white-space:normal!important;overflow:visible!important;font-size:12px!important;box-sizing:border-box!important}
  #stockTable .stock-main-row>td:nth-child(2){grid-column:1/-1!important;grid-row:1!important;padding-bottom:8px!important;border-bottom:1px solid #e2e8f0!important}
  #stockTable .stock-main-row>td:nth-child(1){grid-column:1!important;grid-row:2!important}
  #stockTable .stock-main-row>td:nth-child(7){grid-column:2!important;grid-row:2!important;justify-self:end!important}
  #stockTable .stock-main-row>td:nth-child(3){grid-column:1!important;grid-row:3!important}
  #stockTable .stock-main-row>td:nth-child(4){grid-column:2!important;grid-row:3!important}
  #stockTable .stock-main-row>td:nth-child(5){grid-column:1!important;grid-row:4!important}
  #stockTable .stock-main-row>td:nth-child(6){grid-column:2!important;grid-row:4!important}
  #stockTable .stock-main-row>td:nth-child(8){grid-column:1!important;grid-row:5!important}
  #stockTable .stock-main-row>td:nth-child(9){grid-column:2!important;grid-row:5!important;justify-self:end!important}
  #stockTable .stock-main-row>td:nth-child(3):before{content:'Empresa';}
  #stockTable .stock-main-row>td:nth-child(4):before{content:'Kilómetros';}
  #stockTable .stock-main-row>td:nth-child(5):before{content:'ITV';}
  #stockTable .stock-main-row>td:nth-child(6):before{content:'Seguro';}
  #stockTable .stock-main-row>td:nth-child(8):before{content:'CARFAX';}
  #stockTable .stock-main-row>td:nth-child(3):before,#stockTable .stock-main-row>td:nth-child(4):before,#stockTable .stock-main-row>td:nth-child(5):before,#stockTable .stock-main-row>td:nth-child(6):before,#stockTable .stock-main-row>td:nth-child(8):before{display:block!important;color:#64748b!important;font-size:10px!important;font-weight:600!important;margin-bottom:4px!important}
  #stockTable .gg-stock-vehicle{display:flex!important;flex-direction:row!important;align-items:center!important;gap:11px!important;min-width:0!important}
  #stockTable .gg-stock-photo-wrap{flex:0 0 98px!important;width:98px!important;height:70px!important}
  #stockTable .gg-stock-photo-wrap .gg-stock-thumb{display:flex!important;width:100%!important;height:100%!important}
  #stockTable .gg-stock-photo-wrap img{width:100%!important;height:100%!important;object-fit:cover!important}
  #stockTable .gg-stock-vehicle-text{flex:1!important;min-width:0!important}
  #stockTable .gg-stock-name{font-size:15px!important;white-space:normal!important;overflow-wrap:anywhere!important}
  #stockTable .gg-stock-sub{font-size:11px!important;white-space:normal!important;max-height:none!important;overflow-wrap:anywhere!important}
  #stockTable .gg-stock-status{font-size:10px!important;padding:5px 7px!important;gap:5px!important}
  #stockTable .gg-stock-plate{font-size:12px!important;min-width:90px!important;height:27px!important}
  #stockTable .gg-stock-price{font-size:13px!important}
  #stockTable .gg-stock-actions{display:flex!important;gap:5px!important;justify-content:flex-end!important}
  #stockTable .gg-stock-iconbtn{min-width:30px!important;height:31px!important}
  #stockTable .stock-compact-table tr.stock-detail-row{display:block!important;width:100%!important;max-width:100%!important;margin:-7px 0 12px!important;padding:0 5px!important;box-sizing:border-box!important}
  #stockTable .stock-detail-row.hidden{display:none!important}
  #stockTable .stock-detail-row>td{display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;padding:9px!important;box-sizing:border-box!important}
  #stockTable .gg-stock-expanded{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:8px!important}
  #stockTable .gg-stock-info{grid-template-columns:42% minmax(0,1fr)!important;overflow-wrap:anywhere!important}
  /* Cuatro accesos en dos filas para no romper el lateral estrecho. */
  .top-nav>.gg-sidebar-bottom{width:100%!important;min-width:0!important;padding:8px 0 4px!important;box-sizing:border-box!important}
  .top-nav .gg-sidebar-account.user-bar{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important;justify-items:center!important;align-items:center!important;width:100%!important;min-width:0!important}
  .top-nav .gg-sidebar-icon{display:grid!important;width:31px!important;height:31px!important;min-width:0!important;flex-basis:auto!important;padding:0!important}
  .top-nav .gg-sidebar-icon .icon{width:16px!important;height:16px!important}
  .top-nav .gg-account-card{left:calc(100% + 8px)!important;bottom:0!important;width:190px!important;max-width:calc(100vw - 100px)!important}
}
@media (max-width:390px){
  #stockTable .stock-compact-table tr.stock-main-row{gap:8px!important;padding:9px!important}
  #stockTable .gg-stock-photo-wrap{flex-basis:82px!important;width:82px!important;height:64px!important}
  #stockTable .gg-stock-name{font-size:13px!important}
  #stockTable .gg-stock-plate{font-size:11px!important;min-width:82px!important}
}
/* Mantener los detalles cerrados hasta pulsar el desplegable. */
#stockTable .stock-compact-table tr.stock-detail-row.hidden{display:none!important}
