/* DEREB V1.6 — B2B purchasing usability and balanced footer.
   Loaded after all previous version styles; does not modify database or importer. */

/* Listing: larger, proportional, fully visible product images. The source itself may include white margins. */
.products-page .products-grid .product-card .product-photo{
  height:clamp(205px,14.5vw,250px);min-height:205px;padding:6px 10px;
  display:flex;align-items:center;justify-content:center;background:#f3f7fb;
}
.products-page .products-grid .product-card .product-photo img{
  display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;object-position:center;
}
.products-page .products-grid .product-card .product-body{min-width:0}
.products-page .products-grid .product-card .product-specs{line-height:1.45}

/* Selected products are a transient basket. They become persistent only on Add to Quote List. */
.products-page .selected-models{
  display:block;margin:12px 0 10px;padding:15px 16px;background:#f3f8fd;
  border:1px solid #c9dceb;border-radius:10px;
}
.products-page .selected-models[hidden]{display:none!important}
.products-page .selected-title{font-size:14px;color:#153c62;font-weight:700;margin-bottom:11px}
.products-page .selected-models-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.products-page .selected-model-row{
  display:flex;gap:12px;align-items:center;justify-content:space-between;min-width:0;
  padding:10px 12px;background:#fff;border:1px solid #d8e4f0;border-radius:7px;
}
.products-page .selected-model-row strong{font-size:14px;overflow-wrap:anywhere}
.products-page .selected-qty-controls{display:flex;align-items:center;flex:none;gap:5px;direction:ltr}
.products-page .selected-qty-controls input{
  width:70px;min-width:0;text-align:center;padding:7px 3px;border:1px solid #bfcedd;border-radius:4px;
  font-size:14px;direction:ltr;
}
.products-page .selected-qty-controls input::-webkit-inner-spin-button,.products-page .selected-qty-controls input::-webkit-outer-spin-button{appearance:none;margin:0}
.products-page .selected-qty-step,.products-page .selected-remove{
  width:29px;height:32px;display:flex;align-items:center;justify-content:center;
  border:1px solid #c8d9e8;color:#07549e;background:#fff;border-radius:4px;font-size:17px;line-height:1;
}
.products-page .selected-qty-step:hover{background:#eaf4ff}
.products-page .selected-qty-controls span{font-size:12px;color:#54708b}
.products-page .selected-remove{font-size:21px;color:#a94444;border:0}
.products-page .bulk-bar{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:12px 14px;border:1px solid #c9d8e8;background:#fff;border-radius:7px;
  flex-wrap:wrap;min-height:66px;margin-top:10px;
}
.products-page .bulk-bar .bulk-count{font-size:14px;font-weight:700;white-space:nowrap}
.products-page .bulk-bar .bulk-pcs{display:flex;align-items:center;gap:7px;font-size:13px;white-space:nowrap;color:#294c6d}
.products-page .bulk-bar .bulk-pcs input{width:74px;height:38px;padding:7px;border:1px solid #bdd1e2;border-radius:5px;text-align:center;direction:ltr}
.products-page .bulk-bar button[data-apply-bulk-qty]{border:1px solid #a8c6e3;border-radius:5px;padding:9px 10px;background:#eaf4ff;font-size:12px;color:#075baa;font-weight:700;min-height:38px}
.products-page .bulk-bar button[data-add-selected]{border:1px solid #0b67c7;border-radius:5px;padding:10px 14px;color:#095eaf;background:#fff;min-height:40px;font-size:13px;font-weight:700}
.products-page .bulk-bar button[data-add-selected]:disabled{opacity:.45}
.products-page .bulk-bar button[data-request-selected]{min-height:42px;padding:10px 18px;background:#086bdc;color:#fff;border:1px solid #086bdc;border-radius:5px;font-size:13px;font-weight:700}

/* WhatsApp is only actionable once a brand-specific, real number is configured. */
.detail-v15 .detail-product-help{
  margin-top:18px;padding:20px 22px;border:1px solid #d8e5f1;border-radius:10px;
  background:linear-gradient(125deg,#fff 0%,#f2f8fd 100%);display:flex;flex-direction:column;gap:12px;
}
.detail-v15 .detail-help-heading{display:flex;align-items:flex-start;gap:12px;color:#0c65aa}
.detail-v15 .detail-help-heading h2{font-size:19px;line-height:1.3;margin:0 0 4px;color:#092746;letter-spacing:-.02em}
.detail-v15 .detail-help-heading p{font-size:14px;color:#577087;line-height:1.55;margin:0}
.detail-v15 .detail-wa-button{
  display:flex;align-items:center;justify-content:center;gap:9px;width:100%;min-height:46px;
  background:#12875a;border-color:#12875a;color:#fff;font-weight:700;
}
.detail-v15 .detail-wa-button:hover{background:#0e6e49;border-color:#0e6e49;color:#fff}
.detail-v15 .detail-wa-pending{padding:10px 12px;border:1px dashed #b2cfbf;border-radius:6px;background:#eff8f3;color:#426958;font-size:13px;margin:0}
.detail-v15 .detail-help-secondary{align-self:center;display:inline-flex;align-items:center;gap:6px;color:#0b64b3;font-size:14px;font-weight:700;text-decoration:none}
.detail-v15 .detail-help-secondary:hover{text-decoration:underline}

/* Footer: one title + six-by-six grid, not one tall column. */
@media(min-width:1025px){
 .site-footer .footer-top{grid-template-columns:minmax(0,1.15fr) minmax(0,.60fr) minmax(0,1.56fr) minmax(0,.78fr) minmax(0,1.12fr);column-gap:clamp(18px,2.4vw,45px)}
}
.site-footer .footer-categories{min-width:0}
.site-footer .footer-categories .footer-category-links{
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:18px;row-gap:7px;grid-auto-flow:column;grid-template-rows:repeat(6,auto);align-items:start;
}
.site-footer .footer-categories .footer-category-links a{
 display:block;min-width:0;font-size:13px;line-height:1.38;overflow-wrap:anywhere;color:#fff;
}
.site-footer .footer-categories .footer-category-links a:hover{color:#71b9ff}

/* Preserve the non-mirrored images while making Arabic model selections readable. */
html[dir="rtl"] .products-page .selected-models{text-align:right;direction:rtl}
html[dir="rtl"] .products-page .selected-model-row{direction:rtl}
html[dir="rtl"] .products-page .bulk-bar{direction:rtl}
html[dir="rtl"] .products-page .bulk-pcs{direction:rtl}
html[dir="rtl"] .detail-v15 .detail-product-help{direction:rtl;text-align:right}
html[dir="rtl"] .detail-v15 .detail-help-secondary{align-self:flex-start}

@media(min-width:761px) and (max-width:1100px){
 .products-page .selected-models-grid{grid-template-columns:1fr}
 .products-page .bulk-bar{justify-content:flex-start}
 .site-footer .footer-category-links{column-gap:10px!important}
}
@media(max-width:760px){
 .products-page .products-grid .product-card{
  display:flex!important;flex-direction:column!important;grid-template-columns:none!important;
  padding:0!important;min-height:0!important;
 }
 .products-page .products-grid .product-card .product-photo{
  width:100%!important;max-width:none!important;min-height:190px!important;height:clamp(190px,55vw,270px)!important;
  padding:8px 10px!important;
 }
 .products-page .products-grid .product-card .product-photo img{
  width:100%!important;height:100%!important;max-width:100%!important;object-fit:contain!important;
 }
 .products-page .products-grid .product-card .product-body{width:100%;padding:14px!important}
 .products-page .selected-models-grid{grid-template-columns:1fr}
 .products-page .selected-models{margin:10px 0;padding:12px}
 .products-page .selected-model-row{padding:9px;gap:7px;flex-wrap:wrap}
 .products-page .selected-qty-controls{margin-inline-start:auto}
 .products-page .bulk-bar,html[dir="rtl"] .products-page .bulk-bar{
  display:grid!important;grid-template-columns:1fr!important;gap:10px!important;padding:12px!important;
 }
 .products-page .bulk-bar>*{min-width:0;width:100%;font-size:13px!important}
 .products-page .bulk-bar .bulk-pcs{justify-content:space-between}
 .products-page .bulk-bar .bulk-pcs input{width:72px;flex:none}
 .products-page .bulk-bar button[data-add-selected],.products-page .bulk-bar button[data-request-selected]{width:100%;justify-content:center}
 .detail-v15 .detail-product-help{padding:16px;margin-top:14px}
 .detail-v15 .detail-help-heading h2{font-size:17px}
 .site-footer .footer-categories .footer-category-links{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 14px}
 .site-footer .footer-categories .footer-category-links a{font-size:12px;line-height:1.35}
}
@media(max-width:380px){
 .products-page .selected-model-row strong{width:100%}
 .products-page .selected-qty-controls{margin-inline-start:0}
 .site-footer .footer-categories .footer-category-links{grid-template-columns:1fr;grid-template-rows:none;grid-auto-flow:row}
}
