.products-wrapper {
    margin-top: 3rem;
}

.back-btn-wrapper + .products-wrapper,
.main-btns-box + .products-wrapper {
    margin-top: 0;
}

.qbuttons {
    display: flex;
    align-items: center;
}

.qbuttons .pbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
    color: var(--txt-color);
    border: 2px solid var(--btn-primary-color);
    border-radius: var(--radius);
    background-color: var(--btn-primary-color);
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    line-height: 1;
}

.qbuttons .pbtn:hover {
    background-color: var(--hover-btn-primary-color);
    border-color: var(--hover-btn-primary-color);
}

.qbuttons .pbtn i,
.qbuttons .pbtn span {
    font-size: 20px;
    line-height: 1;
    pointer-events: none;
}

.qbuttons .pbtn.button-disabled-visual {
    opacity: 0.5;
    cursor: default !important;
    pointer-events: none !important;
}

input.qfield {
    background-color: #fff;
    width: 55px;
    height: 55px;
    border: unset;
    text-align: center;
    font-size: 18px;
    font-weight: 500;
    pointer-events: none;
    user-select: none;
}

.ui-state-disabled,
.product-item.ui-state-disabled,
.product-card.ui-state-disabled {
    opacity: 0.5 !important;
    pointer-events: none;
}

.ui-state-disabled .qbuttons,
.product-item.ui-state-disabled .qbuttons,
.product-card.ui-state-disabled .qbuttons {
    pointer-events: auto;
}

.product-link-back {
    background: var(--btn-secondary-color);
    color: var(--btn-secondary-txt-color);
    min-width: 300px;
    border-radius: var(--radius);
    padding: 10px 18px;
    font-size: 20px;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.product-link-back:hover {
    background: var(--hover-btn-secondary-color);
}

.products-empty {
    text-align: center;
    padding: 8rem 1rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: #444;
}

.events-category {
    display: flex;
    gap: 20px;
    opacity: 1;
    flex-wrap: wrap;
    transition: opacity 0.3s ease-in-out;
    margin-bottom: 2rem;
    padding-left: 0;
}

.events-category.hidden {
    opacity: 0;
}

.event-group,
.event-group.active {
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    text-transform: uppercase;
    color: var(--txt-color-secondary);
    font-size: 20px;
    line-height: 28px;
    cursor: pointer;
    border-style: solid;
    border-width: 0 0 1.5px 0;
    border-color: transparent;
    transition: all 0.1s ease;
}

.event-group.active {
    border-bottom-width: 1.5px;
    border-bottom-color: var(--txt-color-secondary);
    line-height: 28px;
    opacity: 1;
}

.event-group:hover,
.event-group:focus {
    line-height: 28px;
    opacity: 1;
    outline: none;
}

.separator {
    color: var(--txt-color-secondary);
    line-height: 28px;
    display: inline-block;
    user-select: none;
}

.products-grid-layout {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.product-category-grid-heading {
    grid-column: 1 / -1;
    margin: 2rem 0 1rem;
    font-size: 26px;
    font-weight: 500;
    text-transform: uppercase;
    border-bottom: 1px solid var(--txt-color-secondary, #666);
    padding-bottom: 0.5rem;
}

.product-category-grid-heading:first-of-type {
    margin-top: 0;
}

.product-grid-card {
    background: #fff;
    border: 1px solid #dae5f0;
    border-radius: var(--radius-small);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-grid-card:not(.ui-state-disabled):hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.product-grid-thumb {
    width: 100%;
    background: radial-gradient(circle at 30% 30%, #86a0b5 0%, #6e889f 70%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-badge-soldout {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    color: #dc3545;
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 2px solid #dc3545;
    border-radius: var(--radius-small);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    z-index: 2;
    pointer-events: none;
    backdrop-filter: blur(4px);
}

.product-grid-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-grid-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
    align-items: center;
}

.product-grid-info .product-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--txt-color-secondary);
    line-height: 1.4;
}

.product-grid-info .product-description {
    font-size: 0.875rem;
    color: var(--txt-description);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: pre-line;
}

.product-grid-info .product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--btn-primary-color, #007bff);
    margin-top: auto;
}

.product-grid-qty {
    padding: 1rem;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: center;
}

.product-grid-qty .qbuttons .pbtn {
    width: 40px;
    height: 40px;
}

.product-grid-qty .qbuttons .pbtn i,
.product-grid-qty .qbuttons .pbtn span {
    font-size: 16px;
}

.product-grid-qty input.qfield {
    width: 40px;
    height: 40px;
    font-size: 16px;
}

.product-grid-card.ui-state-disabled {
    opacity: 0.6;
}

.product-grid-card.ui-state-disabled .product-grid-thumb {
    filter: grayscale(50%);
}

.product-locations-uid-selector {
    margin: 0 auto 2rem;
}

.product-locations-uid-selected {
    margin: 0 auto 2rem;
}

.product-locations-uid-selected-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #f8fbfe;
    border: 1px solid #dae5f0;
    border-radius: var(--radius-small);
}

.product-locations-uid-selected-media {
    width: 88px;
    min-width: 88px;
    aspect-ratio: 1;
    border-radius: var(--radius-small);
    overflow: hidden;
    background: radial-gradient(circle at 30% 30%, #86a0b5 0%, #6e889f 70%);
}

.product-locations-uid-selected-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    box-sizing: border-box;
    padding: 0.5rem;
    display: block;
}

.product-locations-uid-selected-copy {
    flex: 1;
    min-width: 0;
}

.product-locations-uid-selected-label {
    margin-bottom: 0.2rem;
    color: var(--txt-description);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.product-locations-uid-selected-name {
    color: var(--txt-color-secondary);
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
}

.product-locations-uid-selected-description {
    margin-top: 0.35rem;
    color: var(--txt-description);
    line-height: 1.5;
}

.product-locations-uid-headline {
    margin: 0 0 1.25rem;
    font-size: 26px;
    font-weight: 500;
    text-align: center;
    text-transform: uppercase;
}

.product-locations-uid-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.product-location-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    background: #fff;
    border: 1px solid #dae5f0;
    border-radius: var(--radius-small);
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.product-location-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.product-location-card.is-active {
    border-color: var(--primary-color, #6e889f);
    box-shadow: 0 12px 28px rgba(110, 136, 159, 0.18);
}

.product-location-card-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.product-location-card-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    box-sizing: border-box;
    padding: 0.75rem;
    display: block;
}

.product-location-card-body {
    display: flex;
    border-top: 1px solid #00000085;
    flex: 1;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem;
}

.product-location-card-name {
    font-size: 1.125rem;
    font-weight: 600;
    text-align: center;
    color: var(--txt-color-secondary);
    text-transform: uppercase;
}

.product-location-card-description {
    color: var(--txt-description);
    line-height: 1.5;
    white-space: normal;
}

.product-location-card-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin-top: auto;
    padding: 0.85rem 1rem;
    background: var(--btn-primary-color, #6e889f);
    color: #fff;
    letter-spacing: 0.04em;
    text-decoration: none;
    text-transform: uppercase;
    border-radius: var(--radius);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.product-location-card-action:hover {
    color: #fff;
    opacity: 0.92;
}

.product-location-card-reset {
    width: auto;
    min-width: 240px;
    white-space: nowrap;
}

.product-location-card-action.is-active {
    pointer-events: none;
    opacity: 0.75;
}

.products-location-hint {
    max-width: 760px;
    margin: 0 auto 2rem;
    padding: 1rem 1.25rem;
    background: #f8fbfe;
    border: 1px solid #dae5f0;
    border-radius: var(--radius-small);
    color: var(--txt-color-secondary);
    text-align: center;
}

@media (max-width: 1024px) {
    .products-grid-layout {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .product-locations-uid-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .products-empty {
        padding: 8rem 1rem;
    }

    #toggleTextPicker {
        display: none;
    }

    .product-locations-uid-selected-summary {
        flex-wrap: wrap;
    }

    .product-location-card-reset {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 640px) {
    .products-grid-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .product-category-grid-heading {
        font-size: 20px;
        margin: 1.5rem 0 0.75rem;
    }

    .product-grid-info {
        padding: 1rem;
    }

    .product-grid-qty {
        padding: 0.75rem 1rem 1rem;
    }

    .product-locations-uid-headline {
        font-size: 20px;
    }

    .product-locations-uid-grid {
        grid-template-columns: 1fr;
    }

    .product-locations-uid-selected-summary {
        padding: 1rem;
    }

    .product-locations-uid-selected-media {
        width: 72px;
        min-width: 72px;
    }
}