/* Colour / weight / level pickers for the product pages that switch photos by option.
   Loaded after style.css; only touches .vp* classes. */

.vp-gallery {
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    background-color: var(--color-white);
    min-width: 0;
}

.vp-main {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    background-color: var(--color-white);
}

.vp-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.vp-badge {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(51, 51, 51, 0.82);
    color: var(--color-white);
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

.vp-badge[hidden] {
    display: none;
}

.vp-thumbs {
    display: flex;
    gap: 8px;
    padding: 8px;
    overflow-x: auto;
    background-color: var(--color-white);
}

.vp-thumb {
    flex: 0 0 72px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    background: none;
    cursor: pointer;
    overflow: hidden;
}

.vp-thumb img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.vp-thumb.active {
    border-color: var(--color-primary);
}

.vp-thumb:focus-visible,
.vp-swatch:focus-visible,
.vp-chip:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
}

.vp-controls {
    margin: 1.5rem 0;
    display: grid;
    gap: 1.25rem;
}

.vp-group-label {
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-secondary);
}

.vp-group-label strong {
    font-weight: 500;
    color: var(--color-text);
    text-transform: none;
    letter-spacing: 0;
}

.vp-swatches,
.vp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.vp-swatch {
    position: relative;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.18);
    background-color: var(--sw, #ccc);
    cursor: pointer;
    box-shadow: 0 0 0 3px transparent;
    transition: box-shadow 0.15s ease;
}

.vp-swatch.dot {
    background-image: radial-gradient(circle at 30% 30%, var(--dot) 0 12%, transparent 13%),
                      radial-gradient(circle at 70% 36%, var(--dot) 0 12%, transparent 13%),
                      radial-gradient(circle at 46% 72%, var(--dot) 0 12%, transparent 13%);
}

.vp-swatch.is-active {
    box-shadow: 0 0 0 3px var(--color-white), 0 0 0 5px var(--color-secondary);
}

/* option with no photo yet: still visible and clickable, marked with a dashed ring */
.vp-swatch.is-empty::after {
    content: "";
    position: absolute;
    inset: -5px;
    border: 1px dashed rgba(51, 51, 51, 0.45);
    border-radius: 50%;
}

.vp-chip {
    padding: 8px 18px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 999px;
    background: var(--color-white);
    color: var(--color-text);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}

.vp-chip.is-active {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
    color: var(--color-white);
}

.vp-note {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: var(--color-secondary);
    min-height: 1.2em;
}

.vp-specs {
    margin: 1.5rem 0;
}

.vp-specs h3 {
    margin-bottom: 0.6rem;
}

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

.vp-specs th,
.vp-specs td {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    text-align: left;
    font-weight: 400;
    vertical-align: top;
}

.vp-specs th {
    width: 42%;
    color: var(--color-secondary);
    padding-right: 12px;
}

/* extra colour-photo block added to existing product pages */
.vp-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.vp-section > h2 {
    margin-bottom: 0.4rem;
}

.vp-section > .vp-lead {
    margin-bottom: 1.5rem;
    color: var(--color-secondary);
}

@media (min-width: 769px) {
    .vp-gallery {
        display: grid;
        grid-template-columns: 88px 1fr;
    }

    .vp-main {
        grid-column: 2;
        grid-row: 1;
    }

    .vp-thumbs {
        grid-column: 1;
        grid-row: 1;
        flex-direction: column;
        overflow-x: hidden;
        overflow-y: auto;
        height: 0;
        min-height: 100%;
    }

    .vp-thumb {
        flex: 0 0 auto;
    }
}

/* product detail pages that load variants.css: content width aligned with the 1400px navbar */
main.product-detail > .container {
    max-width: 1400px;
}

/* printed patterns block on the ankle & wrist weights page */
.vp-pattern-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.vp-pattern-grid figure {
    margin: 0;
    text-align: center;
}

.vp-pattern-grid img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    background: #fff;
}

.vp-pattern-grid figcaption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-secondary);
}

@media (max-width: 768px) {
    .vp-pattern-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* pump / valve photos on the merged Pilates ball page */
.vp-photo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.vp-photo-grid figure {
    margin: 0;
    text-align: center;
}

.vp-photo-grid img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    background: #fff;
}

.vp-photo-grid figcaption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-secondary);
}

/* weight picker (does not switch photos) */
.vp-weight {
    margin: -0.25rem 0 1.5rem;
}
