/* Shop styles on top of Bootstrap (app.css). */

body {
    background: #f6f8f8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body > .container {
    flex: 1 0 auto;
}

/* Header */
.shop-header {
    background: #1d2b2e;
    color: #fff;
}

.shop-brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.35rem;
    text-decoration: none;
    letter-spacing: .02em;
}

.shop-brand:hover {
    color: var(--bs-primary);
}

.shop-search {
    max-width: 36rem;
}

.shop-vat-note {
    color: rgba(255, 255, 255, .7);
}

.shop-footer {
    background: #1d2b2e;
    color: rgba(255, 255, 255, .7);
    margin-top: 2rem;
}

/* Category sidebar */
.category-menu-title {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--bs-secondary-color);
    margin-bottom: .5rem;
}

.category-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-menu ul ul {
    padding-left: 1rem;
    border-left: 2px solid var(--bs-border-color);
    margin: .15rem 0 .25rem .75rem;
}

.category-menu a {
    display: block;
    padding: .35rem .6rem;
    border-radius: .375rem;
    color: var(--bs-body-color);
    text-decoration: none;
}

.category-menu a:hover {
    background: rgba(var(--bs-primary-rgb), .08);
}

.category-menu a.active {
    background: var(--bs-primary);
    color: #fff;
}

@media (min-width: 992px) {
    .category-menu {
        position: sticky;
        top: 1rem;
    }
}

/* Cards */
.product-card,
.category-card {
    border: 1px solid var(--bs-border-color);
    transition: box-shadow .15s ease, transform .15s ease;
}

.product-card:hover,
.category-card:hover {
    box-shadow: 0 .5rem 1.25rem rgba(0, 0, 0, .08);
    transform: translateY(-2px);
}

.product-card-image {
    display: block;
    aspect-ratio: 4 / 3;
    background: #fff;
    border-bottom: 1px solid var(--bs-border-color);
    border-radius: var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0 0;
    overflow: hidden;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-price {
    font-weight: 700;
    color: var(--bs-emphasis-color);
}

/* Product page */
.product-gallery-main {
    background: #fff;
    border: 1px solid var(--bs-border-color);
    border-radius: .5rem;
    overflow: hidden;
}

.product-gallery-main img {
    object-fit: contain;
}

.gallery-thumb {
    width: 4.5rem;
    height: 3.4rem;
    padding: 0;
    background: #fff;
    border: 2px solid var(--bs-border-color);
    border-radius: .375rem;
    overflow: hidden;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

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

.product-features {
    padding-left: 1.2rem;
}

.variant-table {
    background: #fff;
}

.variant-table tr:target > td {
    background: rgba(var(--bs-primary-rgb), .15);
}

.breadcrumb {
    font-size: .875rem;
}

/* Variant picker: choices on the left, controls on the right; stacked on small screens. */
.variant-options {
    display: grid;
    gap: .6rem;
}

.variant-option {
    display: grid;
    grid-template-columns: minmax(8rem, 11rem) 1fr;
    align-items: center;
    gap: .75rem;
}

.variant-option-flag {
    grid-template-columns: 1fr;
}

@media (min-width: 576px) {
    .variant-option-flag .form-check {
        margin-left: calc(min(11rem, 40%) + .75rem);
    }
}

@media (max-width: 575.98px) {
    .variant-option {
        grid-template-columns: 1fr;
        gap: .25rem;
    }
}

.variant-option-label {
    font-weight: 600;
}

.variant-notice {
    margin: .75rem 0 0;
    padding: .5rem .75rem;
    border-radius: .375rem;
    background: rgba(var(--bs-primary-rgb), .1);
    font-size: .9rem;
}

/* The chosen variant, shaped like the identification tag on lifting gear. */
.variant-tag {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid var(--bs-border-color);
    border-left: .4rem solid var(--bs-primary);
    border-radius: .375rem;
}

.variant-tag-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: .5rem 1rem;
}

.variant-tag-caption {
    display: block;
    font-size: .8rem;
    color: var(--bs-secondary-color);
}

.variant-tag-code {
    font-size: 1.35rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: .01em;
    color: #1d2b2e;
}

.variant-tag-price {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    color: #1d2b2e;
}

.variant-tag-vat {
    font-size: .8rem;
    color: var(--bs-secondary-color);
}

.variant-tag-name {
    margin: .5rem 0 .75rem;
    color: var(--bs-secondary-color);
}

.variant-tag-specs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
    gap: .35rem 1.25rem;
    margin: 0;
    padding-top: .75rem;
    border-top: 1px dashed var(--bs-border-color);
}

.variant-tag-specs > div {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
}

.variant-tag-specs dt {
    font-weight: 400;
    color: var(--bs-secondary-color);
}

.variant-tag-specs dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* One short highlight when the chosen variant changes (answers the visitor's action). */
.variant-tag.is-updated {
    animation: variant-updated .6s ease-out;
}

@keyframes variant-updated {
    from { box-shadow: 0 0 0 .3rem rgba(var(--bs-primary-rgb), .35); }
    to { box-shadow: 0 0 0 0 rgba(var(--bs-primary-rgb), 0); }
}

@media (prefers-reduced-motion: reduce) {
    .variant-tag.is-updated {
        animation: none;
    }
}

/* All variants, collapsed. */
.variant-list {
    border: 1px solid var(--bs-border-color);
    border-radius: .375rem;
    background: #fff;
}

.variant-list > summary {
    padding: .75rem 1rem;
    font-weight: 600;
    cursor: pointer;
}

.variant-list[open] > summary {
    border-bottom: 1px solid var(--bs-border-color);
}

.variant-table tr.is-selected > td {
    background: rgba(var(--bs-primary-rgb), .12);
}

:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}
