/*
 * Responsive migration stylesheet.
 *
 * Move responsive styles from responsive.css into this file block by block.
 * Do not duplicate selectors without removing the old responsive.css rule.
 * When migration is complete, this file should replace responsive.css.
 */

@media screen and (max-width: 992px) {
  #seller-store .product-items li {
    width: 50%;
  }
}

.mobile-account-menu,
.mobile-account-only-nav {
  display: none;
}

@media screen and (max-width: 767px) {
  #seller-store .product-items {
    margin: 0;
  }
}

@media (max-width: 1024px) {
  .inner-banner-section .page-heading {
    top: 0;
  }

  .inner-banner-section .page-heading p {
    margin: 0;
    padding: 0;
  }

  .header-right {
    gap: 20px;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    padding-inline: 24px;
  }

  /* Keep both adjacent carousel cards visibly cropped on tablet widths. */
  .upcycling-slider .item {
    flex-basis: 55vw;
    width: 55vw;
  }
}

@media screen and (max-width: 1440px) {
  /* Match the 60px product-image container gutter. */
  body.single-product .woocommerce-breadcrumb {
    padding: 0 60px;
  }

  .upcycling-section {
    padding: 0 0 80px;
  }

  .upcycling-page img {
    width: 100%;
  }

  .upcycling-page .container {
    max-width: 100%;
    padding: 0;
  }

  .upcycling-des {
    padding-right: 50px;
  }
}

@media screen and (max-width: 1400px) {
  .designer-slider.slick-initialized {
    margin: 0;
  }

  /* Keep carousel gaps inside Slick's calculated slide widths. */
  .designer-slider.slick-initialized .designer-box {
    min-width: 0;
    margin: 0;
    border: 7.5px solid transparent;
    background-clip: padding-box;
  }
}

@media screen and (max-width: 1200px) {
  .meet-designer > .container {
    max-width: none;
    padding-right: 0;
    padding-left: 0;
  }

  .meet-designer .slick-nav {
    justify-content: center;
    margin-top: 20px;
  }
}

@media screen and (min-width: 993px) {
  .main-banner .main-banner-img {
    /* 993pxで470px、1440pxで567px: (567 - 470) / (1440 - 993) = 97 / 447。 */
    /* 470px + ((100vw - 993px) * 97 / 447) を 21.7002237vw + 254.5167785px に展開。 */
    min-height: clamp(470px, calc(21.7002237vw + 254.5167785px), 567px);
    object-fit: cover;
  }
}

@media (max-width: 991px) {
  .services-slider {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
}

@media screen and (max-width: 992px) {
  /* Match the 15px product-image container gutter. */
  body.single-product .woocommerce-breadcrumb {
    padding: 0 15px;
  }

  /* Filter panel close button: smaller on mobile, position unchanged */
  .filter-slide .close-filter {
    font-size: 40px;
  }

  .filter-slide.open-filter .close-filter {
    right: -40px;
  }
}

@media screen and (max-width: 767px) {

  .header-outer {
    position: fixed;
    top: 0;
    right: 20px;
    bottom: 0;
    left: 0;
    z-index: 99;
    max-width: 280px;
    padding: 35px 0;
    overflow-y: auto;
    background: #fff;
    transform: translateX(-100%);
    transition: all ease 0.5s;
    flex-direction: column;
  }

  .header-outer.open-menu {
    transform: translateX(0);
  }

  .arrival-heading .slick-nav,
  .meet-designer .slick-nav {
    justify-content: center !important;
    margin-top: 20px;
  }

  /* Keep the first thumbnail flush with the main gallery image on mobile. */
  body.woocommerce div.product div.images .flex-control-thumbs li {
    margin: 0 6px 10px 0 !important;
  }

  .form-subscribe .ml-field-group input[type="email"] {
    padding: 10px;
  }

  .form-subscribe .ml-form-embedSubmit button {
    font-size: 14px;
  }

  .upcycling-page {
    padding: 30px 15px 0;
  }

  .upcycling-des {
    padding: 15px 0;
  }

  .upcycling-page h2 {
    font-size: 30px;
    line-height: 30px;
  }

  .upcycling-section h2 {
    padding-bottom: 80px;
  }

  .upcycling-slider .slick-list {
    padding-right: 0;
    padding-left: 0;
  }

  .upcycling-slider .item {
    flex-basis: auto;
    width: auto;
    margin-right: 0;
  }

  .upcycling-slider .slick-dots {
    right: 0;
    left: 0;
    width: auto;
  }

  .inner-banner-section img {
    height: 150px;
  }

  .page-heading h1 {
    font-size: 3rem;
    line-height: 3rem;
  }

  /* Switch the equal-width desktop navigation back to a full-width vertical list. */
  header nav .header-outer > ul > li {
    flex: 0 0 auto;
    width: 100%;
    padding: 0;
    text-align: left;
  }

  /* Account links live in the mobile navigation, where every destination is directly tappable. */
  .header-right .account-icon {
    display: none;
  }

  .mobile-account-only-nav,
  .mobile-account-menu {
    display: block;
    margin-top: 24px;
    border-top: 4px solid #f2f2f2;
  }

  .mobile-account-only-nav {
    margin-top: 0;
    border-top: 0;
  }

  header nav .mobile-account-menu__heading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    border-bottom: 1px solid #f2f2f2;
    font-weight: 500;
  }

  header nav .mobile-account-menu__list li a {
    padding-left: 45px;
    font-size: 0.9rem;
  }

  /* Preserve enough room for the four remaining mobile header actions. */
  .header-right {
    gap: clamp(8px, 3vw, 15px);
  }

  body .woocommerce ul.products li.product a img.yith-wcwl-custom-icon,
  body.woocommerce ul.products li.product a img.yith-wcwl-custom-icon {
    height: auto;
  }

  /* Keep the sale badge aligned with the wishlist control inside product images. */
  body.woocommerce ul.products li.product .onsale,
  body .woocommerce ul.products li.product .onsale,
  .woocommerce .regular.slider .item .onsale {
    top: 5px;
    left: 5px;
  }

  /* Center the label and cart icon against the same flex alignment context. */
  .woocommerce ul.products li.product .button {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    width: 100%;
    height: 40px;
    line-height: normal;
  }

  .woocommerce ul.products li.product .button:after {
    width: 15px;
    height: 20px;
    margin-top: 0;
    top: 2px;
    -webkit-mask-size: 100%;
    mask-size: 100%;
  }
}
