/*
 * Hadar Deal Premium — product page desktop layout v1.8.4
 * Scope: single product pages, desktop/tablet only (>=861px).
 * Mobile <=860px intentionally receives no rules from this file.
 *
 * Goal: a normal fluid desktop product page. The layout grows with the
 * viewport, while media/content inside the columns stay proportionate.
 */

@media (min-width:861px){

  /* ---------- Page shell: fluid desktop, not a narrow centered island ---------- */
  body.single-product .site-main{
    width:calc(100% - clamp(36px,5vw,112px))!important;
    max-width:1920px!important;
    margin:28px auto 64px!important;
    min-width:0!important;
  }

  /* Product page stays flat: no card-within-card treatment. */
  body.single-product .woocommerce div.product,
  body.single-product .woocommerce div.product > .woocommerce-product-gallery,
  body.single-product .woocommerce div.product > div.images,
  body.single-product .woocommerce div.product > .summary,
  body.single-product .woocommerce div.product > .woocommerce-tabs,
  body.single-product .woocommerce div.product > .related,
  body.single-product .woocommerce div.product > .upsells,
  body.single-product .woocommerce div.product > .hadar-product-visuals{
    box-shadow:none!important;
    filter:none!important;
    border-radius:0!important;
    background:transparent!important;
  }

  /* ---------- Core: two genuinely fluid columns ---------- */
  body.single-product .woocommerce div.product{
    display:grid!important;
    grid-template-columns:minmax(0,1.08fr) minmax(360px,.92fr)!important;
    column-gap:clamp(24px,3vw,64px)!important;
    row-gap:0!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    align-items:start!important;
    justify-content:stretch!important;
    border:0!important;
    position:relative!important;
  }

  body.single-product .woocommerce div.product::before,
  body.single-product .woocommerce div.product::after{
    content:none!important;
    display:none!important;
  }

  html[dir="rtl"] body.single-product .woocommerce div.product{
    grid-template-columns:minmax(360px,.92fr) minmax(0,1.08fr)!important;
  }

  body.single-product .woocommerce div.product > .onsale{
    position:absolute!important;
    z-index:4!important;
  }

  body.single-product .woocommerce div.product > .woocommerce-product-gallery,
  body.single-product .woocommerce div.product > div.images,
  body.single-product .woocommerce div.product > .summary{
    float:none!important;
    clear:none!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
    border:0!important;
    align-self:start!important;
    justify-self:stretch!important;
  }

  body.single-product .woocommerce div.product > .summary{
    padding:clamp(2px,.6vw,10px) 0 0!important;
  }

  /* Normal commerce order: image left/details right in RTL; image left/details right
     remains conventional in LTR via the inverse grid-line mapping. */
  body.single-product .woocommerce div.product > .woocommerce-product-gallery,
  body.single-product .woocommerce div.product > div.images{
    grid-column:1!important;
    grid-row:1!important;
  }
  body.single-product .woocommerce div.product > .summary{
    grid-column:2!important;
    grid-row:1!important;
  }
  html[dir="rtl"] body.single-product .woocommerce div.product > .woocommerce-product-gallery,
  html[dir="rtl"] body.single-product .woocommerce div.product > div.images{
    grid-column:2!important;
  }
  html[dir="rtl"] body.single-product .woocommerce div.product > .summary{
    grid-column:1!important;
  }

  /* Everything below the hero row uses the full product-page width. */
  body.single-product .woocommerce div.product > .woocommerce-tabs,
  body.single-product .woocommerce div.product > .upsells,
  body.single-product .woocommerce div.product > .related,
  body.single-product .woocommerce div.product > .hd-single-tags,
  body.single-product .woocommerce div.product > .hadar-product-visuals{
    grid-column:1 / -1!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    float:none!important;
    clear:both!important;
  }

  /* ---------- Gallery: column grows; image does not distort ---------- */
  body.single-product .woocommerce div.product div.images .woocommerce-product-gallery__wrapper,
  body.single-product .woocommerce div.product div.images .flex-viewport,
  body.single-product .woocommerce div.product div.images .woocommerce-product-gallery__image,
  body.single-product .woocommerce div.product div.images .woocommerce-product-gallery__image a{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
  }

  body.single-product .woocommerce div.product div.images .woocommerce-product-gallery__image a{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    height:clamp(430px,42vw,760px)!important;
    overflow:hidden!important;
  }

  body.single-product .woocommerce-product-gallery__image img,
  body.single-product .woocommerce div.product div.images img{
    display:block!important;
    width:100%!important;
    height:100%!important;
    max-width:100%!important;
    max-height:100%!important;
    object-fit:contain!important;
    object-position:center!important;
    margin:0 auto!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
  }

  /* Thumbnails stay useful rather than stretching into a full-width row. */
  body.single-product .flex-control-thumbs{
    display:flex!important;
    flex-wrap:wrap!important;
    align-items:flex-start!important;
    justify-content:flex-start!important;
    gap:10px!important;
    width:100%!important;
    margin:14px 0 0!important;
    padding:0!important;
  }

  body.single-product .flex-control-thumbs li{
    float:none!important;
    flex:0 0 clamp(68px,5vw,88px)!important;
    width:clamp(68px,5vw,88px)!important;
    max-width:88px!important;
    margin:0!important;
    padding:0!important;
  }

  body.single-product .flex-control-thumbs img{
    width:100%!important;
    height:auto!important;
    aspect-ratio:1/1!important;
    object-fit:contain!important;
    object-position:center!important;
    margin:0!important;
    padding:3px!important;
    background:#fff!important;
    border:1px solid #e2e6e0!important;
    border-radius:0!important;
    opacity:.72!important;
  }

  body.single-product .flex-control-thumbs img.flex-active{
    border-color:#397c4a!important;
    opacity:1!important;
  }

  /* ---------- Summary: fluid column, readable content ---------- */
  body.single-product .woocommerce div.product .product_title{
    width:100%!important;
    max-width:28ch!important;
    margin:0 0 12px!important;
    font-size:clamp(29px,2.15vw,42px)!important;
    line-height:1.14!important;
    letter-spacing:-.45px!important;
  }

  body.single-product .woocommerce div.product p.price,
  body.single-product .woocommerce div.product span.price{
    margin:0 0 17px!important;
    font-size:clamp(23px,1.55vw,30px)!important;
    line-height:1.25!important;
  }

  body.single-product .woocommerce-product-details__short-description{
    width:100%!important;
    max-width:68ch!important;
    margin:0 0 20px!important;
    padding:0!important;
    font-size:clamp(14px,.85vw,16px)!important;
    line-height:1.7!important;
    background:transparent!important;
    border:0!important;
  }

  body.single-product .hd-single-categories{
    margin:0 0 14px!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
  }

  body.single-product .hd-single-categories a{
    background:transparent!important;
    border:0!important;
    border-radius:0!important;
    padding:0!important;
    min-height:0!important;
  }

  /* Forms use the summary column instead of being trapped at 440/500px. */
  body.single-product .woocommerce div.product form.cart,
  body.single-product .woocommerce div.product form.cart.variations_form{
    width:100%!important;
    max-width:640px!important;
    margin-top:18px!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
    border-radius:0!important;
  }

  body.single-product .woocommerce div.product form.cart .variations{
    width:100%!important;
    max-width:none!important;
    margin:0 0 16px!important;
    border:0!important;
    background:transparent!important;
  }

  body.single-product .woocommerce div.product form.cart .variations tr,
  body.single-product .woocommerce div.product form.cart .variations th,
  body.single-product .woocommerce div.product form.cart .variations td{
    background:transparent!important;
    border:0!important;
  }

  body.single-product .woocommerce div.product form.cart .variations select{
    width:100%!important;
    max-width:none!important;
    min-height:48px!important;
    padding:0 13px!important;
    border:1px solid #bcc5bc!important;
    border-radius:4px!important;
    background:#fff!important;
    font-size:14px!important;
  }

  body.single-product .woocommerce div.product form.cart:not(.variations_form),
  body.single-product .woocommerce div.product .woocommerce-variation-add-to-cart{
    display:flex!important;
    flex-wrap:wrap!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:10px!important;
    width:100%!important;
    max-width:none!important;
  }

  body.single-product .woocommerce div.product form.cart .quantity{
    flex:0 0 auto!important;
    width:auto!important;
    height:48px!important;
    margin:0!important;
    background:#fff!important;
    border:1px solid #c9d0c9!important;
    border-radius:4px!important;
  }

  body.single-product .woocommerce div.product form.cart .quantity .qty{
    width:48px!important;
    height:46px!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
  }

  body.single-product .woocommerce div.product form.cart .hd-qty-step{
    width:38px!important;
    height:46px!important;
    flex:0 0 38px!important;
  }

  body.single-product .woocommerce div.product .single_add_to_cart_button{
    flex:1 1 240px!important;
    width:auto!important;
    min-width:200px!important;
    max-width:480px!important;
    min-height:48px!important;
    margin:0!important;
    padding:11px 26px!important;
    border-radius:4px!important;
  }

  /* ---------- Full-width editorial sections ---------- */
  body.single-product .woocommerce div.product > .woocommerce-tabs{
    margin:clamp(44px,5vw,76px) 0 0!important;
    padding:0!important;
    border:0!important;
  }

  body.single-product .woocommerce div.product .woocommerce-tabs ul.tabs{
    display:flex!important;
    flex-wrap:wrap!important;
    gap:0!important;
    width:100%!important;
    margin:0 0 28px!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
    border-bottom:1px solid #e2e5e1!important;
    border-radius:0!important;
  }

  body.single-product .woocommerce div.product .woocommerce-tabs ul.tabs::before,
  body.single-product .woocommerce div.product .woocommerce-tabs ul.tabs::after,
  body.single-product .woocommerce div.product .woocommerce-tabs ul.tabs li::before,
  body.single-product .woocommerce div.product .woocommerce-tabs ul.tabs li::after{
    display:none!important;
    content:none!important;
  }

  body.single-product .woocommerce div.product .woocommerce-tabs ul.tabs li,
  body.single-product .woocommerce div.product .woocommerce-tabs ul.tabs li.active{
    margin:0!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
    border-radius:0!important;
  }

  body.single-product .woocommerce div.product .woocommerce-tabs ul.tabs li a{
    padding:12px 18px!important;
    background:transparent!important;
    border:0!important;
    border-bottom:2px solid transparent!important;
    border-radius:0!important;
  }

  body.single-product .woocommerce div.product .woocommerce-tabs ul.tabs li.active a{
    border-bottom-color:#357847!important;
  }

  body.single-product .woocommerce div.product .woocommerce-tabs .panel{
    width:100%!important;
    max-width:1200px!important;
    margin:0 auto 40px!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
    border-radius:0!important;
    font-size:clamp(14px,.82vw,16px)!important;
    line-height:1.78!important;
  }

  body.single-product .woocommerce table.shop_attributes{
    width:100%!important;
    margin:10px 0 0!important;
    border:0!important;
    border-radius:0!important;
    border-collapse:collapse!important;
    overflow:visible!important;
    background:transparent!important;
  }

  body.single-product .woocommerce table.shop_attributes tr{
    border-bottom:1px solid #eceeeb!important;
  }

  body.single-product .woocommerce table.shop_attributes th,
  body.single-product .woocommerce table.shop_attributes td{
    padding:12px 8px!important;
    background:transparent!important;
    border:0!important;
    border-radius:0!important;
  }

  body.single-product .woocommerce #reviews #comments ol.commentlist li .comment-text{
    margin:0 0 20px!important;
    padding:0 0 20px!important;
    background:transparent!important;
    border:0!important;
    border-bottom:1px solid #eceeeb!important;
    border-radius:0!important;
  }

  body.single-product .hd-single-tags{
    margin:12px 0 0!important;
    padding:16px 0 0!important;
    background:transparent!important;
    border:0!important;
    border-top:1px solid #eceeeb!important;
    border-radius:0!important;
  }

  body.single-product .hadar-product-visuals{
    width:min(100%,1440px)!important;
    margin:34px auto 0!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
    border-radius:0!important;
  }

  body.single-product .hadar-product-visuals img{
    display:block!important;
    width:100%!important;
    height:auto!important;
    max-width:100%!important;
    max-height:none!important;
    object-fit:contain!important;
    margin:14px auto!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
  }

  /* ---------- Related / upsell: full section width, bounded card density ---------- */
  body.single-product .related.products,
  body.single-product .upsells.products{
    width:100%!important;
    max-width:none!important;
    margin:clamp(42px,5vw,72px) 0 0!important;
    padding:28px 0 0!important;
    background:transparent!important;
    border:0!important;
    border-top:1px solid #eceeeb!important;
    border-radius:0!important;
  }

  body.single-product .related.products ul.products,
  body.single-product .upsells.products ul.products{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:clamp(14px,1.5vw,26px)!important;
    width:100%!important;
    margin:0!important;
  }

  body.single-product .related.products ul.products::before,
  body.single-product .related.products ul.products::after,
  body.single-product .upsells.products ul.products::before,
  body.single-product .upsells.products ul.products::after{
    display:none!important;
    content:none!important;
  }

  body.single-product .related.products ul.products li.product,
  body.single-product .upsells.products ul.products li.product{
    float:none!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
    border-radius:0!important;
    overflow:visible!important;
  }

  body.single-product .related.products ul.products li.product a img,
  body.single-product .upsells.products ul.products li.product a img{
    display:block!important;
    width:100%!important;
    height:auto!important;
    max-width:340px!important;
    max-height:340px!important;
    aspect-ratio:1/1!important;
    object-fit:contain!important;
    object-position:center!important;
    margin:0 auto 10px!important;
    background:transparent!important;
    border:0!important;
    border-radius:0!important;
  }
}

/* Compact desktop/tablet: same two-column structure, smaller gutters.
   Nothing in this file applies at 860px or below. */
@media (min-width:861px) and (max-width:1100px){

  body.single-product .woocommerce div.product div.images .woocommerce-product-gallery__image a{
    height:clamp(390px,46vw,500px)!important;
  }

  body.single-product .woocommerce div.product .product_title{
    max-width:none!important;
    font-size:clamp(27px,3vw,34px)!important;
  }

  body.single-product .related.products ul.products,
  body.single-product .upsells.products ul.products{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}
