/**
 * WooCommerce Custom Styles - Tema DestinoPremio
 * Estilos personalizados para inputs, botones, formularios, carrito, checkout y más
 * 
 * @package DestinoPremio_Theme
 * @version 1.0.0
 */

/* ==========================================================================
   VARIABLES CSS
   ========================================================================== */

:root {
    --wc-primary: #667eea;
    --wc-secondary: #764ba2;
    --wc-accent: #f6ad55;
    --wc-success: #48bb78;
    --wc-danger: #f56565;
    --wc-warning: #f6ad55;
    --wc-info: #4299e1;
    --wc-dark: #2d3748;
    --wc-light: #f7fafc;
    --wc-border: #e2e8f0;
    --wc-text: #2d3748;
    --wc-text-light: #718096;
    --wc-shadow: 0 4px 6px rgba(0,0,0,0.1);
    --wc-shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --wc-radius: 8px;
    --wc-transition: all 0.3s ease;
}

/* ==========================================================================
   1. INPUTS Y CAMPOS DE FORMULARIO
   ========================================================================== */

/* Inputs de texto, email, password, etc. */
.woocommerce input[type="text"],
.woocommerce input[type="email"],
.woocommerce input[type="password"],
.woocommerce input[type="tel"],
.woocommerce input[type="number"],
.woocommerce input[type="url"],
.woocommerce input[type="search"],
.woocommerce textarea,
.woocommerce select,
.woocommerce-page input[type="text"],
.woocommerce-page input[type="email"],
.woocommerce-page input[type="password"],
.woocommerce-page input[type="tel"],
.woocommerce-page input[type="number"],
.woocommerce-page select,
.woocommerce-page textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--wc-border);
    border-radius: var(--wc-radius);
    font-size: 1rem;
    font-family: inherit;
    background: white;
    color: var(--wc-text);
    transition: var(--wc-transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.woocommerce input[type="text"]:focus,
.woocommerce input[type="email"]:focus,
.woocommerce input[type="password"]:focus,
.woocommerce input[type="tel"]:focus,
.woocommerce input[type="number"]:focus,
.woocommerce textarea:focus,
.woocommerce select:focus {
    outline: none;
    border-color: var(--wc-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Placeholder styling */
.woocommerce input::placeholder,
.woocommerce textarea::placeholder {
    color: var(--wc-text-light);
    opacity: 0.7;
}

/* Select styling */
.woocommerce select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
    cursor: pointer;
}

/* Textarea */
.woocommerce textarea {
    min-height: 120px;
    resize: vertical;
}

/* Labels */
.woocommerce label,
.woocommerce-page label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--wc-text);
    font-size: 0.95rem;
}

.woocommerce label abbr,
.woocommerce-page label abbr {
    color: var(--wc-danger);
    text-decoration: none;
    border: none;
}

/* Form rows */
.woocommerce form .form-row {
    margin-bottom: 20px;
}

.woocommerce form .form-row-first,
.woocommerce form .form-row-last {
    width: 48%;
    float: left;
}

.woocommerce form .form-row-last {
    float: right;
}

/* Checkboxes y Radio buttons */
.woocommerce input[type="checkbox"],
.woocommerce input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: var(--wc-primary);
}

.woocommerce .checkbox label,
.woocommerce-page .checkbox label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

/* ==========================================================================
   2. BOTONES
   ========================================================================== */

/* Botón primario */
.woocommerce button.button,
.woocommerce a.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce-page button.button,
.woocommerce-page a.button,
.woocommerce-page input.button {
    background: linear-gradient(135deg, var(--wc-primary) 0%, var(--wc-secondary) 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--wc-radius);
    cursor: pointer;
    transition: var(--wc-transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-shadow: var(--wc-shadow);
    position: relative;
    overflow: hidden;
}

.woocommerce button.button::before,
.woocommerce a.button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.woocommerce button.button:hover::before,
.woocommerce a.button:hover::before {
    width: 300px;
    height: 300px;
}

.woocommerce button.button:hover,
.woocommerce a.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--wc-shadow-lg);
}

.woocommerce button.button:active,
.woocommerce a.button:active {
    transform: translateY(0);
}

/* Botón secundario / Alt */
.woocommerce button.button.alt,
.woocommerce a.button.alt,
.woocommerce input.button.alt {
    background: linear-gradient(135deg, var(--wc-accent) 0%, #ed8936 100%);
}

/* Botón disabled */
.woocommerce button.button:disabled,
.woocommerce button.button.disabled,
.woocommerce a.button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Botón con ícono */
.woocommerce button.button i,
.woocommerce a.button i {
    margin-right: 8px;
}

/* Botón pequeño */
.woocommerce button.button.small,
.woocommerce a.button.small {
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* Botón grande */
.woocommerce button.button.large,
.woocommerce a.button.large {
    padding: 18px 40px;
    font-size: 1.1rem;
}

/* Botón outline */
.woocommerce button.button.outline,
.woocommerce a.button.outline {
    background: white;
    color: var(--wc-primary);
    border: 2px solid var(--wc-primary);
    box-shadow: none;
}

.woocommerce button.button.outline:hover,
.woocommerce a.button.outline:hover {
    background: var(--wc-primary);
    color: white;
}

/* ==========================================================================
   3. MENSAJES Y NOTIFICACIONES
   ========================================================================== */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    padding: 15px 45px;
    margin-bottom: 24px;
    border-radius: var(--wc-radius);
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 4px solid; 
    box-shadow: var(--wc-shadow);
    animation: slideDown 0.5s ease;
    
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

/* Success message */
.woocommerce-message {
    background: #f0fff4;
    border-left-color: var(--wc-success);
    color: #22543d;
}

.woocommerce-message::before {
    content: '\f058';
    color: var(--wc-success);
    
    
}

/* Info message */
.woocommerce-info {
    background: #ebf8ff;
    border-left-color: var(--wc-info);
    color: #2c5282;
    
}

.woocommerce-info::before {
    content: '\f05a';
    color: var(--wc-info);
    left: 15px !important;
    top: 20px !important;
}

/* Error message */
.woocommerce-error {
    background: #fff5f5;
    border-left-color: var(--wc-danger);
    color: #742a2a;
}

.woocommerce-error::before {
    content: '\f06a';
    color: var(--wc-danger);
}

.woocommerce-message a,
.woocommerce-info a,
.woocommerce-error a {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
}

/* ==========================================================================
   4. TABLAS
   ========================================================================== */

.woocommerce table.shop_table {
    width: 100%;
    border: none;
    border-radius: var(--wc-radius);
    overflow: hidden;
    box-shadow: var(--wc-shadow);
    margin-bottom: 24px;
}

.woocommerce table.shop_table thead {
    background: linear-gradient(135deg, var(--wc-primary) 0%, var(--wc-secondary) 100%);
    color: white;
}

.woocommerce table.shop_table thead th {
    padding: 16px;
    font-weight: 600;
    text-align: left;
    border: none;
}

.woocommerce table.shop_table tbody tr {
    border-bottom: 1px solid var(--wc-border);
    transition: var(--wc-transition);
}

.woocommerce table.shop_table tbody tr:hover {
    background: var(--wc-light);
}

.woocommerce table.shop_table tbody td {
    padding: 16px;
    vertical-align: middle;
}

.woocommerce table.shop_table tfoot th,
.woocommerce table.shop_table tfoot td {
    padding: 16px;
    font-weight: 600;
    border-top: 2px solid var(--wc-border);
}

/* ==========================================================================
   5. QUANTITY INPUT (Selector de cantidad)
   ========================================================================== */

.woocommerce .quantity {
    display: inline-flex;
    align-items: center;
    border: 2px solid var(--wc-border);
    border-radius: var(--wc-radius);
    overflow: hidden;
    background: white;
}

.woocommerce .quantity input[type="number"] {
    width: 60px;
    text-align: center;
    border: none;
    padding: 10px 5px;
    box-shadow: none;
    -moz-appearance: textfield;
}

.woocommerce .quantity input[type="number"]::-webkit-outer-spin-button,
.woocommerce .quantity input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.woocommerce .quantity .qty-btn {
    background: var(--wc-light);
    border: none;
    padding: 10px 12px;
    cursor: pointer;
    transition: var(--wc-transition);
    color: var(--wc-primary);
    font-weight: 600;
}

.woocommerce .quantity .qty-btn:hover {
    background: var(--wc-primary);
    color: white;
}

/* ==========================================================================
   6. BREADCRUMBS (Migas de pan)
   ========================================================================== */

.woocommerce .woocommerce-breadcrumb {
    padding: 16px 24px;
    background: var(--wc-light);
    border-radius: var(--wc-radius);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.woocommerce .woocommerce-breadcrumb a {
    color: var(--wc-primary);
    text-decoration: none;
    transition: var(--wc-transition);
    font-weight: 500;
}

.woocommerce .woocommerce-breadcrumb a:hover {
    color: var(--wc-secondary);
    text-decoration: underline;
}

.woocommerce .woocommerce-breadcrumb::before {
    content: '🏠';
    font-size: 1.2rem;
    margin-right: 4px;
}

/* ==========================================================================
   7. BADGES Y ETIQUETAS
   ========================================================================== */

.woocommerce span.onsale,
.woocommerce-page span.onsale {
    background: linear-gradient(135deg, var(--wc-danger) 0%, #c53030 100%);
    color: white;
    padding: 8px 16px;
    border-radius: var(--wc-radius);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--wc-shadow);
    animation: pulse 2s infinite;
}

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

.woocommerce .product-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.woocommerce .product-badge.new {
    background: var(--wc-info);
    color: white;
}

.woocommerce .product-badge.featured {
    background: var(--wc-accent);
    color: white;
}

.woocommerce .product-badge.soldout {
    background: var(--wc-text-light);
    color: white;
}

/* ==========================================================================
   8. LOADING Y OVERLAYS
   ========================================================================== */

.woocommerce .blockUI.blockOverlay {
    background: rgba(255,255,255,0.9) !important;
}

.woocommerce .loader {
    width: 50px;
    height: 50px;
    border: 4px solid var(--wc-light);
    border-top-color: var(--wc-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   9. RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    .woocommerce form .form-row-first,
    .woocommerce form .form-row-last {
        width: 100%;
        float: none;
    }
    
    .woocommerce button.button,
    .woocommerce a.button {
        width: 100%;
        padding: 14px 20px;
    }
    
    .woocommerce table.shop_table {
        font-size: 0.9rem;
    }
    
    .woocommerce table.shop_table thead {
        display: none;
    }
    
    .woocommerce table.shop_table tbody tr {
        display: block;
        margin-bottom: 16px;
        border: 2px solid var(--wc-border);
        border-radius: var(--wc-radius);
    }
    
    .woocommerce table.shop_table tbody td {
        display: block;
        text-align: right;
        padding: 12px;
        border-bottom: 1px solid var(--wc-border);
    }
    
    .woocommerce table.shop_table tbody td::before {
        content: attr(data-title);
        float: left;
        font-weight: 600;
    }
    
    .woocommerce table.shop_table tbody td:last-child {
        border-bottom: none;
    }
}

/* ==========================================================================
   10. UTILIDADES
   ========================================================================== */

.woocommerce .wc-rifa-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, var(--wc-primary) 0%, var(--wc-secondary) 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.woocommerce .wc-rifa-badge::before {
    content: '🎫';
}

.woocommerce .text-center {
    text-align: center;
}

.woocommerce .mt-2 { margin-top: 16px; }
.woocommerce .mb-2 { margin-bottom: 16px; }
.woocommerce .my-2 { margin-top: 16px; margin-bottom: 16px; }

.woocommerce .p-2 { padding: 16px; }
.woocommerce .py-2 { padding-top: 16px; padding-bottom: 16px; }
.woocommerce .px-2 { padding-left: 16px; padding-right: 16px; }

