/* ==========================================================================
   NEW CUSTOM STYLES: newcustomhere.css
   ========================================================================== */

/* 1. Collection Banner: Hỗ trợ thẻ picture cho Desktop & Mobile Banner */
.cbn picture {
  display: block;
  width: 100%;
}

@media (max-width: 767px) {
  .cbn img {
    aspect-ratio: auto;
    min-height: 200px;
    max-height: 380px;
    object-fit: cover;
  }
}

/* 2. Cart Orderbar Docking: Đặt thanh giỏ hàng chuẩn mép trên footer */
body.template-cart,
body:has(.co),
body.s1,
body.s2 {
  padding-bottom: 0 !important;
}

body.template-cart .foot,
body:has(.co) .foot {
  margin-top: 0 !important;
}

.cart-orderbar-dock {
  width: 100%;
  position: relative;
  display: block;
  margin: 16px 0 0 0;
  padding: 0;
}

.cart-orderbar-dock.is-docked .orderbar {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  top: auto !important;
  width: 100% !important;
  box-shadow: none !important;
  border-top: 1px solid var(--line, #DCDEE2) !important;
  border-bottom: 1px solid var(--line, #DCDEE2) !important;
  z-index: 10 !important;
}

/* ==========================================================================
   3. CUSTOMER PAGES STYLES (Login, Register, Account, Addresses, Orders)
   ========================================================================== */

/* --- AUTHENTICATION: LOGIN, REGISTER, RECOVER, RESET --- */
.auth-wrap {
  padding: 36px 16px 72px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 480px;
}

.auth-box {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04), 0 2px 6px rgba(0, 0, 0, 0.02);
  padding: 36px 32px;
  box-sizing: border-box;
}

@media (max-width: 540px) {
  .auth-wrap {
    padding: 20px 12px 48px;
  }
  .auth-box {
    padding: 24px 20px;
    border-radius: 12px;
  }
}

/* Tabs chuyển đổi Đăng nhập / Đăng ký */
.auth-tabs {
  display: flex;
  background: #F1F3F5;
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 26px;
  gap: 4px;
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #64748B;
  text-decoration: none;
  border-radius: 7px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

.auth-tab:hover {
  color: #111827;
}

.auth-tab.active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* Header form */
.auth-title {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 8px;
  text-align: center;
  letter-spacing: -0.01em;
}

.auth-sub {
  font-size: 13.5px;
  color: #64748B;
  text-align: center;
  margin: 0 0 24px;
  line-height: 1.5;
}

/* Form layout */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .auth-row-2 {
    grid-template-columns: 1fr;
  }
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field label {
  font-size: 13px;
  font-weight: 600;
  color: #1F2937;
}

/* Input & Select */
.auth-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  font-size: 14px;
  color: #111827;
  background: #ffffff;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}

.auth-input:focus {
  border-color: #111827;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.auth-input::placeholder {
  color: #9CA3AF;
}

select.auth-input {
  cursor: pointer;
}

/* Radio buttons (Giới tính) */
.auth-radio-group {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 4px 0;
  font-size: 13.5px;
  color: #1F2937;
}

.auth-radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-weight: 500;
}

.auth-radio-group input[type="radio"] {
  accent-color: #111827;
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
}

/* Submit Button */
.auth-actions {
  margin-top: 8px;
}

.auth-btn-submit {
  width: 100%;
  height: 46px;
  background: #111827;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.auth-btn-submit:hover {
  background: #272F3D;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.15);
}

.auth-btn-submit:active {
  transform: translateY(0);
}

/* Links dưới form */
.auth-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: #64748B;
  margin-top: 4px;
}

.auth-links a {
  color: #111827;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s;
}

.auth-links a:hover {
  text-decoration: underline;
}

/* Thông báo lỗi */
.auth-box .errors,
.errors {
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  color: #991B1B;
  font-size: 13px;
}

.auth-box .errors ul,
.errors ul {
  margin: 0;
  padding-left: 18px;
}

.auth-box .errors li,
.errors li {
  margin: 2px 0;
}

/* --- DASHBOARD: ACCOUNT, ORDERS, ADDRESSES --- */
.account-wrap {
  padding: 16px 0 60px;
}

.account-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .account-grid {
    grid-template-columns: 1fr;
  }
}

.account-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 901px) {
  .account-sidebar {
    position: sticky;
    top: 90px;
  }
}

/* User Card trong Sidebar */
.account-user-card {
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.account-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #111827;
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.account-user-name {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
  line-height: 1.3;
}

.account-user-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #7A5A1E;
  background: #FBF4E8;
  border: 1px solid rgba(196, 145, 50, 0.25);
  padding: 3px 10px;
  border-radius: 999px;
}

/* Navigation Sidebar */
.account-nav {
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.account-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: #4B5563;
  text-decoration: none;
  transition: all 0.18s ease;
}

.account-nav-item:hover {
  background: #F8FAFC;
  color: #111827;
}

.account-nav-item.active {
  background: #111827;
  color: #ffffff;
  font-weight: 600;
}

.account-nav-item.active svg {
  stroke: #ffffff;
}

.account-nav-item.logout {
  color: #DC2626;
  margin-top: 4px;
  border-top: 1px solid #F1F5F9;
  border-radius: 0 0 8px 8px;
  padding-top: 14px;
}

.account-nav-item.logout:hover {
  background: #FEF2F2;
  color: #B91C1C;
}

/* Content Area */
.account-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.account-card {
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

@media (max-width: 600px) {
  .account-card {
    padding: 18px 16px;
  }
}

.account-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid #F1F5F9;
}

.account-card-title {
  font-size: 17px;
  font-weight: 700;
  color: #111827;
  margin: 0;
  letter-spacing: -0.01em;
}

/* Thông tin dạng Grid */
.account-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

@media (max-width: 640px) {
  .account-info-grid {
    grid-template-columns: 1fr;
  }
}

.account-info-item {
  background: #F9FAFB;
  border: 1px solid #F3F4F6;
  border-radius: 10px;
  padding: 14px 16px;
}

.account-info-lbl {
  font-size: 11.5px;
  font-weight: 600;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.account-info-val {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin: 0;
  word-break: break-word;
}

/* Bảng đơn hàng */
.account-table-wrap {
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  overflow-x: auto;
}

.account-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

.account-table th {
  background: #F8FAFC;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
  border-bottom: 1px solid #E5E7EB;
  white-space: nowrap;
}

.account-table td {
  padding: 14px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
  color: #1F2937;
}

.account-table tr:last-child td {
  border-bottom: none;
}

/* Trạng thái đơn hàng (Badges) */
.account-badge-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.account-badge-paid {
  background: #DEF7EC;
  color: #03543F;
}

.account-badge-pending {
  background: #FEF08A;
  color: #713F12;
}

.account-badge-cancel {
  background: #FEE2E2;
  color: #991B1B;
}

/* Thẻ địa chỉ */
.address-card {
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 18px;
  position: relative;
  transition: all 0.2s ease;
}

.address-card.is-default {
  border-color: #111827;
  background: #FAF9F8;
}

.address-default-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  color: #047857;
  background: #D1FAE5;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.address-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #E5E7EB;
  font-size: 13px;
}

.address-btn-act {
  color: #111827;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  transition: color 0.15s;
}

.address-btn-act:hover {
  text-decoration: underline;
}

.address-btn-act.delete a {
  color: #DC2626;
  text-decoration: none;
  font-weight: 600;
}

.address-btn-act.delete a:hover {
  text-decoration: underline;
}
