/* =========================================
   Paquete 1: Buscador Moderno (FIXED)
   ========================================= */
.widget_search .search-form,
.header-widget .search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.widget_search input[type="search"],
.header-widget input[type="search"] {
    background: #f0f0f0;
    border-radius: 50px;
    padding: 10px 20px !important;
    border: 1px solid #eee;
    box-shadow: none !important;
    transition: all 0.3s ease;
    width: 100%;
    overflow: hidden;
    position: relative !important;
}

/* Polish Search Button */
.header-widget .wp-block-search__button {
    border-radius: 50% !important;
    margin-left: 10px;
    background-color: #222;
    color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
    border: none;
    cursor: pointer;
    width: 42px;
    height: 42px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-widget .wp-block-search__button:hover {
    transform: scale(1.05);
    background-color: #000;
}

.header-widget .wp-block-search__button svg {
    fill: white;
    width: 20px;
    height: 20px;
}

.widget_search input[type="search"]:focus,
.header-widget input[type="search"]:focus {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #aaa;
}

/* Prevent menu overlay regression */
.navigation-search {
    position: absolute;
}

.navigation-search input[type="search"] {
    background: transparent;
    border: none;
    width: 100%;
    padding: 10px;
    font-size: 16px;
    outline: none;
    color: #333;
}

li.search-item {
    display: none !important;
}

/* =========================================
   Paquete 3: Tarjetas de Producto & Hero
   ========================================= */
.woocommerce ul.products li.product {
    border-radius: 8px;
    background: #fff;
    padding: 15px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid transparent;
}

.woocommerce ul.products li.product:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
    border-color: #eee;
    z-index: 10;
}

.woocommerce span.onsale {
    border-radius: 4px !important;
    min-height: auto !important;
    min-width: auto !important;
    line-height: 1 !important;
    padding: 8px 12px !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8em;
    background: linear-gradient(135deg, #ff6b6b, #ff4757) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.home .wp-block-cover,
.home .wp-block-cover-image {
    min-height: 60vh !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home .wp-block-cover h1,
.home .wp-block-cover h2 {
    font-size: 3rem !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 700;
}

/* Fix: Input Text Visibility */
/* Fix: Input Text Visibility */
input[type='text'],
input[type='email'],
input[type='password'],
input[type='tel'],
input[type='number'],
textarea,
select {
    color: #333 !important;
    background-color: #fff !important;
    /* Ensure background is white to prevent transparency issues */
}

/* Fix: Quantity Input Visibility (2 figures) & Cart Inputs */
.woocommerce .quantity .qty {
    width: 3.631em !important;
    /* Increased width to fit 2+ digits comfortably */
    text-align: center;
    color: #333 !important;
    padding-right: 0 !important;
    /* Remove excessive padding that might cut off text */
}

/* Ensure Coupon inputs are also visible */
.woocommerce-cart .coupon .input-text {
    width: 150px !important;
    /* Ensure enough width */
}

/* =========================================
   WhatsApp Interactive Widget
   ========================================= */
:root {
    --wa-color: #25D366;
    --wa-dark: #12883d;
    --wa-header-bg: #075E54;
}

.wa-widget-container {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 99999;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.wa-floating-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--wa-color);
    color: white;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    cursor: pointer;
    transition: transform 0.3s ease;
    animation: wa-pulse 2s infinite;
}

.wa-floating-btn::after {
    content: "1";
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background-color: #ff3b30;
    color: white;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.wa-floating-btn:hover {
    transform: scale(1.1);
    background-color: #20ba5a;
}

.wa-floating-btn svg {
    width: 53px;
    height: 53px;
    fill: white;
}

/* Chat Box */
.wa-chat-box {
    position: absolute;
    bottom: 100px;
    right: 0;
    width: 320px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: none;
    flex-direction: column;
    transform-origin: bottom right;
    transition: all 0.3s ease;
}

.wa-chat-box.active {
    display: flex;
    animation: wa-slide-in 0.3s ease-out;
}

.wa-chat-header {
    background-color: var(--wa-header-bg);
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
}

.wa-chat-header .wa-avatar {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--wa-header-bg);
    overflow: hidden;
}

.wa-chat-header .wa-info h4 {
    margin: 0;
    font-size: 16px;
}

.wa-chat-header .wa-info p {
    margin: 0;
    font-size: 12px;
    opacity: 0.8;
}

.wa-chat-body {
    padding: 20px;
    background-color: #e5ddd5;
    max-height: 300px;
}

.wa-msg-bubble {
    background: white;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 14px;
    color: #333;
    max-width: 80%;
    margin-bottom: 20px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    position: relative;
}

.wa-msg-bubble::before {
    content: "";
    position: absolute;
    left: -8px;
    top: 0;
    width: 15px;
    height: 15px;
    background: white;
    clip-path: polygon(100% 0, 0 0, 100% 100%);
}

.wa-chat-footer {
    padding: 15px;
    background: #f0f0f0;
}

.wa-chat-footer textarea {
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 10px;
    font-size: 14px;
    resize: none;
    outline: none;
    box-sizing: border-box;
    margin-bottom: 10px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    background-color: #ffffff !important;
    color: #333333;
}

.wa-send-btn {
    background-color: var(--wa-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px;
    width: 100%;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.wa-send-btn:hover {
    background-color: var(--wa-dark);
}

.wa-success-msg {
    display: none;
    text-align: center;
    padding: 20px;
    color: #12883d;
}

.wa-success-msg.active {
    display: block;
}

@keyframes wa-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

@keyframes wa-slide-in {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* =========================================
   Mobile Adjustments (Safe Zone)
   ========================================= */
@media (max-width: 480px) {
    .wa-widget-container {
        bottom: 20px;
        right: 15px;
    }

    .wa-floating-btn {
        width: 60px;
        height: 60px;
    }

    .wa-floating-btn svg {
        width: 35px;
        height: 35px;
    }

    .wa-chat-box {
        bottom: 90px;
        right: 10px;
        width: 300px;
        max-width: 90vw;
    }
}