/* ===== Florería Membresías - Frontend Styles ===== */

/* — Caja principal thank you — */
.fm-thankyou-box {
    border-radius: 14px;
    padding: 28px 32px;
    margin: 28px 0;
}
.fm-status-pending { background: #fffbeb; border: 2px solid #f6d860; }
.fm-status-active  { background: #f0fdf4; border: 2px solid #86efac; }
.fm-status-failed  { background: #fff5f5; border: 2px solid #fca5a5; }

.fm-status-icon { font-size: 2.4em; margin-bottom: 6px; }

.fm-thankyou-box h3 {
    margin: 0 0 10px;
    font-size: 1.3em;
    color: #1a1a1a;
}
.fm-thankyou-box p { color: #444; margin: 8px 0; }

/* Checklist de pasos */
.fm-checklist {
    list-style: none;
    padding: 0;
    margin: 14px 0;
    background: rgba(255,255,255,0.6);
    border-radius: 8px;
    padding: 12px 16px;
}
.fm-checklist li {
    padding: 5px 0;
    font-size: 0.95em;
    color: #333;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.fm-checklist li:last-child { border-bottom: none; }

.fm-note {
    font-size: 0.9em !important;
    color: #666 !important;
    margin-top: 14px !important;
}

/* Botones */
.fm-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}
.fm-wa-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25D366;
    color: #fff !important;
    text-decoration: none !important;
    padding: 11px 22px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.95em;
    transition: background 0.2s;
}
.fm-wa-btn:hover { background: #1ebe5d; color: #fff !important; }

.fm-account-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #d4607a;
    color: #fff !important;
    text-decoration: none !important;
    padding: 11px 22px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.95em;
    transition: background 0.2s;
}
.fm-account-btn:hover { background: #b8495f; color: #fff !important; }

/* — Mi Membresía (cuenta) — */
.fm-account h2 { color: #c0405e; }

.fm-active-card {
    background: #fff5f8;
    border: 2px solid #f4b8c8;
    border-radius: 14px;
    padding: 24px 28px;
    max-width: 500px;
}
.fm-active-card h3 {
    margin: 8px 0 16px;
    color: #333;
    font-size: 1.15em;
}
.fm-active-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
}
.fm-active-card ul li {
    padding: 8px 0;
    border-bottom: 1px solid #f0d4dc;
    font-size: 0.95em;
    display: flex;
    justify-content: space-between;
}
.fm-active-card ul li:last-child { border-bottom: none; }

.fm-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.82em;
    font-weight: bold;
}
.fm-badge.active  { background: #d4edda; color: #155724; }
.fm-badge.expired { background: #f8d7da; color: #721c24; }
.fm-badge.pending { background: #fff3cd; color: #856404; }

.fm-no-membership {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 24px;
    color: #555;
}

/* Historial */
.fm-history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
    font-size: 0.93em;
}
.fm-history-table th,
.fm-history-table td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid #eee;
}
.fm-history-table thead th {
    background: #f9f0f3;
    color: #555;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 600px) {
    .fm-thankyou-box { padding: 20px 18px; }
    .fm-btn-row { flex-direction: column; }
    .fm-wa-btn, .fm-account-btn { justify-content: center; }
}

.fm-cancel-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85em;
    color: #721c24 !important;
    background: #f8d7da;
    text-decoration: none !important;
    border: 1px solid #f5c6cb;
    margin-top: 8px;
    transition: background 0.2s;
}
.fm-cancel-btn:hover { background: #f5c6cb; }

/* ===== Mi Membresía · Estilo "Pétalo Suave" v2 ===== */

/* — Layout a pantalla completa en el endpoint Mi Membresía — */
body.fm-membresia-full { overflow-x: hidden; }

/* Apilar el menú lateral y el contenido en una sola columna */
body.fm-membresia-full .woocommerce-MyAccount-navigation,
body.fm-membresia-full .woocommerce-MyAccount-content {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Menú de la cuenta como barra horizontal arriba */
body.fm-membresia-full .woocommerce-MyAccount-navigation ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0 auto 22px;
    padding: 0;
    max-width: 1480px;
    justify-content: center;
}
body.fm-membresia-full .woocommerce-MyAccount-navigation li { margin: 0 !important; border: 0 !important; }
body.fm-membresia-full .woocommerce-MyAccount-navigation li a {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #f2e3e6;
    color: #8a7480 !important;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none !important;
}
body.fm-membresia-full .woocommerce-MyAccount-navigation li.is-active a {
    background: #d97186;
    border-color: #d97186;
    color: #fff !important;
}

/* El bloque rompe el contenedor y ocupa todo el ancho del viewport */
body.fm-membresia-full .fm-modern-account {
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    padding: 0 clamp(16px, 4vw, 56px) 60px;
}
/* El contenido interno se mantiene legible y centrado dentro de la franja */
body.fm-membresia-full .fm-modern-account > * {
    max-width: 1480px;
    margin-left: auto;
    margin-right: auto;
}

/* — Tokens de color "Pétalo Suave" — */
.woocommerce-account .woocommerce-MyAccount-content .fm-modern-account,
.fm-modern-account {
    --fm-rose:   #d97186;
    --fm-rose-d: #c25a72;
    --fm-sage:   #8aa07f;
    --fm-sage-bg:#eef3ea;
    --fm-ink:    #43363a;
    --fm-muted:  #9a8b8f;
    --fm-card:   #ffffff;
    --fm-line:   #f2e3e6;
    --fm-blush:  #ffe9ec;
    --fm-peach:  #ffeede;
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    color: var(--fm-ink);
    font-family: "Hanken Grotesk", system-ui, sans-serif;
}
.fm-modern-account * { box-sizing: border-box; }

/* — Hero — */
.fm-modern-hero {
    position: relative;
    overflow: hidden;
    border-radius: 34px;
    padding: clamp(28px, 4vw, 52px);
    margin: 0 0 22px;
    background:
        radial-gradient(120% 120% at 100% 0%, #ffe2e8 0%, transparent 45%),
        radial-gradient(120% 120% at 0% 100%, #fff0df 0%, transparent 50%),
        linear-gradient(135deg, #fff6f7, #fff9f3);
    border: 1px solid var(--fm-line);
}
.fm-modern-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    background: #fff;
    color: var(--fm-rose-d);
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
    box-shadow: 0 6px 16px rgba(217,113,134,.18);
}
.fm-modern-eyebrow::before { content: "✿"; }
.fm-modern-hero h2 {
    font-family: "Bricolage Grotesque", sans-serif;
    margin: 18px 0 10px !important;
    color: var(--fm-ink) !important;
    font-size: clamp(34px, 5.5vw, 58px) !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    letter-spacing: -.03em;
}
.fm-modern-hero p {
    max-width: 520px;
    margin: 0 !important;
    color: var(--fm-muted);
    font-size: 16px;
    line-height: 1.55;
}
.fm-modern-hero-mark {
    position: absolute;
    right: 30px;
    top: 26px;
    width: 70px;
    height: 70px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--fm-rose), #f6a93b);
    font-size: 30px;
    box-shadow: 0 16px 36px rgba(217,113,134,.28);
}

/* — Grid principal — */
.fm-modern-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, .85fr);
    gap: 22px;
    align-items: stretch;
}
.fm-modern-card {
    background: var(--fm-card);
    border: 1px solid var(--fm-line);
    border-radius: 30px;
    padding: clamp(24px, 3vw, 36px);
    box-shadow: 0 20px 50px rgba(195,90,114,.10);
}
.fm-modern-main-card { min-height: 100%; }
.fm-modern-card-top {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.fm-modern-plan { color: var(--fm-rose-d); font-weight: 800; font-size: 14px; }
.fm-modern-card h3,
.fm-modern-card h4 {
    font-family: "Bricolage Grotesque", sans-serif;
    margin: 0 0 10px !important;
    color: var(--fm-ink) !important;
    font-weight: 800 !important;
    letter-spacing: -.02em;
}
.fm-modern-card h3 { font-size: clamp(26px, 3.4vw, 38px) !important; line-height: 1.02 !important; }
.fm-modern-card h4 { font-size: 22px !important; }
.fm-modern-muted { color: var(--fm-muted) !important; margin: 0 0 24px !important; line-height: 1.55; }

/* — Stats — */
.fm-modern-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 24px;
}
.fm-modern-stats > div {
    padding: 22px;
    border-radius: 24px;
    border: 0;
}
.fm-modern-stats > div:first-child { background: linear-gradient(160deg, #fff0f2, #ffe5ea); }
.fm-modern-stats > div:last-child  { background: linear-gradient(160deg, #fff3e6, #ffe9d6); }
.fm-modern-stats strong {
    font-family: "Bricolage Grotesque", sans-serif;
    display: block;
    color: var(--fm-rose-d);
    font-size: clamp(28px, 4vw, 42px);
    line-height: .95;
    margin-bottom: 8px;
}
.fm-modern-stats > div:last-child strong { color: #cf7c34; font-size: clamp(22px, 3.2vw, 32px); }
.fm-modern-stats span,
.fm-modern-details span {
    display: block;
    color: var(--fm-muted);
    font-size: 12.5px;
    font-weight: 700;
}

/* — Detalles — */
.fm-modern-details {
    display: grid;
    gap: 0;
    background: #fcf6f7;
    border-radius: 20px;
    padding: 4px 18px;
    margin-bottom: 22px;
}
.fm-modern-details > div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 13px 0;
    border-bottom: 1px solid var(--fm-line);
}
.fm-modern-details > div:last-child { border-bottom: 0; }
.fm-modern-details span { font-size: 13px; }
.fm-modern-details strong { color: var(--fm-ink); font-weight: 800; }

/* — Botones — */
.fm-modern-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 50px;
    padding: 15px 22px !important;
    border-radius: 18px !important;
    text-decoration: none !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    border: 0 !important;
    transition: transform .18s ease, box-shadow .18s ease;
}
.fm-modern-btn:hover { transform: translateY(-2px); }
.fm-modern-btn-primary {
    color: #fff !important;
    background: linear-gradient(135deg, var(--fm-rose), var(--fm-rose-d)) !important;
    box-shadow: 0 12px 26px rgba(217,113,134,.28);
}
.fm-modern-btn-wa {
    width: 100%;
    color: #fff !important;
    background: #25d366 !important;
    box-shadow: 0 12px 26px rgba(37,211,102,.28);
}

/* — Aside renovación — */
.fm-modern-side-card { background: linear-gradient(180deg, #ffffff 0%, #fff6f0 100%); }
.fm-modern-flow-ok {
    display: flex;
    gap: 13px;
    align-items: flex-start;
    padding: 15px;
    border-radius: 18px;
    background: var(--fm-sage-bg);
    border: 1px solid #d6e2cf;
    color: #41562f;
    margin: 14px 0;
}
.fm-modern-flow-ok > span {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--fm-sage);
    color: #fff;
    flex: none;
}
.fm-modern-flow-ok strong { display: block; font-size: 14px; }
.fm-modern-flow-ok small { color: #5c6e4d; font-size: 12.5px; }
.fm-modern-cancel {
    display: inline-block;
    margin-top: 6px;
    color: var(--fm-muted);
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
}

/* — Timeline (pasos como píldoras) — */
.fm-modern-timeline {
    margin-top: 22px;
    padding-top: 0;
    border-top: 0;
    display: grid;
    gap: 12px;
}
.fm-modern-timeline > div {
    display: flex;
    align-items: center;
    gap: 13px;
    background: #fff;
    border: 1px solid var(--fm-line);
    border-radius: 18px;
    padding: 13px 16px;
}
.fm-modern-timeline span {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    flex: none;
    background: var(--fm-sage-bg);
    box-shadow: none;
    display: grid;
    place-items: center;
}
.fm-modern-timeline > div:not(:last-child) span::before { content: "✓"; color: var(--fm-sage); font-weight: 900; font-size: 13px; }
.fm-modern-timeline > div:last-child span { background: #f6eef0; }
.fm-modern-timeline p { margin: 0 !important; color: var(--fm-ink); font-weight: 700; font-size: 14px; }

/* — Badges de estado — */
.fm-modern-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.fm-modern-status-active  { background: var(--fm-sage-bg); color: #466234; }
.fm-modern-status-active::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--fm-sage); }
.fm-modern-status-pending { background: #fff3e6; color: #b06a20; }
.fm-modern-status-expired { background: #fde7ea; color: #a23d54; }
.fm-modern-status-empty   { background: #f4eef0; color: #6f5d63; }

/* — Avisos — */
.fm-modern-notice {
    max-width: 1480px;
    margin: 0 auto 18px;
    border-radius: 18px;
    padding: 14px 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: center;
    border: 1px solid transparent;
}
.fm-modern-notice strong { font-weight: 800; }
.fm-modern-notice span { color: inherit; opacity: .85; }
.fm-modern-notice-success { background: var(--fm-sage-bg); color: #3f5a2c; border-color: #d6e2cf; }
.fm-modern-notice-error   { background: #fff1f3; color: #a23d54; border-color: #f7ccd4; }
.fm-modern-notice-warning { background: #fff6ea; color: #b06a20; border-color: #ffe0b8; }

/* — Estado vacío / pendiente — */
.fm-modern-empty-card {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
    padding: clamp(28px, 5vw, 58px);
    border-radius: 30px;
}
.fm-modern-empty-card h3 { margin-top: 14px !important; }

/* — Historial — */
.fm-modern-section-title { margin: 30px 0 14px; }
.fm-modern-section-title h3 {
    font-family: "Bricolage Grotesque", sans-serif;
    margin: 0 0 4px !important;
    color: var(--fm-ink) !important;
    font-size: 24px !important;
    font-weight: 800 !important;
}
.fm-modern-section-title p { margin: 0 !important; color: var(--fm-muted); }
.fm-modern-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--fm-line);
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(195,90,114,.08);
}
.fm-modern-account .fm-history-table {
    margin: 0 !important;
    border-collapse: collapse;
    width: 100%;
    min-width: 560px;
}
.fm-modern-account .fm-history-table th,
.fm-modern-account .fm-history-table td {
    padding: 16px 20px !important;
    border-bottom: 1px solid var(--fm-line) !important;
    text-align: left;
}
.fm-modern-account .fm-history-table thead th {
    background: #fff7f8 !important;
    color: var(--fm-rose-d) !important;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 800;
}
.fm-modern-account .fm-history-table tbody tr:last-child td { border-bottom: 0 !important; }

/* — Responsive — */
@media (max-width: 860px) {
    .fm-modern-grid { grid-template-columns: 1fr; }
    .fm-modern-hero-mark { position: static; margin-top: 22px; }
}
@media (max-width: 600px) {
    .fm-modern-hero,
    .fm-modern-card { border-radius: 22px; }
    .fm-modern-stats { grid-template-columns: 1fr; }
    .fm-modern-details > div { align-items: flex-start; flex-direction: column; gap: 3px; }
    .fm-modern-btn { width: 100%; }
}

/* ===== Aviso destacado: entregas programadas los miércoles ===== */
.fm-modern-account .fm-delivery-note {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 22px;
    padding: 18px 22px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--fm-rose), var(--fm-rose-d));
    color: #fff;
    box-shadow: 0 16px 36px rgba(217,113,134,.28);
}
.fm-delivery-ic {
    width: 48px;
    height: 48px;
    flex: none;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.18);
    color: #fff;
}
.fm-delivery-txt { display: flex; flex-direction: column; gap: 2px; }
.fm-delivery-txt strong {
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: clamp(18px, 2.4vw, 22px);
    font-weight: 800;
    line-height: 1.12;
    color: #fff;
}
.fm-delivery-txt span { font-size: 14px; opacity: .92; line-height: 1.4; }
.fm-delivery-badge {
    margin-left: auto;
    background: #fff;
    color: var(--fm-rose-d);
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 9px 15px;
    border-radius: 999px;
    white-space: nowrap;
}
@media (max-width: 600px) {
    .fm-modern-account .fm-delivery-note { flex-wrap: wrap; }
    .fm-delivery-badge { margin-left: 0; }
}
