/* BidBuy Listings — Frontend Styles v1.0.0 */

/* ── Form Base ── */
.bidbuy-form { max-width: 800px; margin: 0 auto; }
.bidbuy-form__section { background: #fff; border-radius: 8px; padding: 24px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.bidbuy-form__section-title { font-size: 18px; font-weight: 600; margin: 0 0 20px; padding-bottom: 12px; border-bottom: 2px solid #4CAF50; color: #1a1a2e; }
.bidbuy-form__field { margin-bottom: 16px; }
.bidbuy-form__field label { display: block; font-weight: 600; margin-bottom: 6px; color: #333; font-size: 14px; }
.bidbuy-form__field .required { color: #dc3545; }
.bidbuy-form__field input[type="text"],
.bidbuy-form__field input[type="number"],
.bidbuy-form__field input[type="url"],
.bidbuy-form__field input[type="datetime-local"],
.bidbuy-form__field textarea,
.bidbuy-form__field select { width: 100%; padding: 10px 14px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; transition: border-color 0.2s; }
.bidbuy-form__field input:focus, .bidbuy-form__field textarea:focus, .bidbuy-form__field select:focus { border-color: #4CAF50; outline: none; box-shadow: 0 0 0 3px rgba(76,175,80,0.1); }
.bidbuy-form__row { display: flex; gap: 16px; }
.bidbuy-form__row--wrap { flex-wrap: wrap; }
.bidbuy-form__field--half { flex: 1; min-width: 200px; }

/* ── Input Group ── */
.bidbuy-input-group { display: flex; align-items: stretch; }
.bidbuy-input-group__prefix { background: #f0f0f0; border: 1px solid #ddd; border-right: 0; border-radius: 6px 0 0 6px; padding: 10px 14px; font-weight: 600; color: #666; display: flex; align-items: center; }
.bidbuy-input-group input { border-radius: 0 6px 6px 0; }

/* ── Listing Type Cards ── */
.bidbuy-listing-types { display: flex; gap: 12px; flex-wrap: wrap; }
.bidbuy-listing-type { cursor: pointer; flex: 1; min-width: 140px; }
.bidbuy-listing-type input { display: none; }
.bidbuy-listing-type__card { border: 2px solid #e0e0e0; border-radius: 8px; padding: 16px; text-align: center; transition: all 0.2s; }
.bidbuy-listing-type__card:hover { border-color: #4CAF50; }
.bidbuy-listing-type input:checked + .bidbuy-listing-type__card { border-color: #4CAF50; background: #f1f8e9; }
.bidbuy-listing-type__icon { font-size: 28px; display: block; margin-bottom: 8px; color: #4CAF50; }
.bidbuy-listing-type__card strong { display: block; font-size: 15px; }
.bidbuy-listing-type__card small { color: #666; font-size: 12px; }

/* ── Photo Upload ── */
.bidbuy-photos__preview { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.bidbuy-photo-thumb { position: relative; width: 100px; height: 100px; border-radius: 6px; overflow: hidden; border: 1px solid #ddd; }
.bidbuy-photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bidbuy-photo-remove { position: absolute; top: 2px; right: 2px; background: rgba(220,53,69,0.9); color: #fff; border: 0; border-radius: 50%; width: 22px; height: 22px; cursor: pointer; font-size: 14px; line-height: 20px; text-align: center; }

/* ── Buttons ── */
.bidbuy-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border: none; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s; text-decoration: none; }
.bidbuy-btn--primary { background: #1B5E20; color: #fff; }
.bidbuy-btn--primary:hover { background: #2E7D32; color: #fff; }
.bidbuy-btn--secondary { background: #f0f0f0; color: #333; }
.bidbuy-btn--secondary:hover { background: #e0e0e0; }
.bidbuy-btn--link { background: none; color: #4CAF50; padding: 0; }
.bidbuy-btn--lg { padding: 14px 28px; font-size: 16px; }
.bidbuy-btn--full { width: 100%; justify-content: center; }

/* ── Form Actions ── */
.bidbuy-form__actions { text-align: center; padding: 20px 0; }
.bidbuy-form__disclaimer { font-size: 12px; color: #999; margin-top: 12px; }

/* ── Notices ── */
.bidbuy-notice { padding: 16px 20px; border-radius: 8px; margin-bottom: 20px; }
.bidbuy-notice--success { background: #d4edda; border: 1px solid #c3e6cb; color: #155724; }
.bidbuy-notice--error { background: #f8d7da; border: 1px solid #f5c6cb; color: #721c24; }
.bidbuy-notice--warning { background: #fff3cd; border: 1px solid #ffeeba; color: #856404; }
.bidbuy-notice--info { background: #d1ecf1; border: 1px solid #bee5eb; color: #0c5460; }

/* ── Listings Counter ── */
.bidbuy-listings-counter { background: #e8f5e9; padding: 10px 16px; border-radius: 6px; font-size: 13px; color: #2E7D32; font-weight: 500; margin-bottom: 20px; }

/* ── Browse Page ── */
.bidbuy-browse-wrapper { display: flex; gap: 24px; max-width: 1200px; margin: 0 auto; }

/* Filters sidebar */
.bidbuy-filters { width: 280px; flex-shrink: 0; }
.bidbuy-filters__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.bidbuy-filters__header h3 { margin: 0; font-size: 18px; }
.bidbuy-filter-group { margin-bottom: 16px; }
.bidbuy-filter-group label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: #333; }
.bidbuy-filter-group select, .bidbuy-filter-search { width: 100%; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; }
.bidbuy-price-range { display: flex; align-items: center; gap: 8px; }
.bidbuy-price-range input { width: 45%; padding: 8px; border: 1px solid #ddd; border-radius: 6px; }
.bidbuy-price-range__sep { color: #999; }

/* Products grid */
.bidbuy-products { flex: 1; min-width: 0; }
.bidbuy-products__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.bidbuy-products__count { color: #666; font-size: 14px; margin: 0; }
.bidbuy-products__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }

/* Product card */
.bidbuy-product-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.06); transition: transform 0.2s, box-shadow 0.2s; }
.bidbuy-product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
.bidbuy-product-card__link { text-decoration: none; color: inherit; display: block; }
.bidbuy-product-card__image { position: relative; padding-top: 75%; overflow: hidden; background: #f5f5f5; }
.bidbuy-product-card__image img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.bidbuy-product-card__no-image { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #ccc; }
.bidbuy-product-card__no-image .dashicons { font-size: 48px; width: 48px; height: 48px; }
.bidbuy-product-card__badge { position: absolute; top: 10px; left: 10px; }
.bidbuy-product-card__condition { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,0.7); color: #fff; padding: 3px 8px; border-radius: 4px; font-size: 11px; }
.bidbuy-product-card__info { padding: 14px; }
.bidbuy-product-card__title { font-size: 15px; font-weight: 600; margin: 0 0 6px; color: #1a1a2e; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bidbuy-product-card__price { font-size: 18px; font-weight: 700; color: #1B5E20; margin-bottom: 6px; }
.bidbuy-product-card__location { font-size: 13px; color: #666; margin-bottom: 4px; }
.bidbuy-product-card__meta { font-size: 12px; color: #999; }

/* Pagination */
.bidbuy-products__pagination { display: flex; gap: 6px; justify-content: center; margin-top: 24px; }
.bidbuy-page-link { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid #ddd; border-radius: 6px; text-decoration: none; color: #333; font-size: 14px; transition: all 0.2s; }
.bidbuy-page-link:hover, .bidbuy-page-link.active { background: #1B5E20; color: #fff; border-color: #1B5E20; }

/* Loading */
.bidbuy-loading { text-align: center; padding: 40px; color: #999; }
.bidbuy-no-results { text-align: center; padding: 60px 20px; color: #666; }

/* Filters toggle (mobile) */
.bidbuy-filters-toggle { display: none; }

/* ── Single Product Enhancements ── */
.bidbuy-product-location { font-size: 14px; color: #666; margin-bottom: 8px; }
.bidbuy-product-location .dashicons { font-size: 16px; width: 16px; height: 16px; vertical-align: text-bottom; color: #4CAF50; }
.bidbuy-product-condition { font-size: 14px; margin-bottom: 12px; }
.bidbuy-exchange-info { background: #FFF8E1; border-radius: 6px; padding: 14px; margin: 12px 0; }
.bidbuy-exchange-info h4 { margin: 0 0 6px; font-size: 14px; color: #F57F17; }
.bidbuy-contact-actions { margin: 16px 0; display: flex; gap: 10px; flex-wrap: wrap; }
.bidbuy-seller-card { display: flex; gap: 12px; align-items: center; padding: 12px; background: #f8f9fa; border-radius: 8px; margin: 16px 0; }
.bidbuy-seller-card__avatar { width: 48px; height: 48px; border-radius: 50%; }
.bidbuy-seller-card__info small { color: #666; }
.bidbuy-badge--brand { background: #1565C0; color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 3px; vertical-align: middle; }
.bidbuy-attributes { margin: 16px 0; }
.bidbuy-attributes h4 { margin: 0 0 8px; font-size: 15px; }
.bidbuy-attributes__list { list-style: none; padding: 0; margin: 0; columns: 2; }
.bidbuy-attributes__list li { padding: 4px 0; font-size: 13px; break-inside: avoid; }
.bidbuy-product-video { margin: 20px 0; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .bidbuy-browse-wrapper { flex-direction: column; }
    .bidbuy-filters { width: 100%; display: none; margin-bottom: 16px; }
    .bidbuy-filters--open { display: block; }
    .bidbuy-filters-toggle { display: inline-flex; }
    .bidbuy-form__row { flex-direction: column; gap: 0; }
    .bidbuy-listing-types { flex-direction: column; }
    .bidbuy-products__grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
    .bidbuy-contact-actions { flex-direction: column; }
    .bidbuy-attributes__list { columns: 1; }
}

/* ── Skeleton Loader (Browse Page) ── */
.bidbuy-product-card--skeleton { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.bidbuy-skeleton__image { padding-top: 75%; background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%); background-size: 200% 100%; animation: bidbuy-shimmer 1.2s ease-in-out infinite; }
.bidbuy-skeleton__body { padding: 14px; }
.bidbuy-skeleton__line { border-radius: 4px; background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%); background-size: 200% 100%; animation: bidbuy-shimmer 1.2s ease-in-out infinite; margin-bottom: 8px; }
.bidbuy-skeleton__line--title { height: 16px; width: 80%; }
.bidbuy-skeleton__line--price { height: 20px; width: 40%; }
.bidbuy-skeleton__line--meta { height: 12px; width: 60%; margin-bottom: 0; }
@keyframes bidbuy-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
