/* ================================================================
   MOBIELE CSS — Bandenwinkel
   Let op: product list / card styling zit in product-list.css
         footer styling zit in footer.css

   NOOT: Homepage-specifieke mobiele stijlen (.icon-box, .step)
   zijn verplaatst naar banden-kopen-main.css (responsive sectie).
   ================================================================ */

/* -- Sorter -- */
@media (max-width: 768px) {
    #sorter {
        width: 50%;
        max-width: 100px;
    }
}

/* -- Add to cart knop (product detail pagina) -- */
@media (max-width: 768px) {
    .action.tocart.primary {
        width: 95% !important;
        font-size: 1.1rem !important;
        padding: 14px 0 !important;
        text-align: center !important;
        background-color: #21314B !important;
        color: #ffffff !important;
    }

    .action.tocart.primary:hover {
        background-color: #EF5B33 !important;
        color: #ffffff !important;
    }

    .actions-secondary .action.tocompare,
    .action.tocompare {
        display: none !important;
    }
}

/* -- Heading balk -- */
@media (max-width: 768px) {
    .heading-balk { font-weight: bold; }
}

/* -- Brand divider -- */
@media only screen and (max-width: 767px) {
    .brand-divider { display: none !important; }
}

/* -- USP's product detail pagina -- */
@media (max-width: 767px) {
    .features-card {
        background: #fff;
        border: 1px solid #e6e8ec;
        border-radius: 12px;
        padding: 14px 16px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        box-shadow: 0 1px 0 rgba(0,0,0,.03);
    }

    .features-list {
        list-style: none;
        margin: 0;
        padding: 0;
        display: grid;
        gap: 14px;
    }

    .features-item {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        line-height: 1.45;
        color: #475569;
        font-size: 15px;
    }

    .features-item i {
        color: #16a34a;
        font-size: 16px;
        margin-top: 2px;
        flex: 0 0 auto;
    }

    .custom-block-below-addtocart > * + * { margin-top: 12px; }
}

/* -- Reviews -- */
@media (max-width: 767px) {
    .reviews-actions .action.add {
        font-size: 13px;
        border-radius: 8px;
    }
}

/* -- Cart / checkout -- */
.checkout-cart-index #block-shipping { display: none; }

/* -- Algemene knoppen -- */
.action.primary,
.action-primary,
.amshopby-button,
.am-filter-go {
    border: none !important;
}

/* -- Amasty scroll paginanummers -- */
@media (max-width: 768px) {
    .amscroll-page-num.-amscroll-button {
        padding: 6px 12px;
        font-size: 1.2rem;
    }
}

/* -- Full row voordelen -- */
@media (max-width: 767px) {
    .full-row-voordelen {
        position: static;
        left: auto;
        right: auto;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
    }
}

/* ================================================================
   PRODUCT LIST — RESPONSIVE (pc- classes)
   Desktop styling zit in product-list.css
   Hier alleen de mobiele aanpassingen
   ================================================================ */

/* Tablet */
@media (max-width: 880px) {
    a.pc-img  { flex: 0 0 130px; width: 130px; padding: 14px; }
    .pc-right { flex: 0 0 180px; width: 180px; padding: 14px; }
}

/* Mobiel: stack verticaal */
@media (max-width: 600px) {
    .pc-card {
        flex-direction: column;
    }

    a.pc-img {
        flex: none;
        width: 100%;
        min-height: 140px;
        border-right: none;
        border-bottom: 1px solid #e2e5ea;
    }

    a.pc-img .product-image-photo {
        max-width: 100px;
        max-height: 100px;
    }

    .pc-info {
        padding: 14px 16px;
    }

    .pc-right {
        flex: none;
        width: 100%;
        align-items: stretch;
        border-left: none;
        border-top: 1px solid #e2e5ea;
        padding: 14px 16px;
    }

    .pc-price-wrap,
    .pc-per-band     { text-align: left; }
    .pc-stock        { justify-content: flex-start; }

    .pc-form {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .pc-qty            { flex: 0 0 120px; width: 120px; }
    button.pc-btn-cart { flex: 1 1 auto; width: auto; }
    a.pc-btn-detail    { flex: 1 1 100%; }
}



// =============================================
// Mobile PDP Volgorde via Flexbox
// Bestand: app/design/frontend/<Vendor>/<theme>/web/css/source/_extend.less
//
// Gewenste volgorde mobiel:
//  1. Productnaam (.page-title-wrapper)
//  2. Product afbeelding (.product.media)
//  3. Brand afbeelding / category features (arman.categoryfeatures.media)
//  4. Reviews (product.info.review)
//  5. Prijs (product.info.price)
//  6. Bandenlabels (banden.labels)
//  7. Winkelwagen toevoegen (product.info / product.info.form.content)
//  8. USPS (usps.block)
//  9. Webwinkelkeur (webwinkelkeur.block)
// 10. Veilig betalen / betaalmethodes (betaalmethodes.block)
// 11. Verlanglijst, compare etc. (product-social-links)
// 12. Banden informatie tabs (product.info.details)
// 13. Bandenswitcher (banden.size.switcher)
// =============================================

@media (max-width: 767px) {

  // ----------------------------------------------
  // Stap 1: Maak de content-container een flex-kolom
  // Dit is de gemeenschappelijke parent van zowel
  // .product.media als .product-info-main
  // ----------------------------------------------
  .page-layout-1column .columns,
  .catalog-product-view .column.main {
    display: flex;
    flex-direction: column;
  }

  // ----------------------------------------------
  // Stap 2: Blokken die direct in .column.main zitten
  // ----------------------------------------------

  // 1. Productnaam
  .page-title-wrapper.product {
    order: 1;
  }

  // 2. Product afbeelding (de media container)
  .product.media {
    order: 2;
  }

  // 3. product-info-main als geheel (bevat prijs, reviews, add-to-cart etc.)
  .product-info-main {
    order: 3;
    display: flex;
    flex-direction: column;
  }

  // 13. Bandenswitcher (zit in `content`, buiten product-info-main)
  .banden-size-switcher,
  [data-block="banden.size.switcher"],
  .column.main > .banden-size-switcher {
    order: 13;
  }

  // 12. Banden informatie tabs (product.info.details)
  .product.info.detailed {
    order: 12;
  }

  // ----------------------------------------------
  // Stap 3: Volgorde BINNEN .product-info-main
  // ----------------------------------------------

  .product-info-main {

    // 4. Reviews
    .product-info-review,
    .reviews-actions {
      order: 4;
    }

    // 5. Prijs blok
    .product-info-price {
      order: 5;
    }

    // 6. Bandenlabels (banden.labels ? Arman_BandenSwitcher::product-labels.phtml)
    .product-labels,
    .banden-labels {
      order: 6;
    }

    // 7. Add to cart form (bevat ook USPS, webwinkelkeur, betaalmethodes)
    .product-add-form {
      order: 7;
    }

    // 11. Verlanglijst / compare / social links
    .product-social-links {
      order: 11;
    }

    // Overige blokken (tier price, alerts etc.) vallen automatisch onderaan
    .product.alert,
    .product-info-extrahint,
    .price-tier_price {
      order: 20;
    }
  }

  // ----------------------------------------------
  // Stap 4: Volgorde BINNEN product-info-form-content
  // (usps, webwinkelkeur, betaalmethodes zitten hier)
  // ----------------------------------------------
  .product-info-form-content,
  #product_addtocart_form .product-info-form-content {
    display: flex;
    flex-direction: column;

    // Add to cart knop
    .box-tocart {
      order: 1;
    }

    // 8. USPS
    .usps,
    [data-block="usps.block"] {
      order: 2;
    }

    // 9. Webwinkelkeur
    .webwinkelkeur,
    [data-block="webwinkelkeur.block"] {
      order: 3;
    }

    // 10. Veilig betalen / betaalmethodes
    .betaalmethodes,
    [data-block="betaalmethodes.block"] {
      order: 4;
    }
  }

}