/* Guest store (/store) — card grid: 2 columns on phone, 3 on md, 4 on lg */

.guest-store .store-item-card {
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s ease;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.guest-store .store-item-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12);
    border-color: rgba(15, 23, 42, 0.12);
}

.guest-store .store-item-card .card-body {
    text-align: center;
    padding: 0.75rem 0.65rem 0.85rem;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .guest-store .store-item-card .card-body {
        padding: 1rem 1rem 1.1rem;
    }
}

.guest-store .store-item-card__media {
    aspect-ratio: 4 / 3;
    max-height: 140px;
    padding: 0.4rem;
    border: 1px solid rgba(15, 23, 42, 0.06);
}

@media (min-width: 768px) {
    .guest-store .store-item-card__media {
        max-height: 180px;
        padding: 0.65rem;
    }
}

.guest-store .store-item-card__img {
    max-height: 118px !important;
    object-fit: contain;
}

@media (min-width: 768px) {
    .guest-store .store-item-card__img {
        max-height: 168px !important;
    }
}

.guest-store .store-item-card__placeholder {
    width: 100%;
    min-height: 100%;
    aspect-ratio: 4 / 3;
    max-height: 140px;
    background: rgba(248, 250, 252, 0.95);
    border: 1px dashed rgba(148, 163, 184, 0.45);
}

.guest-store .store-item-card__title {
    font-size: clamp(0.78rem, 2.6vw, 1.05rem);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.guest-store .store-item-card__meta {
    font-size: 0.72rem;
    line-height: 1.2;
}

@media (min-width: 576px) {
    .guest-store .store-item-card__meta {
        font-size: 0.8rem;
    }
}

.guest-store .store-item-card__desc {
    font-size: 0.68rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 0;
    margin-bottom: 0.35rem;
}

@media (min-width: 576px) {
    .guest-store .store-item-card__desc {
        font-size: 0.8rem;
        -webkit-line-clamp: 3;
    }
}

.guest-store .store-item-card__price {
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    color: #0f172a;
}

@media (min-width: 576px) {
    .guest-store .store-item-card__price {
        font-size: 1rem;
    }
}

.guest-store .store-item-card__cart {
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    border-color: rgba(15, 23, 42, 0.1) !important;
}

.guest-store .store-item-card__cart:hover {
    border-color: rgba(29, 78, 216, 0.35) !important;
    box-shadow: 0 2px 8px rgba(29, 78, 216, 0.12);
}

.guest-store .store-item-card__cart .form-check-label {
    font-size: clamp(0.65rem, 2.4vw, 0.82rem);
    line-height: 1.2;
}

.guest-store .store-item-card__cart .form-check-input {
    margin-top: 0.2rem;
}

/* Neutralize legacy icon-container rules inside guest store */
.guest-store .icon-container img {
    height: auto;
    width: 100%;
}

/* Selected / in-cart */
.guest-store .store-item-card:has(.form-check-input:checked),
.guest-store .store-item-card.selected {
    background: linear-gradient(180deg, rgba(219, 234, 254, 0.55) 0%, rgba(255, 255, 255, 0.98) 55%) !important;
    border-color: rgba(37, 99, 235, 0.35) !important;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12) !important;
}

.guest-store .store-item-card.selected:hover,
.guest-store .store-item-card:has(.form-check-input:checked):hover {
    transform: translateY(-3px);
}

.guest-store .form-check-input:checked {
    accent-color: #2563eb;
}

/* Fly-to-cart animation */
.store-fly-item {
    position: fixed;
    z-index: 10050;
    pointer-events: none;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    will-change: transform, opacity;
}

@keyframes store-cart-bump {
    0% {
        transform: scale(1);
    }
    35% {
        transform: scale(1.28);
    }
    100% {
        transform: scale(1);
    }
}

#cart-icon-fly-target.cart-fly-bump .fa-shopping-cart {
    display: inline-block;
    animation: store-cart-bump 0.42s ease;
}

body.theme-dark.guest-dashboard .guest-store .store-item-card {
    background: rgba(30, 41, 59, 0.92);
    border-color: rgba(148, 163, 184, 0.22);
    color: #e2e8f0;
}

body.theme-dark.guest-dashboard .guest-store .store-item-card__price {
    color: #f8fafc;
}

body.theme-dark.guest-dashboard .guest-store .store-item-card__media {
    background: rgba(15, 23, 42, 0.55) !important;
    border-color: rgba(148, 163, 184, 0.15);
}

body.theme-dark.guest-dashboard .guest-store .store-item-card__cart {
    background: rgba(15, 23, 42, 0.5) !important;
    border-color: rgba(148, 163, 184, 0.25) !important;
}
