/*
 * Sales Hub - the customer portal.
 *
 * Sits on top of the Perfex customer theme rather than replacing it: same
 * panels, same buttons, same grid. Only the shop-specific pieces are here, and
 * everything reflows down to a phone without a horizontal scrollbar.
 */

.sl-shop-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.sl-shop-filters {
    margin-bottom: 20px;
}

.sl-shop-empty {
    padding: 30px 0;
    text-align: center;
}

/* ---------------------------------------------------------------------------
 | Product grid
 --------------------------------------------------------------------------- */
.sl-shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}

.sl-product {
    display: flex;
    flex-direction: column;
    border: 1px solid #e4e9ed;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
    transition: box-shadow .12s ease;
}

.sl-product:hover {
    box-shadow: 0 3px 12px rgba(31, 41, 51, .1);
}

.sl-product.sold-out {
    opacity: .65;
}

.sl-product-media {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 150px;
    background: #f4f7f9;
    color: #b6c0c9;
    font-size: 34px;
    overflow: hidden;
}

.sl-product-media img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sl-product-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 12px 14px 14px;
}

.sl-product-name {
    margin: 0 0 6px;
    font-size: 14.5px;
    line-height: 1.35;
}

.sl-product-summary {
    flex: 1 1 auto;
    margin: 0 0 10px;
    font-size: 12.5px;
    color: #7b8794;
}

.sl-product-price {
    margin: 0 0 10px;
    font-size: 16px;
}

.sl-product-price del {
    margin-right: 7px;
    font-size: 13px;
}

.sl-add-form {
    display: flex;
    gap: 7px;
}

.sl-add-qty {
    width: 68px;
    flex: 0 0 auto;
}

.sl-add-form .btn {
    flex: 1 1 auto;
}

.sl-shop-pager {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}

/* ---------------------------------------------------------------------------
 | Basket
 --------------------------------------------------------------------------- */
.sl-cart-table td {
    vertical-align: middle;
}

.sl-qty-form {
    display: flex;
    gap: 6px;
    margin: 0;
}

.sl-qty-form input {
    width: 82px;
}

.sl-voucher-form {
    max-width: 420px;
    margin-top: 18px;
}

.sl-voucher-row {
    display: flex;
    gap: 8px;
}

.sl-totals td {
    vertical-align: middle;
}

.sl-total-row td {
    border-top: 2px solid #dfe4e8 !important;
    font-size: 16px;
}

/* ---------------------------------------------------------------------------
 | One order
 --------------------------------------------------------------------------- */
.sl-order-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.sl-order-badges .label + .label {
    margin-left: 5px;
}

.sl-track-brand {
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eef1f4;
    font-size: 17px;
    font-weight: 600;
}

.sl-lines td,
.sl-lines th {
    vertical-align: middle;
}

@media (max-width: 767px) {
    .sl-shop-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .sl-product-media {
        height: 120px;
    }
}

/* ---------------------------------------------------------------------------
 | One product
 --------------------------------------------------------------------------- */
.sl-product-name a {
    color: inherit;
    text-decoration: none;
}

.sl-product-name a:hover {
    text-decoration: underline;
}

.sl-product-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    border: 1px solid #e4e9ed;
    border-radius: 8px;
    background: #f4f7f9;
    color: #b6c0c9;
    font-size: 48px;
    overflow: hidden;
}

.sl-product-hero img {
    max-width: 100%;
    max-height: 340px;
    object-fit: contain;
}

.sl-product-detail-price {
    font-size: 1.5rem;
    margin: .75rem 0;
}

.sl-product-detail-price del {
    margin-right: .6rem;
    font-size: 1rem;
}

.sl-add-form-detail {
    max-width: 320px;
    margin-top: 1rem;
}

.sl-product-body-text {
    line-height: 1.6;
}

.sl-product-body-text img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 767px) {
    .sl-product-hero {
        min-height: 180px;
        margin-bottom: 1rem;
    }
}

/* ---------------------------------------------------------------------------
 | Guest checkout
 |
 | The honeypot is taken out of the flow rather than hidden with display:none.
 | A person cannot reach it - no space on screen, no tab stop, and a screen
 | reader is told to skip it - while a script that fills in every input still
 | finds it and gives itself away.
 --------------------------------------------------------------------------- */
.sl-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

#sl-guest-checkout {
    scroll-margin-top: 1rem;
}

/* ---------------------------------------------------------------------------
 | Points
 |
 | The balance is the sum of the list under it, and it is presented that way on
 | purpose: a number a customer can add up themselves is a number they do not
 | have to take on trust.
 --------------------------------------------------------------------------- */
.sl-points-summary {
    display: flex;
    align-items: baseline;
    gap: .6rem;
    margin: 0 0 1.25rem;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    background: rgba(0, 0, 0, .04);
}

.sl-points-value {
    font-size: 2.1rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.sl-points-label {
    font-size: .9rem;
    opacity: .7;
}

.sl-points-table td {
    vertical-align: top;
}

.sl-points-box {
    padding: .75rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, .03);
}

/* ---------------------------------------------------------------------------
 | Galeria del producto
 |
 | Miniaturas que envuelven, no una fila que desborda: una ficha con ocho
 | imagenes en un movil no puede producir barra horizontal en la pagina. El
 | `aspect-ratio` mantiene todas del mismo tamano aunque las fotos vengan con
 | proporciones distintas, que es lo normal cuando las sube gente distinta.
 --------------------------------------------------------------------------- */
.sl-product-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .75rem;
}

.sl-product-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    aspect-ratio: 1 / 1;
    border: 1px solid #e4e9ed;
    border-radius: 6px;
    background: #f4f7f9;
    overflow: hidden;
}

.sl-product-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sl-product-thumb:hover,
.sl-product-thumb:focus {
    border-color: #b6c0c9;
}

/* ---------------------------------------------------------------------------
 | Selectores de variante
 |
 | Las opciones envuelven en vez de desbordar: una talla con quince valores no
 | puede sacar barra horizontal en el movil.
 --------------------------------------------------------------------------- */
.sl-variants {
    display: flex;
    flex-direction: column;
    gap: .9rem;
    margin: 1rem 0;
}

.sl-axis-label {
    display: block;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    opacity: .7;
    margin-bottom: .35rem;
}

.sl-axis-options {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.sl-opt {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .4rem .85rem;
    border: 1px solid #e4e9ed;
    border-radius: 999px;
    font-size: .88rem;
    line-height: 1.2;
    color: inherit;
    background: #fff;
    text-decoration: none;
}

.sl-opt:hover,
.sl-opt:focus {
    border-color: #b6c0c9;
    color: inherit;
    text-decoration: none;
}

.sl-opt.is-current {
    border-color: #2c3e50;
    box-shadow: inset 0 0 0 1px #2c3e50;
    font-weight: 600;
}

/* Agotada: apagada Y tachada. Sólo con opacidad, un daltonismo o una pantalla
   al sol no distinguen "no queda" de "no elegida". */
.sl-opt.is-off {
    opacity: .45;
    cursor: not-allowed;
    text-decoration: line-through;
}

.sl-swatch {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, .25);
    flex: none;
}
