/* ============================================
   ESTILOS PARA PERFIL DE USUARIO - PESTAÑAS
   ============================================ */

/* Contenedor principal del perfil */
.shop-profile {
    padding: 15px 0;
}

.profile-title-container {
    text-align: center;
    margin-bottom: 8px;
}

/* Sidebar del perfil */
.profile-sidebar {
    background: white;
    border-radius: 8px;
    padding: 12px 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 15px;
    transition: all 0.3s ease;
    position: sticky;
    top: 100px;
}

.profile-sidebar:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.profile-tabs {
    padding: 0;
    margin: 0;
    list-style: none;
}

.profile-tabs li {
    margin-bottom: 4px;
    border-radius: 6px;
    transition: all 0.3s ease;
    background-color: #f5f5f5;
}

.profile-tabs li:hover {
    background-color: #e9e9e9;
    transform: translateX(5px);
}

.profile-tabs li.active {
    background-color: #DE208B;
}

.profile-tabs li a {
    display: block;
    padding: 8px 10px;
    color: #555;
    text-decoration: none;
    font-weight: 500;
    font-size: 12px;
    transition: all 0.3s ease;
}

.profile-tabs li.active a {
    color: white;
}

.profile-tabs li a i {
    margin-right: 6px;
    width: 16px;
    text-align: center;
}

/* Avatar del usuario */
.profile-avatar-container {
    text-align: center;
    margin-bottom: 10px;
    position: relative;
}

.profile-avatar-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
    border-radius: 50%;
    padding: 5px;
    border: 2px solid #DE208B;
    transition: all 0.3s ease;
    overflow: hidden;
}

.profile-avatar-wrapper:hover {
    transform: scale(1.05);
    border-color: #1A71B9;
    box-shadow: 0 0 15px rgba(26, 113, 185, 0.3);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.profile-avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    opacity: 0;
    transition: all 0.3s ease;
}

.profile-avatar-wrapper:hover .profile-avatar-overlay {
    opacity: 1;
}

.profile-avatar-overlay i {
    font-size: 20px;
    margin-bottom: 4px;
}

.profile-avatar-overlay span {
    font-size: 11px;
    font-weight: 500;
}

/* Información del usuario */
.profile-user-info {
    text-align: center;
    margin-bottom: 10px;
}

.profile-user-info h3 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
}

.email-text {
    color: #666;
    font-size: 11px;
    margin-top: 2px;
}

/* Contenido de las pestañas */
.profile-tab-content {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.profile-tab-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: fadeIn 0.5s forwards;
}

/* Sección de cabecera dentro del contenido */
.profile-section-header {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.profile-section-header h3 {
    font-size: 16px;
    margin-bottom: 3px;
    color: #333;
}

.profile-section-header p {
    color: #777;
    font-size: 11px;
    margin: 0;
}

.profile-section-body {
    padding: 5px 0;
}

/* Contenedor del contenido principal */
.profile-content {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    min-height: 400px;
}

/* Inputs y form-controls compactos */
.profile-content .form-control,
.profile-content input[type="text"],
.profile-content input[type="email"],
.profile-content input[type="tel"],
.profile-content input[type="password"],
.profile-content input[type="number"],
.profile-content select,
.profile-content textarea {
    padding: 5px 8px;
    font-size: 12px;
    height: auto;
    min-height: 28px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.profile-content textarea {
    min-height: 50px;
}

.profile-content label {
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 2px;
    display: block;
}

.profile-content select {
    padding-right: 24px;
}

/* Botones compactos del perfil */
.profile-content button[type="submit"],
.profile-content .btn-submit-form,
.profile-content .btn-primary,
.btn-add-address {
    padding: 6px 12px;
    font-size: 11px;
    border-radius: 4px;
    min-height: auto;
    height: auto;
}

.address-card button,
.address-actions button {
    padding: 4px 8px;
    font-size: 10px;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media queries para responsive */
@media (max-width: 767px) {
    .profile-content {
        margin-top: 30px;
        padding: 20px;
    }

    .profile-avatar {
        width: 100px;
        height: 100px;
    }

    .profile-sidebar {
        position: static;
    }

    .profile-tabs li a {
        padding: 10px;
    }
}

/* Estilo para direcciones */
.address-card {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px;
    transition: all 0.3s ease;
}

.address-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.address-card.primary {
    border: 2px solid #DE208B;
}

.primary-badge {
    background-color: #DE208B;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
}

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

/* Botones de acción */
.address-actions {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

/* Empty states */
.empty-state-container {
    text-align: center;
    padding: 20px 12px;
    border: 1px dashed #ccc;
    border-radius: 6px;
    background-color: #f9f9f9;
}

.empty-state-container p {
    color: #666;
    margin-bottom: 12px;
}

/* Mejoras para el espaciado del modal de direcciones */
#addressModal .modal-body {
    padding: 8px 12px !important;
}

#addressModal label {
    font-weight: 500 !important;
    margin-bottom: 2px !important;
    color: #333 !important;
    font-size: 11px !important;
}

#addressModal .form-control {
    padding: 4px 6px !important;
    height: auto !important;
    min-height: 28px !important;
    font-size: 11px !important;
}

#addressModal .form-group {
    margin-bottom: 8px !important;
}

#addressModal .row {
    margin-bottom: 4px !important;
}

#addressModal .form-text {
    font-size: 9px !important;
    margin-top: 1px !important;
}

#addressModal .modal-header {
    padding: 10px 12px !important;
}

#addressModal .modal-header h5 {
    font-size: 14px !important;
    margin: 0 !important;
}

/* Mejoras para los botones del modal */
#addressModal .modal-footer {
    padding: 8px 12px !important;
    border-top: 1px solid #e0e0e0 !important;
}

#addressModal .modal-footer button {
    padding: 5px 10px !important;
    font-size: 11px !important;
}


.addresses-header {
    margin-bottom: 10px !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid #eee !important;
}

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

.address-card {
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    padding: 10px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

.address-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-3px) !important;
}

.address-card.primary {
    border: 2px solid #DE208B !important;
}

.address-header {
    margin-bottom: 8px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.address-header h4 {
    margin: 0 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #333 !important;
}

.primary-badge {
    background-color: #DE208B !important;
    color: white !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    font-size: 10px !important;
    font-weight: 500 !important;
}

.address-body {
    flex: 1 !important;
    margin-bottom: 8px !important;
}

.address-body p {
    margin-bottom: 4px !important;
    font-size: 11px !important;
    color: #555 !important;
}

.address-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    justify-content: flex-end !important;
}

/* Mejora para estados vacíos */
.empty-state-container {
    text-align: center !important;
    padding: 20px 12px !important;
    background-color: #f9f9f9 !important;
    border-radius: 8px !important;
    border: 1px dashed #ddd !important;
}

.empty-state-container i {
    color: #DE208B !important;
    margin-bottom: 6px !important;
}

.empty-state-container h4 {
    margin-bottom: 5px !important;
    font-weight: 600 !important;
    color: #333 !important;
    font-size: 14px !important;
}

.empty-state-container p {
    color: #666 !important;
    margin-bottom: 10px !important;
    font-size: 11px !important;
}

/* Mejoras para el checkbox en el modal de dirección */
#addressModal .checkbox-container {
    display: flex !important;
    align-items: center !important;
    margin-top: 15px !important;
}

#addressModal .checkbox-container input[type="checkbox"] {
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    margin-right: 8px !important;
    position: relative !important;
    top: 1px !important;
    cursor: pointer !important;
    opacity: 1 !important;
    visibility: visible !important;
}

#addressModal .checkbox-container label {
    display: inline-block !important;
    cursor: pointer !important;
    margin: 0 !important;
    font-weight: normal !important;
}

.fiscal-file-input {
    display: none;
}

.fiscal-file-upload-wrapper {
    border: 2px dashed #ddd;
    border-radius: 6px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.fiscal-file-upload-wrapper:hover {
    border-color: #DE208B;
    background-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(222, 32, 139, 0.1);
}

.fiscal-file-upload-wrapper.file-selected {
    border-color: #28a745;
    background-color: #f8fff9;
}

.fiscal-upload-icon {
    font-size: 18px;
    color: #DE208B;
    margin-bottom: 4px;
    display: block;
}

.fiscal-file-text {
    font-weight: 500;
    color: #333;
    display: block;
    margin-bottom: 3px;
    font-size: 12px;
}

.fiscal-file-hint {
    color: #666;
    font-size: 10px;
    display: block;
}

.fiscal-file-name {
    font-size: 11px;
    color: #555;
    font-weight: 500;
    padding: 4px 8px;
    background-color: #f5f5f5;
    border-radius: 4px;
    display: inline-block;
    max-width: 100%;
    word-break: break-all;
}

.fiscal-file-upload-wrapper.file-selected .fiscal-file-name {
    background-color: #d4edda;
    color: #155724;
}

.fiscal-current-doc {
    margin-top: 8px;
    padding: 6px;
    background-color: #e9ecef;
    border-radius: 4px;
    border-left: 3px solid #DE208B;
}

.fiscal-current-doc p {
    margin: 0;
    font-size: 11px;
    color: #495057;
}

.fiscal-current-doc i {
    color: #dc3545;
    margin-right: 6px;
}

.btn-download-doc {
    color: #DE208B;
    text-decoration: none;
    font-weight: 500;
    margin-left: 5px;
}

.btn-download-doc:hover {
    color: #1A71B9;
    text-decoration: underline;
}

/* ====== Órdenes (Mis Compras) ====== */
.orders-filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    align-items: center;
    justify-content: space-between;
}

.orders-filters-container input[type="text"] {
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    min-width: 220px;
    font-size: 12px;
}

.orders-filters-container select {
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    min-width: 180px;
    font-size: 12px;
}
.orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
    font-size: 13px; /* aumentado */
}

.orders-table thead th {
    background: #f3f4f6;
    padding: 6px 8px;
    font-size: 13px; /* aumentado */
    text-transform: uppercase;
    letter-spacing: .3px;
    color: #555;
}

.orders-table tbody td {
    padding: 8px 8px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
    font-size: 13px; /* aumentado */
}

.orders-table tbody tr {
    cursor: pointer;
    transition: background .2s;
}

.orders-table tbody tr:hover {
    background: #fafafa;
}

.order-status-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .2px;
    color: #fff;
}

.order-status-badge.status-pending {
    background: #ffb347;
}

.order-status-badge.status-confirmed {
    background: #1A71B9;
}

.order-status-badge.status-processing {
    background: #6c5ce7;
}

.order-status-badge.status-shipped {
    background: #17a2b8;
}

.order-status-badge.status-delivered {
    background: #28a745;
}

.order-status-badge.status-cancelled {
    background: #dc3545;
}

.payment-status-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
}

.payment-status-pending {
    background: #ffb347;
}

.payment-status-paid {
    background: #28a745;
}

.payment-status-failed {
    background: #dc3545;
}

.payment-status-refunded {
    background: #6c757d;
}

.orders-empty {
    text-align: center;
    padding: 20px 12px;
    border: 1px dashed #ccc;
    border-radius: 6px;
    background: #f9f9f9;
}

.orders-empty i {
    color: #DE208B;
    margin-bottom: 5px;
}

.orders-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
    margin-top: 10px;
}

.orders-pagination button {
    border: 1px solid #ddd;
    background: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all .2s;
}

.orders-pagination button:hover:not(.active):not(:disabled) {
    background: #f0f0f0;
}

.orders-pagination button.active {
    background: #DE208B;
    border-color: #DE208B;
    color: #fff;
    font-weight: 600;
}

.orders-pagination button:disabled {
    opacity: .5;
    cursor: not-allowed;
    background: #f7f7f7;
}

.order-mini-products {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    max-width: 200px;
}

.order-mini-products span {
    background: #f0f0f5;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 9px;
    line-height: 1.2;
}

/* Estilos para el badge de estado con link de personalización */
.order-status-badge.status-pending_customization {
    background: linear-gradient(135deg, #ff9800 0%, #ff6b00 100%);
    color: white;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 4px 8px;
}

.btn-customize-link {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: rgba(255, 255, 255, 0.9);
    color: #ff6b00;
    padding: 2px 6px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 9px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 2px;
    white-space: nowrap;
}

.btn-customize-link:hover {
    background: white;
    color: #ff5500;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.3);
}

.btn-customize-link i {
    font-size: 9px;
}

.order-status-badge.status-customized {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

@media (max-width: 900px) {
    .orders-table thead {
        display: none;
    }

    .orders-table,
    .orders-table tbody,
    .orders-table tr,
    .orders-table td {
        display: block;
        width: 100%;
    }

    .orders-table tbody tr {
        margin-bottom: 10px;
        border: 1px solid #eee;
        border-radius: 6px;
        padding: 6px;
    }

    .orders-table tbody td {
        border: none;
        padding: 4px 3px;
        font-size: 13px;
    }

    .orders-table tbody td[data-label]::before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: #555;
        font-size: 13px;
    }

    .order-mini-products {
        max-width: 100%;
    }

    .orders-filters-container {
        flex-direction: column;
        align-items: stretch;
    }

    .orders-filters-container input,
    .orders-filters-container select {
        width: 100%;
        min-width: unset;
    }
}

.text-right {
    margin-bottom: 0 !important;
}

.form-group-profile {
    margin-bottom: 0px !important;
}