/* ==========================================================================
   Ecofridge Core: Product page responsive (Elementor template 732 "Eco Single Product")
   Φορτώνει ΜΟΝΟ σε is_product(). Επηρεάζει ΜΟΝΟ tablet (768-1024) και mobile (<=767).
   Desktop (>1024) δεν αγγίζεται. Rollback: αφαιρείς το enqueue στο includes/plugin.php.
   Element IDs:
     13df592c Top Section | 69b0eeb5 title/desc col | 34911cf4 spacer | 4948fd1b H1
     b94cb6e short desc | 15518773 image col | 735fcfec price col | 13b13663 spacer
     00ed73a Hot Deals img | aa39a0a price block | b347d57 add to cart / login prompt
     67cb1868 Blue Section | 415e6a70 Files+Tabs row | 26e96ebe Files col | 099a071 tabs
     a17bc4c Photos section | 3c6015d gallery
   ========================================================================== */

/* ---------- Shared (tablet + mobile) ---------- */
@media (max-width: 1024px) {

  /* Οριζόντιο scroll: η gallery έχει margin-right:-30px (image_spacing 30px) */
  body.single-product .elementor-732 .elementor-element.elementor-element-a17bc4c {
    overflow-x: clip;
  }

  /* Short description: προστασία από επικολλημένο <pre> (monospace, σπασμένες γραμμές) */
  body.single-product .woocommerce-product-details__short-description pre {
    font-family: inherit;
    font-size: inherit;
    white-space: normal;
    background: none;
    border: 0;
    padding: 0;
    margin: 0 0 1em;
    overflow: visible;
  }

  /* Files + Tabs: το ένα κάτω από το άλλο */
  body.single-product .elementor-732 .elementor-element.elementor-element-415e6a70 {
    --flex-direction: column !important;
    flex-direction: column !important;
    --gap: 40px !important;
    --row-gap: 40px !important;
  }
  body.single-product .elementor-732 .elementor-element.elementor-element-415e6a70 > .e-con-inner {
    flex-direction: column !important;
    gap: 40px !important;
  }
  body.single-product .elementor-732 .elementor-element.elementor-element-26e96ebe,
  body.single-product .elementor-732 .elementor-element.elementor-element-099a071 {
    --width: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Highlights: λογικά μεγέθη (το παλιό tablet CSS είχε icon 120px / desc 28px) */
  body.single-product .eco-highlights__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 32px;
  }
  body.single-product .eco-highlights__icon {
    width: 80px;
    height: 80px;
  }
  body.single-product .eco-highlights__item {
    gap: 16px;
  }
  body.single-product .eco-highlights__text {
    max-width: 260px;
  }
  body.single-product .eco-highlights__title {
    font-size: 15px;
  }
  body.single-product .eco-highlights__desc {
    font-size: 19px;
  }
}

/* ---------- Tablet only (768-1024) ---------- */
@media (min-width: 768px) and (max-width: 1024px) {

  /* Top section: [τίτλος/περιγραφή | τιμή] στην 1η σειρά, φωτογραφία full width από κάτω
     (η φωτογραφία συνεχίζει να "πατάει" πάνω στη μπλε ζώνη όπως στο desktop) */
  body.single-product .elementor-732 .elementor-element.elementor-element-13df592c {
    --flex-wrap: wrap !important;
    flex-wrap: wrap !important;
    --row-gap: 24px !important;
    row-gap: 24px !important;
  }
  body.single-product .elementor-732 .elementor-element.elementor-element-69b0eeb5 {
    --width: 55% !important;
    width: 55% !important;
    order: 1;
  }
  body.single-product .elementor-732 .elementor-element.elementor-element-735fcfec {
    --width: 45% !important;
    width: 45% !important;
    order: 2;
    padding-top: 10px !important;
  }
  body.single-product .elementor-732 .elementor-element.elementor-element-15518773 {
    --width: 100% !important;
    width: 100% !important;
    order: 3;
    --min-height: 0px !important;
    min-height: 0 !important;
  }
  body.single-product .elementor-732 .elementor-element-96089ad img {
    max-height: 560px;
    width: auto;
    margin: 0 auto;
    display: block;
  }
  body.single-product .elementor-732 .elementor-element-34911cf4,
  body.single-product .elementor-732 .elementor-element-13b13663 {
    display: none;
  }

  /* Price column: τιμή & καλάθι full width της στήλης */
  body.single-product .elementor-732 .elementor-element-aa39a0a,
  body.single-product .elementor-732 .elementor-element-b347d57 {
    align-self: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Blue section: λιγότερο κενό κάτω (το top 200 μένει, χρειάζεται για το overlap της φωτογραφίας) */
  body.single-product .elementor-732 .elementor-element.elementor-element-67cb1868 {
    --padding-bottom: 80px !important;
    padding-bottom: 80px !important;
  }
}

/* ---------- Mobile only (<=767) ---------- */
@media (max-width: 767px) {

  /* Top section σε μία στήλη με σειρά: Τίτλος -> Φωτογραφία -> Τιμή/Καλάθι -> Περιγραφή */
  body.single-product .elementor-732 .elementor-element.elementor-element-13df592c {
    --flex-direction: column !important;
    flex-direction: column !important;
    --gap: 16px !important;
    gap: 16px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  body.single-product .elementor-732 .elementor-element.elementor-element-69b0eeb5 {
    display: contents !important;
  }
  body.single-product .elementor-732 .elementor-element-34911cf4,
  body.single-product .elementor-732 .elementor-element-13b13663 {
    display: none !important;
  }
  body.single-product .elementor-732 .elementor-element-4948fd1b {
    order: 1;
    width: 100%;
    margin-top: 8px;
  }
  body.single-product .elementor-732 .elementor-element-4948fd1b .elementor-heading-title {
    font-size: 28px !important;
    line-height: 1.15;
  }
  body.single-product .elementor-732 .elementor-element.elementor-element-15518773 {
    order: 2;
    --width: 100% !important;
    width: 100% !important;
    --min-height: 0px !important;
    min-height: 0 !important;
    padding: 0 !important;
  }
  body.single-product .elementor-732 .elementor-element-96089ad img {
    max-height: 380px;
    width: auto;
    margin: 0 auto;
    display: block;
  }
  body.single-product .elementor-732 .elementor-element.elementor-element-735fcfec {
    order: 3;
    --width: 100% !important;
    width: 100% !important;
    position: relative;
  }
  body.single-product .elementor-732 .elementor-element-b94cb6e {
    order: 4;
    width: 100%;
    margin-top: 12px;
  }
  body.single-product .elementor-732 .elementor-element-b94cb6e h2 {
    font-size: 22px;
    line-height: 1.25;
    margin: 0 0 10px;
  }

  /* Hot Deals badge: μικρότερο, πάνω δεξιά στη στήλη τιμής χωρίς να πιάνει δικό του χώρο */
  body.single-product .elementor-732 .elementor-element-00ed73a {
    position: absolute !important;
    top: -74px;
    right: 0;
    width: 72px !important;
    margin: 0 !important;
    z-index: 2;
  }
  body.single-product .elementor-732 .elementor-element-00ed73a img {
    width: 72px !important;
  }

  /* Τιμή & καλάθι / login prompt full width */
  body.single-product .elementor-732 .elementor-element-aa39a0a,
  body.single-product .elementor-732 .elementor-element-b347d57 {
    align-self: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  body.single-product .elementor-732 .ecofridge-single-banner-label {
    font-size: 18px;
  }
  body.single-product .elementor-732 .elementor-element-b347d57 .e-atc-qty-button-holder {
    display: flex;
    gap: 8px;
  }
  body.single-product .elementor-732 .elementor-element-b347d57 .single_add_to_cart_button {
    flex: 1 1 auto;
  }
  body.single-product .elementor-732 .elementor-element-b347d57 .login-to-see-price {
    text-align: center;
    padding: 8px 10px;
  }

  /* Blue section: χωρίς overlap (θα πάταγε πάνω στην περιγραφή), λιγότερο padding */
  body.single-product .elementor-732 .elementor-element.elementor-element-67cb1868 {
    --margin-top: 0px !important;
    margin-top: 0 !important;
    --padding-top: 40px !important;
    --padding-bottom: 40px !important;
    padding: 40px 16px !important;
  }

  /* Προϊόν χωρίς highlights: κρύβεται η άδεια μπλε λωρίδα */
  body.single-product .elementor-732 .elementor-element.elementor-element-67cb1868:not(:has(.eco-highlights__item)) {
    display: none !important;
  }

  /* Highlights: 2 στήλες, μικρότερα */
  body.single-product .eco-highlights__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 16px;
  }
  body.single-product .eco-highlights__icon {
    width: 64px;
    height: 64px;
  }
  body.single-product .eco-highlights__icon::after {
    inset: 10px;
  }
  body.single-product .eco-highlights__item {
    gap: 10px;
  }
  body.single-product .eco-highlights__title {
    font-size: 13px;
  }
  body.single-product .eco-highlights__desc {
    font-size: 15px;
  }

  /* Files + Tabs */
  body.single-product .elementor-732 .elementor-element.elementor-element-415e6a70 {
    --margin-top: 24px !important;
    margin-top: 24px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  body.single-product .elementor-732 .elementor-element.elementor-element-26e96ebe {
    padding: 0 !important;
  }

}
