/*
Theme Name: 7G Accesorios One UI
Description: Tema exclusivo para 7G Accesorios con estética One UI 8.5, Glassmorphism y optimizado para WooCommerce y Add-ons.
Author: Creado por IA
Version: 1.2
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

body {
font-family: 'Inter', sans-serif;
background-color: #f7f7f9;
background-image:
radial-gradient(circle at 15% 50%, rgba(255, 60, 100, 0.08), transparent 25%),
radial-gradient(circle at 85% 30%, rgba(255, 0, 80, 0.05), transparent 25%);
background-attachment: fixed;
margin: 0;
padding: 0;
overflow-x: hidden;
-webkit-tap-highlight-color: transparent;
}

/* Ocultar scrollbar en el submenu */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Utilidades One UI 8.5 */
.one-ui-glass {
background: rgba(255, 255, 255, 0.75);
backdrop-filter: blur(24px);
-webkit-backdrop-filter: blur(24px);
border: 1px solid rgba(255, 255, 255, 0.6);
border-radius: 28px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.one-ui-glass:hover {
transform: translateY(-4px);
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
background: rgba(255, 255, 255, 0.9);
}

.header-glass {
background: rgba(255, 255, 255, 0.85);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border-bottom: 1px solid rgba(255, 255, 255, 0.4);
position: sticky;
top: 0;
z-index: 100;
}

.search-bar {
background: rgba(0, 0, 0, 0.04);
border-radius: 9999px;
transition: background 0.3s ease, box-shadow 0.3s ease;
}

.search-bar:focus-within {
background: #ffffff;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
border: 1px solid rgba(255, 60, 100, 0.3);
}

.btn-primary, .woocommerce button.button.alt, .woocommerce input.button.alt, .woocommerce a.button.alt {
background: linear-gradient(135deg, #FF6B9E 0%, #E62045 100%) !important;
color: white !important;
border-radius: 9999px !important;
font-weight: 700 !important;
border: none !important;
padding: 12px 24px !important;
transition: opacity 0.3s ease, transform 0.2s ease !important;
box-shadow: 0 4px 15px rgba(230, 32, 69, 0.3) !important;
}

.btn-primary:hover, .woocommerce button.button.alt:hover, .woocommerce a.button.alt:hover {
opacity: 0.9 !important;
transform: scale(1.02) !important;
}

/* ====================================================
REMASTERIZACIÓN WOOCOMMERCE: MI CUENTA
==================================================== */

/* Wrapper general de la página */
.woocommerce-account main,
.woocommerce-account #main,
.woocommerce-account .site-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 32px 96px;
}

/* Ocultar el título nativo "My Account" */
.woocommerce-account .woocommerce > h1,
.woocommerce-account .woocommerce > h2,
.woocommerce-account h1.page-title,
.woocommerce-account h2.page-title,
.entry-title {
    display: none !important;
}

/* Layout flex del contenido woocommerce */
.woocommerce-account .woocommerce {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: flex-start;
}

/* ---- SIDEBAR DE NAVEGACIÓN ---- */
.woocommerce-MyAccount-navigation {
    flex: 0 0 260px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
    padding: 20px 16px;
    position: sticky;
    top: 90px; /* altura del header sticky */
}

.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-MyAccount-navigation ul li {
    margin-bottom: 4px;
}

.woocommerce-MyAccount-navigation ul li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 20px;
    border-radius: 16px;
    color: #4B5563;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.25s ease;
    background: transparent;
}

.woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-MyAccount-navigation ul li a:hover {
    background: rgba(230, 32, 69, 0.08);
    color: #E62045;
}

/* Iconos automáticos por ítem del menú */
.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--dashboard a::before { content: "🏠 "; }
.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--orders a::before { content: "📦 "; }
.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--downloads a::before { content: "⬇️ "; }
.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--edit-address a::before { content: "📍 "; }
.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--edit-account a::before { content: "👤 "; }
.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--customer-logout a::before { content: "🚪 "; }
.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--customer-logout a {
    color: #9ca3af;
    margin-top: 8px;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 16px;
}
.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--customer-logout a:hover {
    background: rgba(230, 32, 69, 0.06);
    color: #E62045;
}

/* ---- ÁREA DE CONTENIDO ---- */
.woocommerce-MyAccount-content {
    flex: 1;
    min-width: 0;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 32px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
}

/* Título dentro del contenido */
.woocommerce-MyAccount-content h2,
.woocommerce-MyAccount-content h3 {
    font-weight: 800;
    color: #111827;
    margin-bottom: 1rem;
}

/* Texto de bienvenida */
.woocommerce-MyAccount-content p {
    color: #4B5563;
    line-height: 1.7;
}

/* Links dentro del contenido */
.woocommerce-MyAccount-content a {
    color: #E62045;
    font-weight: 600;
}

/* Tabla de pedidos */
.woocommerce-orders-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}
.woocommerce-orders-table th {
    font-weight: 800;
    color: #111827;
    padding: 10px 16px;
    background: transparent;
    border: none !important;
}
.woocommerce-orders-table td {
    background: #fff;
    padding: 14px 16px;
    border: none !important;
}
.woocommerce-orders-table tr td:first-child { border-radius: 12px 0 0 12px; }
.woocommerce-orders-table tr td:last-child { border-radius: 0 12px 12px 0; }

/* Badge de estado de pedido */
.woocommerce-orders-table .woocommerce-orders-table__cell-order-status mark {
    background: rgba(230, 32, 69, 0.1);
    color: #E62045;
    border-radius: 8px;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Formularios de la cuenta */
.woocommerce-MyAccount-content .woocommerce-form-row label {
    font-weight: 700;
    color: #374151;
    display: block;
    margin-bottom: 6px;
}
.woocommerce-MyAccount-content .woocommerce-form-row input[type="text"],
.woocommerce-MyAccount-content .woocommerce-form-row input[type="email"],
.woocommerce-MyAccount-content .woocommerce-form-row input[type="password"],
.woocommerce-MyAccount-content .input-text {
    width: 100%;
    padding: 12px 18px;
    border-radius: 14px;
    border: 1.5px solid rgba(0,0,0,0.08);
    background: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border 0.2s, box-shadow 0.2s;
}
.woocommerce-MyAccount-content .woocommerce-form-row input:focus,
.woocommerce-MyAccount-content .input-text:focus {
    border-color: rgba(230, 32, 69, 0.4);
    box-shadow: 0 0 0 4px rgba(230, 32, 69, 0.06);
}

/* Responsive mobile */
@media (max-width: 640px) {
    .woocommerce-MyAccount-navigation {
        flex: 0 0 100%;
        position: static;
    }
    .woocommerce-MyAccount-content {
        padding: 24px 20px;
    }
    .woocommerce-account main,
    .woocommerce-account #main,
    .woocommerce-account .site-main {
        padding: 24px 16px 96px;
    }
}

/* ====================================================
REMASTERIZACIÓN WOOCOMMERCE: CARRITO Y CHECKOUT
==================================================== */
.woocommerce-cart .woocommerce {
display: flex;
flex-wrap: wrap;
gap: 30px;
}
.woocommerce-cart-form {
flex: 1;
min-width: 60%;
background: rgba(255, 255, 255, 0.75);
backdrop-filter: blur(24px);
border-radius: 32px;
padding: 30px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
border: 1px solid rgba(255, 255, 255, 0.6);
}
.cart-collaterals {
flex: 0 0 35%;
background: rgba(255, 255, 255, 0.75);
backdrop-filter: blur(24px);
border-radius: 32px;
padding: 30px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
border: 1px solid rgba(255, 255, 255, 0.6);
align-self: flex-start;
}
/* Limpieza de la Tabla del carrito */
.woocommerce table.shop_table {
border: none !important;
border-collapse: separate !important;
border-spacing: 0 15px !important;
width: 100%;
}
.woocommerce table.shop_table th {
border: none !important;
font-weight: 800;
color: #1f2937;
padding: 10px 15px;
background: transparent;
}
.woocommerce table.shop_table td {
border: none !important;
background: #ffffff;
padding: 15px;
}
.woocommerce table.shop_table tr.cart_item td:first-child {
border-radius: 16px 0 0 16px;
}
.woocommerce table.shop_table tr.cart_item td:last-child {
border-radius: 0 16px 16px 0;
}
.woocommerce a.remove {
color: #E62045 !important;
font-weight: bold;
border-radius: 50%;
}
.woocommerce a.remove:hover {
background: #E62045 !important;
color: white !important;
}

/* Carrito Vacío y Mensajes de Alerta */
.cart-empty.woocommerce-info {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
padding: 60px 20px;
background: rgba(255,255,255,0.7);
border-radius: 32px;
border: 2px dashed rgba(0,0,0,0.1);
font-size: 1.2rem;
font-weight: 700;
color: #4B5563;
}
.cart-empty.woocommerce-info::before { display: none; }
.return-to-shop { margin-top: 20px; text-align: center; }

.woocommerce-message, .woocommerce-info, .woocommerce-error {
background: rgba(255, 255, 255, 0.85) !important;
backdrop-filter: blur(12px);
border-radius: 16px !important;
border: none !important;
border-left: 6px solid #E62045 !important;
box-shadow: 0 4px 15px rgba(0,0,0,0.05);
color: #1f2937 !important;
font-weight: 600;
}

/* Botones genéricos de Woo */
.woocommerce button.button {
background: #f3f4f6;
color: #111827;
border-radius: 12px;
font-weight: 700;
transition: all 0.3s ease;
}
.woocommerce button.button:hover { background: #e5e7eb; }

/* Desplegable de Búsqueda en Vivo */
.live-search-dropdown {
position: absolute;
top: calc(100% + 10px);
left: 0;
width: 100%;
background: rgba(255, 255, 255, 0.75);
backdrop-filter: blur(24px);
-webkit-backdrop-filter: blur(24px);
border-radius: 24px;
box-shadow: 0 12px 48px rgba(0,0,0,0.12);
border: 1px solid rgba(255, 255, 255, 0.6);
overflow: hidden;
z-index: 999;
display: none;
}
.live-search-item {
display: flex;
align-items: center;
padding: 10px 16px;
border-bottom: 1px solid rgba(0,0,0,0.04);
text-decoration: none;
color: #1f2937;
transition: background 0.2s;
gap: 12px;
}
.live-search-item:last-child { border-bottom: none; }
.live-search-item:hover { background: rgba(230, 32, 69, 0.04); }

/* Imagen del producto — tamaño fijo, sin stretch */
.live-search-item .ls-img-wrap {
width: 48px;
height: 48px;
min-width: 48px;
border-radius: 12px;
overflow: hidden;
background: #f3f4f6;
display: flex;
align-items: center;
justify-content: center;
}
.live-search-item .ls-img-wrap img {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
display: block;
}

/* Ocultar titulo nativo repetido en woo */
.woocommerce-products-header__title.page-title { display: none; }

/* ====================================================
   ICONOS DE CATEGORÍAS — COLORES ONE UI
==================================================== */
.cat-icon-1 { color: #E62045; }   /* Fundas — rojo principal */
.cat-icon-2 { color: #F59E0B; }   /* Cargadores — amarillo energía */
.cat-icon-3 { color: #6366F1; }   /* Cables — violeta */
.cat-icon-4 { color: #0EA5E9; }   /* Vincha — azul */
.cat-icon-5 { color: #10B981; }   /* In-Ear BT — verde */
.cat-icon-6 { color: #8B5CF6; }   /* Templados — púrpura */

/* Fondo del ícono con tinte del color respectivo */
.cat-icon-1 { color: #E62045; }
.group:nth-child(1) .rounded-\[24px\] { background: rgba(230, 32, 69, 0.06) !important; }
.group:nth-child(2) .rounded-\[24px\] { background: rgba(245, 158, 11, 0.06) !important; }
.group:nth-child(3) .rounded-\[24px\] { background: rgba(99, 102, 241, 0.06) !important; }
.group:nth-child(4) .rounded-\[24px\] { background: rgba(14, 165, 233, 0.06) !important; }
.group:nth-child(5) .rounded-\[24px\] { background: rgba(16, 185, 129, 0.06) !important; }
.group:nth-child(6) .rounded-\[24px\] { background: rgba(139, 92, 246, 0.06) !important; }

/* ====================================================
   WOOCOMMERCE PRODUCT ADD-ONS — ESTILOS
==================================================== */

/* Precio del addon (el que aparece como "+$ 65.000,00") */
.wc-pao-addon-price,
.wc-pao-addon-totals,
.product-addon-totals,
.addon-price,
p.price.woocommerce-Price-amount {
    color: #E62045 !important;
    font-weight: 700 !important;
}

/* Subtotal dinámico debajo de los addons */
.wc-pao-addon-totals-price,
.woocommerce-product-addon-price,
.product-addon-total,
.wc-pao-addon-totals .amount {
    color: #E62045 !important;
    font-weight: 800 !important;
    font-size: 1.1rem !important;
}

/* Toda la sección de totales del addon */
.wc-pao-addon-totals {
    background: rgba(230, 32, 69, 0.04);
    border-radius: 16px;
    padding: 16px 20px;
    margin: 16px 0;
    border: 1px solid rgba(230, 32, 69, 0.1);
}

/* Labels de los addons */
.wc-pao-addon-name,
.wc-pao-addon label {
    font-weight: 600 !important;
    color: #111827 !important;
}

/* Checkboxes y radios del addon */
.wc-pao-addon input[type="checkbox"],
.wc-pao-addon input[type="radio"] {
    accent-color: #E62045;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Precio junto a cada opción "+$ X" */
.wc-pao-addon-price-suffix {
    color: #6B7280;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Precio del producto cuando es $0,00 base */
.woocommerce div.product p.price .woocommerce-Price-amount,
.woocommerce div.product span.price .woocommerce-Price-amount {
    background: linear-gradient(135deg, #FF6B9E 0%, #E62045 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2rem !important;
    font-weight: 900 !important;
}

/* ====================================================
   COMPATIBILIDAD GUTENBERG (BLOCK EDITOR)
==================================================== */

/* Fuente y fondo en el editor */
.editor-styles-wrapper {
    font-family: 'Inter', sans-serif !important;
    background-color: #f7f7f9 !important;
}

/* El área de escritura del editor */
.editor-styles-wrapper p,
.editor-styles-wrapper li,
.editor-styles-wrapper td {
    font-family: 'Inter', sans-serif;
    color: #374151;
    line-height: 1.7;
}

/* Títulos en el editor */
.editor-styles-wrapper h1,
.editor-styles-wrapper h2,
.editor-styles-wrapper h3,
.editor-styles-wrapper h4 {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    color: #111827;
}

/* Alinear el ancho del editor con el diseño */
.wp-block {
    max-width: 1200px;
}
.wp-block[data-align="wide"] {
    max-width: 1400px;
}
.wp-block[data-align="full"] {
    max-width: 100%;
}