/* WHERING 4.5.12 — camada responsiva consolidada.
   O Banco de reserva usa um renderer próprio (classes v4512-*), isolado dos CSS legados. */

/* ============================================================
   CATÁLOGO — densidade
   ============================================================ */
@media (min-width:1600px){
  #page-wardrobe .grid{grid-template-columns:repeat(8,minmax(0,1fr))!important;gap:7px!important}
}
@media (min-width:1280px) and (max-width:1599px){
  #page-wardrobe .grid{grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:7px!important}
}
@media (min-width:1121px) and (max-width:1279px){
  #page-wardrobe .grid{grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:7px!important}
}
@media (min-width:761px) and (max-width:1120px){
  #page-wardrobe .grid{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:7px!important}
}
@media (min-width:761px){
  #page-wardrobe .imagebox{height:132px!important}
  #page-wardrobe .content{padding:6px!important}
  #page-wardrobe .code{font-size:11px!important}
  #page-wardrobe .alias{font-size:7px!important;margin-left:3px!important}
  #page-wardrobe .type{font-size:8.5px!important;line-height:1.2!important;min-height:20px}
  #page-wardrobe .desc{margin-top:3px!important;font-size:7.2px!important;line-height:1.25!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  #page-wardrobe .tags{display:none!important}
  #page-wardrobe .addbtn{margin-top:5px!important;padding:5px 3px!important;font-size:7.2px!important;line-height:1.15!important}
}

/* ============================================================
   BANCO DE RESERVA — renderer isolado
   ============================================================ */
.page-saved-grid,#savedLooksGrid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:12px!important;
  align-items:start!important;
}

.v4512-look-card{
  min-width:0!important;
  display:grid!important;
  grid-template-rows:auto auto auto!important;
  overflow:hidden!important;
  border:1px solid #d6ad59!important;
  border-radius:14px!important;
  background:#fffaf0!important;
  box-shadow:none!important;
}
.v4512-look-card:hover{border-color:#bc8d34!important;box-shadow:0 5px 15px rgba(95,68,20,.07)!important}

.v4512-card-head{
  min-width:0!important;
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:6px!important;
  padding:7px 8px 5px!important;
}
.v4512-card-title{min-width:0!important;overflow:hidden!important}
.v4512-card-title strong{
  display:block!important;
  max-width:100%!important;
  font-size:9.2px!important;
  line-height:1.18!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.v4512-card-title small{display:block!important;margin-top:1px!important;font-size:6.4px!important;line-height:1!important;color:#7c827e!important}
.v4512-status{flex:0 0 auto!important;font-size:6.2px!important;padding:3px 5px!important;line-height:1!important;white-space:nowrap!important}

.v4512-stage{
  position:relative!important;
  display:block!important;
  height:282px!important;
  min-height:282px!important;
  margin:0 7px!important;
  padding:0!important;
  overflow:hidden!important;
  border:1px solid #ead8b7!important;
  border-radius:11px!important;
  background:radial-gradient(circle at 50% 44%,#fff 0 36%,#fff9ed 74%,#fbf1dd 100%)!important;
}
.v4512-main{
  position:absolute!important;
  left:50%!important;
  transform:translateX(-50%)!important;
  width:calc(100% - 66px)!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
}
.v4512-main img{display:block!important;width:auto!important;height:auto!important;object-fit:contain!important}
.v4512-top{top:4px!important;height:88px!important}
.v4512-bottom{top:94px!important;height:124px!important}
.v4512-footwear{bottom:5px!important;height:56px!important}
.v4512-top-pair{width:100%!important;height:100%!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;overflow:hidden!important}
.v4512-top.two .v4512-top-pair{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;justify-items:center!important;align-items:center!important}

/* WebP padronizados: camiseta um pouco menor; shorts e calçados menores; calça longa preservada. */
.v4512-top img{max-width:126px!important;max-height:84px!important}
.v4512-top.is-tee img{max-width:112px!important;max-height:79px!important}
.v4512-top.two img{max-width:88px!important;max-height:77px!important}
.v4512-bottom img{max-width:132px!important;max-height:120px!important}
.v4512-bottom.is-short img{max-width:88px!important;max-height:70px!important}
.v4512-footwear img{max-width:112px!important;max-height:43px!important}
.v4512-code{position:absolute!important;left:0!important;right:0!important;bottom:0!important;text-align:center!important;font-size:5px!important;line-height:1!important;color:#7e847f!important;opacity:.55!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;pointer-events:none!important}

.v4512-badge{
  position:absolute!important;
  z-index:10!important;
  width:38px!important;
  height:40px!important;
  padding:2px 2px 8px!important;
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
  border:1px solid #e1e4df!important;
  border-radius:9px!important;
  background:rgba(255,255,255,.96)!important;
  box-shadow:0 2px 8px rgba(20,30,23,.045)!important;
}
.v4512-badge img{display:block!important;width:auto!important;height:auto!important;max-width:31px!important;max-height:29px!important;object-fit:contain!important}
.v4512-badge span{position:absolute!important;left:2px!important;right:2px!important;bottom:1px!important;font-size:4.5px!important;line-height:1!important;text-align:center!important;color:#7d847f!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.v4512-headwear{left:5px!important;top:7px!important}
.v4512-socks{left:5px!important;bottom:5px!important}
.v4512-watch{right:5px!important;bottom:5px!important}
.v4512-right-stack{position:absolute!important;z-index:10!important;right:5px!important;top:50%!important;transform:translateY(-50%)!important;width:38px!important;display:flex!important;flex-direction:column!important;gap:4px!important;align-items:center!important}
.v4512-right-stack .v4512-side{position:relative!important;inset:auto!important;flex:0 0 38px!important;padding:2px!important}
.v4512-right-stack .v4512-side img{max-width:31px!important;max-height:31px!important}

.v4512-card-foot{min-width:0!important;padding:5px 7px 7px!important;overflow:hidden!important}
.v4512-codes{margin:0 0 5px!important;font-size:5.8px!important;line-height:1.1!important;color:#777f79!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.v4512-actions{width:100%!important;min-width:0!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:4px!important}
.v4512-look-card.archived-look-card .v4512-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.v4512-actions button,
.v4512-actions .saved-delete-btn{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  min-height:28px!important;
  box-sizing:border-box!important;
  margin:0!important;
  padding:5px 2px!important;
  border-radius:7px!important;
  font-size:7px!important;
  line-height:1!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

@media (min-width:761px) and (max-width:900px){
  .page-saved-grid,#savedLooksGrid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:9px!important}
}

/* ============================================================
   MOBILE
   ============================================================ */
.saved-action-compact,.catalog-add-compact{display:none}
@media (max-width:760px){
  #page-wardrobe .grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:4px!important}
  #page-wardrobe .imagebox{height:84px!important}
  #page-wardrobe .content{padding:4px!important}
  #page-wardrobe .code{font-size:8px!important;line-height:1!important}
  #page-wardrobe .alias{display:none!important}
  #page-wardrobe .type{margin-top:2px!important;font-size:6.5px!important;line-height:1.1!important;min-height:14px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  #page-wardrobe .desc,#page-wardrobe .tags{display:none!important}
  #page-wardrobe .addbtn{margin-top:3px!important;padding:4px 2px!important;min-height:25px;font-size:6px!important;line-height:1!important}
  #page-wardrobe .catalog-add-full{display:none!important}
  #page-wardrobe .catalog-add-compact{display:inline!important}

  .page-saved-grid,#savedLooksGrid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:5px!important;align-items:start!important}
  .saved-bank-body{padding:6px!important}
  .v4512-look-card{border-radius:9px!important}
  .v4512-card-head{padding:4px 4px 3px!important;gap:2px!important;align-items:center!important}
  .v4512-card-title strong{font-size:6.2px!important;line-height:1.1!important}
  .v4512-card-title small{display:none!important}
  .v4512-status{display:none!important}

  .v4512-stage{height:158px!important;min-height:158px!important;margin:0 3px!important;border-radius:7px!important}
  .v4512-main{width:calc(100% - 24px)!important}
  .v4512-top{top:2px!important;height:50px!important}
  .v4512-bottom{top:53px!important;height:69px!important}
  .v4512-footwear{bottom:2px!important;height:33px!important}
  .v4512-top img{max-width:64px!important;max-height:48px!important}
  .v4512-top.is-tee img{max-width:58px!important;max-height:45px!important}
  .v4512-top.two img{max-width:40px!important;max-height:41px!important}
  .v4512-bottom img{max-width:61px!important;max-height:65px!important}
  .v4512-bottom.is-short img{max-width:46px!important;max-height:42px!important}
  .v4512-footwear img{max-width:57px!important;max-height:25px!important}
  .v4512-code{font-size:3.4px!important}

  .v4512-badge{width:23px!important;height:24px!important;padding:1px!important;border-radius:6px!important}
  .v4512-badge img{max-width:20px!important;max-height:20px!important}
  .v4512-badge span{display:none!important}
  .v4512-headwear{left:2px!important;top:2px!important}
  .v4512-socks{left:2px!important;bottom:2px!important}
  .v4512-watch{right:2px!important;bottom:2px!important}
  .v4512-right-stack{right:2px!important;width:23px!important;gap:2px!important}
  .v4512-right-stack .v4512-side{width:23px!important;height:24px!important;flex-basis:24px!important}
  .v4512-right-stack .v4512-side img{max-width:20px!important;max-height:20px!important}

  .v4512-card-foot{padding:3px!important}
  .v4512-codes{display:none!important}
  .v4512-actions{gap:2px!important}
  .v4512-actions button,.v4512-actions .saved-delete-btn{min-height:22px!important;padding:2px 1px!important;font-size:5px!important;border-radius:5px!important}

  .saved-bank-head{padding:9px!important;gap:7px!important}
  .saved-bank-head h2{font-size:14px!important}
  .saved-bank-head small{font-size:7.5px!important}
  .saved-bank-head-actions{gap:5px!important}
  #savedBankSearch{min-height:34px;font-size:10px!important;padding:6px 8px!important}
  .saved-bank-count{font-size:7px!important;padding:4px 5px!important}
}
@media (max-width:360px){
  #page-wardrobe .grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .page-saved-grid,#savedLooksGrid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* ============================================================
   PRÓXIMOS EVENTOS — look ampliável
   ============================================================ */
.event-preview.event-look-expand{position:relative;display:flex;align-items:center;justify-content:center;margin:0;padding:0;border:0;background:transparent;border-radius:11px;cursor:zoom-in;overflow:visible}
.event-preview.event-look-expand::after{content:'Ampliar';position:absolute;left:50%;bottom:1px;transform:translateX(-50%);padding:2px 5px;border-radius:999px;background:rgba(25,35,28,.78);color:#fff;font-size:5.8px;font-weight:800;line-height:1;letter-spacing:.02em;opacity:.82;pointer-events:none}
.event-preview.event-look-expand:hover::after{opacity:1}
.event-preview.event-look-expand:focus-visible{outline:2px solid #315f44;outline-offset:2px}
.event-look-preview-dialog{width:min(560px,calc(100vw - 24px));max-height:calc(100vh - 24px);padding:0;border:0;border-radius:18px;background:#fff;box-shadow:0 28px 90px rgba(0,0,0,.28);color:#222;overflow:hidden}
.event-look-preview-dialog::backdrop{background:rgba(18,24,20,.58);backdrop-filter:blur(5px)}
.event-look-preview-shell{display:flex;flex-direction:column;max-height:calc(100vh - 24px)}
.event-look-preview-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:14px 16px 11px;border-bottom:1px solid #e4e7e2}
.event-look-preview-head>div{min-width:0}
.event-look-preview-head strong{display:block;font-size:14px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.event-look-preview-head small{display:block;margin-top:3px;font-size:8.5px;color:#737c75}
.event-look-preview-close{width:34px;height:34px;flex:0 0 34px;padding:0;border-radius:999px;font-size:21px;line-height:1;background:#f4f5f2;border:1px solid #dfe3dd;color:#4e5851;cursor:pointer}
.event-look-preview-body{min-height:0;overflow:auto;padding:12px 14px 15px}
.event-look-preview-stage .saved-stage{width:100%!important;height:430px!important;min-height:430px!important;margin:0!important;grid-template-rows:145px 170px 100px!important;padding:6px 10px!important}
.event-look-preview-stage .saved-stage-top img{max-width:210px!important;max-height:138px!important}
.event-look-preview-stage .saved-stage-top.is-tee img{max-width:190px!important;max-height:130px!important}
.event-look-preview-stage .saved-stage-top.two img{max-width:150px!important;max-height:126px!important}
.event-look-preview-stage .saved-stage-bottom img{max-width:205px!important;max-height:164px!important}
.event-look-preview-stage .saved-stage-bottom.is-short img{max-width:150px!important;max-height:112px!important}
.event-look-preview-stage .saved-stage-footwear img{max-width:178px!important;max-height:72px!important}
.event-look-preview-codes{margin-top:9px;padding:7px 8px;border-radius:8px;background:#f6f7f4;color:#687169;font-size:8px;line-height:1.35;text-align:center}
@media(max-width:760px){
  .event-row{grid-template-columns:58px 84px minmax(0,1fr)!important;gap:6px!important;padding:6px!important;min-height:104px!important}
  .event-preview{width:84px!important;height:90px!important}
  .event-preview .v3-look-thumb{width:82px!important;min-width:82px!important;height:90px!important}
  .event-preview.event-look-expand::after{font-size:5.5px!important;bottom:0}
  .event-main strong{font-size:9px!important}
  .event-main small{font-size:7.5px!important}
  .event-inline-actions{gap:3px!important;margin-top:5px!important}
  .event-inline-actions button{padding:5px 6px!important;font-size:7px!important}
  .event-look-preview-dialog{width:calc(100vw - 16px);max-height:calc(100vh - 16px);border-radius:15px}
  .event-look-preview-shell{max-height:calc(100vh - 16px)}
  .event-look-preview-head{padding:10px 11px 8px}
  .event-look-preview-head strong{font-size:12px}
  .event-look-preview-head small{font-size:7.5px}
  .event-look-preview-close{width:32px;height:32px;flex-basis:32px}
  .event-look-preview-body{padding:8px 9px 10px}
  .event-look-preview-stage .saved-stage{height:min(405px,62vh)!important;min-height:360px!important;grid-template-rows:32% 43% 25%!important;padding:5px 7px!important}
  .event-look-preview-stage .saved-stage-top img{max-width:178px!important;max-height:118px!important}
  .event-look-preview-stage .saved-stage-top.is-tee img{max-width:164px!important;max-height:112px!important}
  .event-look-preview-stage .saved-stage-bottom img{max-width:174px!important;max-height:146px!important}
  .event-look-preview-stage .saved-stage-bottom.is-short img{max-width:132px!important;max-height:96px!important}
  .event-look-preview-stage .saved-stage-footwear img{max-width:152px!important;max-height:62px!important}
  .event-look-preview-codes{font-size:7px;margin-top:6px;padding:6px}
}
