/* ============================================================
   My Account Page Styles
   WooCommerce: woocommerce/myaccount/
   ============================================================ */

.breadcrumb-bar { background: var(--bg-light); border-bottom: 1px solid var(--border); padding: 10px 0; }
.woocommerce-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.woocommerce-breadcrumb a { color: var(--primary); }
.woocommerce-breadcrumb .fa { font-size: 10px; }

.account-section { padding: 48px 0 60px; background: var(--bg-light); min-height: 70vh; }
.active-icon { background: rgba(255,255,255,0.2) !important; }

/* ============================================================
   GUEST VIEW: Auth tabs
   ============================================================ */
.account-tabs-wrap { max-width: 520px; margin: 0 auto; }

.account-tabs {
  display: flex;
  background: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-bottom: none;
}
.account-tab {
  flex: 1;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  background: var(--bg-light);
}
.account-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: #fff;
}

.account-tab-panel { display: none; }
.account-tab-panel.active { display: block; }

.auth-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 36px;
}
.auth-header {
  text-align: center;
  margin-bottom: 28px;
}
.auth-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.auth-header h2 { font-size: 22px; font-family: Georgia, serif; margin-bottom: 6px; }
.auth-header p { font-size: 14px; color: var(--text-muted); }

/* Form inputs */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--text); }
.form-group input, .form-group select {
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,122,60,0.1); }
.required { color: #c92a2a; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 499px) { .form-row { grid-template-columns: 1fr; } }

.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon-wrap .fa:not(.toggle-pass .fa) {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 14px;
}
.input-icon-wrap input { padding-left: 40px; width: 100%; }
.toggle-pass {
  position: absolute;
  right: 12px;
  color: var(--text-muted);
  font-size: 15px;
  cursor: pointer;
  transition: color var(--transition);
  background: none;
}
.toggle-pass:hover { color: var(--primary); }

.form-row-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 8px;
}
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.checkbox-label input { accent-color: var(--primary); }
.forgot-link { font-size: 13px; color: var(--primary); font-weight: 600; }
.forgot-link:hover { text-decoration: underline; }

/* Auth button */
.auth-btn {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* Password strength */
.password-strength {
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}
.strength-fill { height: 100%; width: 0%; background: #c92a2a; transition: width 0.3s, background 0.3s; border-radius: 2px; }
.strength-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Social Auth */
.social-auth { margin-top: 24px; }
.social-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.social-divider::before, .social-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.social-btns { display: flex; gap: 10px; }
.social-btn {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  background: #fff;
  color: var(--text);
}
.social-btn.google:hover { border-color: #ea4335; color: #ea4335; }
.social-btn.facebook:hover { border-color: #1877f2; color: #1877f2; }

/* ============================================================
   LOGGED IN: Dashboard
   ============================================================ */

/* Welcome Bar */
.dashboard-welcome {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  color: #fff;
}
.welcome-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  flex-shrink: 0;
}
.welcome-text h2 { font-size: 18px; font-family: Georgia, serif; margin-bottom: 2px; }
.welcome-text p { font-size: 13px; opacity: 0.8; }
.welcome-text a { color: rgba(255,255,255,0.9); text-decoration: underline; }
.welcome-stats {
  margin-left: auto;
  display: flex;
  gap: 24px;
}
.stat-item { text-align: center; }
.stat-num { font-size: 22px; font-weight: 800; display: block; }
.stat-item > span:last-child { font-size: 11px; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.8px; }

/* Dashboard Layout */
.dashboard-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 768px) {
  .dashboard-layout { grid-template-columns: 220px 1fr; }
}

/* Account Nav */
.account-nav {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  height: fit-content;
}
.woocommerce-MyAccount-navigation { }
.woocommerce-MyAccount-navigation li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), color var(--transition);
}
.woocommerce-MyAccount-navigation li:last-child a { border-bottom: none; }
.woocommerce-MyAccount-navigation li a:hover { background: var(--bg-light); color: var(--primary); }
.woocommerce-MyAccount-navigation li.is-active a {
  background: linear-gradient(135deg, rgba(26,122,60,0.08), rgba(26,122,60,0.03));
  color: var(--primary);
  border-left: 3px solid var(--primary);
}
.woocommerce-MyAccount-navigation li a .fa { width: 16px; color: var(--text-muted); }
.woocommerce-MyAccount-navigation li.is-active a .fa { color: var(--primary); }
.logout-item a { color: #c92a2a !important; }
.logout-item a .fa { color: #c92a2a !important; }

/* Account Content Panels */
.account-content { }
.account-panel { display: none; animation: fadeIn 0.2s ease; }
.account-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.panel-title {
  font-size: 22px;
  font-family: Georgia, serif;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.count-badge {
  font-size: 12px;
  background: var(--primary);
  color: #fff;
  padding: 2px 8px;
  border-radius: 20px;
  font-family: inherit;
}

/* Dashboard overview */
.dashboard-hello { font-size: 14px; color: var(--text-muted); line-height: 1.8; margin-bottom: 24px; }
.dashboard-hello a { color: var(--primary); font-weight: 600; }

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
@media (min-width: 600px) { .dashboard-cards { grid-template-columns: repeat(4, 1fr); } }

.dash-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.dash-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.dash-card-icon.order { background: #e8f5e9; color: var(--primary); }
.dash-card-icon.pending { background: #fff8e1; color: #e67700; }
.dash-card-icon.delivered { background: #e8f5e9; color: #2b8a3e; }
.dash-card-icon.points { background: #fff3e0; color: #f59f00; }
.dash-card-info h3 { font-size: 22px; font-weight: 800; margin-bottom: 2px; }
.dash-card-info p { font-size: 12px; color: var(--text-muted); }

.recent-title { font-size: 16px; font-weight: 700; margin-bottom: 14px; }

/* Orders / Recent Orders table */
.recent-orders-table,
.woocommerce-orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.recent-orders-table thead tr,
.woocommerce-orders-table thead tr {
  background: var(--bg-light);
  border-bottom: 2px solid var(--border);
}
.recent-orders-table th,
.woocommerce-orders-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}
.recent-orders-table td,
.woocommerce-orders-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.recent-orders-table tr:last-child td,
.woocommerce-orders-table tr:last-child td { border-bottom: none; }
.recent-orders-table a, .woocommerce-orders-table a { color: var(--primary); font-weight: 600; }

.order-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.order-status.processing { background: #fff3cd; color: #856404; }
.order-status.completed  { background: #d1e7dd; color: #0a3622; }
.order-status.cancelled  { background: #f8d7da; color: #842029; }
.order-status.pending    { background: #cfe2ff; color: #084298; }

.order-actions { display: flex; gap: 6px; }
.btn-xs { padding: 6px 12px !important; font-size: 12px !important; }
.btn-sm { padding: 9px 18px !important; font-size: 13px !important; }

/* Wishlist Grid */
.wishlist-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (min-width: 600px) { .wishlist-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .wishlist-grid { grid-template-columns: repeat(4, 1fr); } }

.wishlist-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  transition: box-shadow var(--transition);
}
.wishlist-item:hover { box-shadow: var(--shadow); }
.wishlist-info { padding: 12px; }
.wishlist-info h4 { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.wishlist-info h4 a { color: var(--text); }
.wishlist-info h4 a:hover { color: var(--primary); }
.wishlist-info .price { display: block; font-size: 14px; font-weight: 800; color: var(--primary); margin-bottom: 8px; }
.wishlist-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  border: 1px solid var(--border);
}
.wishlist-remove:hover { background: #c92a2a; color: #fff; border-color: #c92a2a; }

/* Addresses */
.addresses-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 600px) { .addresses-grid { grid-template-columns: repeat(3, 1fr); } }

.address-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.address-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.address-card-header h3 { font-size: 15px; font-weight: 700; }
.edit-address { font-size: 12px; color: var(--primary); display: flex; align-items: center; gap: 4px; }
.address-card address { font-style: normal; font-size: 13px; color: var(--text-muted); line-height: 1.8; }
.address-card address .fa { color: var(--primary); margin-right: 4px; }

.add-address {
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  cursor: pointer;
  transition: border-color var(--transition);
}
.add-address:hover { border-color: var(--primary); }
.add-address-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--transition);
}
.add-address-btn .fa { font-size: 28px; }
.add-address:hover .add-address-btn { color: var(--primary); }

/* Account Details form */
.account-details-form { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.form-divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.account-details-form h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.account-details-form small { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
