/* Mobile hotfix: single product layout + thumbnails visibility */
@media (max-width: 980px) {

  .single-product .product-top-section,
  .single-product div.product-top-section {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 12px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  .single-product .product-top-section .product-images,
  .single-product div.product-top-section div.product-images,
  .single-product .product-top-section .summary.entry-summary,
  .single-product div.product-top-section div.summary {
    display: block !important;
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  .single-product .product-top-section form.cart,
  .single-product div.product-top-section div.summary form.cart {
    width: 100% !important;
    max-width: 100% !important;
    margin: 16px 0 0 !important;
    margin-left: 0 !important;
    padding: 0 !important;
  }

  .single-product .product_title,
  .single-product .price,
  .single-product .woocommerce-product-details__short-description {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  .single-product .woocommerce-product-gallery__trigger {
    display: block !important;
  }

  .single-product .flex-control-nav,
  .single-product .flex-control-nav.flex-control-thumbs {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    margin: 8px 0 0 !important;
    padding: 0 !important;
    list-style: none !important;
    overflow-x: auto !important;
  }

  .single-product .flex-control-nav.flex-control-thumbs li {
    width: 48px !important;
    min-width: 48px !important;
    margin: 0 !important;
    float: none !important;
  }

  .single-product .flex-control-nav.flex-control-thumbs img {
    display: block !important;
    width: 48px !important;
    height: 48px !important;
    object-fit: cover !important;
    opacity: 1 !important;
    border-radius: 8px !important;
  }

  .single-product .woocommerce-product-gallery.armu-has-flex-thumbs .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image {
    display: none !important;
  }

  .single-product .woocommerce-product-gallery.armu-has-flex-thumbs .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image:first-child,
  .single-product .woocommerce-product-gallery.armu-has-flex-thumbs .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image.flex-active-slide {
    display: block !important;
    visibility: visible !important;
    width: 100% !important;
    height: auto !important;
    opacity: 1 !important;
  }

  .single-product .woocommerce-product-gallery.armu-no-flex-thumbs .woocommerce-product-gallery__wrapper {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    align-items: flex-start !important;
  }

  .single-product .woocommerce-product-gallery.armu-no-flex-thumbs .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image:first-child {
    display: block !important;
    width: 100% !important;
    margin-bottom: 6px !important;
  }

  .single-product .woocommerce-product-gallery.armu-no-flex-thumbs .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image:not(:first-child) {
    display: inline-block !important;
    vertical-align: top !important;
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    margin: 0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
  }

  .single-product .woocommerce-product-gallery.armu-no-flex-thumbs .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image:not(:first-child) img {
    width: 48px !important;
    height: 48px !important;
    object-fit: cover !important;
  }

  /* Related products: force a single readable column on phones */
  .single-product .related.products {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .single-product .related.products ul.products {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .single-product .related.products ul.products li.product {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  .single-product .related.products ul.products li.product.card>a.card__link {
    min-height: 300px !important;
  }
}

/* Fix Hero Layout & Buttons on Mobile */
@media (max-width: 768px) {
  #primary .hero {
    min-height: auto !important;
    /* Allow content to dictate height */
    height: auto !important;
    padding-top: 120px !important;
    /* Push content down from header */
    padding-bottom: 80px !important;
    /* Ensure space for buttons at bottom */
    overflow: visible !important;
    /* Prevent cutting off */
    display: flex !important;
    /* Flex allows column layout easily */
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
  }

  #primary .hero .wrap {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 20px !important;
  }

  #primary .hero .btns {
    display: flex !important;
    flex-direction: column !important;
    /* Stack buttons vertically on mobile for better touch targets */
    width: 100% !important;
    max-width: 320px !important;
    margin: 0 auto !important;
    gap: 16px !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 10 !important;
  }

  /* Force buttons styles */
  #primary .hero .btns .btn {
    display: flex !important;
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    font-size: 14px !important;
    padding: 14px 20px !important;
    box-sizing: border-box !important;
  }

  #primary .hero .btns .btn-secondary {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    color: #f4e5d3 !important;
    /* var(--panel) */
    border-color: #f4e5d3 !important;
    background: rgba(10, 9, 8, 0.6) !important;
    /* improved readability */
  }
}

/* Fix Slider Arrows (Nouveaux Produits) - Artifacts & Position */
@media (max-width: 768px) {

  .arm-swiper-prev,
  .arm-swiper-next {
    font-size: 0 !important;
    /* Hide the moji-bake text */
    color: transparent !important;
    width: 44px !important;
    height: 44px !important;
    background: rgba(0, 0, 0, 0.7) !important;
    border: 1px solid #d4af37 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    top: 125px !important;
    /* Centered on image approx height */
    transform: translateY(-50%) !important;
    margin: 0 !important;
  }

  .arm-swiper-prev {
    left: 4px !important;
    right: auto !important;
  }

  .arm-swiper-next {
    right: 4px !important;
    left: auto !important;
  }

  .arm-swiper-prev::after,
  .arm-swiper-next::after {
    content: '' !important;
    display: block !important;
    width: 10px !important;
    height: 10px !important;
    border-top: 2px solid #d4af37 !important;
    border-right: 2px solid #d4af37 !important;
    font-size: 0 !important;
  }

  .arm-swiper-prev::after {
    transform: rotate(-135deg) !important;
    margin-left: 4px !important;
  }

  .arm-swiper-next::after {
    transform: rotate(45deg) !important;
    margin-right: 4px !important;
  }
}

/* Product page fix: keep qty + cart aligned, place gravure on its own row. */
.single-product .woocommerce-variation-add-to-cart.variations_button {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  column-gap: 12px !important;
  row-gap: 12px !important;
}

.single-product .woocommerce-variation-add-to-cart.variations_button > .quantity {
  order: 1 !important;
}

.single-product .woocommerce-variation-add-to-cart.variations_button > .single_add_to_cart_button {
  order: 2 !important;
}

.single-product .woocommerce-variation-add-to-cart.variations_button > .gwc-accordion-wrapper,
.single-product form.cart > .gwc-accordion-wrapper {
  order: 3 !important;
  flex: 1 1 100% !important;
  width: 100% !important;
  margin: 8px 0 0 !important;
}

/* Product tabs: closed = +, open = -, no inherited rotated glyph artifacts. */
.woocommerce-tabs .wc-tabs li a::after {
  content: '+' !important;
  transform: translateY(-50%) !important;
}

.woocommerce-tabs .wc-tabs li.active a::after {
  content: '-' !important;
  transform: translateY(-50%) !important;
}
