/* Feed Wrapper (sidebar layout) */
.tbs-feed-wrapper { display: flex; gap: 30px; }
.tbs-feed-wrapper.tbs-layout-stacked { flex-direction: row; }
.tbs-filter-sidebar { flex: 0 0 25%; max-width: 25%; background: #f8f9fa; padding: 24px; border-radius: 8px; align-self: flex-start; }
.tbs-feed-main { flex: 1; min-width: 0; }

/* ===== FILTER SIDEBAR (stacked) ===== */
.tbs-filter-sidebar .tbs-filter-section { margin-bottom: 28px; }
.tbs-filter-sidebar .tbs-filter-section:last-of-type { margin-bottom: 20px; }
.tbs-filter-sidebar .tbs-filter-label { display: block; font-size: 13px; font-weight: 600; color: #555; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
.tbs-filter-sidebar .tbs-filter-clear { width: 100%; margin-top: 4px; }

/* ===== FILTER HORIZONTAL BAR ===== */
.tbs-filter-bar { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; background: #f8f9fa; padding: 16px 20px; border-radius: 8px; margin-bottom: 24px; }
.tbs-filter-bar .tbs-filter-group { display: flex; flex-direction: column; gap: 6px; min-width: 180px; }
.tbs-filter-bar .tbs-filter-label { font-size: 12px; font-weight: 600; color: #555; text-transform: uppercase; letter-spacing: 0.3px; }

/* ===== DROPDOWN (horizontal mode) ===== */
.tbs-filter-dropdown { position: relative; }
.tbs-filter-toggle { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: #fff; border: 1px solid #ccc; border-radius: 6px; font-size: 14px; font-weight: 500; color: #333; cursor: pointer; min-width: 160px; justify-content: space-between; }
.tbs-filter-toggle:hover { border-color: #2271b1; }
.tbs-filter-arrow { display: inline-block; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 5px solid #666; transition: transform 0.2s ease; margin-left: 6px; }
.tbs-filter-dropdown.tbs-open .tbs-filter-arrow { transform: rotate(180deg); }
.tbs-filter-dropdown-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px; background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 10px; box-shadow: 0 8px 30px rgba(0,0,0,0.12); z-index: 100; display: none; max-height: 300px; overflow-y: auto; }
.tbs-filter-dropdown.tbs-open .tbs-filter-dropdown-menu { display: block; }

/* ===== MODERN CHECKBOXES ===== */
.tbs-checkbox-list { display: flex; flex-direction: column; gap: 10px; }
.tbs-filter-checkbox { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: #333; user-select: none; position: relative; }
.tbs-filter-checkbox input { position: absolute; opacity: 0; width: 0; height: 0; }
.tbs-cb-box { display: inline-block; width: 20px; height: 20px; min-width: 20px; border: 2px solid #ccc; border-radius: 5px; background: #fff; position: relative; transition: all 0.2s ease; }
.tbs-filter-checkbox:hover .tbs-cb-box { border-color: #2271b1; }
.tbs-filter-checkbox input:checked + .tbs-cb-box { background: #2271b1; border-color: #2271b1; }
.tbs-filter-checkbox input:checked + .tbs-cb-box::after { content: ''; position: absolute; left: 5px; top: 1px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.tbs-cb-text { line-height: 1.3; }

/* ===== PRICE SLIDER ===== */
.tbs-price-slider { width: 100%; height: 6px; border-radius: 3px; background: #ddd; outline: none; -webkit-appearance: none; cursor: pointer; margin-top: 4px; }
.tbs-price-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #2271b1; cursor: pointer; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.2); }
.tbs-price-slider::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #2271b1; cursor: pointer; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.2); }
.tbs-price-currency { font-size: 14px; font-weight: 700; color: #2271b1; }

/* ===== CLEAR BUTTON ===== */
.tbs-filter-clear { padding: 10px 20px; border: none; border-radius: 6px; background: #2271b1; color: #fff; font-weight: 600; font-size: 13px; cursor: pointer; transition: background 0.2s ease; white-space: nowrap; }
.tbs-filter-clear:hover { background: #135e96; }

/* ===== PRODUCT FEED GRID ===== */
.tbs-feed-grid { display: grid; gap: 30px; transition: transform 0.35s ease, opacity 0.35s ease; }
.tbs-feed-grid.tbs-cols-1 { grid-template-columns: 1fr; }
.tbs-feed-grid.tbs-cols-2 { grid-template-columns: repeat(2, 1fr); }
.tbs-feed-grid.tbs-cols-3 { grid-template-columns: repeat(3, 1fr); }
.tbs-feed-grid.tbs-cols-4 { grid-template-columns: repeat(4, 1fr); }
.tbs-feed-grid.tbs-layout-list { grid-template-columns: 1fr; }
.tbs-feed-grid.tbs-layout-list .tbs-product-card { display: grid; grid-template-columns: 300px 1fr; align-items: start; }

/* Slider Animations */
.tbs-feed-grid.tbs-sliding-out { transform: translateX(-60px); opacity: 0; }
.tbs-feed-grid.tbs-sliding-in  { transform: translateX(60px); opacity: 0; }

.tbs-product-card { background: #ffffff; border-radius: 8px; overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; border: 1px solid #e0e0e0; }
.tbs-product-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.12); }
.tbs-product-card.tbs-filter-hidden { display: none !important; }

.tbs-product-image { position: relative; overflow: hidden; aspect-ratio: 16/9; }
.tbs-product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.tbs-product-card:hover .tbs-product-image img { transform: scale(1.05); }

.tbs-category-badge { position: absolute; top: 12px; left: 12px; background: #2271b1; color: #fff; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 600; text-transform: uppercase; z-index: 2; }
.tbs-category-badge.tbs-cat-digital { background: #00a32a; }
.tbs-category-badge.tbs-cat-bundle { background: #9b51e0; }

.tbs-product-title { margin: 0 0 10px 0; font-size: 18px; font-weight: 600; }
.tbs-product-title a { color: inherit; text-decoration: none; }

.tbs-product-price { font-size: 20px; font-weight: 700; }
.tbs-sale-price { font-size: 14px; text-decoration: line-through; margin-left: 8px; }

.tbs-product-btn { display: inline-block; padding: 12px 24px; border-radius: 4px; text-decoration: none; font-weight: 600; font-size: 14px; transition: background 0.2s ease; }

/* Pagination */
.tbs-pagination { text-align: center; margin-top: 40px; }
.tbs-pagination .page-numbers { display: inline-block; padding: 10px 18px; margin: 0 4px; background: #f0f0f1; color: #444; text-decoration: none; border-radius: 4px; font-weight: 500; transition: all 0.2s ease; cursor: pointer; border: none; }
.tbs-pagination .page-numbers:hover { background: #2271b1; color: #fff; }
.tbs-pagination .page-numbers.current { background: #2271b1; color: #fff; }

/* Single Product */
.tbs-single-image { margin-bottom: 30px; border-radius: 12px; overflow: hidden; }
.tbs-single-image img { width: 100%; display: block; }

.tbs-single-cat { display: inline-block; padding: 6px 16px; border-radius: 20px; font-size: 12px; font-weight: 600; text-transform: uppercase; margin-bottom: 15px; }
.tbs-single-cat.tbs-cat-course { background: #2271b1; color: #fff; }
.tbs-single-cat.tbs-cat-bundle { background: #9b51e0; color: #fff; }
.tbs-single-cat.tbs-cat-digital_download { background: #00a32a; color: #fff; }

.tbs-single-title { margin: 0 0 15px 0; font-size: 36px; font-weight: 700; }

.tbs-single-price-box { background: #f0f6fc; padding: 25px 30px; border-radius: 12px; margin-bottom: 30px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.tbs-single-price { font-size: 32px; font-weight: 700; }
.tbs-single-sale-price { font-size: 20px; text-decoration: line-through; margin-left: 12px; opacity: 0.6; }
.tbs-single-cta { display: inline-block; text-decoration: none; font-weight: 600; margin-left: auto; transition: background 0.2s ease; }
.tbs-single-cta:hover { opacity: 0.9; }

.tbs-single-desc { font-size: 16px; line-height: 1.7; }
.tbs-single-long-desc { margin-top: 30px; padding-top: 30px; border-top: 1px solid #eee; }

/* Bundle Includes */
.tbs-bundle-includes { margin: 30px 0; }
.tbs-bundle-section-title { font-size: 24px; font-weight: 700; margin-bottom: 20px; }
.tbs-bundle-items { display: grid; gap: 20px; }
.tbs-layout-grid .tbs-bundle-items { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.tbs-layout-grid.tbs-cols-2 .tbs-bundle-items { grid-template-columns: repeat(2, 1fr); }
.tbs-layout-grid.tbs-cols-3 .tbs-bundle-items { grid-template-columns: repeat(3, 1fr); }
.tbs-layout-grid.tbs-cols-4 .tbs-bundle-items { grid-template-columns: repeat(4, 1fr); }
.tbs-layout-list .tbs-bundle-items { grid-template-columns: 1fr; }
.tbs-layout-list .tbs-bundle-item { display: grid; grid-template-columns: 200px 1fr; align-items: start; }

.tbs-bundle-item { background: #fff; border-radius: 12px; overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; border: 1px solid #e8e8e8; display: flex; flex-direction: column; }
.tbs-bundle-item:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,0,0,0.10); }
.tbs-bundle-item-image { position: relative; overflow: hidden; aspect-ratio: 16/9; background: #f5f5f5; }
.tbs-bundle-item-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.tbs-bundle-item:hover .tbs-bundle-item-image img { transform: scale(1.05); }
.tbs-bundle-item-content { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tbs-bundle-item-title { margin: 0; font-size: 16px; font-weight: 600; }
.tbs-bundle-item-title a { color: #1a1a1a; text-decoration: none; }
.tbs-bundle-item-cta { display: inline-block; padding: 10px 20px; border-radius: 8px; text-align: center; text-decoration: none; font-weight: 600; font-size: 14px; margin-top: auto; transition: background 0.2s ease; }

/* Responsive */
@media (max-width: 1024px) {
    .tbs-feed-wrapper.tbs-layout-stacked { flex-direction: column; }
    .tbs-filter-sidebar { flex: 1 1 100% !important; max-width: 100% !important; }
    .tbs-feed-grid.tbs-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .tbs-filter-bar { flex-direction: column; align-items: stretch; }
    .tbs-filter-dropdown-menu { position: static; box-shadow: none; border: 1px solid #ddd; margin-top: 4px; }
}
@media (max-width: 768px) {
    .tbs-feed-grid.tbs-cols-2, .tbs-feed-grid.tbs-cols-3, .tbs-feed-grid.tbs-cols-4 { grid-template-columns: 1fr; }
    .tbs-feed-grid.tbs-layout-list .tbs-product-card { grid-template-columns: 1fr; }
    .tbs-single-title { font-size: 24px; }
    .tbs-single-price-box { flex-direction: column; align-items: flex-start; }
    .tbs-single-cta { width: 100%; text-align: center; margin-left: 0; }
    .tbs-layout-grid .tbs-bundle-items, .tbs-layout-grid.tbs-cols-2 .tbs-bundle-items, .tbs-layout-grid.tbs-cols-3 .tbs-bundle-items, .tbs-layout-grid.tbs-cols-4 .tbs-bundle-items { grid-template-columns: 1fr; }
    .tbs-layout-list .tbs-bundle-item { grid-template-columns: 1fr; }
}
