/* ══════════════════════════════════════════════════════════
 * BBF SHOP — Product Grid Section
 * Styling for rental products displayed with giá gốc (buy price)
 * ══════════════════════════════════════════════════════════ */

/* ── Section container ─────────────────────────────────── */
.bsl-products-section {
    padding: 3rem 0;
}

.bsl-products-section .bsl-section-head {
    margin-bottom: 2rem;
}

/* ── Filter bar ────────────────────────────────────────── */
.bsl-product-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 2rem;
    align-items: center;
}

.bsl-product-filters .bsl-filter-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.bsl-product-filters .bsl-filter-label {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    margin-right: 4px;
}

.bsl-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 100px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.bsl-filter-btn:hover {
    border-color: #fda4af;
    color: #e11d48;
    background: #fff1f2;
    transform: translateY(-1px);
}

.bsl-filter-btn.active {
    border-color: #e11d48;
    color: #fff;
    background: linear-gradient(135deg, #e11d48, #f43f5e);
    box-shadow: 0 2px 8px rgba(225, 29, 72, 0.25);
}

.bsl-filter-search {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 320px;
}

.bsl-filter-search input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border-radius: 100px;
    border: 1.5px solid #e2e8f0;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
}

.bsl-filter-search input:focus {
    border-color: #fda4af;
    box-shadow: 0 0 0 3px rgba(253, 164, 175, 0.15);
}

.bsl-filter-search::before {
    content: '🔍';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    pointer-events: none;
}

/* ── Product grid ──────────────────────────────────────── */
.bsl-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .bsl-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .bsl-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

@media (max-width: 480px) {
    .bsl-products-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* ── Product card ──────────────────────────────────────── */
.bsl-product-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.04);
}

.bsl-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(225, 29, 72, 0.1), 0 4px 16px rgba(0,0,0,0.06);
    border-color: rgba(253, 164, 175, 0.4);
}

/* Card image */
.bsl-product-card-image {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 aspect ratio */
    overflow: hidden;
    background: linear-gradient(135deg, #fef2f2, #fdf2f8);
}

.bsl-product-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.bsl-product-card:hover .bsl-product-card-image img {
    transform: scale(1.05);
}

.bsl-product-card-image .bsl-product-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    opacity: 0.4;
}

/* Badges on image */
.bsl-product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    z-index: 2;
}

.bsl-badge-age {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    font-size: 11px;
    font-weight: 700;
    color: #d97706;
    border: 1px solid rgba(217, 119, 6, 0.15);
}

.bsl-badge-skill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    font-size: 11px;
    font-weight: 700;
    color: #e11d48;
    border: 1px solid rgba(225, 29, 72, 0.15);
}

/* Card body */
.bsl-product-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}

.bsl-product-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.bsl-product-card-title a {
    color: inherit;
    text-decoration: none;
}

.bsl-product-card-title a:hover {
    color: #e11d48;
}

.bsl-product-card-meta {
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Price area */
.bsl-product-card-price-area {
    margin-top: auto;
    padding-top: 8px;
}

.bsl-product-card-price {
    font-size: 20px;
    font-weight: 800;
    color: #e11d48;
    line-height: 1.2;
}

.bsl-product-card-price .bsl-price-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.bsl-product-card-rent-price {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.bsl-product-card-rent-price span {
    text-decoration: line-through;
    opacity: 0.6;
}

/* Card actions */
.bsl-product-card-actions {
    padding: 0 16px 16px;
    display: flex;
    gap: 8px;
}

.bsl-btn-buy {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 12px;
    border: none;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    text-align: center;
}

.bsl-btn-buy-primary {
    background: linear-gradient(135deg, #e11d48, #f43f5e);
    color: #fff;
    box-shadow: 0 2px 8px rgba(225, 29, 72, 0.2);
}

.bsl-btn-buy-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(225, 29, 72, 0.3);
    color: #fff;
    text-decoration: none;
}

.bsl-btn-buy-outline {
    background: #fff;
    color: #475569;
    border: 1.5px solid #e2e8f0;
}

.bsl-btn-buy-outline:hover {
    border-color: #fda4af;
    color: #e11d48;
    text-decoration: none;
}

.bsl-btn-buy-disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

/* ── Load More ─────────────────────────────────────────── */
.bsl-load-more-wrap {
    text-align: center;
    margin-top: 2rem;
}

.bsl-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    border-radius: 100px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    font-size: 14px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bsl-load-more-btn:hover {
    border-color: #fda4af;
    color: #e11d48;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.1);
}

.bsl-load-more-btn.loading {
    pointer-events: none;
    opacity: 0.6;
}

.bsl-products-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.bsl-products-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.bsl-products-empty p {
    font-size: 15px;
    margin: 0;
}

/* ── Skeleton loading ──────────────────────────────────── */
.bsl-product-skeleton {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.04);
}

.bsl-product-skeleton .skel-image {
    width: 100%;
    padding-top: 100%;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: bsl-shimmer 1.5s infinite;
}

.bsl-product-skeleton .skel-body {
    padding: 16px;
}

.bsl-product-skeleton .skel-line {
    height: 14px;
    border-radius: 7px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: bsl-shimmer 1.5s infinite;
    margin-bottom: 10px;
}

.bsl-product-skeleton .skel-line.short {
    width: 60%;
}

.bsl-product-skeleton .skel-line.price {
    width: 40%;
    height: 20px;
    margin-top: 12px;
}

@keyframes bsl-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ── Filter divider ────────────────────────────────────── */
.bsl-filter-divider {
    width: 1px;
    height: 24px;
    background: #e2e8f0;
    margin: 0 4px;
}

/* ── Active filter count badge ─────────────────────────── */
.bsl-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 100px;
    background: #e11d48;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    margin-left: 6px;
}

/* ── Toast notification for add to cart ─────────────────── */
.bsl-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1e293b;
    color: #fff;
    padding: 14px 24px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    z-index: 10000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 10px;
}

.bsl-toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ── Mobile filter toggle ──────────────────────────────── */
@media (max-width: 768px) {
    .bsl-product-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .bsl-product-filters .bsl-filter-group {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        flex-wrap: nowrap;
    }
    
    .bsl-filter-search {
        max-width: 100%;
    }
    
    .bsl-filter-divider {
        display: none;
    }
    
    .bsl-product-card-actions {
        flex-direction: column;
    }
}

/* ── Combo modal responsive ───────────────────────────── */
@media (max-width: 768px) {
    .bsl-combo-modal-content {
        margin: 2vh 12px !important;
        padding: 20px !important;
        border-radius: 20px !important;
    }
}

/* ── Sort/filter active indicator ──────────────────────── */
.bsl-quick-card.bsl-active {
    border-color: #e11d48 !important;
    background: #fff1f2 !important;
    box-shadow: 0 4px 16px rgba(225, 29, 72, 0.15) !important;
}

/* ── Filter group highlight animation ──────────────────── */
.bsl-filter-group-highlight {
    background: rgba(253, 164, 175, 0.1);
    border-radius: 16px;
    padding: 8px 12px;
    transition: all 0.3s ease;
}
