/* Beeiles catalogue desktop proof-of-concept. Only WooCommerce shop/category/tag archives.
   Preserves existing sidebar, controls, search, checkout and all prices. */
@media (min-width: 992px) {
  body.post-type-archive-product ul.products,
  body.tax-product_cat ul.products,
  body.tax-product_tag ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 18px !important;
    margin: 22px 0 30px !important;
    padding: 0 !important;
    list-style: none !important;
    align-items: stretch !important;
  }
  body.post-type-archive-product ul.products::before,
  body.post-type-archive-product ul.products::after,
  body.tax-product_cat ul.products::before,
  body.tax-product_cat ul.products::after,
  body.tax-product_tag ul.products::before,
  body.tax-product_tag ul.products::after {
    content: none !important;
    display: none !important;
  }
  body.post-type-archive-product ul.products > li.product,
  body.tax-product_cat ul.products > li.product,
  body.tax-product_tag ul.products > li.product {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 14px !important;
    float: none !important;
    clear: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    text-align: center !important;
    position: relative !important;
    background: #fff !important;
    border: 1px solid #e0e7f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 10px rgba(30, 55, 90, 0.045) !important;
    transition: box-shadow .18s ease, border-color .18s ease;
  }
  body.post-type-archive-product ul.products > li.product:hover,
  body.tax-product_cat ul.products > li.product:hover,
  body.tax-product_tag ul.products > li.product:hover {
    border-color: #c9d7e8 !important;
    box-shadow: 0 8px 22px rgba(30, 55, 90, 0.11) !important;
  }
  body.post-type-archive-product ul.products li.product img,
  body.tax-product_cat ul.products li.product img,
  body.tax-product_tag ul.products li.product img {
    width: 100% !important;
    height: 170px !important;
    max-height: 170px !important;
    object-fit: contain !important;
    margin: 3px auto 12px !important;
    display: block;
  }
  body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title,
  body.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
  body.tax-product_tag ul.products li.product .woocommerce-loop-product__title {
    box-sizing: border-box;
    font-size: 14px !important;
    line-height: 1.45 !important;
    font-weight: 600 !important;
    min-height: 81px !important;
    max-height: 81px !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 4 !important;
    -webkit-box-orient: vertical !important;
    overflow-wrap: anywhere;
  }
  body.post-type-archive-product ul.products > li.product .price,
  body.tax-product_cat ul.products > li.product .price,
  body.tax-product_tag ul.products > li.product .price {
    font-size: 17px !important;
    font-weight: 750 !important;
    line-height: 1.35 !important;
    margin: 10px 0 8px !important;
  }
  body.post-type-archive-product ul.products > li.product > a.button,
  body.tax-product_cat ul.products > li.product > a.button,
  body.tax-product_tag ul.products > li.product > a.button {
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    width: 100%;
    margin: auto 0 0 !important;
    border-radius: 8px !important;
    white-space: normal;
    text-align: center;
  }
  /* All inner product content must be able to wrap instead of widening its grid track. */
  body.post-type-archive-product ul.products > li.product *,
  body.tax-product_cat ul.products > li.product *,
  body.tax-product_tag ul.products > li.product * { min-width: 0; }
}



/* Beeiles v0.4.0 — price, brand, stock and categories together in left sidebar.
   Existing WooCommerce and custom forms are only moved, not altered. */
@media (min-width: 992px) {
  .beeiles-side-controls { width:100%; box-sizing:border-box; margin:12px 0 20px; }
  .beeiles-side-controls * { box-sizing:border-box; }
  .beeiles-side-controls .final-wc-filter-bar.beeiles-sidebar-filter-bar {
    display:block !important; width:100% !important;
    padding:14px !important; margin:0 0 12px !important;
    background:#fff; border:1px solid #e1e7f0; border-radius:10px;
    float:none !important; clear:none !important;
  }
  .beeiles-side-controls .final-wc-filter-bar > form.final-wc-filters {
    display:flex !important; flex-direction:column !important; align-items:stretch !important;
    width:100% !important; gap:13px !important; margin:0 !important;
    padding:0 !important; float:none !important;
  }
  .beeiles-side-controls .final-wc-filter-field {
    width:100% !important; min-width:0 !important; display:flex !important;
    flex-direction:column !important; gap:5px !important;
  }
  .beeiles-side-controls .final-wc-filter-field label {
    display:block; color:#334155; font-size:13px !important; font-weight:650;
  }
  .beeiles-side-controls .final-brand-wrapper { width:100% !important; max-width:none !important; }
  .beeiles-side-controls .final-wc-brand-search,
  .beeiles-side-controls .final-wc-filter-field select {
    width:100% !important; min-width:0 !important; max-width:100% !important;
    min-height:40px !important; height:40px !important;
    padding:8px 10px !important; font-size:13px !important;
    background-color:#fff !important; border:1px solid #cbd5e1 !important;
    border-radius:6px !important;
  }
  .beeiles-side-controls .final-brand-results,
  .beeiles-side-controls .final-wc-brand-results { max-width:100%; }
  .beeiles-side-categories {
    border:1px solid #e1e7f0; border-radius:10px; background:#fff;
    margin:0 0 14px; overflow:visible;
  }
  .beeiles-side-categories-title {
    padding:13px 14px; cursor:pointer; font-weight:700; color:#24344b;
    display:list-item; font-size:15px;
  }
  .beeiles-side-categories-title > small {
    float:right; font-size:11px; font-weight:650; color:#64748b;
    background:#f1f5fa; border-radius:12px; padding:2px 7px; margin-left:8px;
  }
  .beeiles-side-categories[open] .beeiles-side-categories-title {border-bottom:1px solid #edf1f5;}
  .beeiles-side-categories-content {padding:12px 12px 14px;}
  .beeiles-side-categories .beeiles-back {margin:0 0 10px !important;}
  .beeiles-side-categories .beeiles-back a {
    display:block; padding:8px 10px; text-align:left;
    color:#0759a5; background:#edf6ff; font-size:12px; border-radius:6px;
  }
  body .beeiles-side-categories ul.beeiles-context-menu {
    display:flex !important; flex-direction:column !important;
    flex-wrap:nowrap !important; align-items:stretch !important;
    width:100% !important; gap:3px !important;
    margin:0 !important; padding:0 !important; list-style:none !important;
    overflow:visible !important;
  }
  body .beeiles-side-categories .beeiles-context-menu > li {
    display:block !important; width:100% !important;
    margin:0 !important; padding:0 !important; min-width:0;
  }
  body .beeiles-side-categories .beeiles-context-menu > li[hidden] {display:none !important;}
  body .beeiles-side-categories .beeiles-context-menu a {
    display:block; width:100%; white-space:normal; overflow-wrap:anywhere;
    background:transparent !important; border:0 !important;
    padding:8px 9px !important; border-radius:6px !important;
    color:#334155; font-size:13px; line-height:1.35; text-decoration:none;
  }
  body .beeiles-side-categories .beeiles-context-menu a:hover {
    background:#edf6ff !important; color:#0759a5;
  }
  .beeiles-side-category-search {
    display:block; width:100%; min-width:0; height:38px; padding:8px 10px;
    margin:0 0 10px !important; background:#fff; color:#1e293b;
    font-size:13px; border:1px solid #cbd5e1; border-radius:6px;
  }
  .beeiles-side-category-more {
    display:block; width:100%; margin:10px 0 0; padding:9px 10px;
    background:#f0f7ff; color:#0759a5; font-size:13px; font-weight:650;
    border:1px solid #d2e5fc; border-radius:6px; cursor:pointer;
  }
  .beeiles-side-category-more[hidden] {display:none !important;}
  .beeiles-side-category-more:hover {background:#e0efff;}
  .beeiles-results-head {
    display:flex; flex-wrap:wrap; gap:12px; align-items:end;
    justify-content:space-between; margin:4px 0 16px;
    min-height:45px; width:100%; box-sizing:border-box;
  }
  .woocommerce .beeiles-results-head .woocommerce-result-count,
  .woocommerce-page .beeiles-results-head .woocommerce-result-count {
    display:block !important; float:none !important; width:auto !important;
    margin:0 0 9px !important; padding:0 !important;
    color:#64748b; font-size:13px;
  }
  .beeiles-results-sort {margin-left:auto; min-width:205px; max-width:260px;}
  .beeiles-results-sort label {display:block; margin-bottom:5px; font-size:13px; color:#334155; font-weight:650;}
  .woocommerce .beeiles-results-sort form.woocommerce-ordering,
  .woocommerce-page .beeiles-results-sort form.woocommerce-ordering {
    display:block !important; float:none !important; clear:none !important;
    width:100% !important; margin:0 !important; padding:0 !important;
  }
  .beeiles-results-sort select.orderby {
    width:100% !important; min-width:0 !important; max-width:none !important;
    height:40px !important; margin:0 !important;
    padding:8px 28px 8px 10px !important; font-size:13px;
    border:1px solid #cbd5e1; border-radius:6px; background-color:#fff;
  }
  .beeiles-side-controls a:focus-visible,
  .beeiles-side-controls button:focus-visible,
  .beeiles-side-controls input:focus-visible,
  .beeiles-side-controls select:focus-visible {outline:2px solid #007bff; outline-offset:2px;}
}
