/* ============================================================
   SHOP / ARCHIVE — list view + sticky sidebar
   ============================================================ */
.ds-archive-page { background: #f8f9fa; min-height: 60vh; padding-bottom: 48px; }
.ds-archive-wrap { max-width: 1920px; margin: 0 auto; padding: 0 20px; }

/* TOPBAR */
.ds-archive-topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; flex-wrap: wrap; gap: 12px; border-bottom: 1px solid #e5e5e5; margin-bottom: 18px; }
.ds-archive-topbar__left { display: flex; align-items: baseline; gap: 10px; }
.ds-archive-title { font-size: 22px; font-weight: 700; color: #111; margin: 0; }
.ds-archive-count { font-size: 13px; color: #767676; }
.ds-archive-topbar .woocommerce-ordering select { height: 38px; border: 1px solid #ddd; border-radius: 4px; padding: 0 30px 0 12px; font-size: 13px; font-family: 'Inter', sans-serif; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 10px center; -webkit-appearance: none; }

/* LAYOUT */
.ds-archive-layout {
    display: grid !important;
    grid-template-columns: 260px 1fr !important;
    gap: 20px !important;
    align-items: start !important;
}

/* SIDEBAR */
.ds-archive-sidebar {
    position: sticky !important;
    top: 88px !important;
    max-height: calc(100vh - 108px) !important;
    overflow-y: auto !important;
    scrollbar-width: thin !important;
    scrollbar-color: #ddd #f5f5f5 !important;
}
.ds-archive-sidebar::-webkit-scrollbar { width: 3px; }
.ds-archive-sidebar::-webkit-scrollbar-thumb { background: #ddd; }

.ds-archive-sidebar__inner { background: #fff; border: 1px solid #e5e5e5; border-radius: 8px; padding: 14px; }
.ds-filter-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid #f0f0f0; margin-bottom: 4px; }
.ds-filter-header__title { font-size: 14px; font-weight: 700; color: #111; }
.ds-filter-clear { font-size: 12px; color: #767676; background: none; border: none; cursor: pointer; text-decoration: underline; padding: 0; font-family: 'Inter', sans-serif; }
.ds-filter-clear:hover { color: #F65F0A; }
.ds-filter-group { border-bottom: 1px solid #f0f0f0; padding: 8px 0; }
.ds-filter-group:last-child { border-bottom: none; }
.ds-filter-group__title { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 600; color: #222; cursor: pointer; padding: 4px 0; user-select: none; }
.ds-filter-group__title.is-collapsed svg { transform: rotate(-90deg); }
.ds-filter-group__title svg { transition: transform .2s; }
.ds-filter-group__body { margin-top: 8px; }
.ds-filter-cats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.ds-filter-cats li a { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: #333; text-decoration: none; padding: 4px 6px; border-radius: 4px; transition: background .1s, color .1s; }
.ds-filter-cats li a:hover, .ds-filter-cats li.is-active a { background: #fff3ea; color: #F65F0A; }
.ds-filter-cats__count { font-size: 11px; color: #999; background: #f0f0f0; padding: 1px 5px; border-radius: 8px; }
.ds-filter-checkbox { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #333; cursor: pointer; padding: 4px 0; }
.ds-filter-checkbox input[type="checkbox"] { width: 16px; height: 16px; accent-color: #F65F0A; cursor: pointer; }
/* Price filter */
.ds-filter-group__body .widget_price_filter .price_slider_wrapper { margin: 10px 0 0; }
.ds-filter-group__body .widget_price_filter .price_slider_amount { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #555; margin-top: 6px; }
.ds-filter-group__body .widget_price_filter .price_slider_amount .button { background: #F65F0A; color: #fff; border: none; padding: 5px 12px; border-radius: 4px; font-size: 12px; font-weight: 600; cursor: pointer; }
.ds-filter-group__body .ui-slider { height: 4px; background: #e0e0e0; border-radius: 2px; margin: 10px 4px; position: relative; }
.ds-filter-group__body .ui-slider-range { background: #F65F0A; position: absolute; height: 100%; }
.ds-filter-group__body .ui-slider-handle { width: 16px; height: 16px; border-radius: 50%; background: #F65F0A; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); top: -6px; cursor: pointer; position: absolute; margin-left: -8px; }
.ds-filter-apply { display: none; width: 100%; background: #F65F0A; color: #fff; border: none; padding: 11px; border-radius: 4px; font-size: 14px; font-weight: 700; cursor: pointer; margin-top: 8px; font-family: 'Inter', sans-serif; }
.ds-filter-apply--mobile { display: none; }

/* ── PRODUCTS — LIST VIEW ── */
.ds-archive-products {
    min-width: 0; /* WAŻNE: zapobiega overflow i "ogromnym produktom" */
}

.ds-products-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

/* Product row — like Allegro list */
.ds-product-row {
    display: grid !important;
    grid-template-columns: 200px 1fr auto !important;
    gap: 16px !important;
    background: #fff !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    transition: border-color .15s, box-shadow .15s !important;
    align-items: center !important;
    padding: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
.ds-product-row:hover { border-color: #ccc; box-shadow: 0 2px 10px rgba(0,0,0,.07); }

/* Image */
.ds-product-row__img {
    position: relative;
    display: block;
    width: 172px !important;
    height: 172px !important;
    flex-shrink: 0;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
    background: #fafafa;
}
.ds-product-row__img img { width: 100% !important; height: 100% !important; object-fit: contain !important; padding: 8px !important; display: block !important; }
.ds-product-row__badge { position: absolute; top: 6px; left: 0; background: #00813a; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 0 3px 3px 0; z-index: 2; }

/* Info */
.ds-product-row__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ds-product-row__title { font-size: 16px; font-weight: 600; color: #111; text-decoration: none; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ds-product-row__title:hover { color: #F65F0A; }
.ds-product-row__desc { font-size: 13px; color: #767676; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ds-product-row__attrs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.ds-product-row__attrs li { font-size: 12px; color: #555; }
.ds-product-row__attrs li span { color: #999; }
.ds-product-row__delivery { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #555; margin-top: 4px; }
.ds-product-row__delivery strong { color: #00813a; font-weight: 600; }

/* Buy */
.ds-product-row__buy { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; min-width: 160px; flex-shrink: 0; }
.ds-product-row__price { text-align: right; }
.ds-product-row__price-sale { display: block; font-size: 22px; font-weight: 800; color: #111; white-space: nowrap; }
.ds-product-row__price-sale .woocommerce-Price-amount { font-size: 22px !important; color: #111 !important; font-weight: 800 !important; }
.ds-product-row__price-reg { display: block; font-size: 12px; color: #999; text-decoration: line-through; }
.ds-product-row__btn { display: block; width: 100%; padding: 10px 16px; background: #F65F0A; color: #fff !important; border: none; border-radius: 4px; font-size: 13px; font-weight: 700; text-align: center; text-decoration: none !important; cursor: pointer; transition: background .15s; white-space: nowrap; }
.ds-product-row__btn:hover { background: #d4530a !important; color: #fff !important; }
.ds-product-row__btn--out { background: #f0f0f0; color: #555 !important; }
.ds-product-row__btn--out:hover { background: #e5e5e5 !important; color: #333 !important; }
.ds-product-row__details { font-size: 12px; color: #767676; text-decoration: none; text-align: right; }
.ds-product-row__details:hover { color: #F65F0A; }

/* Pagination */
.ds-archive-products .woocommerce-pagination { margin-top: 20px; }
.ds-archive-products .woocommerce-pagination ul { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; justify-content: center; }
.ds-archive-products .woocommerce-pagination ul li a,
.ds-archive-products .woocommerce-pagination ul li span { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; color: #333; text-decoration: none; transition: all .15s; }
.ds-archive-products .woocommerce-pagination ul li a:hover,
.ds-archive-products .woocommerce-pagination ul li span.current { background: #F65F0A; border-color: #F65F0A; color: #fff; }

/* Empty */
.ds-archive-empty { text-align: center; padding: 48px 20px; background: #fff; border-radius: 8px; border: 1px solid #e5e5e5; }
.ds-archive-empty p { font-size: 15px; color: #767676; margin: 12px 0 20px; }
.ds-btn-empty { display: inline-block; background: #F65F0A; color: #fff; padding: 10px 24px; border-radius: 4px; font-weight: 700; text-decoration: none; }

/* Mobile filter button */
.ds-filter-mobile-btn { display: none; position: fixed; bottom: 20px; right: 20px; z-index: 500; background: #F65F0A; color: #fff; border: none; border-radius: 24px; padding: 12px 18px; font-size: 14px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 12px rgba(255,90,0,.3); font-family: 'Inter', sans-serif; align-items: center; gap: 8px; }

/* RESPONSIVE */
@media (max-width: 1100px) {
    .ds-archive-layout { grid-template-columns: 220px 1fr !important; }
    .ds-product-row { grid-template-columns: 160px 1fr auto !important; }
    .ds-product-row__img { width: 136px !important; height: 136px !important; }
}
@media (max-width: 767px) {
    .ds-archive-layout { grid-template-columns: 1fr !important; }
    .ds-archive-sidebar { position: static !important; max-height: none !important; overflow: visible !important; display: none; }
    .ds-archive-sidebar.is-open { display: block !important; }
    .ds-filter-apply--mobile { display: block !important; }
    .ds-filter-mobile-btn { display: flex !important; }
    .ds-product-row { grid-template-columns: 120px 1fr !important; padding: 10px !important; }
    .ds-product-row__img { width: 100px !important; height: 100px !important; }
    .ds-product-row__buy { display: none; } /* ukryj buy na mobile, klik na cały rząd */
    .ds-product-row { cursor: pointer; } /* cały rząd klikalny na mobile */
    .ds-product-row__title { font-size: 14px; }
    .ds-product-row__price-sale { font-size: 16px !important; display: block; }
}
