/* 
Theme Fix: compactshop-single-mobile-fix.css
Version: 1.6t (Slider-Final + Responsive)
Date: 2025-07-19
Author: ChatGPT + Kai
Purpose:
– Einheitliches Layout für Produktseiten (Mobile)
– Optimierter Fake-Slider für Upsells, Related & Recently Viewed
– Mobile-spezifische Layout- und Abstandsoptimierungen
*/

@media (max-width: 767px) {

  /* --- Text-Layout --- */
  .single-product .summary p,
  .woocommerce-Tabs-panel p {
    line-height: 1.3em;
    margin-bottom: 0.4em;
  }

  /* --- Layout-Reset für Mobile --- */
  .single-product .product {
    flex-direction: column;
    padding: 0 1.5rem;
    gap: 1.5rem;
  }

  /* Viewport volle Breite */
  .single-product .flex-viewport {
    width: 100% !important;
  }

  /* Positionierungs-Reset für Mobile */
  .single-product .woocommerce-product-gallery__image {
    transform: none !important;
    left: auto !important;
  }

  /* Schriftgröße für Mobile-Produktbeschreibung */
  .single-product .product .summary p,
  .woocommerce-Tabs-panel p {
    font-size: 1rem;
  }

  /* --- Galerie-Container volle Breite --- */
  .single-product .woocommerce-product-gallery,
  .single-product .woocommerce-product-gallery__wrapper,
  .single-product .woocommerce-product-gallery__image {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 auto !important;
    padding: 0 !important;
    transform: none !important;
    text-align: center !important;
  }

  /* --- Hauptbild sichtbar + zentriert --- */
  .single-product .woocommerce-product-gallery__image img {
    display: block !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 auto !important;
  }

  /* --- No-Slider-Modus --- */
  body.no-product-slider .no-slider-wrapper {
    display: block !important;
    text-align: center !important;
    margin: 0 auto !important;
  }

  body.no-product-slider .no-slider-main-image {
    display: block !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 auto !important;
  }

  /* --- Harte Zentrierung des Produktbildes --- */
  .single-product .woocommerce-product-gallery {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }

  /* --- Mehrere Produktbilder: sauber nebeneinander --- */
  .single-product .woocommerce-product-gallery__wrapper {
    display: flex !important;
    justify-content: center !important;
    gap: 0.5rem; /* Abstand zwischen Thumbnails */
    flex-wrap: nowrap; /* Kein Zeilenumbruch */
  }

  .single-product .woocommerce-product-gallery__image {
    flex: 0 0 auto !important;
  }

  /* --- Warenkorb-Bereich unter Produkt --- */
.single-product .cart {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

  .single-product .cart .quantity,
  .single-product .cart button {
    width: 100%;
  }

  /* --- Fake-Slider: Breite der Produkte im Mobile --- */
  .upsells.products ul.products li.product,
  .related.products ul.products li.product,
  .recently-viewed.products ul.products li.product {
    flex: 0 0 60%;
    max-width: 60%;
  }
	
  /* --- Abstand zwischen Produkt-Meta und Teilen-Block reduzieren --- */
  .single-product .product_meta {
    margin-bottom: 0.5rem; /* vorher vermutlich 1.5–2rem */
  }

  .single-product .product_meta + .share {
    margin-top: 0.5rem; /* evtl. vorhandene obere Lücke ebenfalls kleiner */
  }
	
}

/* Pressmart Mobile/Tablet Bottom-Navbar: Add-to-cart darf nicht verschwinden */
@media (max-width: 1024px){

  .single-product.has-mobile-bottom-navbar-single-page form.cart{
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px;
  }

  .single-product.has-mobile-bottom-navbar-single-page form.cart .quantity{
    order: 1;
    width: auto;
  }

  .single-product.has-mobile-bottom-navbar-single-page form.cart .single_add_to_cart_button{
    order: 2;
    display: inline-flex !important;
    width: 100% !important;
    position: relative;
    z-index: 50; /* falls Sticky-Bar drüberliegt */
  }
    /* Optik: „In den Warenkorb“ sauber als Primary */
  .single-product.has-mobile-bottom-navbar-single-page form.cart .single_add_to_cart_button{
    background: #b50000;   /* COMPACT-Rot */
    color: #fff;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-weight: 700;
  }
  /* Optik: „Sofort kaufen“ als Secondary (falls vorhanden) */
  .single-product.has-mobile-bottom-navbar-single-page form.cart .buy_now_button,
  .single-product.has-mobile-bottom-navbar-single-page form.cart .single_buy_now_button{
    background: #0f4a59; /* dein Türkis aus Screenshot (oder Theme-Farbe) */
    color: #fff;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-weight: 700;
  }


  /* Google Pay / Quick Buy darunter */
  .single-product.has-mobile-bottom-navbar-single-page form.cart #eh-stripe-payment-request-button,
  .single-product.has-mobile-bottom-navbar-single-page form.cart .pressmart-quick-buy{
    order: 3;
    width: 100%;
  }

  /* falls eine Bottom-Bar über dem Content liegt: Platz schaffen */
  .single-product.has-mobile-bottom-navbar-single-page .summary{
    padding-bottom: 90px;
  }
}

