/**
 * El Club de la Grúa - Estilos Principales
 * 
 * Este archivo complementa style.css con estilos adicionales
 */

/* ============================================
   UTILIDADES ADICIONALES
   ============================================ */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-muted { color: #6c757d; }

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-inline-block { display: inline-block !important; }

.justify-content-start { justify-content: flex-start !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }

.align-items-start { align-items: flex-start !important; }
.align-items-center { align-items: center !important; }
.align-items-end { align-items: flex-end !important; }

.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }

.m-0 { margin: 0 !important; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.ml-0 { margin-left: 0 !important; }
.mr-0 { margin-right: 0 !important; }

.p-0 { padding: 0 !important; }
.pt-0 { padding-top: 0 !important; }
.pb-0 { padding-bottom: 0 !important; }

/* ============================================
   COMPONENTES ADICIONALES
   ============================================ */

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25em 0.75em;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary { background-color: var(--ecdlg-primary); color: white; }
.badge-secondary { background-color: var(--ecdlg-secondary); color: white; }
.badge-success { background-color: var(--ecdlg-success); color: white; }
.badge-warning { background-color: var(--ecdlg-warning); color: #000; }
.badge-danger { background-color: var(--ecdlg-danger); color: white; }

/* Alertas */
.alert {
    position: relative;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: var(--ecdlg-border-radius);
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* Cards */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid rgba(0,0,0,0.125);
    border-radius: var(--ecdlg-border-radius);
}

.card-body {
    flex: 1 1 auto;
    padding: 1.5rem;
}

.card-title {
    margin-bottom: 0.75rem;
}

.card-text:last-child {
    margin-bottom: 0;
}

/* List groups */
.list-group {
    display: flex;
    flex-direction: column;
    padding-left: 0;
    margin-bottom: 0;
}

.list-group-item {
    position: relative;
    display: block;
    padding: 0.75rem 1.25rem;
    margin-bottom: -1px;
    background-color: #fff;
    border: 1px solid rgba(0,0,0,0.125);
}

.list-group-item:first-child {
    border-top-left-radius: var(--ecdlg-border-radius);
    border-top-right-radius: var(--ecdlg-border-radius);
}

.list-group-item:last-child {
    margin-bottom: 0;
    border-bottom-right-radius: var(--ecdlg-border-radius);
    border-bottom-left-radius: var(--ecdlg-border-radius);
}

/* ============================================
   WOOCOMMERCE ADICIONAL
   ============================================ */

/* Product cards */
.woocommerce ul.products li.product {
    background: white;
    border-radius: var(--ecdlg-border-radius);
    overflow: hidden;
    box-shadow: var(--ecdlg-shadow-sm);
    transition: var(--ecdlg-transition);
}

.woocommerce ul.products li.product:hover {
    box-shadow: var(--ecdlg-shadow-lg);
    transform: translateY(-5px);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 1.125rem;
    padding: 0 1.5rem;
}

.woocommerce ul.products li.product .price {
    padding: 0 1.5rem;
    color: var(--ecdlg-primary);
    font-weight: 700;
}

.woocommerce ul.products li.product .button {
    margin: 0 1.5rem 1.5rem;
    width: calc(100% - 3rem);
    text-align: center;
}

/* Single product */
.woocommerce div.product .product_title {
    color: var(--ecdlg-primary);
    font-size: 2rem;
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
    color: var(--ecdlg-primary);
    font-size: 1.5rem;
    font-weight: 700;
}

/* Cart */
.woocommerce-cart table.cart td {
    padding: 1rem;
}

.woocommerce-cart .cart-collaterals .cart_totals {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: var(--ecdlg-border-radius);
}

/* Checkout */
.woocommerce-checkout #customer_details {
    margin-bottom: 2rem;
}

.woocommerce-checkout h3 {
    color: var(--ecdlg-primary);
    margin-bottom: 1.5rem;
}

/* ============================================
   ANIMACIONES ADICIONALES
   ============================================ */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-in;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-down {
    animation: fadeInDown 0.6s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Delay classes */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* ============================================
   WHATSAPP WIDGET
   ============================================ */

.whatsapp-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.whatsapp-widget.visible {
    opacity: 1;
    transform: translateY(0);
}

.whatsapp-float {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    position: relative;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
}

.whatsapp-widget.pulse .whatsapp-float {
    animation: pulse 2s infinite;
}

/* Tooltip del widget */
.whatsapp-widget::before {
    content: '¿Necesitas ayuda?';
    position: absolute;
    bottom: 70px;
    right: 0;
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.whatsapp-widget.visible::before {
    opacity: 1;
    transform: translateY(0);
    animation: hideTooltip 0.3s ease 5s forwards;
}

@keyframes hideTooltip {
    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* ============================================
   UTILIDADES DE DEBUG
   ============================================ */

.debug-info {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: var(--ecdlg-border-radius);
    padding: 1rem;
    margin: 1rem 0;
    font-family: monospace;
    font-size: 0.875rem;
}

.debug-info pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ============================================
   LOADING STATES
   ============================================ */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner-large {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0,123,255,0.3);
    border-top-color: var(--ecdlg-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .site-header,
    .site-footer,
    .whatsapp-widget,
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    a {
        text-decoration: underline;
    }
    
    .page-break {
        page-break-before: always;
    }
}
