/* =============================================================================
   LALALO VariantLinks — lalalo-variant-links.css
   Amazon-style swatch tiles for product variant selection on simple products.
   ============================================================================= */

/* Container */
.lalalo-variant-links {
    margin: 10px 0 14px;
    max-width: 100%;
}

/* "Varianten" heading */
.lalalo-variant-links__heading {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #444;
    margin: 0 0 8px;
    padding: 0;
}

/* Scrollable tile row */
.lalalo-variant-links__track {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 7px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;       /* Firefox: hide scrollbar */
    padding-bottom: 3px;         /* Space for focus outline */
    align-items: flex-start;
}

.lalalo-variant-links__track::-webkit-scrollbar {
    display: none;               /* Chrome/Safari: hide scrollbar */
}

/* Individual tile wrapper */
.lalalo-variant-links__tile {
    flex: 0 0 auto;
    scroll-snap-align: start;
}

/* Shared inner styles — applies to both <a> and <span> */
.lalalo-variant-links__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 58px;
    min-height: 72px;
    padding: 4px;
    border: 2px solid #c8c8c8;
    border-radius: 5px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.12s ease;
    cursor: pointer;
}

/* Hover/focus for link tiles */
a.lalalo-variant-links__inner:hover {
    border-color: #555;
    text-decoration: none;
}

a.lalalo-variant-links__inner:focus {
    outline: none;
    border-color: #555;
}

a.lalalo-variant-links__inner:focus-visible {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
    border-color: #005fcc;
}

/* Active (current product) tile */
.lalalo-variant-links__tile--active .lalalo-variant-links__inner {
    border-color: #111;
    border-width: 2px;
    background: #f6f6f6;
    cursor: default;
}

/* Product thumbnail */
.lalalo-variant-links__img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 3px;
    display: block;
    flex-shrink: 0;
}

/* Placeholder when product has no image */
.lalalo-variant-links__img--placeholder {
    width: 56px;
    height: 56px;
    background: #ebebeb;
    border-radius: 3px;
    display: block;
    flex-shrink: 0;
}

/* Short variant label ("Blau", "Rot, XL", etc.) */
.lalalo-variant-links__label {
    display: block;
    font-size: 0.67rem;
    line-height: 1.25;
    text-align: center;
    margin-top: 4px;
    color: #333;
    max-width: 50px;
    word-break: break-word;
    hyphens: auto;
    overflow: hidden;
    /* Limit to 2 lines to keep tiles compact */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Bold label on active tile */
.lalalo-variant-links__tile--active .lalalo-variant-links__label {
    font-weight: 700;
    color: #111;
}
