/* ── Category filter pills ─────────────────────────────── */
.filter-pills {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 0 12px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.filter-pills::-webkit-scrollbar { display: none; }

.filter-pill {
    flex-shrink: 0;
    padding: 6px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.filter-pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ── Products grid ─────────────────────────────────────── */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.product-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.product-card:active {
    transform: scale(0.97);
    border-color: var(--glass-border-hover);
}

.product-image-container {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #1a1a1a;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-category-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-info {
    padding: 10px 12px 12px;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

.product-desc {
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Product detail ────────────────────────────────────── */
.product-detail-card {
    padding-bottom: 24px;
}

/* Gallery */
.gallery {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #111;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    touch-action: pan-y;
}

.gallery-track {
    display: flex;
    height: 100%;
    transition: transform 0.3s ease;
    will-change: transform;
}

.gallery-slide {
    flex: 0 0 100%;
    height: 100%;
    overflow: hidden;
}

.gallery-slide img,
.gallery-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* Transparent overlay — captures right-clicks on media */
.gallery-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Promos */
.product-promo-tag {
    position: absolute;
    bottom: 8px;
    left: 8px;
    z-index: 2;
    background: #ff4d6d;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.6px;
    padding: 3px 8px;
    border-radius: 6px;
}

.product-promo-price {
    color: #ff4d6d;
    font-size: 12px;
    font-weight: 700;
    margin: 2px 0 4px;
}

.promo-banner {
    background: linear-gradient(135deg, rgba(255, 77, 109, 0.18), rgba(255, 77, 109, 0.05));
    border: 1px solid rgba(255, 77, 109, 0.35);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    white-space: pre-line;
    word-break: break-word;
}

.promo-section {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
}

.promo-section-text {
    font-size: 13px;
    line-height: 1.45;
    white-space: pre-line;
    word-break: break-word;
}

.promo-section-link-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.promo-section-text:empty + .promo-section-link-row,
.promo-section-link-row:first-child {
    margin-top: 0;
}

.promo-section-link {
    color: #4da6ff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    word-break: break-all;
}

.promo-copy-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    cursor: pointer;
}

.promo-copy-btn:active {
    background: rgba(255, 255, 255, 0.14);
}

.promo-group {
    margin-bottom: 28px;
}

.promo-group-header {
    margin-bottom: 12px;
}

.promo-group-name {
    font-size: 17px;
    font-weight: 700;
}

.promo-group-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Detail — bandeau promo */
.product-detail-promo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.product-detail-promo .product-promo-tag {
    position: static;
}

.product-detail-promo-price {
    color: #ff4d6d;
    font-size: 16px;
    font-weight: 800;
}

/* Sort pills row — plus discret que les catégories */
.sort-pills {
    margin-top: 2px;
}

/* Likes — heart-in-circle badge, bottom-right of card image & detail gallery */
.product-like-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: none;
    border-radius: 999px;
    padding: 3px 10px 3px 3px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.product-like-badge:active {
    transform: scale(0.92);
}

.like-heart {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.like-heart svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.product-like-badge.liked {
    color: #fff;
}

.product-like-badge.liked .like-heart {
    background: rgba(255, 77, 109, 0.22);
}

.product-like-badge.liked .like-heart svg {
    fill: #ff4d6d;
    stroke: #ff4d6d;
    animation: like-pop 0.25s ease;
}

@keyframes like-pop {
    0%   { transform: scale(0.5); }
    60%  { transform: scale(1.25); }
    100% { transform: scale(1); }
}

/* Detail gallery with a video: clear the sound toggle (36px wide @ right 12px) */
.product-like-badge.shifted {
    right: 56px;
    bottom: 16px;
}

/* Detail page without media: badge flows inline in the info block */
.product-like-badge.inline {
    position: static;
    margin-bottom: 12px;
}

/* Product grid — video card badge */
.product-video-badge {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
}

.product-image {
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.gallery-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

/* Sound toggle (Instagram/TikTok pattern) */
.gallery-sound-toggle {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.gallery-sound-toggle:active {
    transform: scale(0.92);
    background: rgba(0, 0, 0, 0.75);
}

.gallery-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: var(--transition);
}

.gallery-dot.active {
    background: white;
    width: 20px;
    border-radius: 3px;
}

/* Detail info */
.product-detail-info {
    padding: 20px 16px;
}

.product-detail-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

.product-detail-category {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 14px;
}

.product-detail-price {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 16px;
}

/* Prices as chips */
.price-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.price-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;
}

.price-chip-qty {
    color: var(--text-muted);
    font-weight: 500;
}

.price-chip-qty::after {
    content: '·';
    margin-left: 4px;
    color: var(--text-dim);
}

.price-chip-amt {
    color: var(--primary);
    font-weight: 800;
}

.product-detail-description {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.order-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.order-btn:active {
    transform: scale(0.97);
    background: var(--primary-hover);
}
