/* =============================================================================
   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.95rem;
    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: 72px;
    min-height: 76px;
    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: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 3px;
    display: block;
    flex-shrink: 0;
}

/* Placeholder when product has no image */
.lalalo-variant-links__img--placeholder {
    width: 60px;
    height: 60px;
    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.75rem;
    line-height: 1.25;
    text-align: center;
    margin-top: 4px;
    color: #333;
    max-width: 60px;
    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;
}

/* =============================================================================
   Scroll navigation — wrapper, fade gradients, arrow buttons
   ============================================================================= */

.lalalo-variant-links__scroll-wrapper {
    position: relative;
}

/* Fade gradients (left + right) — reveal when JS adds vl-can-* classes */
.lalalo-variant-links__scroll-wrapper::before,
.lalalo-variant-links__scroll-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 3px; /* match track padding-bottom */
    width: 28px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 1;
}

.lalalo-variant-links__scroll-wrapper::before {
    left: 0;
    background: linear-gradient(to right, rgba(255,255,255,0.95) 30%, rgba(255,255,255,0));
}

.lalalo-variant-links__scroll-wrapper::after {
    right: 0;
    background: linear-gradient(to left, rgba(255,255,255,0.95) 30%, rgba(255,255,255,0));
}

.lalalo-variant-links__scroll-wrapper.vl-can-left::before  { opacity: 1; }
.lalalo-variant-links__scroll-wrapper.vl-can-right::after  { opacity: 1; }

/* Arrow buttons — JS sets display:flex when needed, hidden on touch devices */
.lalalo-variant-links__scroll-btn {
    display: none; /* shown by JS (flex) when scrollable in that direction */
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 22px;
    height: 22px;
    padding: 0;
    background: #fff;
    border: 1px solid #bbb;
    border-radius: 50%;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    line-height: 1;
    color: #444;
    box-shadow: 0 1px 3px rgba(0,0,0,0.18);
    transition: border-color 0.12s ease, color 0.12s ease;
}

.lalalo-variant-links__scroll-btn:hover {
    border-color: #555;
    color: #111;
}

.lalalo-variant-links__scroll-btn--left  { left:  -11px; }
.lalalo-variant-links__scroll-btn--right { right: -11px; }

/* Touch devices: buttons unnecessary (native swipe works), fade still active */
@media (pointer: coarse) {
    .lalalo-variant-links__scroll-btn { display: none !important; }
}

/* =============================================================================
   LALALO ManufacturerLink — Anweisung 187 (Teil A)
   Small "Marke: [Brand]" text link directly below the product H1.
   ============================================================================= */

.lalalo-manufacturer-link {
    font-size: 1.3rem;
    margin: 2px 0 10px;
    padding: 0;
    line-height: 1.4;
    color: #555;
}

.lalalo-manufacturer-link__label {
    color: #888;
    margin-right: 4px;
}

.lalalo-manufacturer-link__name {
    color: #0085b9;
    text-decoration: none;
    font-weight: 600;
}

.lalalo-manufacturer-link__name:hover,
.lalalo-manufacturer-link__name:focus {
    text-decoration: underline;
    color: #006492;
}

/* =============================================================================
   LALALO ProductTags — Anweisung 187 (Teil B)
   "Ähnliche personalisierte Geschenke" link chips below variant tiles.
   ============================================================================= */

.lalalo-product-tags {
    margin: 10px 0 8px;
}

.lalalo-product-tags__heading {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #444;
    margin: 0 0 8px;
    padding: 0;
}

.lalalo-product-tags__list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lalalo-product-tags__list li {
    margin: 0;
    padding: 0;
}

.lalalo-product-tags__list a {
    display: inline-block;
    padding: 3px 10px;
    background: #f0faff;
    border: 1px solid #c4dded;
    border-radius: 3px;
    color: #0085b9;
    font-size: 1.2rem;
    text-decoration: none;
    line-height: 1.7;
    white-space: nowrap;
    transition: background 0.1s ease, border-color 0.1s ease;
}

.lalalo-product-tags__list a:hover,
.lalalo-product-tags__list a:focus {
    background: #d8eef8;
    border-color: #0085b9;
    text-decoration: none;
    color: #006492;
}

/* =============================================================================
   LALALO ProductTags — Anweisung 188 (Teil B) — Styling-Update
   Link-Blau (#3e9bf7) + Pfeil → + Hover-Fill statt Teal.
   Overrides Anweisung-187-Regeln (gleiche Selektoren, CSS Cascade).
   ============================================================================= */

.lalalo-product-tags__list a {
    background: #f5f9ff;
    border: 1px solid #3e9bf7;
    color: #3e9bf7;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.lalalo-product-tags__list a::after {
    content: " \2192";        /* → U+2192 RIGHTWARDS ARROW */
    font-size: 0.85em;
    margin-left: 3px;
    opacity: 0.75;
    transition: opacity 0.12s ease;
}

.lalalo-product-tags__list a:hover,
.lalalo-product-tags__list a:focus {
    background: #3e9bf7;
    border-color: #3e9bf7;
    color: #fff;
    text-decoration: none;
}

.lalalo-product-tags__list a:hover::after,
.lalalo-product-tags__list a:focus::after {
    opacity: 1;
}
