/*
 * 2026 ALCALINK E-COMMERCE & SEO, S.L.L.
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * @author ALCALINK E-COMMERCE & SEO, S.L.L. <info@alcalink.com>
 * @copyright  2026 ALCALINK E-COMMERCE & SEO, S.L.L.
 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 *
 * Registered Trademark & Property of ALCALINK E-COMMERCE & SEO, S.L.L.
 */

/* ── Nueva cuadrícula de características (ficha de producto) ──────────────── */

#alcafeaturesinfo_all .alcafeaturesinfo-product-container {
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid #eee;
}

#alcafeaturesinfo_all .alcafeaturesinfo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: start;
}

#alcafeaturesinfo_all .alcafeaturesinfo-item--highlight {
    grid-column: 1 / -1;
    background: #eef9ee;
    padding: 10px 15px;
    border-radius: 4px;
    display: inline-flex !important;
    width: auto !important;
    margin-bottom: 10px;
}

#alcafeaturesinfo_all .alcafeaturesinfo-item--highlight .alcafeaturesinfo-label {
    font-weight: 700;
    color: #2e7d32;
    text-transform: uppercase;
}

#alcafeaturesinfo_all .alcafeaturesinfo-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

#alcafeaturesinfo_all .alcafeaturesinfo-icon-wrap {
    flex: 0 0 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #444;
}

#alcafeaturesinfo_all .alcafeaturesinfo-img-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

#alcafeaturesinfo_all .alcafeaturesinfo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

#alcafeaturesinfo_all .alcafeaturesinfo-label {
    font-size: 13px;
    color: #777;
    margin-bottom: 2px;
}

#alcafeaturesinfo_all .alcafeaturesinfo-value {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

#alcafeaturesinfo_all .alcafeaturesinfo-bar-mini {
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin-top: 5px;
    overflow: hidden;
    width: 100px;
}

#alcafeaturesinfo_all .alcafeaturesinfo-bar-mini-fill {
    height: 100%;
    background: #f39900;
}

@media (max-width: 991px) {
    #alcafeaturesinfo_all .alcafeaturesinfo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    #alcafeaturesinfo_all .alcafeaturesinfo-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Vista de listado (categoría) ─────────────────────────────────────────── */

#products.alcafeaturesinfo-list-mode .products.row {
    flex-direction: column;
    gap: 0;
}

#products.alcafeaturesinfo-list-mode .js-product {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding: 0;
    margin-bottom: 0;
}

#products.alcafeaturesinfo-list-mode .product-miniature,
#products.alcafeaturesinfo-list-mode .thumbnail-container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    background: #fff;
    border: 1px solid #e4e4e4;
    border-radius: 8px;
    margin-bottom: 20px;
    min-height: 220px;
    width: 100% !important;
}

#products.alcafeaturesinfo-list-mode .thumbnail-top,
#products.alcafeaturesinfo-list-mode .product-thumbnail {
    flex: 0 0 250px !important;
    width: 250px !important;
    min-width: 250px !important;
    max-width: 250px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-right: 1px solid #f0f0f0;
}

#products.alcafeaturesinfo-list-mode img {
    max-width: 100% !important;
    max-height: 180px !important;
    height: auto !important;
    object-fit: contain !important;
}

#products.alcafeaturesinfo-list-mode .product-description {
    flex: 1 !important;
    display: grid !important;
    grid-template-columns: 1fr 200px;
    grid-template-areas: 
        "title price"
        "features price";
    padding: 0 !important;
    min-width: 0;
}

#products.alcafeaturesinfo-list-mode .product-title {
    grid-area: title;
    padding: 20px 25px 5px 25px !important;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 !important;
    border-bottom: 1px solid #f0f0f0;
}

#products.alcafeaturesinfo-list-mode .alcafeaturesinfo-row {
    grid-area: features;
    padding: 15px 25px 20px 25px !important;
    margin: 0 !important;
    border: none !important;
}

#products.alcafeaturesinfo-list-mode .product-price-and-shipping {
    grid-area: price;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f9f9f9 !important;
    border-left: 1px solid #f0f0f0;
    padding: 20px !important;
    margin: 0 !important;
    height: 100% !important;
    min-width: 200px !important;
}

#products.alcafeaturesinfo-list-mode .price {
    font-size: 1.4rem;
    font-weight: 800;
    color: #333;
}

#products.alcafeaturesinfo-list-mode .regular-price {
    font-size: 0.9rem;
    color: #999;
}

/* ── Fila de características (en tarjeta de listado) ─────────────────────── */

.alcafeaturesinfo-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 15px 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.alcafeaturesinfo-card-item--bar {
    width: 100%;
    order: -1;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.alcafeaturesinfo-card-item--bar .alcafeaturesinfo-card-bar-track {
    flex: 1;
    max-width: 120px;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.alcafeaturesinfo-card-item--bar .alcafeaturesinfo-card-bar-fill {
    height: 100%;
    background: #f39900;
}

.alcafeaturesinfo-card-item--bar .alcafeaturesinfo-card-bar-name {
    font-size: 0.7rem;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
}

.alcafeaturesinfo-card-item--bar .alcafeaturesinfo-card-bar-value {
    font-size: 0.75rem;
    font-weight: 700;
    color: #f39900;
}

.alcafeaturesinfo-card-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 70px;
    margin-bottom: 10px;
}

.alcafeaturesinfo-card-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f39900;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.alcafeaturesinfo-card-icon img {
    max-width: 28px;
    max-height: 28px;
    object-fit: contain;
}

.alcafeaturesinfo-card-name {
    font-size: 0.65rem;
    color: #999;
    text-transform: uppercase;
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 2px;
}

.alcafeaturesinfo-card-value {
    font-size: 0.8rem;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

/* ── Botón "Características" para móvil ───────────────────────────────────── */

.alcafeaturesinfo-mobile-btn {
    display: none;
}

@media (max-width: 767px) {
    .alcafeaturesinfo-mobile-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        margin-top: 10px;
        padding: 8px 16px;
        background: #f39900;
        color: #fff;
        border: none;
        border-radius: 20px;
        font-size: 0.85rem;
        font-weight: 700;
        cursor: pointer;
        letter-spacing: 0.03em;
    }

    .alcafeaturesinfo-mobile-btn:hover,
    .alcafeaturesinfo-mobile-btn:focus {
        background: #d98800;
        outline: none;
    }

    .alcafeaturesinfo-mobile-btn:focus-visible {
        outline: 2px solid #2e7d32;
        outline-offset: 2px;
    }

    .alcafeaturesinfo-row {
        display: none;
    }

    #products.alcafeaturesinfo-list-mode .thumbnail-container {
        flex-direction: column;
    }

    #products.alcafeaturesinfo-list-mode .thumbnail-top {
        flex: none;
        max-width: 100%;
        width: 100%;
    }

    #products.alcafeaturesinfo-list-mode .thumbnail-top .product-thumbnail img {
        width: 100%;
        height: 200px;
    }

    #products.alcafeaturesinfo-list-mode .product-description {
        padding: 12px;
    }
}

/* ── Modal deslizante desde abajo (móvil) ─────────────────────────────────── */

.alcafeaturesinfo-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.alcafeaturesinfo-modal-overlay.is-open {
    display: block;
    opacity: 1;
}

.alcafeaturesinfo-modal-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 18px 18px 0 0;
    padding: 0 20px 24px;
    max-height: 82vh;
    overflow-y: auto;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
    -webkit-overflow-scrolling: touch;
}

.alcafeaturesinfo-modal-overlay.is-open .alcafeaturesinfo-modal-sheet {
    transform: translateY(0);
}

.alcafeaturesinfo-modal-handle-wrap {
    position: sticky;
    top: 0;
    background: #fff;
    padding: 12px 0 8px;
    text-align: center;
    z-index: 1;
}

.alcafeaturesinfo-modal-handle {
    display: inline-block;
    width: 44px;
    height: 5px;
    background: #ccc;
    border-radius: 3px;
}

.alcafeaturesinfo-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0 12px;
    border-bottom: 1px solid #eee;
    margin-bottom: 16px;
    position: sticky;
    top: 29px;
    background: #fff;
    z-index: 1;
}

.alcafeaturesinfo-modal-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: #333;
}

.alcafeaturesinfo-modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    color: #888;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}

.alcafeaturesinfo-modal-close:hover {
    color: #333;
}

.alcafeaturesinfo-modal-close:focus-visible {
    outline: 2px solid #f39900;
}

.alcafeaturesinfo-modal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.alcafeaturesinfo-modal-table tr:nth-child(odd) {
    background: #f8f8f8;
}

.alcafeaturesinfo-modal-table td {
    padding: 9px 8px;
    vertical-align: middle;
}

.alcafeaturesinfo-modal-icon {
    width: 40px;
    text-align: center;
    color: #f39900;
    font-size: 1.2rem;
}

.alcafeaturesinfo-modal-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.alcafeaturesinfo-modal-name {
    font-weight: 600;
    color: #555;
}

.alcafeaturesinfo-modal-value {
    color: #222;
    text-align: right;
}

.alcafeaturesinfo-modal-bar-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.alcafeaturesinfo-modal-bar-track {
    width: 90px;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.alcafeaturesinfo-modal-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f39900, #e07000);
    border-radius: 4px;
    min-width: 3px;
}

.alcafeaturesinfo-modal-bar-label {
    font-weight: 700;
    color: #f39900;
    white-space: nowrap;
}

/* ── Screen-Reader / Accessible Helper ── */
.alcafeaturesinfo-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ── Estilos de iconos en filtros del Faceted Search ─────────────────────── */
.alcafeaturesinfo-facet-icon {
    max-width: 16px;
    max-height: 16px;
    vertical-align: middle;
    margin-right: 6px;
    object-fit: contain;
    display: inline-block;
    color: #f39900;
}

.alcafeaturesinfo-facet-header-icon {
    max-width: 18px;
    max-height: 18px;
    vertical-align: middle;
    margin-right: 8px;
    object-fit: contain;
    display: inline-block;
    color: #f39900;
}

