/* ======================================================== */
/*      ESTILO DE FONDO Y CONTENEDOR UNIFICADO              */
/* ======================================================== */

.body-background-image {
    background-image: url('/img/banner.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.store-wrapper {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border-radius: var(--radio-borde);
    padding: 4rem 1rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.profile-wrapper {
    margin: 2rem auto;
    max-width: 1280px;
    padding: 2rem;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border-radius: var(--radio-borde);
}

/* ======================================================== */
/*      TÍTULOS DE SECCIÓN MEJORADOS (TIENDA Y PERFIL)      */
/* ======================================================== */

.store-section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.store-section-header h2 {
    font-size: 2.75rem;
    font-weight: 800;
    color: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
    display: inline-block;
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.store-section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--color-primario);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--color-primario);
}

.profile-header { text-align: center; padding: 2rem 0; }
.profile-header h1 { font-size: 2.5rem; font-weight: 800; color: white; }
.profile-header p { color: rgba(255, 255, 255, 0.8); }

.tab-title { 
    font-size: 1.75rem; 
    font-weight: 700; 
    margin-bottom: 2rem; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.2); 
    padding-bottom: 1rem; 
    color: white;
}

/* ======================================================== */
/*      DISEÑO DE TARJETAS (PRODUCTOS, CATEGORÍAS, ETC)     */
/* ======================================================== */

.product-card {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radio-borde);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.product-card:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.2);
}

.product-card-image-container { height: 200px; overflow: hidden; }
.product-card-image-container img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.product-card:hover .product-card-image-container img { transform: scale(1.1); }

.product-card-content { padding: 1.25rem; display: flex; flex-direction: column; flex-grow: 1; }
.product-card-name { font-size: 1.1rem; font-weight: 600; color: white; margin-bottom: 0.5rem; min-height: 3.3rem; }
.product-card-category { font-size: 0.8rem; color: rgba(255, 255, 255, 0.8); margin-bottom: 1rem; }
.product-card-footer { margin-top: auto; display: flex; flex-direction: column; gap: 1rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.product-card-price { font-size: 1.75rem; font-weight: 700; color: #adff2f; text-align: left; }
.product-card-button {
    display: flex; align-items: center; justify-content: center;
    gap: 0.5rem; width: 100%; background-color: var(--color-primario);
    color: white; padding: 0.75rem 1rem; border-radius: 0.5rem;
    font-weight: 600; font-size: 0.9rem; border: none; cursor: pointer;
    transition: background-color 0.2s ease;
}
.product-card-button:hover { background-color: #7c3aed; }
.product-card-button::before { content: '🛒'; font-size: 1rem; }

.category-cell {
    position: relative; display: flex; align-items: center; justify-content: center;
    padding: 1.5rem; border-radius: var(--radio-borde);
    background-color: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.2);
    cursor: pointer; overflow: hidden; min-height: 120px;
    background-size: cover; background-position: center;
    transition: transform 0.3s ease;
}
.category-cell.has-image { color: white; }
.category-cell-overlay {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    transition: opacity 0.3s ease;
}
.category-cell:hover .category-cell-overlay { background-color: rgba(0, 0, 0, 0.6); }
.category-cell-title {
    position: relative; z-index: 2; font-weight: 700;
    font-size: 1.25rem; text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
}
.category-cell:not(.has-image) .category-cell-title { color: white; text-shadow: none; }

/* ======================================================== */
/*      ESTILOS PARA PÁGINA DE PERFIL                       */
/* ======================================================== */

.profile-container { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 1024px) { .profile-container { grid-template-columns: 280px 1fr; } }

.profile-tab-nav {
    display: flex; flex-direction: row;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radio-borde);
    padding: 0.75rem;
    backdrop-filter: blur(10px);
    overflow-x: auto;
}
@media (min-width: 1024px) { .profile-tab-nav { flex-direction: column; overflow-x: visible; } }

.profile-tab {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 1rem; border-radius: 0.5rem;
    font-weight: 600; text-align: left;
    background: none; border: none; cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
}
.profile-tab svg { width: 24px; height: 24px; }
.profile-tab:hover { background-color: rgba(255, 255, 255, 0.1); color: white; }
.profile-tab.active { background-color: var(--color-primario); color: white; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

.tab-content-container {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: var(--radio-borde);
}

.profile-wrapper .form-group label { color: white; }
.profile-wrapper .form-input {
    background-color: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}
.profile-wrapper .form-input:focus { background-color: rgba(0, 0, 0, 0.3); border-color: var(--color-primario); }
.profile-wrapper .form-input:disabled { background-color: rgba(0, 0, 0, 0.4); color: rgba(255, 255, 255, 0.5); cursor: not-allowed; }
.profile-wrapper .form-hint { color: rgba(255, 255, 255, 0.6); }

.orders-list, .address-display-list { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.order-card, .address-card-display {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radio-borde);
    padding: 1.5rem;
    display: flex; flex-direction: column; gap: 1rem;
    transition: all 0.3s ease;
}
.order-card:hover, .address-card-display:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.3); box-shadow: 0 8px 20px rgba(0,0,0,0.2); }

.order-card-title, .address-card-header strong { font-size: 1.1rem; font-weight: 600; color: white; }
.order-card-text, .address-card-body p { font-size: 0.95rem; line-height: 1.5; color: rgba(255, 255, 255, 0.85); margin: 0; }
.order-card-total { color: #adff2f; font-weight: 700; }
.order-card-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 0.75rem; }

.address-card-header { display: flex; align-items: center; gap: 0.75rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: 1rem; }
.address-card-header svg { width: 24px; height: 24px; color: var(--color-secundario); }
.address-card-actions { margin-top: auto; padding-top: 1rem; display: flex; justify-content: flex-end; }

.action-btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background-color: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8); font-weight: 600; font-size: 0.85rem;
    padding: 0.5rem 1rem; border-radius: 0.5rem; cursor: pointer;
    transition: all 0.2s ease;
}
.action-btn svg { width: 16px; height: 16px; }
.btn-edit { color: #adff2f; }
.btn-edit:hover { background-color: rgba(173, 255, 47, 0.2); border-color: rgba(173, 255, 47, 0.5); color: white; }
.btn-delete { color: #fca5a5; }
.btn-delete:hover { background-color: rgba(239, 68, 68, 0.2); border-color: rgba(239, 68, 68, 0.5); color: white; }

.coupons-list { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.coupon-card {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 5px solid var(--color-secundario);
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    display: flex; justify-content: space-between; align-items: center;
}
.coupon-card-info h4 { color: white; font-weight: 600; }
.coupon-card-info p { color: rgba(255, 255, 255, 0.7); font-size: 0.875rem; }
.coupon-card-code {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 700;
    color: white;
    font-family: monospace;
}

/* ======================================================== */
/*      CARRITO Y CHECKOUT                                  */
/* ======================================================== */

#cart-products { display: flex; flex-direction: column; gap: 1rem; }
.cart-item { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; padding-bottom: 1rem; border-bottom: 1px solid var(--color-borde); }
.cart-item-image { width: 64px; height: 64px; object-fit: cover; border-radius: 0.5rem; background-color: var(--color-fondo); }
.cart-item-details { display: flex; flex-direction: column; justify-content: space-between; gap: 0.5rem; }
.cart-item-name { font-weight: 600; color: var(--color-texto-principal); line-height: 1.3; }
.cart-item-subtotal { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; }
.cart-item-total { font-weight: 700; font-size: 1rem; }
.cart-item-remove-btn { background: none; border: none; cursor: pointer; color: var(--color-texto-secundario); padding: 0.25rem; }
.cart-item-remove-btn:hover { color: var(--color-error); }
.cart-item-remove-btn svg { width: 18px; height: 18px; }

.cart-summary { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }
.cart-summary-row { display: flex; justify-content: space-between; align-items: center; font-size: 1rem; color: var(--color-texto-secundario); }
.cart-summary-row.grand-total { font-size: 1.25rem; color: var(--color-texto-principal); margin-top: 0.5rem; padding-top: 0.75rem; border-top: 2px solid var(--color-borde); }
.cart-summary-row.discount-row { color: var(--color-exito); }

.checkout-body { padding: 1.5rem; overflow-y: auto; display: flex; flex-direction: column; gap: 2rem; }
.checkout-section { padding-bottom: 1.5rem; border-bottom: 1px solid var(--color-borde); }
.checkout-section:last-child { border-bottom: none; padding-bottom: 0; }
.checkout-section-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 1rem; }
#addressSelectionModal .modal-content { max-width: 550px; }
#addressSelectionModal .modal-actions { padding: 1.5rem; background-color: var(--color-fondo); }
#checkout-summary .cart-summary-row { padding: 0.25rem 0; }
#checkout-summary .grand-total { font-size: 1.4rem; }

.cart-coupon-form { display: flex; gap: 0.5rem; }
.cart-coupon-form .form-input { font-size: 0.9rem; }
.cart-coupon-form .btn { padding: 0.5rem 1rem; white-space: nowrap; }
.coupon-feedback-text { font-size: 0.875rem; margin-top: 0.5rem; font-weight: 500; min-height: 1.2em; }
.coupon-feedback-text .link { font-size: 0.8em; margin-left: 0.5rem; vertical-align: middle; }

.cart-item-controls { display: flex; align-items: center; gap: 1rem; }
.quantity-selector { display: flex; align-items: center; border: 1px solid var(--color-borde); border-radius: 999px; overflow: hidden; }
.quantity-btn { background-color: var(--color-fondo); border: none; cursor: pointer; padding: 0.25rem 0.75rem; font-size: 1.2rem; font-weight: 600; color: var(--color-texto-secundario); transition: background-color 0.2s; }
.quantity-btn:hover { background-color: var(--color-borde); color: var(--color-texto-principal); }
.quantity-display { padding: 0 0.5rem; font-weight: 600; min-width: 30px; text-align: center; }
.cart-item-price-unit { font-size: 0.8rem; color: var(--color-texto-secundario); }

/* ======================================================== */
/*      PANEL DE ADMINISTRACIÓN                             */
/* ======================================================== */

.admin-section-wrapper {
    background-color: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: var(--radio-borde);
    padding: 2rem;
    margin-bottom: 2rem;
}
.admin-section-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.5rem; padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.admin-section-header h1, .admin-section-header h2 {
    color: white; font-weight: 800;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}
.admin-section-header h1 { font-size: 2rem; }
.admin-section-header h2 { font-size: 1.75rem; }

.admin-controls { margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.5rem; }
.admin-controls label { color: rgba(255, 255, 255, 0.9); font-weight: 600; white-space: nowrap; }
.admin-controls .form-input {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: white; max-width: 250px;
}
.admin-controls .form-input option { background-color: #333; color: white; }

.admin-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.admin-table td, .admin-table th { padding: 1rem 1.25rem; color: rgba(255, 255, 255, 0.9); border-bottom: 1px solid rgba(255, 255, 255, 0.15); }
.admin-table th { color: rgba(255, 255, 255, 0.7); font-weight: 600; }
.admin-table tbody tr:hover { background-color: rgba(255, 255, 255, 0.05); }
.admin-table .link { color: var(--color-primario-claro); font-weight: 600; text-decoration: none; }
.admin-table .link:hover { color: white; text-decoration: underline; }

.category-list { display: flex; flex-direction: column; gap: 0.75rem; }
.category-list-item {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    display: flex; justify-content: space-between; align-items: center;
}
.category-list-item span { color: white; font-weight: 500; }

.admin-action-btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 1rem; border-radius: 0.5rem;
    font-weight: 600; font-size: 0.875rem;
    border: 1px solid transparent; cursor: pointer;
    transition: all 0.2s ease; text-decoration: none;
}
.admin-action-btn svg { width: 16px; height: 16px; }
.admin-btn-edit { background-color: rgba(22, 197, 94, 0.2); border-color: rgba(22, 197, 94, 0.3); color: #dcfce7; }
.admin-btn-edit:hover { background-color: rgba(22, 197, 94, 0.3); border-color: rgba(22, 197, 94, 0.6); color: white; }
.admin-btn-delete { background-color: rgba(239, 68, 68, 0.2); border-color: rgba(239, 68, 68, 0.3); color: #fee2e2; }
.admin-btn-delete:hover { background-color: rgba(239, 68, 68, 0.3); border-color: rgba(239, 68, 68, 0.6); color: white; }

.dashboard-grid .card-icon.icon-revenue { background-color: #3b82f6; }
.dashboard-grid .card-icon.icon-profit { background-color: #10b981; }

/* ======================================================== */
/*      MODAL DE CONFIRMACIÓN Y OTROS                       */
/* ======================================================== */

.confirmation-body {
    padding: 1.5rem;
    font-size: 1.1rem;
    color: var(--color-texto-secundario);
    text-align: center;
}

.button-spacing > .btn + .btn,
.button-spacing > .admin-action-btn + .admin-action-btn,
.button-spacing > .action-btn + .action-btn {
    margin-left: 0.75rem;
}

.modal-actions.button-spacing {
    display: flex;
    justify-content: flex-end;
}
