/* Cuentas de cliente: login, registro, mi cuenta, pedidos, rastreo, favoritos */

.cuenta-hero {
    padding: 40px 0 0;
}

.cuenta-hero h1 {
    font-size: 1.9rem;
    font-weight: 800;
    color: #222;
    margin-bottom: 6px;
}

.cuenta-hero p {
    color: #666;
}

/* Tarjeta blanca base, misma línea que .product-full-description */
.cuenta-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    padding: 30px 32px;
}

.cuenta-card--narrow {
    max-width: 480px;
    margin: 30px auto 60px;
}

/* Formularios reutilizables (mismo lenguaje visual que pages/contacto.php) */
.form-royaal {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 700;
    color: #444;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-royaal input[type="text"],
.form-royaal input[type="email"],
.form-royaal input[type="tel"],
.form-royaal input[type="password"],
.form-royaal input[type="file"],
.form-royaal textarea,
.form-royaal select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 1rem;
    color: #333;
    transition: all 0.3s ease;
    background: #fdfdfd;
}

.form-royaal input:focus,
.form-royaal textarea:focus,
.form-royaal select:focus {
    border-color: var(--primary-color);
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(220, 31, 39, 0.1);
}

.form-royaal .form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.form-royaal .form-row .form-group {
    flex: 1;
    min-width: 200px;
}

.btn-royaal-submit {
    background: #333;
    color: #fff;
    border: none;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 6px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-royaal-submit:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(220, 31, 39, 0.3);
}

.section-title-simple {
    color: #333;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 22px;
    position: relative;
    padding-bottom: 10px;
}

.section-title-simple::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.cuenta-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 18px;
}

.cuenta-alert--danger {
    background: rgba(220, 31, 39, 0.08);
    color: #b31920;
    border: 1px solid rgba(220, 31, 39, 0.2);
}

.cuenta-alert--success {
    background: rgba(46, 204, 113, 0.1);
    color: #1e8449;
    border: 1px solid rgba(46, 204, 113, 0.25);
}

.cuenta-form-footer {
    margin-top: 18px;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

.cuenta-form-footer a {
    color: var(--primary-color);
    font-weight: 700;
}

/* Layout con navegación lateral (Mi cuenta / Mis pedidos / Mis datos / Favoritos) */
.cuenta-shell {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 30px 0 60px;
}

.cuenta-nav {
    width: 240px;
    min-width: 240px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    overflow: hidden;
}

.cuenta-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    color: #444;
    font-weight: 600;
    font-size: 0.92rem;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.2s ease;
}

.cuenta-nav a:last-child {
    border-bottom: none;
}

.cuenta-nav a i {
    width: 18px;
    text-align: center;
    color: #999;
}

.cuenta-nav a:hover {
    background: #fff5f5;
    color: var(--primary-color);
}

.cuenta-nav a.is-active {
    background: var(--primary-color);
    color: #fff;
}

.cuenta-nav a.is-active i {
    color: #fff;
}

.cuenta-content {
    flex: 1;
    min-width: 0;
}

.cuenta-content h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #222;
    margin-bottom: 18px;
}

.cuenta-welcome {
    font-size: 1.05rem;
    color: #444;
    margin-bottom: 20px;
}

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

.cuenta-quick-links a {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    color: #333;
    transition: all 0.25s ease;
}

.cuenta-quick-links a:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(220, 31, 39, 0.08);
    transform: translateY(-3px);
}

.cuenta-quick-links a i {
    font-size: 1.4rem;
    color: var(--primary-color);
}

.cuenta-quick-links a strong {
    font-size: 0.95rem;
}

@media (max-width: 860px) {
    .cuenta-shell {
        flex-direction: column;
    }
    .cuenta-nav {
        width: 100%;
    }
    .cuenta-nav a {
        display: inline-flex;
        border-bottom: none;
        border-right: 1px solid #f5f5f5;
    }
    .cuenta-nav {
        display: flex;
        overflow-x: auto;
    }
}

/* Pedidos: tabla/lista + badges de estado + línea de tiempo */
.pedido-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
}

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

.pedido-row__info strong {
    display: block;
    font-size: 0.98rem;
    color: #222;
}

.pedido-row__info span {
    font-size: 0.85rem;
    color: #888;
}

.estado-badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.estado-badge--nuevo { background: #eee; color: #555; }
.estado-badge--confirmado { background: #e3f2fd; color: #1565c0; }
.estado-badge--pagado { background: #e8f5e9; color: #2e7d32; }
.estado-badge--preparando { background: #fff3e0; color: #ef6c00; }
.estado-badge--enviado { background: #ede7f6; color: #5e35b1; }
.estado-badge--entregado { background: #e8f5e9; color: #1b5e20; }
.estado-badge--cancelado { background: rgba(220, 31, 39, 0.1); color: #b31920; }

.pedido-timeline {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
}

.pedido-timeline li {
    position: relative;
    padding: 0 0 22px 28px;
    border-left: 2px solid #eee;
}

.pedido-timeline li:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
}

.pedido-timeline li::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.pedido-timeline li strong {
    display: block;
    font-size: 0.92rem;
    color: #222;
}

.pedido-timeline li span {
    font-size: 0.8rem;
    color: #888;
}

.pedido-timeline li p {
    margin-top: 4px;
    font-size: 0.85rem;
    color: #666;
}

.cuenta-empty {
    text-align: center;
    padding: 50px 20px;
    color: #888;
}

.cuenta-empty i {
    font-size: 2.4rem;
    color: #ddd;
    margin-bottom: 14px;
    display: block;
}

/* Cupón (compartido entre cart.php y checkout.php) */
.cart-coupon {
    margin-top: 18px;
    border-top: 1px solid #eee;
    padding-top: 16px;
}

.cart-coupon__toggle {
    background: none;
    border: none;
    color: #333;
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: space-between;
}

.cart-coupon__toggle i.fa-tag { color: var(--primary-color); }

.cart-coupon__form {
    display: none;
    gap: 8px;
    margin-top: 12px;
}

.cart-coupon__form.is-open {
    display: flex;
}

.cart-coupon__form input {
    flex: 1;
    padding: 10px 12px;
    border: 1.5px solid #eee;
    border-radius: 8px;
    font-size: .9rem;
    text-transform: uppercase;
}

.cart-coupon__form button {
    background: #333;
    color: #fff;
    border: none;
    padding: 0 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: .85rem;
    cursor: pointer;
}

.cart-coupon__form button:hover {
    background: var(--primary-color);
}

.cart-coupon__msg {
    margin-top: 8px;
    font-size: .82rem;
}

.cart-coupon__applied {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(46, 204, 113, .08);
    border: 1px solid rgba(46, 204, 113, .25);
    color: #1e8449;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 700;
}

.cart-coupon__applied button {
    background: none;
    border: none;
    color: #b31920;
    cursor: pointer;
    font-size: .8rem;
    text-decoration: underline;
}

/* Bloque invitado / login / registro en checkout */
.checkout-account-choice {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #f0f0f0;
    margin-bottom: 24px;
}

.checkout-account-choice__text strong {
    display: block;
    font-size: 1rem;
    color: #222;
    margin-bottom: 2px;
}

.checkout-account-choice__text span {
    font-size: 0.85rem;
    color: #777;
}

.checkout-account-choice__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.checkout-account-choice__actions a,
.checkout-account-choice__actions button {
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.checkout-account-choice__guest {
    background: #f0f0f0;
    color: #333;
}

.checkout-account-choice__guest:hover {
    background: #e4e4e4;
}

.checkout-account-choice__login {
    background: #fff;
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color) !important;
}

.checkout-account-choice__register {
    background: var(--primary-color);
    color: #fff;
}

.checkout-account-choice__register:hover {
    background: #b31920;
}

.checkout-logged-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 18px;
    border-radius: 10px;
    background: rgba(46, 204, 113, 0.08);
    border: 1px solid rgba(46, 204, 113, 0.2);
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #2e7d32;
}

.checkout-logged-banner a {
    color: #b31920;
    font-weight: 700;
}

@media (max-width: 600px) {
    .checkout-account-choice {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .checkout-account-choice__actions {
        justify-content: center;
    }
}
