/* =========================================================
   Làng Ẩn Dật - REBUILD V4 SHOP / ĐỔI QUÀ
   ========================================================= */

.shop-page{
  padding:18px;
}

.shop-shell{
  width:min(1500px,100%);
  height:100%;
  margin:0 auto;
  border:1px solid var(--line);
  border-radius:22px;
  background:linear-gradient(135deg,rgba(16,14,22,.74),rgba(42,24,20,.58));
  box-shadow:var(--shadow);
  backdrop-filter:blur(12px);
  overflow:hidden;
  display:grid;
  grid-template-rows:auto 1fr;
}

.shop-head{
  margin:0;
  padding:18px 22px;
  border-bottom:1px solid rgba(255,255,255,.12);
}

.shop-head h1{
  margin:0;
  color:var(--gold);
  text-transform:uppercase;
  font-size:38px;
  line-height:1;
}

.shop-head p{
  margin:6px 0 0;
  color:var(--muted);
  text-transform:uppercase;
  font-size:12px;
  font-weight:900;
  letter-spacing:.12em;
}

.shop-head-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.shop-wallet{
  min-height:42px;
  display:grid;
  place-items:center;
  padding:0 16px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(0,0,0,.28);
  color:var(--gold-2);
  font-weight:950;
  text-transform:uppercase;
  font-size:12px;
}

.shop-grid{
  min-height:0;
  overflow:auto;
  padding:16px 18px 18px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 380px;
  gap:14px;
  align-items:start;
}

.shop-card{
  border:1px solid var(--line);
  border-radius:20px;
  background:linear-gradient(135deg,rgba(18,16,24,.74),rgba(28,19,18,.58));
  box-shadow:0 18px 55px rgba(0,0,0,.32);
  padding:16px;
}

.shop-side{
  display:grid;
  gap:14px;
}

.shop-card-title{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.shop-card-title h2{
  margin:0;
  color:var(--gold);
  text-transform:uppercase;
  font-size:20px;
  line-height:1.1;
}

.shop-card-title span{
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}

.shop-items{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
  gap:12px;
}

.shop-item{
  border:1px solid rgba(245,213,137,.20);
  border-radius:18px;
  background:rgba(0,0,0,.20);
  overflow:hidden;
  display:grid;
  grid-template-rows:150px auto;
}

.shop-item-img{
  width:100%;
  height:150px;
  object-fit:cover;
  background:rgba(0,0,0,.22);
}

.shop-item-body{
  padding:12px;
  display:grid;
  gap:8px;
}

.shop-item-body h3{
  margin:0;
  color:var(--gold-2);
  font-size:16px;
}

.shop-item-body p{
  margin:0;
  color:var(--muted);
  font-size:12px;
  line-height:1.35;
}

.shop-price{
  color:#7fffc2;
  font-weight:950;
  text-transform:uppercase;
}

.shop-item-actions{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
}

.shop-admin-item-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}

.shop-btn{
  min-height:42px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.18);
  background:linear-gradient(180deg,rgba(93,96,110,.88),rgba(45,47,58,.88));
  color:#fff7df;
  font-size:10px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.07em;
  padding:0 14px;
  display:grid;
  place-items:center;
  text-align:center;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 8px 20px rgba(0,0,0,.25);
}

.shop-btn:hover{filter:brightness(1.08);transform:translateY(-1px)}
.shop-primary{background:linear-gradient(180deg,#fff0aa,#d4a33c);color:#1c1004;border-color:#ffe69a}
.shop-success{background:linear-gradient(180deg,#25e29b,#0ea471);color:#031610;border-color:#8dffd0}
.shop-danger{background:linear-gradient(180deg,#ff5a7d,#b8193a);color:#fff;border-color:#ff9bad}

.shop-history,
.shop-requests{
  display:grid;
  gap:8px;
  max-height:420px;
  overflow:auto;
}

.shop-request,
.shop-history-row{
  border:1px solid rgba(255,255,255,.10);
  border-radius:15px;
  background:rgba(0,0,0,.18);
  padding:10px 12px;
  display:grid;
  gap:7px;
}

.shop-request b,
.shop-history-row b{
  color:var(--gold-2);
  font-size:13px;
}

.shop-request span,
.shop-history-row span{
  color:var(--muted);
  font-size:11px;
  line-height:1.35;
}

.shop-request-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}

.shop-status{
  width:max-content;
  max-width:100%;
  border-radius:999px;
  padding:4px 9px;
  font-size:10px;
  font-weight:950;
  text-transform:uppercase;
  background:rgba(245,213,137,.14);
  border:1px solid rgba(245,213,137,.24);
  color:var(--gold-2);
}

.shop-status.approved{color:#8dffd0;border-color:rgba(141,255,208,.34);background:rgba(10,180,120,.12)}
.shop-status.rejected{color:#ff9bad;border-color:rgba(255,155,173,.34);background:rgba(255,70,100,.12)}

.shop-empty{
  border:1px dashed rgba(245,213,137,.22);
  border-radius:16px;
  background:rgba(0,0,0,.16);
  color:var(--muted);
  text-align:center;
  padding:18px;
  font-weight:800;
}

.shop-modal{
  position:fixed;
  inset:0;
  z-index:210;
  display:grid;
  place-items:center;
  background:rgba(0,0,0,.62);
  padding:18px;
}

.shop-modal-card{
  width:min(720px,100%);
  max-height:92vh;
  overflow:auto;
  border:1px solid var(--line);
  border-radius:22px;
  background:linear-gradient(135deg,rgba(18,16,24,.94),rgba(35,22,20,.90));
  box-shadow:var(--shadow);
  padding:18px;
}

.shop-reject-card{
  width:min(460px,100%);
}

.shop-modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}

.shop-modal-head h2{
  margin:0;
  color:var(--gold);
  text-transform:uppercase;
}

.shop-icon-btn{
  width:38px;
  height:38px;
  min-height:38px;
  border-radius:50%;
  border:1px solid var(--line);
  background:rgba(0,0,0,.30);
  color:var(--gold-2);
  font-size:20px;
  font-weight:950;
}

.shop-form{
  display:grid;
  gap:10px;
}

.shop-form.two{
  grid-template-columns:1fr 1fr;
}

.shop-full{
  grid-column:1/-1;
}

.shop-field{
  display:grid;
  gap:6px;
}

.shop-field span{
  color:var(--muted);
  text-transform:uppercase;
  font-size:10px;
  font-weight:950;
  letter-spacing:.10em;
}

.shop-field input,
.shop-field textarea{
  min-height:42px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(7,8,12,.64);
  color:var(--text);
  padding:0 12px;
  outline:none;
}

.shop-field textarea{
  padding:10px 12px;
  resize:vertical;
}

.shop-avatar-edit{
  display:grid;
  gap:12px;
  border:1px solid rgba(245,213,137,.22);
  border-radius:16px;
  background:rgba(0,0,0,.18);
  padding:12px;
}

.shop-item-preview-wrap{
  display:grid;
  grid-template-columns:78px minmax(0,1fr);
  gap:12px;
  align-items:center;
}

.shop-item-preview{
  width:78px;
  height:78px;
  border-radius:18px;
  object-fit:cover;
  border:1px solid rgba(245,213,137,.38);
  background:rgba(0,0,0,.28);
  display:none;
}

.shop-item-preview-wrap b{
  color:var(--gold-2);
  text-transform:uppercase;
  font-size:13px;
}

.shop-item-preview-wrap p{
  margin:5px 0 0;
  color:var(--muted);
  font-size:12px;
  line-height:1.35;
}

.shop-avatar-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.shop-file-btn{
  cursor:pointer;
}

@media(max-width:1100px){
  .shop-page{padding:9px}
  .shop-shell{border-radius:18px}
  .shop-grid{
    grid-template-columns:1fr;
    padding:12px;
  }
  .shop-side{
    grid-template-columns:1fr 1fr;
  }
}

@media(max-width:700px){
  .shop-side{
    grid-template-columns:1fr;
  }
  .shop-head{
    display:grid;
    gap:10px;
    padding:14px;
  }
  .shop-head h1{font-size:30px}
  .shop-head-actions{
    justify-content:stretch;
  }
  .shop-wallet,
  .shop-head-actions .close-page{
    width:100%;
  }
  .shop-form.two{
    grid-template-columns:1fr;
  }
  .shop-items{
    grid-template-columns:1fr;
  }
  .shop-avatar-actions{
    grid-template-columns:1fr;
  }
}


/* =========================================================
   REBUILD V4.2 - SHOP CARD SIMPLE
   Card quà chỉ hiện ảnh, giá point, nút đổi.
   ========================================================= */
.shop-item{
  grid-template-rows:150px auto!important;
}

.shop-item-body-simple{
  padding:12px!important;
  display:grid!important;
  gap:10px!important;
}

.shop-price-main{
  font-size:16px!important;
  color:var(--gold-2)!important;
  font-weight:950!important;
  text-align:center!important;
  text-transform:none!important;
}

.shop-item-body-simple .shop-item-actions{
  display:grid!important;
  gap:8px!important;
}

.shop-item-body-simple .shop-btn{
  min-height:40px!important;
}

@media(max-width:560px){
  .shop-item{
    grid-template-rows:140px auto!important;
  }

  .shop-item-img{
    height:140px!important;
  }

  .shop-price-main{
    font-size:15px!important;
  }
}


/* =========================================================
   REBUILD V4.3 - SHOP IMAGE NO CROP
   Ảnh quà hiển thị đầy đủ, không bị crop trên PC/mobile.
   ========================================================= */
.shop-item{
  grid-template-rows:auto auto!important;
  overflow:hidden!important;
}

.shop-item-img{
  width:100%!important;
  height:auto!important;
  max-height:none!important;
  aspect-ratio:16 / 7!important;
  object-fit:contain!important;
  object-position:center!important;
  background:linear-gradient(180deg,rgba(255,231,150,.10),rgba(0,0,0,.18))!important;
  padding:0!important;
}

.shop-item-body-simple{
  margin-top:0!important;
}

@media(max-width:700px){
  .shop-item-img{
    aspect-ratio:16 / 7!important;
    height:auto!important;
    object-fit:contain!important;
  }
}

@media(max-width:560px){
  .shop-item{
    grid-template-rows:auto auto!important;
  }

  .shop-item-img{
    height:auto!important;
    aspect-ratio:16 / 7!important;
    object-fit:contain!important;
  }
}