/* ─────────────────────────────────────────────────────────────────
   ASM Profile — Matches ASM Checkout style
   Colors injected via CSS vars: --asmp-primary, --asmp-secondary, --asmp-accent
   ───────────────────────────────────────────────────────────────── */

:root {
    --asmp-primary: #5eb3b7;
    --asmp-secondary: #0f7b6c;
    --asmp-accent: #d9730d;

    /* Neutrals — same as checkout */
    --asmp-bg: #ffffff;
    --asmp-bg-light: #f8fafc;
    --asmp-text-dark: #1e293b;
    --asmp-text-body: #374151;
    --asmp-text-muted: #64748b;
    --asmp-text-placeholder: #94a3b8;
    --asmp-border: #e2e8f0;
    --asmp-border-light: #f1f5f9;
    --asmp-red: #ef4444;
    --asmp-green: #10b981;
    --asmp-yellow-bg: #fef3c7;
    --asmp-yellow-text: #92400e;

    /* Shared */
    --asmp-radius-card: 12px;
    --asmp-radius-option: 10px;
    --asmp-radius-input: 8px;
    --asmp-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --asmp-mono: "SFMono-Regular", Menlo, Consolas, "PT Mono", monospace;
}

/* ── Reset on our sections ───────────────────────────────────── */
.woocommerce-MyAccount-content .asmp-section {
    font-family: var(--asmp-font);
    color: var(--asmp-text-dark);
    line-height: 1.5;
}

.woocommerce-MyAccount-content .asmp-section * {
    box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════════════════
   WOODMART INTEGRATION — Custom SVG Icons for ASM Profile Endpoints
   ═══════════════════════════════════════════════════════════════════ */

/* Hide the default gear SVG inside our endpoints */
.woocommerce-MyAccount-navigation-link--asm-dashboard .wd-nav-icon svg,
.woocommerce-MyAccount-navigation-link--asm-orders .wd-nav-icon svg,
.woocommerce-MyAccount-navigation-link--asm-fiscal-data .wd-nav-icon svg,
.woocommerce-MyAccount-navigation-link--asm-billing .wd-nav-icon svg,
.woocommerce-MyAccount-navigation-link--asm-addresses .wd-nav-icon svg,
.woocommerce-MyAccount-navigation-link--asm-bank-transfer .wd-nav-icon svg,
.woocommerce-MyAccount-navigation-link--asm-payment .wd-nav-icon svg,
.woocommerce-MyAccount-navigation-link--asm-preferences .wd-nav-icon svg {
    display: none;
}

/* Base icon style */
.woocommerce-MyAccount-navigation-link--asm-dashboard .wd-nav-icon,
.woocommerce-MyAccount-navigation-link--asm-orders .wd-nav-icon,
.woocommerce-MyAccount-navigation-link--asm-fiscal-data .wd-nav-icon,
.woocommerce-MyAccount-navigation-link--asm-billing .wd-nav-icon,
.woocommerce-MyAccount-navigation-link--asm-addresses .wd-nav-icon,
.woocommerce-MyAccount-navigation-link--asm-bank-transfer .wd-nav-icon,
.woocommerce-MyAccount-navigation-link--asm-payment .wd-nav-icon,
.woocommerce-MyAccount-navigation-link--asm-preferences .wd-nav-icon {
    background-repeat: no-repeat;
    background-position: center;
    background-size: 24px 24px;
    min-width: 24px;
    min-height: 24px;
}

.woocommerce-MyAccount-navigation-link--asm-dashboard .wd-nav-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E");
}

.woocommerce-MyAccount-navigation-link--asm-orders .wd-nav-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 8a2 2 0 00-1-1.73l-7-4a2 2 0 00-2 0l-7 4A2 2 0 003 8v8a2 2 0 001 1.73l7 4a2 2 0 002 0l7-4A2 2 0 0021 16z'/%3E%3Cpath d='M3.27 6.96L12 12.01l8.73-5.05M12 22.08V12'/%3E%3C/svg%3E");
}

.woocommerce-MyAccount-navigation-link--asm-fiscal-data .wd-nav-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z'/%3E%3Cpath d='M14 2v6h6M16 13H8M16 17H8M10 9H8'/%3E%3C/svg%3E");
}

.woocommerce-MyAccount-navigation-link--asm-billing .wd-nav-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='2' width='16' height='20' rx='2'/%3E%3Cpath d='M9 22v-4h6v4M8 6h.01M16 6h.01M12 6h.01M8 10h.01M16 10h.01M12 10h.01M8 14h.01M16 14h.01M12 14h.01'/%3E%3C/svg%3E");
}

.woocommerce-MyAccount-navigation-link--asm-addresses .wd-nav-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
}

.woocommerce-MyAccount-navigation-link--asm-bank-transfer .wd-nav-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 22h18M6 18v-4M10 18v-4M14 18v-4M18 18v-4M2 10l10-7 10 7'/%3E%3C/svg%3E");
}

.woocommerce-MyAccount-navigation-link--asm-payment .wd-nav-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1' y='4' width='22' height='16' rx='2'/%3E%3Cpath d='M1 10h22'/%3E%3C/svg%3E");
}

.woocommerce-MyAccount-navigation-link--asm-preferences .wd-nav-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 3h15v13H1zM16 8h4l3 3v5h-7V8z'/%3E%3Ccircle cx='5.5' cy='18.5' r='2.5'/%3E%3Ccircle cx='18.5' cy='18.5' r='2.5'/%3E%3C/svg%3E");
}

/* ═══════════════════════════════════════════════════════════════════
   CARDS — same as .asm-ct-fields-section
   ═══════════════════════════════════════════════════════════════════ */
.asmp-card {
    background: var(--asmp-bg);
    border: 1px solid var(--asmp-border);
    border-radius: var(--asmp-radius-card);
    padding: 20px;
    margin-bottom: 16px;
}

.asmp-card-light {
    background: var(--asmp-bg-light);
}

/* ── Section title — emoji + text + bottom line ─────────────── */
.asmp-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--asmp-text-dark);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--asmp-border-light);
}

.asmp-section-title:not(:first-child) {
    margin-top: 20px;
}

/* ── Page header ─────────────────────────────────────────────── */
.asmp-page-header {
    text-align: center;
    margin-bottom: 20px;
}

.asmp-page-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--asmp-text-dark);
    margin: 0 0 4px;
}

.asmp-page-header p {
    font-size: 13px;
    color: var(--asmp-text-muted);
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════
   TYPE SELECTOR — same as .asm-ct-selector / .asm-ct-option
   ═══════════════════════════════════════════════════════════════════ */
.asmp-selector {
    background: var(--asmp-bg-light);
    border-radius: var(--asmp-radius-card);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--asmp-border);
}

.asmp-selector h3 {
    text-align: center;
    margin: 0 0 16px;
    font-size: 20px;
    color: var(--asmp-text-dark);
}

.asmp-selector-options {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.asmp-option {
    position: relative;
    cursor: pointer;
    flex: 1;
    max-width: 200px;
    min-width: 140px;
    padding: 20px 16px;
    text-align: center;
    background: var(--asmp-bg);
    border: 2px solid var(--asmp-border);
    border-radius: var(--asmp-radius-option);
    transition: all 0.2s ease;
}

.asmp-option:hover,
.asmp-option.selected {
    border-color: var(--asmp-primary);
}

.asmp-option.selected {
    background: #f0fdfa;
}

.asmp-option input {
    position: absolute;
    opacity: 0;
}

.asmp-option-icon {
    display: block;
    font-size: 36px;
    margin-bottom: 8px;
}

.asmp-option-text {
    display: block;
    font-weight: 600;
    font-size: 15px;
    color: var(--asmp-text-dark);
}

.asmp-option-desc {
    display: block;
    font-size: 12px;
    color: var(--asmp-text-muted);
    margin-top: 2px;
}

.asmp-option-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    background: var(--asmp-primary);
    color: #fff;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.asmp-option.selected .asmp-option-check {
    display: flex;
}

.asmp-hint {
    text-align: center;
    margin: 16px 0 0;
    padding: 12px;
    background: var(--asmp-yellow-bg);
    border-radius: var(--asmp-radius-input);
    color: var(--asmp-yellow-text);
    font-size: 13px;
}

/* ═══════════════════════════════════════════════════════════════════
   FORM FIELDS — same as .asm-ct-field-group
   ═══════════════════════════════════════════════════════════════════ */
.asmp-field-group {
    margin-bottom: 14px;
}

.asmp-field-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--asmp-text-body);
    margin-bottom: 4px;
}

.asmp-field-group label abbr {
    color: var(--asmp-red);
    text-decoration: none;
}

.asmp-field-group input,
.asmp-field-group select,
.asmp-field-group textarea {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    font-size: 14px;
    font-family: var(--asmp-font);
    border: 1px solid var(--asmp-border);
    border-radius: var(--asmp-radius-input);
    background: var(--asmp-bg);
    color: var(--asmp-text-dark);
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.asmp-field-group textarea {
    height: auto;
    min-height: 80px;
    padding: 12px 14px;
    resize: vertical;
}

.asmp-field-group select {
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath fill='%2364748b' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.asmp-field-group input:focus,
.asmp-field-group select:focus,
.asmp-field-group textarea:focus {
    outline: none;
    border-color: var(--asmp-primary);
}

.asmp-field-group input::placeholder,
.asmp-field-group textarea::placeholder {
    color: var(--asmp-text-placeholder);
}

.asmp-field-hint {
    font-size: 11px;
    color: var(--asmp-text-muted);
    margin-top: 4px;
}

/* Field layout — rows */
.asmp-field-row {
    display: flex;
    gap: 12px;
}

.asmp-field-half {
    flex: 1;
}

.asmp-field-small {
    flex: 0 0 100px;
}

.asmp-field-large {
    flex: 1;
}

/* Mono style for fiscal codes */
.asmp-field-group input.asmp-mono {
    font-family: var(--asmp-mono);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════ */
.asmp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 24px;
    border-radius: var(--asmp-radius-input);
    font-family: var(--asmp-font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.4;
}

.asmp-btn-primary {
    background: var(--asmp-primary);
    color: white;
}

.asmp-btn-primary:hover {
    opacity: 0.9;
}

.asmp-btn-outline {
    background: transparent;
    border: 1px solid var(--asmp-border);
    color: var(--asmp-text-dark);
}

.asmp-btn-outline:hover {
    background: var(--asmp-bg-light);
}

.asmp-btn-danger {
    background: none;
    border: none;
    padding: 8px 16px;
    color: var(--asmp-red);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

.asmp-btn-danger:hover {
    text-decoration: underline;
}

.asmp-btn-text {
    background: none;
    border: none;
    padding: 8px 12px;
    color: var(--asmp-primary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

.asmp-btn-text:hover {
    text-decoration: underline;
}

.asmp-btn-sm {
    font-size: 13px;
    padding: 8px 16px;
}

.asmp-btn-full {
    width: 100%;
    border: 2px dashed var(--asmp-border);
    background: transparent;
    padding: 14px;
    color: var(--asmp-text-muted);
    border-radius: var(--asmp-radius-option);
}

.asmp-btn-full:hover {
    color: var(--asmp-primary);
    border-color: var(--asmp-primary);
    background: #f0fdfa;
}

/* ── Form actions ─────────────────────────────────────────────── */
.asmp-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--asmp-border-light);
}

.asmp-save-status {
    font-size: 13px;
    color: var(--asmp-text-muted);
}

.asmp-save-status.success {
    color: var(--asmp-green);
}

.asmp-save-status.error {
    color: var(--asmp-red);
}

/* ═══════════════════════════════════════════════════════════════════
   WELCOME / DASHBOARD
   ═══════════════════════════════════════════════════════════════════ */
.asmp-welcome {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.asmp-avatar img {
    border-radius: 50%;
    width: 64px;
    height: 64px;
}

.asmp-welcome-text h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--asmp-text-dark);
    margin: 0 0 2px;
}

.asmp-welcome-text p {
    font-size: 13px;
    color: var(--asmp-text-muted);
    margin: 0;
}

/* ── Stats Grid ──────────────────────────────────────────────── */
.asmp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.asmp-stat-card {
    background: var(--asmp-bg);
    border: 1px solid var(--asmp-border);
    border-radius: var(--asmp-radius-option);
    padding: 16px;
    text-align: center;
    transition: border-color 0.2s;
}

.asmp-stat-card:hover {
    border-color: var(--asmp-primary);
}

.asmp-stat-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.asmp-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--asmp-text-dark);
}

.asmp-stat-label {
    font-size: 12px;
    color: var(--asmp-text-muted);
    margin-top: 2px;
}

/* ── Dashboard grid ──────────────────────────────────────────── */
.asmp-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

/* ── Info rows inside cards ──────────────────────────────────── */
.asmp-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--asmp-border-light);
}

.asmp-info-row:last-child {
    border-bottom: none;
}

.asmp-info-label {
    font-size: 13px;
    color: var(--asmp-text-muted);
    font-weight: 500;
}

.asmp-info-value {
    font-size: 14px;
    color: var(--asmp-text-dark);
    font-weight: 500;
}

.asmp-mono {
    font-family: var(--asmp-mono);
    font-size: 13px;
    letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════════════════════════════
   TAGS / BADGES
   ═══════════════════════════════════════════════════════════════════ */
.asmp-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
}

.asmp-tag-blue   { background: #dbeafe; color: #1e40af; }
.asmp-tag-green  { background: #d1fae5; color: #065f46; }
.asmp-tag-red    { background: #fee2e2; color: #991b1b; }
.asmp-tag-yellow { background: #fef3c7; color: #92400e; }
.asmp-tag-gray   { background: #f1f5f9; color: #475569; }

/* ── Default badge ───────────────────────────────────────────── */
.asmp-default-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #d1fae5;
    color: #065f46;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════
   EMPTY STATES
   ═══════════════════════════════════════════════════════════════════ */
.asmp-empty-state {
    text-align: center;
    padding: 32px 20px;
}

.asmp-empty-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.asmp-empty {
    color: var(--asmp-text-muted);
    font-size: 14px;
    margin: 0;
}

.asmp-muted {
    font-size: 13px;
    color: var(--asmp-text-muted);
    margin: 4px 0 0;
}

/* ── Links ────────────────────────────────────────────────────── */
.asmp-link {
    color: var(--asmp-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: opacity .15s;
}

.asmp-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════════
   ADDRESS CARD
   ═══════════════════════════════════════════════════════════════════ */
.asmp-address-card {
    background: var(--asmp-bg);
    border: 1px solid var(--asmp-border);
    border-radius: var(--asmp-radius-card);
    padding: 20px;
    margin-bottom: 16px;
    transition: border-color 0.2s;
}

.asmp-address-card.asmp-address-default {
    border-color: var(--asmp-primary);
    border-width: 2px;
}

.asmp-address-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--asmp-border-light);
}

.asmp-address-header h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--asmp-text-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.asmp-address-actions {
    display: flex;
    gap: 4px;
}

.asmp-address-summary p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--asmp-text-body);
}

/* ═══════════════════════════════════════════════════════════════════
   TABLES — Orders, Bank Transfer, etc.
   ═══════════════════════════════════════════════════════════════════ */
.asmp-table-wrapper {
    overflow-x: auto;
    border-radius: var(--asmp-radius-card);
    border: 1px solid var(--asmp-border);
}

.asmp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.asmp-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--asmp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--asmp-bg-light);
    border-bottom: 1px solid var(--asmp-border);
}

.asmp-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--asmp-border-light);
    vertical-align: middle;
    color: var(--asmp-text-dark);
}

.asmp-table tbody tr:hover {
    background: var(--asmp-bg-light);
}

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

.asmp-items-preview {
    font-size: 13px;
    color: var(--asmp-text-muted);
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Order details ────────────────────────────────────────────── */
.asmp-order-details {
    background: var(--asmp-bg-light);
    padding: 20px;
    border-radius: var(--asmp-radius-input);
}

.asmp-details-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.asmp-details-grid h4 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--asmp-text-muted);
    margin: 0 0 8px;
}

.asmp-items-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.asmp-items-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--asmp-border-light);
    font-size: 13px;
}

.asmp-items-list li:last-child {
    border-bottom: none;
}

.asmp-item-name { flex: 1; }
.asmp-item-qty { color: var(--asmp-text-muted); }
.asmp-item-total { font-weight: 600; }

/* ── Pagination ──────────────────────────────────────────────── */
.asmp-pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 16px;
}

.asmp-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--asmp-radius-input);
    font-size: 14px;
    font-weight: 500;
    color: var(--asmp-text-dark);
    text-decoration: none;
    border: 1px solid var(--asmp-border);
    transition: all 0.2s;
}

.asmp-page-link:hover {
    background: var(--asmp-bg-light);
}

.asmp-page-link.active {
    background: var(--asmp-primary);
    color: white;
    border-color: var(--asmp-primary);
}

/* ═══════════════════════════════════════════════════════════════════
   PAYMENT METHODS
   ═══════════════════════════════════════════════════════════════════ */
.asmp-payment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.asmp-payment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border: 1px solid var(--asmp-border);
    border-radius: var(--asmp-radius-option);
    transition: all 0.2s;
}

.asmp-payment-item:hover {
    background: var(--asmp-bg-light);
}

.asmp-payment-item.asmp-payment-default {
    border-color: var(--asmp-primary);
    background: #f0fdfa;
}

.asmp-payment-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.asmp-payment-icon {
    font-size: 20px;
}

.asmp-payment-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--asmp-text-dark);
    display: block;
}

.asmp-payment-gateway {
    font-size: 12px;
    color: var(--asmp-text-muted);
}

.asmp-payment-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Gateway list ─────────────────────────────────────────────── */
.asmp-gateway-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.asmp-gateway-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--asmp-border-light);
}

.asmp-gateway-item:last-child {
    border-bottom: none;
}

.asmp-gateway-title {
    font-weight: 500;
    font-size: 14px;
    color: var(--asmp-text-dark);
}

.asmp-gateway-desc {
    font-size: 13px;
    color: var(--asmp-text-muted);
}

/* ── Callout ──────────────────────────────────────────────────── */
.asmp-callout {
    padding: 14px 18px;
    border-radius: var(--asmp-radius-input);
    font-size: 14px;
    margin-top: 16px;
}

.asmp-callout-info {
    background: #dbeafe;
    color: #1e40af;
}

/* ── Filters ──────────────────────────────────────────────────── */
.asmp-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.asmp-filter-bar select {
    height: 40px;
    padding: 0 36px 0 12px;
    font-size: 13px;
    border: 1px solid var(--asmp-border);
    border-radius: var(--asmp-radius-input);
    background: var(--asmp-bg);
    color: var(--asmp-text-dark);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath fill='%2364748b' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

/* ── Bank details ─────────────────────────────────────────────── */
.asmp-bank-details {
    padding: 12px 0;
    border-bottom: 1px solid var(--asmp-border-light);
}

.asmp-bank-details:last-child {
    border-bottom: none;
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .asmp-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .asmp-grid-2 {
        grid-template-columns: 1fr;
    }

    .asmp-field-row {
        flex-direction: column;
        gap: 0;
    }

    .asmp-field-small {
        flex: auto;
    }

    .asmp-details-grid {
        grid-template-columns: 1fr;
    }

    .asmp-payment-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .asmp-table th:nth-child(5),
    .asmp-table td:nth-child(5) {
        display: none;
    }

    .asmp-address-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .asmp-selector-options {
        flex-direction: column;
    }

    .asmp-option {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .asmp-stats-grid {
        grid-template-columns: 1fr;
    }

    .asmp-welcome {
        flex-direction: column;
        text-align: center;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   WOODMART THEME COMPATIBILITY
   ═══════════════════════════════════════════════════════════════════ */
.woocommerce-MyAccount-content .asmp-section {
    max-width: 100%;
}

/* Fix Woodmart input/select overrides */
.asmp-section .asmp-field-group input,
.asmp-section .asmp-field-group select,
.asmp-section .asmp-field-group textarea {
    border: 1px solid var(--asmp-border) !important;
    border-radius: var(--asmp-radius-input) !important;
    padding: 0 14px !important;
    font-size: 14px !important;
    height: 46px !important;
    box-shadow: none !important;
    background: var(--asmp-bg) !important;
}

.asmp-section .asmp-field-group textarea {
    height: auto !important;
    min-height: 80px !important;
    padding: 12px 14px !important;
}

.asmp-section .asmp-field-group input:focus,
.asmp-section .asmp-field-group select:focus,
.asmp-section .asmp-field-group textarea:focus {
    border-color: var(--asmp-primary) !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Fix Woodmart button style bleeds */
.asmp-section .asmp-btn {
    line-height: 1.4 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
}

.asmp-section .asmp-btn-primary {
    background: var(--asmp-primary) !important;
    color: white !important;
    border: none !important;
}

.asmp-section .asmp-btn-primary:hover {
    opacity: 0.9 !important;
}

/* Fix Woodmart table overrides */
.asmp-section .asmp-table {
    border: none !important;
    margin: 0 !important;
}

.asmp-section .asmp-table th,
.asmp-section .asmp-table td {
    border-left: none !important;
    border-right: none !important;
}

/* Fix Woodmart link colors */
.asmp-section a.asmp-link {
    color: var(--asmp-primary) !important;
}

/* Woodmart label reset */
.asmp-section .asmp-option {
    margin: 0 !important;
    line-height: 1.4 !important;
}

/* Woodmart card shadow refinement */
.asmp-section .asmp-card {
    box-shadow: none;
}

/* Active navigation item highlight for Woodmart grid nav */
.woocommerce-MyAccount-navigation-link--asm-dashboard.wd-active a,
.woocommerce-MyAccount-navigation-link--asm-orders.wd-active a,
.woocommerce-MyAccount-navigation-link--asm-fiscal-data.wd-active a,
.woocommerce-MyAccount-navigation-link--asm-billing.wd-active a,
.woocommerce-MyAccount-navigation-link--asm-addresses.wd-active a,
.woocommerce-MyAccount-navigation-link--asm-bank-transfer.wd-active a,
.woocommerce-MyAccount-navigation-link--asm-payment.wd-active a,
.woocommerce-MyAccount-navigation-link--asm-preferences.wd-active a {
    color: var(--asmp-primary) !important;
    border-color: var(--asmp-primary) !important;
}

/* ═══════════════════════════════════════════════════════════════════
   WOODMART MOBILE NAV FIX
   Woodmart hides .woocommerce-MyAccount-navigation on mobile and
   may replace it with its own dropdown/slider nav. Force the
   navigation to always be visible on mobile for custom endpoints.
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* Force WooCommerce My Account navigation to show on mobile */
    .woocommerce-MyAccount-navigation {
        display: block !important;
        width: 100% !important;
        float: none !important;
        margin-bottom: 20px !important;
    }

    .woocommerce-MyAccount-content {
        width: 100% !important;
        float: none !important;
    }

    /* Woodmart grid nav: make it horizontal scrollable on mobile */
    .woocommerce-MyAccount-navigation ul {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        gap: 0 !important;
        padding-bottom: 4px;
    }

    .woocommerce-MyAccount-navigation ul li {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
    }

    .woocommerce-MyAccount-navigation ul li a {
        padding: 10px 16px !important;
        font-size: 13px !important;
    }

    /* Hide icon on mobile to save space */
    .woocommerce-MyAccount-navigation ul li .wd-nav-icon {
        display: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   WOODMART MOBILE DROPDOWN OVERRIDE
   Style the Woodmart My Account dropdown to match ASM Profile design
   ═══════════════════════════════════════════════════════════════════ */

/* Dropdown container */
.wd-my-account-dropdown .wd-dropdown,
.wd-dropdown-myaccount,
.wd-my-account-nav .wd-dropdown,
.wd-my-account-sidebar .wd-nav,
.widget_nav_menu .wd-nav-myaccount,
.my-account-navigation-dropdown,
.woocommerce-MyAccount-navigation-mobile {
    background: var(--asmp-bg, #fff) !important;
    border: 1px solid var(--asmp-border, #e2e8f0) !important;
    border-radius: var(--asmp-radius-card, 12px) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08) !important;
}

/* Dropdown items */
.wd-my-account-dropdown .wd-dropdown a,
.wd-dropdown-myaccount a,
.wd-my-account-nav .wd-dropdown a,
.wd-my-account-sidebar .wd-nav a,
.my-account-navigation-dropdown a {
    color: var(--asmp-text-body, #374151) !important;
    background: transparent !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: background .15s, color .15s !important;
}

.wd-my-account-dropdown .wd-dropdown a:hover,
.wd-dropdown-myaccount a:hover,
.wd-my-account-nav .wd-dropdown a:hover,
.wd-my-account-sidebar .wd-nav a:hover,
.my-account-navigation-dropdown a:hover {
    background: var(--asmp-bg-light, #f8fafc) !important;
    color: var(--asmp-primary, #5eb3b7) !important;
}

/* Active item */
.wd-my-account-dropdown .wd-dropdown .wd-active > a,
.wd-my-account-dropdown .wd-dropdown .current-menu-item > a,
.wd-dropdown-myaccount .wd-active > a,
.wd-my-account-nav .wd-dropdown .wd-active > a,
.wd-my-account-sidebar .wd-nav .wd-active > a,
.my-account-navigation-dropdown .active a {
    background: rgba(94, 179, 183, .08) !important;
    color: var(--asmp-primary, #5eb3b7) !important;
    font-weight: 600 !important;
    border-left: 3px solid var(--asmp-primary, #5eb3b7) !important;
}

/* Logout link in red */
.wd-my-account-dropdown .wd-dropdown .woocommerce-MyAccount-navigation-link--customer-logout a,
.wd-dropdown-myaccount .woocommerce-MyAccount-navigation-link--customer-logout a,
.my-account-navigation-dropdown .woocommerce-MyAccount-navigation-link--customer-logout a {
    color: var(--asmp-red, #ef4444) !important;
}

/* Trigger button styling */
.wd-my-account-dropdown > a,
.wd-my-account-nav > a,
.my-account-navigation-dropdown > button,
.my-account-navigation-dropdown > a {
    background: var(--asmp-bg, #fff) !important;
    color: var(--asmp-text-dark, #1e293b) !important;
    border: 1px solid var(--asmp-border, #e2e8f0) !important;
    border-radius: var(--asmp-radius-input, 8px) !important;
    font-weight: 500 !important;
}
