/* PanelShop — design tokens; --ps-font set via admin inline style */

:root {
  --ps-font: system-ui, sans-serif;
  --ps-fw-body: 400;
  --ps-fw-btn: 500;
  --ps-fw-title: 600;
  --ps-fw-heading: 700;
  --ps-currency-icon-height: 20px;
  --ps-currency-icon-height-compact: 16px;
  --ps-mobile-currency-icon-height: 18px;
  --ps-primary-50: #eff6ff;
  --ps-primary-100: #dbeafe;
  --ps-primary-200: #bfdbfe;
  --ps-primary-300: #93c5fd;
  --ps-primary-400: #60a5fa;
  --ps-primary-500: #3b82f6;
  --ps-primary-600: #2563eb;
  --ps-primary-700: #1d4ed8;
  --ps-accent-50: #f0fdf4;
  --ps-accent-100: #dcfce7;
  --ps-accent-500: #22c55e;
  --ps-accent-600: #16a34a;
  --ps-surface-50: #f8fafc;
  --ps-surface-100: #f1f5f9;
  --ps-surface-200: #e2e8f0;
  --ps-surface-300: #cbd5e1;
  --ps-surface-400: #94a3b8;
  --ps-surface-500: #64748b;
  --ps-surface-600: #475569;
  --ps-surface-700: #334155;
  --ps-surface-800: #1e293b;
  --ps-surface-900: #0f172a;
  --ps-warning: #f59e0b;
  --ps-error: #ef4444;
  --ps-success: #22c55e;
  --ps-radius: 12px;
  --ps-radius-lg: 16px;
  --ps-radius-xl: 24px;
  --ps-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --ps-shadow-lg: 0 8px 32px rgba(15, 23, 42, 0.1);
}

.panelshop-auth,
.panelshop-checkout,
.panelshop-dashboard,
.panelshop-cart,
.panelshop-mini-cart,
.panelshop-thank-you,
.panelshop-legal,
.panelshop-mini-account,
.panelshop-header-search,
.panelshop-mobile-search,
.panelshop-product-gallery,
.panelshop-product-cart,
.panelshop-product-variations,
.panelshop-product-price-wrap,
.panelshop-product-colors-wrap,
.panelshop-product-attributes-wrap,
.panelshop-product-card-meta,
.panelshop-product-single-actions-wrap,
.panelshop-product-card-wishlist-wrap,
.ps-purchase-root,
.panelshop-elementor-inner {
  font-family: var(--ps-font);
  font-weight: var(--ps-fw-body);
  direction: rtl;
  color: var(--ps-surface-800);
  line-height: 1.6;
  box-sizing: border-box;
}

.ps-currency-inline svg,
.ps-currency-inline .ps-currency-svg,
.ps-currency-inline img {
  display: inline-block;
  height: var(--ps-currency-icon-height, 20px);
  width: auto;
  max-width: 5em;
  vertical-align: middle;
  object-fit: contain;
}

:is(
  .panelshop-auth,
  .panelshop-checkout,
  .panelshop-dashboard,
  .panelshop-cart,
  .panelshop-mini-cart,
  .panelshop-thank-you,
  .panelshop-legal,
  .panelshop-mini-account,
  .panelshop-header-search,
  .panelshop-mobile-search,
  .panelshop-product-gallery,
  .panelshop-product-cart,
  .panelshop-product-variations,
  .panelshop-product-price-wrap,
  .panelshop-product-colors-wrap,
  .panelshop-product-attributes-wrap,
  .panelshop-product-card-meta,
  .panelshop-product-single-actions-wrap,
  .panelshop-product-card-wishlist-wrap
) :where(input, button, select, textarea) {
  font-family: inherit;
}

.panelshop-auth *,
.panelshop-checkout *,
.panelshop-dashboard *,
.panelshop-cart *,
.panelshop-mini-cart *,
.panelshop-thank-you *,
.panelshop-legal *,
.panelshop-mini-account *,
.panelshop-header-search *,
.panelshop-mobile-search *,
.panelshop-product-gallery *,
.panelshop-product-cart *,
.panelshop-product-variations *,
.panelshop-product-price-wrap *,
.panelshop-product-colors-wrap *,
.panelshop-product-attributes-wrap *,
.panelshop-product-card-meta *,
.panelshop-product-single-actions-wrap *,
.panelshop-product-card-wishlist-wrap * {
  box-sizing: border-box;
}

/* Auth */
.ps-auth-bg {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, var(--ps-primary-50), #fff, #f5f3ff);
  z-index: -1;
}

.ps-auth-container {
  max-width: 420px;
  margin: 0 auto;
  padding: 48px 16px;
}

.ps-auth-header { text-align: center; margin-bottom: 32px; }

.ps-auth-logo {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--ps-primary-500), var(--ps-primary-700));
  border-radius: var(--ps-radius-lg);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  color: #fff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
}

.ps-auth-title { font-size: 24px; font-weight: var(--ps-fw-heading); margin: 0; }
.ps-auth-subtitle { font-size: 14px; color: var(--ps-surface-400); margin: 4px 0 0; }

.ps-auth-card {
  background: #fff;
  border-radius: var(--ps-radius-xl);
  box-shadow: var(--ps-shadow-lg);
  border: 1px solid var(--ps-surface-100);
  overflow: hidden;
}

.ps-auth-steps {
  display: flex; align-items: center;
  padding: 24px 32px 0;
  gap: 0;
}

.ps-step {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--ps-surface-100);
  color: var(--ps-surface-400);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
  transition: all 0.3s;
}

.ps-step.active { background: var(--ps-primary-500); color: #fff; }
.ps-step.done { background: var(--ps-accent-500); color: #fff; }

.ps-step-line { flex: 1; height: 2px; background: var(--ps-surface-200); margin: 0 8px; transition: background 0.3s; }
.ps-step-line.done { background: var(--ps-accent-500); }

.ps-auth-body { padding: 32px; }

.ps-step-header { text-align: center; margin-bottom: 24px; }
.ps-step-header h2 { font-size: 20px; font-weight: 700; margin: 0 0 8px; }
.ps-step-header p { font-size: 14px; color: var(--ps-surface-400); margin: 0; }

.ps-form-group { margin-bottom: 16px; }
.ps-form-group label { display: block; font-size: 14px; font-weight: 500; color: var(--ps-surface-700); margin-bottom: 8px; }

.ps-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--ps-surface-50);
  border: 1px solid var(--ps-surface-200);
  border-radius: var(--ps-radius);
  font-size: 14px;
  color: var(--ps-surface-800);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.ps-input:focus {
  border-color: var(--ps-primary-400);
  box-shadow: 0 0 0 4px var(--ps-primary-50);
}

select.ps-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
  padding-left: 40px;
  cursor: pointer;
}

.ps-textarea { resize: vertical; min-height: 80px; }

.ps-input-icon { position: relative; }
.ps-input-icon svg { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--ps-surface-400); }
.ps-input-icon .ps-input { padding-right: 44px; }

.ps-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px;
  border-radius: var(--ps-radius);
  font-size: 14px; font-weight: var(--ps-fw-btn);
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

.ps-btn-primary {
  background: var(--ps-primary-600);
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25);
}

.ps-btn-primary:hover { background: var(--ps-primary-700); }
.ps-btn-primary:disabled,
.ps-btn-accent:disabled { opacity: 0.7; cursor: not-allowed; }

.ps-btn-accent {
  background: var(--ps-accent-600);
  color: #fff;
  box-shadow: 0 4px 16px rgba(22, 163, 74, 0.28);
}

.ps-btn-accent:hover { background: #15803d; }

.ps-btn.is-loading {
  position: relative;
  pointer-events: none;
  color: transparent !important;
}

.ps-btn.is-loading > * {
  opacity: 0;
}

.ps-btn.is-loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ps-btn-spin 0.65s linear infinite;
}

.ps-btn-outline.is-loading::after {
  border-color: rgba(37, 99, 235, 0.2);
  border-top-color: var(--ps-primary-600);
}

@keyframes ps-btn-spin {
  to { transform: rotate(360deg); }
}

.ps-btn-outline {
  background: transparent;
  color: var(--ps-surface-600);
  border: 1px solid var(--ps-surface-200);
}

.ps-btn-outline:hover { background: var(--ps-surface-50); }
.ps-btn-block { width: 100%; }
.ps-btn-lg { padding: 16px 32px; font-size: 16px; }
.ps-btn-sm { padding: 8px 12px; font-size: 12px; font-weight: 600; }

.ps-info-box {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px;
  background: var(--ps-primary-50);
  border-radius: var(--ps-radius);
  margin-top: 16px;
}

.ps-info-box svg { color: var(--ps-primary-500); flex-shrink: 0; margin-top: 2px; }
.ps-info-box p { font-size: 12px; color: var(--ps-primary-700); margin: 0; line-height: 1.6; }

.ps-back-btn {
  display: flex; align-items: center; gap: 4px;
  background: none; border: none;
  color: var(--ps-surface-400);
  font-size: 14px;
  cursor: pointer; margin-bottom: 16px;
  padding: 0;
}

.ps-back-btn:hover { color: var(--ps-surface-600); }

.ps-otp-icon {
  width: 64px; height: 64px;
  background: var(--ps-primary-50);
  border-radius: var(--ps-radius-lg);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  color: var(--ps-primary-500);
}

.ps-otp-inputs {
  display: flex; gap: 12px; justify-content: center;
  margin-bottom: 12px;
}

.otp-input, .ps-otp-input {
  width: 48px; height: 56px;
  text-align: center;
  font-size: 20px; font-weight: var(--ps-fw-heading);
  font-family: monospace;
  border: 2px solid var(--ps-surface-200);
  border-radius: var(--ps-radius);
  background: #fff;
  direction: ltr;
  outline: none;
  transition: all 0.2s;
}

.otp-input:focus, .ps-otp-input:focus {
  border-color: var(--ps-primary-500);
  box-shadow: 0 0 0 4px var(--ps-primary-100);
}

.otp-input.filled, .ps-otp-input.filled {
  border-color: var(--ps-primary-500);
  background: rgba(59, 130, 246, 0.05);
}

.ps-clear-otp {
  display: block; margin: 0 auto 16px;
  background: none; border: none;
  font-size: 12px; color: var(--ps-surface-400);
  cursor: pointer;
}

.ps-resend-area { text-align: center; }
.ps-resend-area p { font-size: 14px; color: var(--ps-surface-400); }
#ps-countdown { font-family: monospace; font-weight: 700; color: var(--ps-primary-600); }

.ps-resend-btn {
  background: none; border: none;
  color: var(--ps-primary-600); font-weight: 500;
  font-size: 14px; cursor: pointer;
}

.ps-new-user-badge {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
  font-size: 12px; background: #fffbeb; color: #d97706;
  padding: 4px 12px; border-radius: 8px; font-weight: 500;
}

.ps-loading-indicator {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--ps-primary-600); font-size: 14px; font-weight: 500; margin-top: 16px;
}

.ps-spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--ps-primary-200);
  border-top-color: var(--ps-primary-600);
  border-radius: 50%;
  animation: ps-spin 0.8s linear infinite;
}

@keyframes ps-spin { to { transform: rotate(360deg); } }

/* Success */
.ps-success { text-align: center; padding: 24px 0; }

.ps-success-icon {
  width: 80px; height: 80px;
  background: var(--ps-accent-100);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  color: var(--ps-accent-600);
  position: relative;
}

.ps-pulse-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid var(--ps-accent-500);
  animation: pulseRing 1.5s ease-out infinite;
}

@keyframes pulseRing {
  0% { transform: scale(0.95); opacity: 1; }
  100% { transform: scale(1.3); opacity: 0; }
}

.ps-progress-bar {
  width: 192px; height: 4px;
  background: var(--ps-surface-100);
  border-radius: 999px;
  margin: 24px auto 0;
  overflow: hidden;
}

.ps-progress-fill {
  height: 100%; background: var(--ps-accent-500);
  border-radius: 999px;
  animation: ps-progress 2s linear forwards;
}

@keyframes ps-progress { from { width: 0; } to { width: 100%; } }

.ps-auth-footer { text-align: center; font-size: 12px; color: var(--ps-surface-400); margin-top: 24px; }

/* Cards */
.ps-card {
  background: #fff;
  border-radius: var(--ps-radius-lg);
  border: 1px solid var(--ps-surface-100);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--ps-shadow);
}

.ps-card-title { font-size: 18px; font-weight: 700; margin: 0 0 20px; }

/* Checkout */
.ps-checkout-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  max-width: var(--ps-layout-max-width, 1100px);
  margin: 0 auto;
  padding: 24px 16px;
}

.ps-stepper {
  display: flex; align-items: center;
  margin-bottom: 24px;
  padding: 16px 24px;
  background: #fff;
  border-radius: var(--ps-radius-lg);
  border: 1px solid var(--ps-surface-100);
}

.ps-stepper-item {
  display: flex; align-items: center; gap: 8px;
  color: var(--ps-surface-400);
  font-size: 14px;
}

.ps-stepper-item.active { color: var(--ps-primary-600); font-weight: 600; }
.ps-stepper-item.done { color: var(--ps-accent-600); }

.ps-stepper-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--ps-surface-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}

.ps-stepper-item.active .ps-stepper-num { background: var(--ps-primary-500); color: #fff; }
.ps-stepper-item.done .ps-stepper-num { background: var(--ps-accent-500); color: #fff; }

.ps-stepper-line { flex: 1; height: 2px; background: var(--ps-surface-200); margin: 0 12px; }

.ps-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.ps-checkout-sidebar { position: sticky; top: 24px; align-self: start; }

.ps-order-summary .ps-summary-row {
  display: flex; justify-content: space-between;
  padding: 8px 0; font-size: 14px; color: var(--ps-surface-600);
}

.ps-summary-total {
  display: flex; justify-content: space-between;
  padding: 16px 0 0;
  border-top: 1px solid var(--ps-surface-200);
  font-size: 16px; font-weight: 700;
  margin-top: 8px;
}

.ps-summary-total-lg { font-size: 20px; padding: 24px 0; }

.ps-coupon-form { display: flex; gap: 8px; margin-top: 16px; }
.ps-coupon-form .ps-input { flex: 1; }

.ps-coupon-message { font-size: 13px; margin-top: 8px; padding: 8px 12px; border-radius: 8px; }
.ps-coupon-message.success { background: var(--ps-accent-50); color: var(--ps-accent-600); }
.ps-coupon-message.error { background: #fef2f2; color: var(--ps-error); }

.ps-methods-list { display: flex; flex-direction: column; gap: 12px; }

.ps-method-card {
  display: flex; align-items: center; gap: 16px;
  padding: 16px;
  border: 2px solid var(--ps-surface-200);
  border-radius: var(--ps-radius);
  cursor: pointer;
  transition: all 0.2s;
}

.ps-method-card:hover { border-color: var(--ps-primary-300); }
.ps-method-card.selected { border-color: var(--ps-primary-500); background: var(--ps-primary-50); }

.ps-method-icon {
  width: 48px; height: 48px;
  background: var(--ps-surface-100);
  border-radius: var(--ps-radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}

.ps-method-info { flex: 1; }
.ps-method-info strong { display: block; font-size: 14px; }
.ps-method-info span { font-size: 12px; color: var(--ps-surface-400); }
.ps-method-price { font-weight: 700; color: var(--ps-primary-600); }

.ps-cart-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--ps-surface-100);
}

.ps-cart-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.ps-cart-item-info { flex: 1; }
.ps-cart-item-info strong { font-size: 14px; display: block; }
.ps-cart-item-info span { font-size: 12px; color: var(--ps-surface-400); }

.ps-qty-control {
  display: flex; align-items: center; gap: 8px;
}

.ps-qty-btn {
  width: 28px; height: 28px;
  border: 1px solid var(--ps-surface-200);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}

.ps-checkout-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 16px; }

/* Dashboard — layout shell is in dashboard.css (ps-dashboard-inner grid) */
.ps-dashboard-layout {
  max-width: var(--ps-layout-max-width, 1280px);
  margin: 0 auto;
  padding: 24px 16px;
  min-width: 0;
  width: 100%;
}

.ps-user-info {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--ps-surface-100);
  margin-bottom: 12px;
}

.ps-avatar {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--ps-primary-500), var(--ps-primary-700));
  border-radius: var(--ps-radius);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 18px;
}

.ps-user-info strong { display: block; font-size: 14px; }
.ps-user-info span { font-size: 12px; color: var(--ps-surface-400); direction: ltr; display: block; }

.ps-nav-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none; background: none;
  border-radius: var(--ps-radius);
  font-size: 14px;
  color: var(--ps-surface-600);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  position: relative;
}

.ps-nav-item:hover { background: var(--ps-surface-50); color: var(--ps-surface-800); }
.ps-nav-item.active { background: var(--ps-primary-50); color: var(--ps-primary-700); font-weight: 600; }

.ps-badge {
  position: absolute; left: 12px;
  background: var(--ps-error); color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 999px;
}

.ps-logout { color: var(--ps-error) !important; margin-top: 8px; }

.ps-page-title { font-size: 24px; font-weight: var(--ps-fw-heading); margin: 0 0 24px; }

.ps-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.ps-stat-card {
  background: #fff;
  border: 1px solid var(--ps-surface-100);
  border-radius: var(--ps-radius-lg);
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--ps-shadow);
}

.ps-stat-card:hover { transform: translateY(-2px); box-shadow: var(--ps-shadow-lg); }

.ps-stat-value { display: block; font-size: 28px; font-weight: var(--ps-fw-heading); color: var(--ps-primary-600); }
.ps-stat-label { font-size: 13px; color: var(--ps-surface-400); }

.ps-filter-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }

.ps-filter-tab {
  padding: 8px 16px;
  border: 1px solid var(--ps-surface-200);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.ps-filter-tab.active { background: var(--ps-primary-500); color: #fff; border-color: var(--ps-primary-500); }

.ps-order-card {
  background: #fff;
  border: 1px solid var(--ps-surface-100);
  border-radius: var(--ps-radius-lg);
  padding: 20px;
  margin-bottom: 12px;
}

.ps-order-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.ps-order-number { font-weight: 700; }
.ps-status-badge {
  font-size: 12px; padding: 4px 10px;
  border-radius: 999px; font-weight: 600;
  background: var(--ps-primary-50); color: var(--ps-primary-700);
}

.ps-addresses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

.ps-address-card {
  background: #fff;
  border: 1px solid var(--ps-surface-100);
  border-radius: var(--ps-radius-lg);
  padding: 20px;
  position: relative;
}

.ps-address-actions { display: flex; gap: 8px; margin-top: 12px; }

.ps-page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.ps-page-header .ps-page-title { margin: 0; }

.ps-wishlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }

.ps-wishlist-item {
  background: #fff;
  border: 1px solid var(--ps-surface-100);
  border-radius: var(--ps-radius-lg);
  overflow: hidden;
}

.ps-wishlist-item img { width: 100%; height: 160px; object-fit: cover; }
.ps-wishlist-item-info { padding: 12px; }
.ps-wishlist-item-info strong { font-size: 14px; display: block; margin-bottom: 4px; }
.ps-wishlist-item-info span { color: var(--ps-primary-600); font-weight: 700; }

.ps-notification-item {
  display: flex; gap: 16px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--ps-surface-100);
  border-radius: var(--ps-radius-lg);
  margin-bottom: 12px;
}

.ps-notification-item.unread { border-right: 3px solid var(--ps-primary-500); }
.ps-notif-type { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.ps-notif-type.promo { background: var(--ps-primary-500); }
.ps-notif-type.info { background: var(--ps-surface-400); }
.ps-notif-type.warning { background: var(--ps-warning); }

/* Modal */
.ps-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; }
.ps-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.5); }
.ps-modal-content {
  position: relative;
  background: #fff;
  border-radius: var(--ps-radius-lg);
  width: 90%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--ps-shadow-lg);
}

.ps-modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--ps-surface-100);
}

.ps-modal-header h3 { margin: 0; font-size: 18px; }
.ps-modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--ps-surface-400); }
.ps-modal-body { padding: 24px; }
.ps-modal-footer { display: flex; justify-content: flex-end; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--ps-surface-100); }

/* Confirm dialog */
.ps-confirm-modal {
  z-index: 100010;
  padding: 16px;
  align-items: center;
  justify-content: center;
}

.ps-confirm-modal .ps-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}

.ps-confirm-card {
  position: relative;
  z-index: 1;
  width: min(420px, calc(100% - 32px));
  text-align: center;
  border-radius: var(--ps-radius-xl);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

.ps-confirm-body {
  padding: 28px 24px 8px;
}

.ps-confirm-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #fef2f2;
  color: var(--ps-error, #dc2626);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ps-confirm-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: var(--ps-fw-heading);
  color: var(--ps-surface-800);
}

.ps-confirm-message {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ps-surface-500);
}

.ps-confirm-actions {
  display: flex;
  justify-content: center;
  flex-direction: row-reverse;
  gap: 10px;
  padding: 20px 24px 24px;
  border-top: none;
  background: #fff;
}

.ps-confirm-modal .ps-btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 120px;
  padding: 12px 20px;
  border-radius: var(--ps-radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.ps-confirm-modal .ps-btn-outline {
  background: #fff;
  color: var(--ps-surface-600);
  border: 1px solid var(--ps-surface-200);
}

.ps-confirm-modal .ps-btn-outline:hover {
  background: var(--ps-surface-50);
  border-color: var(--ps-surface-300);
}

.ps-confirm-modal .ps-btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  border: none;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.28);
}

.ps-confirm-modal .ps-btn-danger:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}

@media (max-width: 480px) {
  .ps-confirm-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .ps-confirm-modal .ps-btn {
    width: 100%;
    min-width: 0;
  }
}

/* Modal inline validation */
.ps-modal-error {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 13px;
  line-height: 1.55;
  text-align: right;
}

.ps-modal-error[hidden] {
  display: none !important;
}

/* Thank you — see assets/css/thank-you.css */

.ps-order-details { margin: 32px 0; text-align: right; }
.ps-order-detail-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--ps-surface-100); }

.ps-timeline { text-align: right; margin: 32px 0; }
.ps-timeline-item { display: flex; gap: 16px; padding: 12px 0; position: relative; }
.ps-timeline-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ps-surface-200); margin-top: 4px; flex-shrink: 0; }
.ps-timeline-item.active .ps-timeline-dot { background: var(--ps-accent-500); }
.ps-timeline-content strong { display: block; font-size: 14px; }
.ps-timeline-content span { font-size: 12px; color: var(--ps-surface-400); }

.ps-loading { color: var(--ps-surface-400); text-align: center; padding: 32px; }
.ps-message { padding: 12px 16px; border-radius: 8px; margin-top: 12px; font-size: 14px; }
.ps-message.success { background: var(--ps-accent-50); color: var(--ps-accent-600); }
.ps-message.error { background: #fef2f2; color: var(--ps-error); }

.glass { backdrop-filter: blur(12px); background: rgba(255, 255, 255, 0.8); }

/* Responsive */
@media (max-width: 768px) {
  .ps-checkout-layout {
    grid-template-columns: 1fr;
    min-width: 0;
    max-width: 100%;
    padding: 0;
  }
  .ps-checkout-sidebar { position: static; min-width: 0; }
  .ps-checkout-main { min-width: 0; }
  .ps-dashboard-layout {
    padding: 12px max(8px, env(safe-area-inset-right, 0px)) 12px max(8px, env(safe-area-inset-left, 0px));
    max-width: 100%;
  }

  .panelshop-dashboard .ps-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ps-form-row { grid-template-columns: 1fr; }
  .ps-stepper-label { display: none; }
}
