/* =========================================================
   PM UI FRAMEWORK
   COMPONENT: BRAND COMPARISON
   Version: 0.1.0
   =========================================================

   Componente:
   Comparativa editorial de marcas.

   Características:
   - Tabla comparativa premium.
   - Marca destacada.
   - Badge de elección.
   - Botones de compra.
   - Scroll horizontal responsive.
   - Diseño independiente de content.css.

   ========================================================= */


/* =========================================================
   01 — MAIN CONTAINER
========================================================= */

.pm-brand-compare {

    width: 100%;
    max-width: 100%;

    margin: 2.5rem 0;

    color: #243238;

    box-sizing: border-box;

}


/* =========================================================
   02 — HEADER
========================================================= */

.pm-brand-compare__header {

    width: 100%;

    margin-bottom: 1.6rem;

}


.pm-brand-compare__title {

    margin: 0 !important;

    padding: 0;

    color: #171717;

    font-size: clamp(1.8rem, 3vw, 2.35rem);

    font-weight: 750;

    line-height: 1.2;

    letter-spacing: -0.025em;

    text-align: left;

}


/* =========================================================
   03 — RESPONSIVE WRAPPER
========================================================= */

.pm-brand-compare__wrapper {

    display: block;

    width: 100%;
    max-width: 100%;

    overflow-x: auto;
    overflow-y: hidden;

    -webkit-overflow-scrolling: touch;

    border-radius: 18px;

    box-sizing: border-box;

}


/* =========================================================
   04 — SCROLLBAR
========================================================= */

.pm-brand-compare__wrapper::-webkit-scrollbar {

    height: 8px;

}


.pm-brand-compare__wrapper::-webkit-scrollbar-track {

    background: #f1f1f1;

    border-radius: 10px;

}


.pm-brand-compare__wrapper::-webkit-scrollbar-thumb {

    background: #4CAF50;

    border-radius: 10px;

}


.pm-brand-compare__wrapper::-webkit-scrollbar-thumb:hover {

    background: #2E7D32;

}


/* =========================================================
   05 — TABLE
========================================================= */

.pm-brand-compare__table {

    width: 100%;

    min-width: 950px;

    margin: 0 !important;

    border-collapse: separate !important;

    border-spacing: 0 !important;

    table-layout: fixed;

    background: #ffffff;

    border: none !important;

    border-radius: 18px;

    overflow: hidden;

    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.08);

    font-size: 15px;

}


/* COLUMN WIDTHS */

.pm-brand-compare__table th:nth-child(1),
.pm-brand-compare__table td:nth-child(1) {

    width: 16%;

}


.pm-brand-compare__table th:nth-child(2),
.pm-brand-compare__table td:nth-child(2) {

    width: 44%;

}


.pm-brand-compare__table th:nth-child(3),
.pm-brand-compare__table td:nth-child(3) {

    width: 22%;

}


.pm-brand-compare__table th:nth-child(4),
.pm-brand-compare__table td:nth-child(4) {

    width: 18%;

}


/* =========================================================
   06 — TABLE HEADER
========================================================= */

.pm-brand-compare__table thead th {

    padding: 20px 16px !important;

    background: linear-gradient(
        135deg,
        #43A047,
        #2E7D32
    ) !important;

    color: #ffffff !important;

    border: none !important;

    border-bottom: 4px solid #FFC107 !important;

    font-size: 15px;

    font-weight: 700;

    line-height: 1.4;

    text-align: center;

    vertical-align: middle;

    white-space: nowrap;

}


/* FIRST HEADER CELL */

.pm-brand-compare__table thead th:first-child {

    border-top-left-radius: 18px;

}


/* LAST HEADER CELL */

.pm-brand-compare__table thead th:last-child {

    border-top-right-radius: 18px;

}


/* =========================================================
   07 — TABLE CELLS
========================================================= */

.pm-brand-compare__table tbody td {

    padding: 20px 18px !important;

    background: #ffffff;

    color: #333333;

    border: none !important;

    border-bottom: 1px solid #ededed !important;

    font-size: 14px;

    line-height: 1.65;

    vertical-align: middle;

    text-align: left;

    overflow-wrap: normal;

}


/* LAST ROW */

.pm-brand-compare__table tbody tr:last-child td {

    border-bottom: none !important;

}


/* =========================================================
   08 — ROW HOVER
========================================================= */

.pm-brand-compare__table tbody tr {

    transition: background 0.25s ease;

}


.pm-brand-compare__table tbody tr:hover td {

    background: #F8FFF9;

}


/* =========================================================
   09 — FEATURED BRAND
========================================================= */

.pm-brand-compare__table tbody tr.pm-brand-compare__featured td {

    background: #F5FFF4;

    border-top: 4px solid #FFC107 !important;

}


.pm-brand-compare__table tbody tr.pm-brand-compare__featured:hover td {

    background: #EDFDED;

}


/* =========================================================
   10 — FEATURED BADGE
========================================================= */

.pm-brand-compare__badge {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    margin-bottom: 10px;

    padding: 6px 14px;

    background: linear-gradient(
        135deg,
        #FFC107,
        #F57C00
    );

    color: #ffffff;

    border-radius: 999px;

    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15);

    font-size: 11px;

    font-weight: 800;

    line-height: 1.3;

    letter-spacing: 0.2px;

    text-transform: uppercase;

    white-space: nowrap;

}


/* =========================================================
   11 — BRAND NAME
========================================================= */

.pm-brand-compare__brand {

    display: block;

    color: #2E7D32;

    font-size: 17px;

    font-weight: 750;

    line-height: 1.4;

    white-space: nowrap;

}


/* =========================================================
   12 — DESCRIPTION
========================================================= */

.pm-brand-compare__description {

    color: #444444;

    font-size: 14px;

    line-height: 1.7;

}


/* =========================================================
   13 — IDEAL USE
========================================================= */

.pm-brand-compare__ideal {

    color: #444444;

    font-size: 14px;

    font-weight: 600;

    line-height: 1.6;

}


/* =========================================================
   14 — PURCHASE COLUMN
========================================================= */

.pm-brand-compare__action {

    text-align: center !important;

}


/* =========================================================
   15 — AMAZON BUTTON
========================================================= */

.pm-brand-compare__button {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    padding: 13px 17px;

    background: linear-gradient(
        180deg,
        #FFD814,
        #F7CA00
    );

    color: #111111 !important;

    border: none !important;

    border-radius: 999px;

    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.13);

    font-size: 13px;

    font-weight: 800;

    line-height: 1.35;

    text-align: center;

    text-decoration: none !important;

    white-space: nowrap;

    transition:
        background 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;

}


/* BUTTON HOVER */

.pm-brand-compare__button:hover {

    background: linear-gradient(
        180deg,
        #F7CA00,
        #F2B800
    );

    color: #111111 !important;

    transform: translateY(-2px);

    box-shadow: 0 9px 20px rgba(0, 0, 0, 0.18);

}


/* BUTTON FOCUS */

.pm-brand-compare__button:focus-visible {

    outline: 3px solid #2E7D32;

    outline-offset: 4px;

}


/* =========================================================
   16 — MOBILE
========================================================= */

@media (max-width: 768px) {

    .pm-brand-compare {

        margin: 2rem 0;

    }


    .pm-brand-compare__header {

        margin-bottom: 1.2rem;

    }


    .pm-brand-compare__title {

        font-size: 1.75rem;

        line-height: 1.25;

    }


    .pm-brand-compare__wrapper {

        border-radius: 14px;

    }


    .pm-brand-compare__table {

        min-width: 900px;

        font-size: 14px;

    }


    .pm-brand-compare__table thead th {

        padding: 16px 14px !important;

        font-size: 14px;

    }


    .pm-brand-compare__table tbody td {

        padding: 16px 14px !important;

        font-size: 13px;

    }


    .pm-brand-compare__brand {

        font-size: 16px;

    }


    .pm-brand-compare__badge {

        padding: 5px 11px;

        font-size: 10px;

    }


    .pm-brand-compare__button {

        padding: 11px 14px;

        font-size: 12px;

    }

}


/* =========================================================
   17 — REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .pm-brand-compare__table tbody tr,
    .pm-brand-compare__button {

        transition: none;

    }


    .pm-brand-compare__button:hover {

        transform: none;

    }

}


/* =========================================================
   END COMPONENT
   PM BRAND COMPARISON v0.1.0
========================================================= */