/**
 * My Account - CSS Compilado
 * Estilos para área Minha Conta (estilo Guadalupe)
 * Usa variáveis do base.css
 */

/* ==================== */
/* PAGE LAYOUT          */
/* ==================== */
.myaccount-page {
    min-height: 100vh;
    background: var(--cream);
    font-family: 'DM Sans', sans-serif;
    color: var(--text-dark);
}

.myaccount-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 16px 60px;
}

@media (min-width: 768px) {
    .myaccount-container {
        padding: 40px 24px 80px;
    }
}

/* ==================== */
/* HEADER               */
/* ==================== */
.myaccount-header {
    text-align: center;
    margin-bottom: 32px;
}

.myaccount-header__title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--green-dark);
    margin-bottom: 8px;
}

@media (min-width: 768px) {
    .myaccount-header__title {
        font-size: 2rem;
    }
}

.myaccount-header__subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ==================== */
/* NAVIGATION TABS      */
/* ==================== */
.myaccount-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}

.myaccount-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 9999px;
    background: var(--white);
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.myaccount-nav__link:hover {
    background: var(--cream-dark);
    color: var(--text-dark);
}

.myaccount-nav__link--active {
    background: var(--green-dark);
    color: var(--white);
}

.myaccount-nav__link--active:hover {
    background: var(--green-medium);
    color: var(--white);
}

/* ==================== */
/* ORDERS LIST          */
/* ==================== */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.orders-empty {
    text-align: center;
    padding: 48px 24px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.orders-empty__icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.orders-empty__title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.25rem;
    color: var(--green-dark);
    margin-bottom: 8px;
}

.orders-empty__text {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.orders-empty__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--gold);
    color: var(--white);
    border-radius: 9999px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.3s ease;
}

.orders-empty__btn:hover {
    background: var(--gold-light);
}

/* ==================== */
/* ORDER CARD           */
/* ==================== */
.order-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.order-card:hover {
    box-shadow: var(--shadow-hover);
}

.order-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--cream-dark);
}

.order-card__info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-card__id {
    font-weight: 600;
    color: var(--text-dark);
}

.order-card__date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Status Badge */
.order-card__badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.order-card__badge--pending {
    background: rgba(196, 136, 58, 0.15);
    color: var(--gold);
}

.order-card__badge--processing {
    background: rgba(106, 123, 82, 0.15);
    color: var(--green-medium);
}

.order-card__badge--delivered {
    background: rgba(34, 197, 94, 0.15);
    color: #16A34A;
}

.order-card__badge--cancelled {
    background: rgba(107, 119, 112, 0.15);
    color: var(--text-muted);
}

/* Order Body */
.order-card__body {
    padding: 16px 20px;
}

.order-card__items {
    margin-bottom: 12px;
}

.order-card__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.order-card__item:not(:last-child) {
    border-bottom: 1px solid var(--cream);
}

.order-card__item-image {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--cream);
}

.order-card__item-info {
    flex: 1;
    min-width: 0;
}

.order-card__item-name {
    font-size: 0.875rem;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-card__item-qty {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.order-card__item-price {
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
}

.order-card__more-items {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    padding: 8px 0;
}

/* Order Footer */
.order-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--cream);
    border-top: 1px solid var(--cream-dark);
}

.order-card__total {
    display: flex;
    flex-direction: column;
}

.order-card__total-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.order-card__total-value {
    font-family: 'DM Serif Display', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--green-dark);
}

.order-card__actions {
    display: flex;
    gap: 8px;
}

.order-card__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.order-card__btn--primary {
    background: var(--gold);
    color: var(--white);
}

.order-card__btn--primary:hover {
    background: var(--gold-light);
}

.order-card__btn--secondary {
    background: var(--white);
    color: var(--green-dark);
    border: 2px solid var(--green-dark);
    font-weight: 600;
}

.order-card__btn--secondary:hover {
    background: var(--green-dark);
    color: var(--white);
}

.order-card__btn-arrow {
    transition: transform 0.2s ease;
}

.order-card__btn--secondary:hover .order-card__btn-arrow {
    transform: translateX(4px);
}

/* ==================== */
/* ORDER DETAILS PAGE   */
/* ==================== */
.order-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Back Link */
.order-details__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.order-details__back:hover {
    color: var(--green-dark);
}

/* Order Header */
.order-details__header {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow);
    text-align: center;
}

.order-details__title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.5rem;
    color: var(--green-dark);
    margin-bottom: 8px;
}

.order-details__meta {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Payment Alert */
.order-payment-alert {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border-radius: 16px;
    padding: 24px;
    color: var(--white);
    text-align: center;
}

.order-payment-alert__icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.order-payment-alert__title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.order-payment-alert__total {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.order-payment-alert__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 300px;
    padding: 14px 24px;
    background: var(--white);
    color: var(--gold);
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.order-payment-alert__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Section Card */
.order-section {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.order-section__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--cream-dark);
}

.order-section__icon {
    font-size: 1.25rem;
}

.order-section__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--green-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.order-section__body {
    padding: 20px;
}

/* Items List */
.order-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-item {
    display: flex;
    gap: 16px;
    padding: 12px;
    background: var(--cream);
    border-radius: 12px;
}

.order-item__image {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--white);
}

.order-item__info {
    flex: 1;
    min-width: 0;
}

.order-item__name {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.order-item__meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.order-item__prices {
    text-align: right;
}

.order-item__price {
    font-weight: 600;
    color: var(--text-dark);
}

.order-item__subtotal {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Totals */
.order-totals {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--cream-dark);
}

.order-totals__row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.875rem;
}

.order-totals__row--total {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--green-dark);
    border-top: 2px solid var(--cream-dark);
    margin-top: 8px;
    padding-top: 16px;
}

/* Address */
.order-address {
    line-height: 1.6;
}

.order-address__name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.order-address__line {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Payment Info */
.order-payment {
    display: flex;
    align-items: center;
    gap: 16px;
}

.order-payment__icon {
    width: 48px;
    height: 48px;
    background: var(--cream);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.order-payment__info {
    flex: 1;
}

.order-payment__method {
    font-weight: 500;
    color: var(--text-dark);
}

.order-payment__status {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* NF-e */
.order-nfe {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.order-nfe__info {
    flex: 1;
}

.order-nfe__number {
    font-weight: 600;
    color: var(--text-dark);
}

.order-nfe__key {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
    word-break: break-all;
    margin-top: 4px;
}

.order-nfe__link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    background: rgba(196, 136, 58, 0.15);
    color: var(--gold);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.order-nfe__link:hover {
    background: rgba(196, 136, 58, 0.25);
}

/* Tracking Embed */
.order-tracking {
    margin: 0;
}

.order-tracking .tracking-card--embed {
    box-shadow: none;
}

/* ==================== */
/* DASHBOARD            */
/* ==================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.dashboard-card {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow);
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

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

.dashboard-card__icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.dashboard-card__title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.125rem;
    color: var(--green-dark);
    margin-bottom: 4px;
}

.dashboard-card__desc {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ==================== */
/* LOGOUT LINK          */
/* ==================== */
.myaccount-logout {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--cream-dark);
}

.myaccount-logout__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.myaccount-logout__link:hover {
    color: var(--gold);
}

/* ==================== */
/* PAGINATION           */
/* ==================== */
.orders-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--cream-dark);
}

.orders-pagination__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    border-radius: 9999px;
    background: var(--white);
    color: var(--green-dark);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.orders-pagination__link:hover {
    background: var(--cream-dark);
    transform: translateY(-1px);
}

.orders-pagination__link--active {
    background: var(--green-dark);
    color: var(--white);
}

.orders-pagination__link--active:hover {
    background: var(--green-medium);
}

.orders-pagination__link--disabled {
    opacity: 0.5;
    pointer-events: none;
}

.orders-pagination__ellipsis {
    color: var(--text-muted);
    padding: 0 4px;
}

/* ==================== */
/* WC NOTICES GLOBAL    */
/* ==================== */
.myaccount-page .woocommerce-notices-wrapper {
    margin-bottom: 20px;
}

/* ==================== */
/* LOGIN PAGE           */
/* Portal do Santuário  */
/* ==================== */
.login-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    background: var(--cream);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--white);
    border-radius: 24px;
    padding: 40px 32px;
    box-shadow:
        0 4px 20px rgba(45, 74, 62, 0.06),
        0 12px 40px rgba(45, 74, 62, 0.04);
    animation: loginReveal 0.6s ease-out;
}

@keyframes loginReveal {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-ornament {
    text-align: center;
    margin-bottom: 24px;
    color: var(--gold);
    font-size: 0.875rem;
    letter-spacing: 0.3em;
}

.login-ornament__rose {
    display: inline-block;
    font-size: 1.5rem;
    margin: 0 12px;
    animation: gentlePulse 3s ease-in-out infinite;
}

@keyframes gentlePulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.05); opacity: 1; }
}

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

.login-header__title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--green-dark);
    margin-bottom: 8px;
}

.login-header__subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-field__label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.login-field__input-wrap {
    position: relative;
}

.login-field__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.3s ease;
    z-index: 2;
}

.login-page .login-field__input {
    width: 100%;
    padding: 14px 16px 14px 48px !important;
    border: 1.5px solid var(--cream-dark);
    border-radius: 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    color: var(--text-dark);
    background: var(--white);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.login-page .login-field__input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.login-field__input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(196, 136, 58, 0.1);
}

.login-field__input:focus ~ .login-field__icon {
    color: var(--gold);
}

.login-field__toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.login-field__toggle:hover {
    color: var(--gold);
}

.login-field__toggle svg {
    width: 20px;
    height: 20px;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-muted);
}

.login-remember__checkbox {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--cream-dark);
    border-radius: 4px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.login-remember__checkbox:checked {
    background: var(--gold);
    border-color: var(--gold);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-size: 14px;
    background-position: center;
    background-repeat: no-repeat;
}

.login-forgot {
    color: var(--gold);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.login-forgot:hover {
    color: var(--gold-light);
    text-decoration: underline;
}

.login-submit {
    width: 100%;
    padding: 16px 24px;
    background: var(--gold);
    color: var(--white);
    border: none;
    border-radius: 9999px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(196, 136, 58, 0.3);
    margin-top: 8px;
}

.login-submit:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 136, 58, 0.4);
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.login-divider__line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cream-dark), transparent);
}

.login-divider__text {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.login-register {
    text-align: center;
}

.login-register__text {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.login-register__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: 1.5px solid var(--green-dark);
    border-radius: 9999px;
    color: var(--green-dark);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.login-register__link:hover {
    background: var(--green-dark);
    color: var(--white);
}

.login-error {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-error__icon {
    color: #DC2626;
    flex-shrink: 0;
}

.login-error__text {
    font-size: 0.875rem;
    color: #DC2626;
}

/* ==================== */
/* REGISTER PAGE        */
/* ==================== */
.login-card--register .login-field__input--noicon {
    padding-left: 16px;
}

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

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

/* ==================== */
/* RESPONSIVE           */
/* ==================== */
@media (min-width: 768px) {
    .login-page { padding: 60px 24px; }
    .login-card { padding: 48px 40px; }
    .login-header__title { font-size: 2rem; }
}

@media (max-width: 380px) {
    .login-card { padding: 32px 24px; }
    .login-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

/* ==================== */
/* SUCCESS MESSAGE      */
/* (Lost Password)      */
/* ==================== */
.login-success {
    text-align: center;
    padding: 24px;
    background: rgba(34, 197, 94, 0.08);
    border-radius: 16px;
    margin-top: 24px;
}

.login-success__icon {
    color: #16A34A;
    margin-bottom: 16px;
}

.login-success__text {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}
