/* ═══════════════════════════════════════════════════════════
   BBF Shop – Shop Grid Styles
   For [bbf_shop] shortcode pages
   ═══════════════════════════════════════════════════════════ */

/* ─── Grid wrapper ──────────────────────────────────────── */
.bbfs-shop-grid-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 0;
}

/* ─── Filter tabs ───────────────────────────────────────── */
.bbfs-shop-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    padding: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    border: 1px solid var(--bbfs-border, #E7D8C7);
}

.bbfs-filter-btn {
    padding: 10px 18px;
    border-radius: 12px;
    border: none;
    background: transparent;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--bbfs-text, #2A1E16);
    white-space: nowrap;
}

.bbfs-filter-btn:hover {
    background: rgba(200, 162, 122, 0.12);
}

.bbfs-filter-btn.active {
    background: linear-gradient(135deg, #C8A27A, #7A4E2D);
    color: white;
    box-shadow: 0 4px 12px rgba(122, 78, 45, 0.25);
}

/* ─── Product grid ──────────────────────────────────────── */
.bbfs-shop-grid {
    display: grid;
    gap: 16px;
}

.bbfs-cols-2 { grid-template-columns: repeat(2, 1fr); }
.bbfs-cols-3 { grid-template-columns: repeat(3, 1fr); }
.bbfs-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 980px) {
    .bbfs-cols-3,
    .bbfs-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
    .bbfs-cols-2,
    .bbfs-cols-3,
    .bbfs-cols-4 { grid-template-columns: 1fr; }
}

/* ─── Product card ──────────────────────────────────────── */
.bbfs-shop-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--bbfs-border, #E7D8C7);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(42, 30, 22, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.bbfs-shop-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(42, 30, 22, 0.12);
}

.bbfs-card-link {
    text-decoration: none;
    color: inherit;
    flex: 1;
}

/* ─── Card image ────────────────────────────────────────── */
.bbfs-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.bbfs-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.bbfs-shop-card:hover .bbfs-card-image img {
    transform: scale(1.05);
}

.bbfs-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    background: linear-gradient(135deg,
        rgba(247, 201, 211, 0.5),
        rgba(191, 231, 214, 0.5),
        rgba(185, 217, 255, 0.5));
}

.bbfs-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    font-size: 11px;
    font-weight: 700;
    color: var(--bbfs-brown, #7A4E2D);
    border: 1px solid rgba(231, 216, 199, 0.5);
}

.bbfs-card-sale {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 8px;
    background: #e74c3c;
    color: white;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ─── Card body ─────────────────────────────────────────── */
.bbfs-card-body {
    padding: 14px;
}

.bbfs-card-title {
    font-size: 15px;
    font-weight: 800;
    margin: 0 0 6px 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--bbfs-text, #2A1E16);
}

.bbfs-card-price {
    font-weight: 900;
    font-size: 16px;
    color: var(--bbfs-brown, #7A4E2D);
    margin-bottom: 4px;
}

.bbfs-card-price del {
    font-size: 13px;
    opacity: 0.5;
    font-weight: 400;
}

.bbfs-card-price ins {
    text-decoration: none;
}

.bbfs-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    opacity: 0.65;
    gap: 8px;
}

/* ─── Card actions ──────────────────────────────────────── */
.bbfs-card-actions {
    padding: 0 14px 14px;
    display: flex;
    gap: 8px;
}

.bbfs-card-actions .bbfs-btn {
    flex: 1;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 10px;
}

/* ─── Empty state ───────────────────────────────────────── */
.bbfs-shop-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    opacity: 0.6;
}

.bbfs-empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

.bbfs-shop-empty p {
    font-size: 15px;
    margin: 0;
}

/* ─── Pagination ────────────────────────────────────────── */
.bbfs-shop-pagination {
    text-align: center;
    margin-top: 24px;
    padding: 16px;
}

.bbfs-shop-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    margin: 0 3px;
    border-radius: 10px;
    border: 1px solid var(--bbfs-border, #E7D8C7);
    background: white;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    color: var(--bbfs-text, #2A1E16);
    transition: all 0.2s ease;
}

.bbfs-shop-pagination .page-numbers:hover {
    background: rgba(200, 162, 122, 0.1);
}

.bbfs-shop-pagination .page-numbers.current {
    background: linear-gradient(135deg, #C8A27A, #7A4E2D);
    color: white;
    border-color: transparent;
}

/* ─── Filter animation ──────────────────────────────────── */
.bbfs-shop-card.bbfs-hiding {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.bbfs-shop-card.bbfs-showing {
    animation: bbfs-card-appear 0.4s ease forwards;
}

@keyframes bbfs-card-appear {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
