/* =======================================================
   UI CHI TIẾT SHOP ACCOUNT (/chuyenmuc/shop_acc/_shop_detail.php)
   Chỉ dùng riêng cho trang này.
   ======================================================= */

.acc-shop-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 6px 20px;
}

/* -------- HERO SHOP (thumbnail + mô tả) -------- */

.acc-hero {
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* HERO thumbnail shop – luôn 16:9, không bị CSS .card img khác phá layout */
.acc-hero-thumb {
  flex: 0 0 260px;
  max-width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #020617;
  aspect-ratio: 16 / 9;     /* khung 16:9 cố định */
}

/* ép ảnh fill đúng khung 16:9, cắt crop chứ không bóp méo */
.acc-shop-wrap .acc-hero-thumb > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100% !important;  /* đè mọi rule height:auto ở nơi khác */
  object-fit: cover;
  display: block;
}


.acc-hero-thumb-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #94a3b8;
  background: #020617;
}

.acc-hero-body {
  flex: 1 1 260px;
  min-width: 0;
}

.acc-hero-title {
  margin: 0 0 6px;
  font-size: 18px;
}

.acc-hero-desc {
  margin: 0 0 8px;
  font-size: 13px;
  color: #94a3b8;
}

.acc-hero-code {
  margin: 0;
  font-size: 12px;
  color: #64748b;
}

/* -------- ALERT (error / success) -------- */

.acc-alert {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 10px;
}

.acc-alert-error {
  background: rgba(248, 113, 113, .08);
  border: 1px solid #f87171;
}

.acc-alert-success {
  background: rgba(52, 211, 153, .08);
  border: 1px solid #34d399;
}

.acc-alert-item {
  font-size: 13px;
  color: #e11d48;
}

.acc-alert-success .acc-alert-item {
  color: #166534;
}

/* -------- FORM ADMIN TẠO ACCOUNT -------- */

.acc-admin-create {
  margin-bottom: 16px;
}

.acc-admin-create-title {
  margin: 0 0 8px;
  font-size: 16px;
}

.acc-admin-create-form {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
}

.acc-admin-create-left,
.acc-admin-create-right {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.acc-admin-label {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.acc-admin-label input,
.acc-admin-label textarea,
.acc-admin-label select {
  margin-top: 0;
}

.acc-admin-hint {
  font-size: 11px;
  color: #94a3b8;
}

.acc-admin-create-actions {
  margin-top: 8px;
}

/* -------- DANH SÁCH ACCOUNT -------- */

.acc-list-title {
  margin: 0 0 8px;
  font-size: 16px;
}

.acc-list-empty {
  margin: 0;
  font-size: 13px;
  color: #94a3b8;
}

/* Lưới card – co giãn 2–4 cột tùy độ rộng */
.acc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

/* Card chung: nền tối, viền rõ để dễ tách card khi có nhiều acc */
.acc-card {
  background:
    radial-gradient(circle at top left, rgba(59,130,246,.12), transparent 55%),
    radial-gradient(circle at bottom right, rgba(45,212,191,.10), transparent 60%),
    #020617;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,.35);
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(15,23,42,.9);
  display: flex;
  flex-direction: column;
  transition:
    transform .08s ease-out,
    box-shadow .08s ease-out,
    border-color .08s ease-out,
    background .08s ease-out;
}

.acc-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(15,23,42,1);
  border-color: rgba(96,165,250,.9);
}

/* Thumbnail 16:9 */
.acc-card-thumb {
  position: relative;
  padding-top: 56.25%; /* 16:9 */
  overflow: hidden;
}

.acc-card-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform .18s ease-out;
}

.acc-card:hover .acc-card-thumb img {
  transform: scale(1.06);
}

.acc-card-thumb-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #94a3b8;
  background: #020617;
}

/* Badge trạng thái */
.acc-badge-status {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #f9fafb;
}

.acc-badge-status--available { background:#16a34a; }
.acc-badge-status--sold      { background:#dc2626; }
.acc-badge-status--hidden    { background:#6b7280; }

/* Pill admin */
.acc-admin-pill {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(15,23,42,.85);
  color: #fbbf24;
  border: 1px solid rgba(250,204,21,.8);
  cursor: pointer;
}

/* Thanh title đè lên ảnh */
.acc-card-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 6px 10px 5px;
  background: linear-gradient(to top, rgba(15,23,42,.98), rgba(15,23,42,.35));
  z-index: 10;
}

.acc-card-title {
  font-weight: 700;
  font-size: 14px;
  color: #f9fafb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acc-card-sub {
  margin-top: 1px;
  font-size: 12px;
  color: #e5e7eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Thân card – gom thông tin gọn, dễ scan */
.acc-card-body {
  padding: 8px 10px 0;
  font-size: 13px;
  color: #e5e7eb;
  line-height: 1.5;
  flex: 1 1 auto;
}

.acc-card-body p {
  margin: 1px 0;
}

.acc-price-org   { color:#fbbf24; font-weight:700; }
.acc-price-disc  { color:#38bdf8; font-weight:700; }
.acc-price-final { color:#22c55e; font-weight:800; }

.acc-note-small {
  font-size: 12px;
  color:#94a3b8;
  margin-top:3px;
}

.acc-login-link {
  color:#38bdf8;
}

/* Nút xem thêm hình ảnh */
.acc-thumb-more {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #020617;
  color: #bbf7d0;
  border: 1px solid #22c55e;
  text-align: center;
  cursor: pointer;
  transition:
    background .12s ease-out,
    color .12s ease-out,
    box-shadow .12s ease-out,
    border-color .12s;
}

.acc-thumb-more:hover {
  background: #022c22;
  color: #e5fdf5;
  border-color:#4ade80;
  box-shadow: 0 0 10px rgba(34,197,94,.6);
}

/* Chân card */
.acc-card-foot {
  padding: 8px 10px 10px;
  border-top: 1px solid rgba(15,23,42,.85);
  background: radial-gradient(circle at top, rgba(15,23,42,.9), rgba(15,23,42,1));
}

.acc-card-foot-note {
  margin: 0;
  font-size: 12px;
  color:#f97316;
}

/* Nút mua */
.acc-buy-btn,
.acc-buy-btn-login {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: #22c55e;
  color: #052e16;
  text-shadow: 0 0 5px rgba(190,242,100,.9);
  box-shadow: 0 0 16px rgba(22,163,74,.75);
  cursor: pointer;
  transition:
    transform .08s ease-out,
    box-shadow .08s ease-out,
    background .08s ease-out;
}

.acc-buy-btn:hover,
.acc-buy-btn-login:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 0 22px rgba(74,222,128,.95);
  background:#4ade80;
}

.acc-buy-btn:active,
.acc-buy-btn-login:active {
  transform: translateY(1px) scale(.99);
  box-shadow: 0 0 10px rgba(22,163,74,.7);
}

.acc-buy-btn-login {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

/* -------- Overlay popup chung -------- */

.acc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  overflow-y: auto;
  overflow-x: hidden;
}

.acc-dialog {
  box-sizing: border-box;
  background: #020617;
  border-radius: 18px;
  padding: 16px 18px 14px;
  max-width: min(480px, 100vw - 24px);
  width: 100%;
  max-height: 92vh;
  box-shadow: 0 20px 50px rgba(0,0,0,.9);
  color:#e5e7eb;
  position: relative;
  display: flex;
  flex-direction: column;
}

.acc-dialog-title {
  margin:0 0 8px;
  font-size:18px;
  font-weight:800;
}

.acc-dialog-close {
  position:absolute;
  top:8px;
  right:10px;
  border:none;
  background:transparent;
  color:#9ca3af;
  font-size:20px;
  cursor:pointer;
}

.acc-dialog-btn-row {
  margin-top:12px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.acc-dialog-btn {
  flex:1 1 0;
  border-radius:999px;
  border:none;
  padding:8px 12px;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
}

.acc-dialog-btn-primary {
  background:#22c55e;
  color:#052e16;
}

.acc-dialog-btn-secondary {
  background:#0f172a;
  color:#e5e7eb;
  border:1px solid #1f2937;
}

.acc-dialog-note {
  margin-top:6px;
  font-size:12px;
  color:#94a3b8;
}

/* Gallery 16:9 */
.acc-gallery-main {
  width: 100%;
  margin-bottom: 8px;
}

.acc-gallery-main img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  cursor: zoom-in;
  transition: transform .15s ease-out;
  object-fit: cover;
}

.acc-gallery-main img.acc-zoomed {
  transform: scale(1.35);
  cursor: zoom-out;
}

.acc-gallery-thumbs {
  display:flex;
  gap:6px;
  overflow-x:auto;
}

.acc-gallery-thumbs img {
  flex:0 0 auto;
  height:60px;
  width:auto;
  aspect-ratio:16 / 9;
  border-radius:6px;
  cursor:pointer;
  opacity:.7;
  object-fit:cover;
}

.acc-gallery-thumbs img.acc-thumb-active {
  opacity:1;
  outline:2px solid #22c55e;
}

/* Khối admin edit mini dưới card */
.acc-admin-edit {
  margin-top:8px;
  padding:8px 10px;
  border-radius:10px;
  background:#020617;
  border:1px dashed #334155;
}

.acc-admin-edit label {
  font-size:12px;
  display:block;
  margin-bottom:4px;
}

.acc-admin-edit input,
.acc-admin-edit textarea,
.acc-admin-edit select {
  font-size:12px;
  margin-top:2px;
}

.acc-admin-edit-actions {
  margin-top:6px;
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}

/* Modal mua */
.acc-buy-info {
  font-size:13px;
  line-height:1.6;
}

.acc-buy-info-note {
  margin-top:8px;
  font-size:12px;
  color:#94a3b8;
}



/* -------- QUICK SEARCH (tìm nhanh + gợi ý) -------- */

.acc-search-wrap{
  margin: 6px 0 10px;
  position: relative;
}

.acc-search-row{
  display:flex;
  gap:8px;
  align-items:center;
}

.acc-search-input{
  flex:1;
}

.acc-search-clear{
  padding:6px 10px;
  line-height:1;
  border-radius:10px;
}

.acc-search-count{
  margin-top:6px;
  font-size:12px;
  color:#94a3b8;
}

/* Dropdown gợi ý */
.acc-suggest{
  position:absolute;
  top: 44px;
  left: 0;
  right: 0;
  z-index: 50;
  border-radius: 12px;
  background: #0b1220;
  border: 1px solid rgba(148,163,184,.35);
  box-shadow: 0 16px 40px rgba(15,23,42,1);
  overflow: hidden;
}

.acc-suggest-item{
  width:100%;
  text-align:left;
  padding:8px 10px;
  background: transparent;
  border:0;
  cursor:pointer;
  color:#e5e7eb;
  display:block;
}

.acc-suggest-item:hover{
  background: rgba(59,130,246,.12);
}

.acc-suggest-title{
  font-size:13px;
  font-weight:700;
  line-height:1.3;
}

.acc-suggest-desc{
  font-size:12px;
  color:#94a3b8;
  margin-top:2px;
  line-height:1.25;
}

.acc-suggest mark{
  background: rgba(250,204,21,.25);
  color: inherit;
  padding: 0 2px;
  border-radius: 4px;
}

/* highlight card khi click gợi ý */
.acc-card-highlight{
  outline: 2px solid rgba(34,197,94,.9);
  outline-offset: 2px;
}

/* -------- Responsive -------- */

@media (max-width: 640px) {
  .acc-shop-wrap {
    padding: 10px 6px 18px;
  }

  .acc-hero {
    gap: 8px;
  }

  .acc-grid {
    gap: 10px;
  }

  .acc-card-foot {
    padding: 7px 9px 9px;
  }

  .acc-buy-btn,
  .acc-buy-btn-login {
    font-size: 14px;
    padding: 8px 12px;
  }

  .acc-admin-create-form {
    grid-template-columns: minmax(0, 1fr);
  }
}
