/* RajuBazar listings: hero, toolbar, filter sheet, product cards, infinite scroll. */
.woocommerce-archive-wrapper .inside-article { padding-top: var(--rb-gutter); }
.rb-hero { margin: 0 0 4px; padding: 18px 18px 16px; border-radius: 16px; background: var(--rb-accent-dark); color: #d1e7dd; }
.rb-hero .rb-crumbs, .rb-hero .rb-crumbs a { color: #a7d4bf; }
.rb-hero .rb-hero__title { color: #fff; }
.rb-hero .rb-hero__desc { color: #d1e7dd; }
.rb-hero .rb-more-btn { color: #fff; }
.rb-hero .rb-chip { background: transparent; border-color: rgba(255,255,255,.3); color: #fff; font-weight: 600; }
.rb-hero .rb-chip:hover { background: rgba(255,255,255,.12); color: #fff; }
@media (min-width: 768px) { .rb-hero { padding: 26px 28px 22px; } .rb-hero .rb-hero__title { font-size: 34px; } .rb-chips { flex-wrap: wrap; } }
.rb-crumbs { font-size: 13px; color: var(--rb-text-2); margin-bottom: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.rb-crumbs a { color: var(--rb-text-2); text-decoration: none; }
.rb-crumbs a:hover { color: var(--rb-accent-dark); }
.rb-hero__title { margin: 0 0 8px; font-size: 26px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.rb-hero__desc { max-height: 3.2em; overflow: hidden; color: var(--rb-text-2); font-size: 14px; line-height: 1.6; }
.rb-hero__desc.is-open { max-height: none; }
.rb-hero__desc p { margin: 0 0 .5em; }
.rb-more-btn { padding: 0 6px; border: 0; background: none; color: var(--rb-accent-dark); font-weight: 700; cursor: pointer; }
.rb-chips { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.rb-chips::-webkit-scrollbar { display: none; }
.rb-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid var(--rb-line); border-radius: 99px; background: #fff; color: var(--rb-text); font-size: 14px; text-decoration: none; white-space: nowrap; }
.rb-chip:hover { border-color: var(--rb-accent); color: var(--rb-accent-dark); }
.rb-chip--on { background: var(--rb-accent-soft); border-color: var(--rb-accent); color: var(--rb-accent-dark); }

.rb-bar { position: sticky; top: var(--rb-header-h, 0px); z-index: 10; display: flex; align-items: center; gap: 16px; margin: 0 0 10px; padding: 4px 0; border-bottom: 1px solid var(--rb-line); background: var(--rb-bg); }
.rb-bar__filter { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 4px 0 0; border: 0; background: none; color: var(--rb-text); font-size: 15px; font-weight: 700; cursor: pointer; }
.rb-bar__filter:hover { background: none; color: var(--rb-accent-dark); }
.rb-bar__filter .rb-icon { width: 20px; height: 20px; }
.rb-bar__n { min-width: 20px; height: 20px; border-radius: 99px; background: var(--rb-accent); color: #fff; font-size: 12px; line-height: 20px; text-align: center; }
.rb-bar__count { color: var(--rb-text-2); font-size: 14px; }
.rb-bar__sort { position: relative; display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--rb-text); }
.rb-bar__sortlabel { display: inline-flex; color: var(--rb-text); pointer-events: none; }
.rb-bar__sortlabel .rb-icon { width: 20px; height: 20px; }
.rb-bar__sort select { height: 44px; margin: 0; padding: 0 22px 0 0; border: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23222' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right center/16px no-repeat; color: var(--rb-text); font-size: 15px; font-weight: 700; line-height: 44px; cursor: pointer; -webkit-appearance: none; appearance: none; }
.rb-bar__sort select:focus-visible { outline: 2px solid var(--rb-accent); outline-offset: 2px; border-radius: 4px; }
.rb-active { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.rb-active__clear { font-size: 14px; color: var(--rb-text-2); }

.rb-sheet { width: 100%; max-width: 560px; max-height: 88dvh; margin: auto auto 0; padding: 0; border: 0; border-radius: 18px 18px 0 0; background: #fff; color: var(--rb-text); }
.rb-sheet::backdrop { background: rgba(0, 0, 0, .55); }
.rb-sheet[open] { animation: rb-up .22s ease; }
@keyframes rb-up { from { transform: translateY(40px); opacity: 0; } }
@media (min-width: 640px) { .rb-sheet { margin: auto; border-radius: 18px; max-height: 84vh; } }
.rb-sheet__form { display: flex; flex-direction: column; max-height: inherit; }
.rb-sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 12px 6px 18px; font-size: 19px; font-weight: 800; touch-action: none; }
.rb-sheet__head::before { content: ""; position: absolute; top: 7px; left: 50%; width: 44px; height: 5px; margin-left: -22px; border-radius: 5px; background: #cfcfd6; }
@media (min-width: 640px) { .rb-sheet__head::before { display: none; } }
.rb-sheet__body { flex: 1; overflow-y: auto; padding: 0 18px 8px; }
.rb-sheet__foot { display: flex; gap: 10px; padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rb-line); }
.rb-sheet__reset { flex: 1; display: flex; align-items: center; justify-content: center; padding: 14px; border: 1px solid var(--rb-line); border-radius: 12px; color: var(--rb-text); font-weight: 700; text-decoration: none; }
.rb-sheet__reset:hover { background: var(--rb-bg-2); color: var(--rb-text); }
.rb-sheet__foot .rb-pill { flex: 2; justify-content: center; padding: 14px; border: 0; border-radius: 12px; font-size: 16px; cursor: pointer; }
.rb-fs { margin: 0; padding: 12px 0 14px; border: 0; border-bottom: 1px solid var(--rb-bg-3); }
.rb-fs:last-child { border-bottom: 0; }
.rb-fs legend { display: block; width: 100%; padding: 0; margin: 0 0 10px; font-weight: 700; }
.rb-fs legend small { font-weight: 500; color: var(--rb-text-2); }
.rb-fs legend + * { clear: both; }
.rb-opt { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; font-size: 15px; }
.rb-opt input { width: 18px; height: 18px; accent-color: var(--rb-accent); }
.rb-opts { display: flex; flex-wrap: wrap; gap: 8px; clear: both; }
.rb-opt--chip { padding: 0; }
.rb-opt--chip input { position: absolute; opacity: 0; pointer-events: none; }
.rb-opt--chip span { display: inline-block; min-width: 44px; padding: 9px 14px; border: 1.5px solid var(--rb-line); border-radius: 10px; font-size: 14px; font-weight: 600; text-align: center; }
.rb-opt--chip small { color: var(--rb-text-2); }
.rb-opt--chip input:checked + span { border-color: var(--rb-accent); background: var(--rb-accent-soft); color: var(--rb-accent-dark); font-weight: 600; }
.rb-opt--chip input:focus-visible + span { outline: 2px solid var(--rb-accent); outline-offset: 2px; }

/* Grid + cards */
.rb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 24px; padding: 0; list-style: none; }
@media (min-width: 640px) { .rb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1024px) { .rb-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
.rb-card { display: flex; flex-direction: column; min-width: 0; margin: 0 !important; border: 1px solid var(--rb-line); border-radius: var(--rb-radius); background: #fff; overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.rb-card:hover { border-color: #d4d4d8; box-shadow: var(--rb-shadow); }
.rb-card__img { position: relative; display: block; aspect-ratio: 1; background: var(--rb-bg-2); overflow: hidden; }
.rb-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.rb-card:hover .rb-card__img img { transform: scale(1.03); }
.rb-badge { position: absolute; top: 8px; left: 8px; padding: 3px 8px; border-radius: 6px; background: var(--rb-sale); color: #fff; font-size: 12px; font-weight: 700; }
.rb-badge--oos { top: auto; bottom: 8px; background: rgba(0, 0, 0, .7); }
.is-oos .rb-card__img img { opacity: .55; }
.rb-card__body { display: flex; flex-direction: column; flex: 1; gap: 6px; padding: 10px; }
.rb-card__title { margin: 0; font-size: 14px; font-weight: 500; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.rb-card__title a { color: var(--rb-text); text-decoration: none; }
.rb-card__title a:hover { color: var(--rb-accent-dark); }
.rb-stars { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--rb-text-2); }
.rb-stars span { position: relative; display: inline-block; width: 70px; height: 13px; background: linear-gradient(90deg, #f59e0b var(--r), #d4d4d8 var(--r)); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 70 13'%3E%3Cg%3E%3Cpath id='s' d='M6.5 0l1.9 4.2 4.6.5-3.4 3.1 1 4.5-4.1-2.4-4.1 2.4 1-4.5L0 4.7l4.6-.5z'/%3E%3Cuse href='%23s' x='14'/%3E%3Cuse href='%23s' x='28'/%3E%3Cuse href='%23s' x='42'/%3E%3Cuse href='%23s' x='56'/%3E%3C/g%3E%3C/svg%3E") no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 70 13'%3E%3Cg%3E%3Cpath id='s' d='M6.5 0l1.9 4.2 4.6.5-3.4 3.1 1 4.5-4.1-2.4-4.1 2.4 1-4.5L0 4.7l4.6-.5z'/%3E%3Cuse href='%23s' x='14'/%3E%3Cuse href='%23s' x='28'/%3E%3Cuse href='%23s' x='42'/%3E%3Cuse href='%23s' x='56'/%3E%3C/g%3E%3C/svg%3E") no-repeat; }
.rb-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; line-height: 1.2; }
.rb-price ins { text-decoration: none; font-size: 17px; font-weight: 800; color: var(--rb-accent-dark); }
.rb-price del { font-size: 13px; color: var(--rb-text-2); }
.rb-price small { font-size: 12px; color: var(--rb-text-2); }
.rb-opts-card { display: flex; flex-wrap: wrap; gap: 4px; }
.rb-optbtn { min-width: 36px; min-height: 30px; padding: 5px 8px; border: 1px solid var(--rb-line); border-radius: 6px; background: #fff; color: var(--rb-text); font-size: 12px; line-height: 1.2; cursor: pointer; }
.rb-optbtn:hover { border-color: var(--rb-accent); background: #fff; color: var(--rb-text); }
.rb-optbtn[aria-pressed=true] { border-color: var(--rb-accent); background: var(--rb-accent); color: #fff; }
.rb-optbtn:disabled { opacity: .4; text-decoration: line-through; cursor: not-allowed; }
.rb-card__msg { margin: 0; min-height: 16px; font-size: 12px; line-height: 16px; color: var(--rb-text-2); }
.rb-card__msg[hidden] { display: block; visibility: hidden; }
.rb-card__msg.is-low { color: var(--rb-sale); }
.rb-opts-card.is-hint .rb-optbtn { animation: rb-hint .9s ease; }
@keyframes rb-hint { 0%, 100% { border-color: var(--rb-line); box-shadow: none; } 30%, 70% { border-color: var(--rb-accent); box-shadow: 0 0 0 3px var(--rb-accent-soft); } }
.rb-card__actions { display: grid; grid-template-columns: auto 1fr; gap: 6px; margin-top: auto; padding-top: 4px; }
.rb-card__actions > :only-child { grid-column: 1 / -1; }
.rb-cbtn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 38px; padding: 6px 10px; border: 1px solid var(--rb-accent); border-radius: 8px; background: var(--rb-accent); color: #fff; font-size: 14px; font-weight: 700; line-height: 1.1; text-align: center; text-decoration: none; cursor: pointer; }
.rb-cbtn:hover { background: #3a9f33; border-color: #3a9f33; color: #fff; }
.rb-cbtn--ghost { background: #fff; color: var(--rb-accent-dark); }
.rb-cbtn--ghost:hover { background: var(--rb-accent-soft); color: var(--rb-accent-dark); }
.rb-cbtn .rb-icon { width: 18px; height: 18px; }
@media (max-width: 479px) { .rb-cbtn--ghost span { display: none; } .rb-card__body { padding: 8px; } .rb-price ins { font-size: 16px; } }
.is-shake { animation: rb-shake .35s; }
@keyframes rb-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* Pagination + infinite scroll */
.woocommerce-pagination { text-align: center; margin: 8px 0 32px; }
.woocommerce-pagination ul { display: inline-flex; gap: 6px; margin: 0; padding: 0; list-style: none; border: 0; }
.woocommerce-pagination a, .woocommerce-pagination span { display: grid; place-items: center; min-width: 40px; height: 40px; border: 1px solid var(--rb-line); border-radius: 8px; text-decoration: none; color: var(--rb-text); }
.woocommerce-pagination .current { background: var(--rb-accent); border-color: var(--rb-accent); color: #fff; }
.rb-inf .woocommerce-pagination { display: none; }
.rb-loader { min-height: 40px; margin: 0 0 32px; color: var(--rb-text-2); font-size: 14px; text-align: center; }
.rb-loader.is-busy::before { content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 8px; vertical-align: -3px; border: 2px solid var(--rb-line); border-top-color: var(--rb-accent); border-radius: 50%; animation: rb-spin .7s linear infinite; }
@keyframes rb-spin { to { transform: rotate(360deg); } }
.woocommerce-info { padding: 16px; border-radius: var(--rb-radius); background: var(--rb-bg-2); }
@media (max-width: 767px) { .rb-hero__title { font-size: 22px; } .rb-bar__count { display: none; } .woocommerce-archive-wrapper .inside-article { padding-top: var(--rb-gutter); } .rb-opts-card { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -2px; padding: 2px; } .rb-opts-card::-webkit-scrollbar { display: none; } .rb-optbtn { flex: none; } }
.rb-store { display: flex; align-items: center; gap: 16px; }
.rb-store__logo { flex: none; display: grid; place-items: center; width: 72px; height: 72px; padding: 8px; border-radius: 14px; background: #fff; }
.rb-store__logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.rb-hero--store .rb-hero__desc { max-height: none; margin: 0; }
