/* ============================================================
   ESTILO DEFINITIVO 2 COLUMNAS - VIBRA PLENA (MOBILE READY)
   ============================================================ */

/* 1. Estructura de la Tabla */
.woocommerce-MyAccount-downloads.shop_table {
    border-collapse: separate !important;
    border-spacing: 0 15px !important; /* Espacio entre filas */
    border: none !important;
    width: 100% !important;
    background: transparent !important;
}

/* 2. Encabezados */
.shop_table thead th {
    background: transparent !important;
    color: #5B2C6F !important;
    border: none !important;
    text-transform: uppercase !important;
    font-size: 11px !important;
    letter-spacing: 1.5px !important;
    padding: 10px 20px !important;
}

/* Centrar específicamente el encabezado de Descarga */
.shop_table thead th.download-remaining {
    text-align: center !important;
}

/* 3. Filas y Celdas */
.shop_table tbody tr td {
    padding: 25px !important;
    background: #ffffff !important;
    border: none !important;
    vertical-align: middle !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.04) !important;
}

/* Bordes redondeados */
.shop_table tbody tr td:first-child { border-radius: 20px 0 0 20px !important; }
.shop_table tbody tr td:last-child { border-radius: 0 20px 20px 0 !important; }

/* 4. Columna de Info (Izquierda) */
.vp-info-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}

.vp-download-title strong {
    color: #5B2C6F !important;
    font-size: 1.1rem !important;
    line-height: 1.2 !important;
}

.vp-download-file small {
    color: #7a7a7a !important;
    background: #f7f3f9 !important;
    padding: 4px 10px !important;
    border-radius: 8px !important;
    font-style: italic !important;
    display: inline-block !important;
    width: fit-content !important;
}

.vp-download-date {
    font-size: 0.8rem !important;
    color: #b0b0b0 !important;
    margin-top: 2px !important;
}

/* 5. Columna de Descarga (Centrada) */
.shop_table td.download-remaining {
    text-align: center !important;
}

/* 6. Botón Descargar */
.vp-btn-download {
    background-color: #5B2C6F !important;
    color: #ffffff !important;
    width: 48px !important;   /* Un poquito más grande para mejor zona de clic */
    height: 48px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important; /* Efecto elástico suave */
    text-decoration: none !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: 0 4px 10px rgba(91, 44, 111, 0.2) !important;
}

/* Icono Nube SVG */
.vp-btn-download::before {
    content: "" !important;
    width: 24px !important; /* Tamaño del icono */
    height: 24px !important;
    background-color: currentColor !important;
    /* Usamos un padding interno en el SVG (viewBox) para que no toque los bordes */
    -webkit-mask: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-1 -1 26 26' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.5 19c2.5 0 4.5-2 4.5-4.5 0-2.3-1.7-4.2-3.9-4.5-1-4.1-4.7-7-9.1-7-4.4 0-8.1 2.9-9.1 7C1.7 10.3 0 12.2 0 14.5 0 17 2 19 4.5 19h13z'/%3E%3Cpath d='M12 11v6'/%3E%3Cpath d='M9 14l3 3 3-3'/%3E%3C/svg%3E") no-repeat center !important;
    mask: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-1 -1 26 26' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.5 19c2.5 0 4.5-2 4.5-4.5 0-2.3-1.7-4.2-3.9-4.5-1-4.1-4.7-7-9.1-7-4.4 0-8.1 2.9-9.1 7C1.7 10.3 0 12.2 0 14.5 0 17 2 19 4.5 19h13z'/%3E%3Cpath d='M12 11v6'/%3E%3Cpath d='M9 14l3 3 3-3'/%3E%3C/svg%3E") no-repeat center !important;
    mask-size: contain !important;
}

.vp-btn-download:hover {
    background-color: #EAB839 !important;
    transform: scale(1.15) !important; /* Feedback visual al tocarlo */
    box-shadow: 0 6px 15px rgba(234, 184, 57, 0.3) !important;
}

/* 7. RESPONSIVE (Móviles) - CENTRADO Y SEPARACIÓN CLARA */
@media (max-width: 768px) {
    
    /* 1. Ocultamos etiquetas y limpiamos la estructura de tabla */
    .shop_table thead, 
    .shop_table td::before,
    .shop_table td.download-remaining::before { 
        display: none !important; 
    }

    .woocommerce-MyAccount-downloads.shop_table {
        border: none !important;
        display: block !important;
    }

    /* 2. La TARJETA (Fila): Aquí unificamos todo el bloque blanco */
    .woocommerce-MyAccount-downloads.shop_table tbody tr {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        background: #ffffff !important;
        
        /* Margen inferior para separar un producto de otro */
        margin-bottom: 30px !important; 
        padding: 30px 20px !important;
        
        border-radius: 24px !important;
        /* Sombra suave para dar el efecto de tarjeta */
        box-shadow: 0 10px 25px rgba(0,0,0,0.05) !important;
        border: none !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 3. Las CELDAS: Quitamos ese borde gris que divide el botón */
    .woocommerce-MyAccount-downloads.shop_table tbody tr td {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        padding: 5px 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        /* ESTO QUITA LA LÍNEA MOLESTA */
        border: none !important; 
    }

    /* 4. Contenedor de Información */
    .vp-info-container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        margin-bottom: 15px !important;
    }

    /* 5. Celda del Botón: Centrado total sin líneas divisoras */
    .woocommerce-MyAccount-downloads.shop_table tbody tr td.download-remaining {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        border-top: none !important; /* Refuerzo para quitar la línea */
        margin-top: 10px !important;
    }

    /* 6. EL BOTÓN: Círculo perfecto y centrado */
    .vp-btn-download {
        width: 60px !important;
        height: 60px !important;
        min-width: 60px !important;
        border-radius: 50% !important;
        margin: 0 auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 5px 15px rgba(91, 44, 111, 0.2) !important;
    }
    .vp-download-file {
        display: flex !important;
        justify-content: center !important; /* Centra el contenido horizontalmente */
        width: 100% !important;
        margin: 5px 0 !important;
    }

    .vp-download-file small {
        display: block !important; /* Cambiamos a block para que el flex del padre lo maneje mejor */
        text-align: center !important;
        margin: 0 auto !important; /* Refuerzo de centrado */
        max-width: 90% !important; /* Evita que toque los bordes si el nombre es muy largo */
        line-height: 1.4 !important; /* Mejora la lectura si el texto se rompe en dos líneas */
    }
}