/**
 * Servofluid Premium - Custom CSS
 * Override de estilos nativos de WooCommerce y OceanWP
 * para mantener coherencia con el sistema de diseño Tailwind.
 */

/* ============================================
   1. TIPOGRAFÍA GLOBAL
============================================ */
body,
.woocommerce,
.woocommerce-page {
    font-family: 'Inter', 'Jost', system-ui, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

/* Ajuste de padding para Header Fijo integrado */
body.has-fixed-header {
    padding-top: 80px !important;
}

@media (max-width: 1024px) {
    body.has-fixed-header {
        padding-top: 70px !important;
    }
}


h1, h2, h3, h4, h5, h6,
.font-heading,
.woocommerce div.product .product_title,
.woocommerce-loop-product__title {
    font-family: 'Roboto', system-ui, sans-serif !important;
}

/* ============================================
   2. BOTONES WOO (Override a Estilo Servofluid)
============================================ */
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
    background-color: #FF8C00 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 0.75rem !important;
    font-weight: 700 !important;
    font-size: 0.875rem !important;
    padding: 0.875rem 1.5rem !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 0 20px rgba(255, 140, 0, 0.25) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
    background-color: #e67e00 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 140, 0, 0.35) !important;
}

/* Botón View Cart */
.woocommerce a.added_to_cart {
    background-color: #00AEEF !important;
    color: #fff !important;
    border-radius: 0.75rem !important;
    padding: 0.5rem 1rem !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    transition: all 0.3s ease !important;
}

/* ============================================
   3. CAMPOS DE FORMULARIO (Inputs / Selects)
============================================ */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-checkout #payment div.form-row input,
#customer_details input,
#customer_details select,
#customer_details textarea {
    width: 100% !important;
    height: 3rem !important;
    padding: 0.5rem 1rem !important;
    border-radius: 0.75rem !important;
    border: 1px solid #e5e7eb !important;
    background-color: #f9fafb !important;
    font-size: 0.95rem !important;
    outline: none !important;
    transition: all 0.2s ease !important;
    font-family: 'Inter', system-ui, sans-serif !important;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus,
#customer_details input:focus,
#customer_details select:focus,
#customer_details textarea:focus {
    background-color: #ffffff !important;
    border-color: #00AEEF !important;
    box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.15) !important;
}

.woocommerce form .form-row textarea,
#customer_details textarea {
    height: auto !important;
    min-height: 6rem !important;
}

.woocommerce form .form-row label {
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: rgba(26, 26, 26, 0.7) !important;
    margin-bottom: 0.35rem !important;
}

/* ============================================
   4. CHECKOUT - Order Review Table
============================================ */
.servofluid-order-review .woocommerce-checkout-review-order-table {
    border: none !important;
    margin-bottom: 1.5rem;
}

.servofluid-order-review .woocommerce-checkout-review-order-table th,
.servofluid-order-review .woocommerce-checkout-review-order-table td {
    border: none !important;
    padding: 0.75rem 0 !important;
    font-size: 0.9rem !important;
}

.servofluid-order-review .woocommerce-checkout-review-order-table tfoot .order-total th,
.servofluid-order-review .woocommerce-checkout-review-order-table tfoot .order-total td {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    padding-top: 1rem !important;
    border-top: 1px solid #e5e7eb !important;
    color: #FF8C00 !important;
}

/* ============================================
   5. CHECKOUT - Payment Methods
============================================ */
.servofluid-payment-wrapper .wc_payment_methods {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.servofluid-payment-wrapper .wc_payment_method {
    padding: 1rem !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 1rem !important;
    margin-bottom: 0.75rem !important;
    transition: all 0.2s ease !important;
}

.servofluid-payment-wrapper .wc_payment_method.payment_method_flow,
.servofluid-payment-wrapper .wc_payment_method:has(input:checked) {
    border-color: #00AEEF !important;
    background-color: rgba(0, 174, 239, 0.04) !important;
}

.servofluid-payment-wrapper .wc_payment_method label {
    font-weight: 600 !important;
    cursor: pointer !important;
}

.servofluid-payment-wrapper #place_order {
    width: 100% !important;
    height: 3.5rem !important;
    border-radius: 9999px !important;
    background-color: #00AEEF !important;
    font-size: 1.1rem !important;
    box-shadow: 0 8px 20px rgba(0, 174, 239, 0.3) !important;
}

.servofluid-payment-wrapper #place_order:hover {
    background-color: #009ad6 !important;
    transform: translateY(-2px);
}

/* ============================================
   6. ARCHIVE/SHOP - Grid Overrides
============================================ */
.woocommerce ul.products,
.woocommerce-page ul.products {
    display: contents !important;
}

.woocommerce ul.products li.product {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

/* Precio en la grilla */
.price-wrapper .woocommerce-Price-amount {
    color: #FF8C00 !important;
    font-weight: 700 !important;
    font-size: 1.25rem !important;
}

.price-wrapper del .woocommerce-Price-amount {
    color: #9ca3af !important;
    font-size: 0.875rem !important;
    font-weight: 400 !important;
}

.price-wrapper ins {
    text-decoration: none !important;
}

/* ============================================
   7. SINGLE PRODUCT - Refinamientos
============================================ */
.servofluid-price .woocommerce-Price-amount {
    color: #1A1A1A !important;
}

.servofluid-price del .woocommerce-Price-amount {
    color: #9ca3af !important;
    font-size: 1rem !important;
}

.servofluid-price ins {
    text-decoration: none !important;
}

/* Add to Cart Button on Single Product */
.woocommerce div.product form.cart .button.single_add_to_cart_button {
    width: 100% !important;
    flex: 1 !important;
    height: 3.5rem !important;
    background-color: #00AEEF !important;
    border-radius: 1rem !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    box-shadow: 0 8px 30px rgba(0, 174, 239, 0.2) !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}


.woocommerce div.product form.cart .button.single_add_to_cart_button:hover {
    background-color: #009ad6 !important;
    transform: translateY(-2px);
}

/* Quantity Input */
.woocommerce div.product form.cart div.quantity input.qty {
    border-radius: 1rem !important;
    border: 1px solid #e5e7eb !important;
    padding: 0.5rem !important;
    text-align: center !important;
    height: 3.5rem !important;
    width: 4rem !important;
    background: #f9fafb !important;
    font-weight: 600 !important;
}


/* WooCommerce Tabs */
.woocommerce div.product .woocommerce-tabs ul.tabs {
    padding: 0 !important;
    margin: 0 0 1.5rem !important;
    list-style: none !important;
    display: flex !important;
    gap: 0.5rem !important;
    border-bottom: 2px solid #f3f4f6 !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs::before {
    display: none !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
    border: none !important;
    background: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after {
    display: none !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
    padding: 0.75rem 1.25rem !important;
    font-weight: 600 !important;
    color: rgba(26, 26, 26, 0.5) !important;
    border-bottom: 3px solid transparent !important;
    transition: all 0.2s ease !important;
    display: block !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
    color: #00AEEF !important;
    border-bottom-color: #00AEEF !important;
}

/* ============================================
   8. NOTICES / MENSAJES WOO
============================================ */
.woocommerce-message {
    border-top-color: #00AEEF !important;
    background-color: rgba(0, 174, 239, 0.05) !important;
    border-radius: 0.75rem !important;
}

.woocommerce-error {
    border-top-color: #ef4444 !important;
    border-radius: 0.75rem !important;
}

.woocommerce-info {
    border-top-color: #FF8C00 !important;
    border-radius: 0.75rem !important;
}

/* ============================================
   9. MINICART / WIDGET CARRITO
============================================ */
.widget_shopping_cart .total .woocommerce-Price-amount {
    color: #FF8C00 !important;
    font-weight: 700 !important;
}

/* ============================================
   10. BREADCRUMBS
============================================ */
.woocommerce .woocommerce-breadcrumb {
    font-size: 0.85rem !important;
    color: rgba(26, 26, 26, 0.5) !important;
    padding: 1rem 0 !important;
}

.woocommerce .woocommerce-breadcrumb a {
    color: #00AEEF !important;
    text-decoration: none !important;
}

.woocommerce .woocommerce-breadcrumb a:hover {
    text-decoration: underline !important;
}

/* ============================================
   11. RELATED PRODUCTS
============================================ */
.woocommerce .related.products h2 {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    margin-bottom: 1.5rem !important;
}

/* ============================================
   12. GLASSMORPHISM UTILITY (Fallback CSS)
============================================ */
.glass-panel {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
}

/* ============================================
   13. RESPONSIVE FIXES
============================================ */
@media (max-width: 768px) {
    .woocommerce div.product form.cart {
        flex-direction: column !important;
    }

    .woocommerce div.product form.cart div.quantity {
        margin-bottom: 1rem !important;
    }

    .woocommerce div.product form.cart .button.single_add_to_cart_button {
        width: 100% !important;
    }
}

/* ============================================
   14. OCEANWP HEADER/NAV OVERRIDE
============================================ */
#site-header,
.oceanwp-mobile-menu-icon,
#site-navigation-wrap .dropdown-menu > li > a {
    font-family: 'Inter', system-ui, sans-serif !important;
}

#site-header {
    background: rgba(26, 26, 26, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

#site-navigation-wrap .dropdown-menu > li > a {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500 !important;
    transition: color 0.2s ease !important;
}

#site-navigation-wrap .dropdown-menu > li > a:hover,
#site-navigation-wrap .dropdown-menu > li.current-menu-item > a {
    color: #FF8C00 !important;
}

/* Logo */
#site-logo img {
    max-height: 45px !important;
}

/* ============================================
   15. FOOTER OVERRIDE
============================================ */
#footer,
#footer-bottom {
    background-color: #1A1A1A !important;
    color: rgba(255, 255, 255, 0.6) !important;
    font-family: 'Inter', system-ui, sans-serif !important;
}

#footer a {
    color: #00AEEF !important;
    transition: color 0.2s ease !important;
}

#footer a:hover {
    color: #FF8C00 !important;
}

/* ============================================
   16. PERFORMANCE - Hide unnecessary Woo CSS
============================================ */
.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering {
    display: none !important;
}
