/* First Cradle | Shop & product archive visual consistency v2.1.0
 * Styling only. Scope: WooCommerce shop, product categories, product tags and product search.
 * Does not change price, city inventory, booking modal, cart, forms or single product UI.
 */
body.woocommerce-shop,
body.tax-product_cat,
body.tax-product_tag,
body.post-type-archive-product,
body.search.search-results.post-type-archive-product {
  --fc-archive-blue: #0a75bb;
  --fc-archive-ink: #18344e;
  --fc-archive-muted: #607b94;
  --fc-archive-line: #d6e9f5;
  --fc-archive-softblue: #eef8ff;
  --fc-archive-softpink: #fff2f7;
  --fc-archive-shadow: 0 9px 24px rgba(29, 86, 122, .08);
}

/* The homepage keeps its own independently branded shortcode layout. */
body.woocommerce-shop .site-content,
body.tax-product_cat .site-content,
body.tax-product_tag .site-content,
body.post-type-archive-product .site-content {
  background: linear-gradient(180deg,#f5fbff 0%,#fff5f9 320px,#fff 710px);
}

body.woocommerce-shop .ast-woocommerce-container,
body.tax-product_cat .ast-woocommerce-container,
body.tax-product_tag .ast-woocommerce-container,
body.post-type-archive-product .ast-woocommerce-container {
  background: transparent;
}

body.woocommerce-shop .woocommerce-products-header,
body.tax-product_cat .woocommerce-products-header,
body.tax-product_tag .woocommerce-products-header,
body.post-type-archive-product .woocommerce-products-header {
  padding: clamp(17px, 2.8vw, 32px);
  margin: 4px 0 22px;
  background: linear-gradient(115deg, #eaf7ff 0%,#f9fbff 45%,#fff0f6 100%);
  border: 1px solid #d9eaf5;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(16,87,135,.05);
}
body.woocommerce-shop .woocommerce-products-header__title,
body.tax-product_cat .woocommerce-products-header__title,
body.tax-product_tag .woocommerce-products-header__title,
body.post-type-archive-product .woocommerce-products-header__title {
  color: #143b5d;
  font-weight: 800;
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.2;
  margin-bottom: 6px;
}
body.woocommerce-shop .term-description,
body.tax-product_cat .term-description,
body.tax-product_tag .term-description,
body.post-type-archive-product .term-description {
  color: #526d85;
  line-height: 1.65;
}

/* Existing FC search, selected city, category chips. No new forms or handlers. */
body.woocommerce-shop .fc-shop-filters,
body.tax-product_cat .fc-shop-filters,
body.tax-product_tag .fc-shop-filters,
body.post-type-archive-product .fc-shop-filters {
  padding: clamp(14px, 2vw, 21px);
  margin: 0 0 26px;
  border: 1px solid #d8eaf6;
  border-radius: 19px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--fc-archive-shadow);
}
body.woocommerce-shop .fc-search-form input[type="search"],
body.tax-product_cat .fc-search-form input[type="search"],
body.tax-product_tag .fc-search-form input[type="search"],
body.post-type-archive-product .fc-search-form input[type="search"] {
  min-height: 48px;
  border: 1px solid #c9dfec;
  border-radius: 13px;
  background: #f9fcff;
  box-shadow: none;
  color: #23415a;
}
body.woocommerce-shop .fc-selected-city,
body.tax-product_cat .fc-selected-city,
body.tax-product_tag .fc-selected-city,
body.post-type-archive-product .fc-selected-city {
  color: #056eb7;
  font-weight: 700;
}
body.woocommerce-shop .fc-category-chips .fc-chip,
body.tax-product_cat .fc-category-chips .fc-chip,
body.tax-product_tag .fc-category-chips .fc-chip,
body.post-type-archive-product .fc-category-chips .fc-chip {
  display: inline-flex;
  align-items: center;
  min-height: 39px;
  padding: 8px 15px;
  color: #345a79;
  background: #f3f9fd;
  border: 1px solid #d7eaf5;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: color .18s ease,background .18s ease,border-color .18s ease;
}
body.woocommerce-shop .fc-category-chips .fc-chip.active,
body.tax-product_cat .fc-category-chips .fc-chip.active,
body.tax-product_tag .fc-category-chips .fc-chip.active,
body.post-type-archive-product .fc-category-chips .fc-chip.active {
  color: #fff;
  background: #157ab8;
  border-color: #157ab8;
}
body.woocommerce-shop .fc-category-chips .fc-chip:hover,
body.tax-product_cat .fc-category-chips .fc-chip:hover,
body.tax-product_tag .fc-category-chips .fc-chip:hover,
body.post-type-archive-product .fc-category-chips .fc-chip:hover {
  border-color: #84c7ec;
}

/* Keep existing WooCommerce grid column sizing; only style the card surfaces. */
body.woocommerce-shop .woocommerce ul.products li.product,
body.tax-product_cat .woocommerce ul.products li.product,
body.tax-product_tag .woocommerce ul.products li.product,
body.post-type-archive-product .woocommerce ul.products li.product {
  box-sizing: border-box;
  background: #fff;
  padding: 13px 13px 19px;
  border: 1px solid #dfecf5;
  border-radius: 17px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(30,74,108,.07);
  transition: box-shadow .18s ease, transform .18s ease;
}
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  body.woocommerce-shop .woocommerce ul.products li.product:hover,
  body.tax-product_cat .woocommerce ul.products li.product:hover,
  body.tax-product_tag .woocommerce ul.products li.product:hover,
  body.post-type-archive-product .woocommerce ul.products li.product:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(30,74,108,.13);
  }
}
body.woocommerce-shop .woocommerce ul.products li.product img,
body.tax-product_cat .woocommerce ul.products li.product img,
body.tax-product_tag .woocommerce ul.products li.product img,
body.post-type-archive-product .woocommerce ul.products li.product img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 11px;
  background: #f5f9fd;
}
body.woocommerce-shop .woocommerce ul.products li.product .woocommerce-loop-product__title,
body.tax-product_cat .woocommerce ul.products li.product .woocommerce-loop-product__title,
body.tax-product_tag .woocommerce ul.products li.product .woocommerce-loop-product__title,
body.post-type-archive-product .woocommerce ul.products li.product .woocommerce-loop-product__title {
  color: #173a59;
  font-weight: 750;
  line-height: 1.4;
}
body.woocommerce-shop .woocommerce ul.products li.product .price,
body.tax-product_cat .woocommerce ul.products li.product .price,
body.tax-product_tag .woocommerce ul.products li.product .price,
body.post-type-archive-product .woocommerce ul.products li.product .price {
  color: #0a72ab;
  font-weight: 750;
}
/* Reuse the existing request-booking action; never replace a handler. */
body.woocommerce-shop .woocommerce ul.products li.product .fc-quick-book-btn,
body.tax-product_cat .woocommerce ul.products li.product .fc-quick-book-btn,
body.tax-product_tag .woocommerce ul.products li.product .fc-quick-book-btn,
body.post-type-archive-product .woocommerce ul.products li.product .fc-quick-book-btn {
  width: 100%;
  min-height: 42px;
  margin: 10px 0 0;
  color: #fff;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(100deg,#0a7bc2,#118ac9);
  box-shadow: none;
  font-weight: 750;
}
body.woocommerce-shop .woocommerce ul.products li.product .fc-quick-book-btn:hover,
body.tax-product_cat .woocommerce ul.products li.product .fc-quick-book-btn:hover,
body.tax-product_tag .woocommerce ul.products li.product .fc-quick-book-btn:hover,
body.post-type-archive-product .woocommerce ul.products li.product .fc-quick-book-btn:hover {
  background: #086ea9;
}
body.woocommerce-shop .woocommerce-ordering select,
body.tax-product_cat .woocommerce-ordering select,
body.tax-product_tag .woocommerce-ordering select,
body.post-type-archive-product .woocommerce-ordering select {
  min-height: 40px;
  border: 1px solid #d6e7f1;
  background: #fff;
  border-radius: 10px;
  color: #304f6d;
}
body.woocommerce-shop .woocommerce nav.woocommerce-pagination ul li a,
body.tax-product_cat .woocommerce nav.woocommerce-pagination ul li a,
body.post-type-archive-product .woocommerce nav.woocommerce-pagination ul li a {
  border-radius: 8px;
  color: #0a72ab;
}
body.woocommerce-shop .woocommerce nav.woocommerce-pagination ul li span.current,
body.tax-product_cat .woocommerce nav.woocommerce-pagination ul li span.current,
body.post-type-archive-product .woocommerce nav.woocommerce-pagination ul li span.current {
  color: #fff;
  background: #0a7bc2;
  border-radius: 8px;
}

@media (max-width: 921px) {
  body.woocommerce-shop .woocommerce-products-header,
  body.tax-product_cat .woocommerce-products-header,
  body.tax-product_tag .woocommerce-products-header,
  body.post-type-archive-product .woocommerce-products-header {
    padding: 18px 17px;
    border-radius: 15px;
  }
  body.woocommerce-shop .fc-shop-filters,
  body.tax-product_cat .fc-shop-filters,
  body.tax-product_tag .fc-shop-filters,
  body.post-type-archive-product .fc-shop-filters {
    padding: 12px;
    border-radius: 14px;
  }
}
@media (max-width: 500px) {
  body.woocommerce-shop .woocommerce ul.products li.product,
  body.tax-product_cat .woocommerce ul.products li.product,
  body.tax-product_tag .woocommerce ul.products li.product,
  body.post-type-archive-product .woocommerce ul.products li.product {
    padding: 9px 9px 14px;
    border-radius: 13px;
  }
}


/* ===============================================================
 * First Cradle Shop Compact Spacing v2.1.1
 * Presentation-only refinement. Keeps existing design, stock badges,
 * product cards, category filtering, city and booking logic intact.
 * =============================================================== */

/* Reduce Astra's large archive top inset; retain enough breathing room. */
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.post-type-archive-product) #primary {
  margin-top: 0 !important;
}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.post-type-archive-product) .ast-woocommerce-container {
  padding-top: 26px !important;
}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.post-type-archive-product) .woocommerce-breadcrumb {
  margin-top: 0 !important;
  margin-bottom: 13px !important;
}

/* The one-line Shop title does not need a tall hero-style panel. */
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.post-type-archive-product) .woocommerce-products-header {
  padding: 18px 23px !important;
  min-height: 0 !important;
  margin: 0 0 14px !important;
}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.post-type-archive-product) .woocommerce-products-header__title {
  margin: 0 !important;
  line-height: 1.18 !important;
  font-size: clamp(25px, 2.7vw, 33px);
}
/* Preserve space when a category has descriptive editorial content. */
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.post-type-archive-product) .woocommerce-products-header .term-description:not(:empty) {
  margin-top: 10px;
}

/* Search and filter panel: no empty vertical padding above/below controls. */
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.post-type-archive-product) .fc-shop-filters {
  padding: 13px 16px !important;
  margin: 0 0 15px !important;
  min-height: 0 !important;
}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.post-type-archive-product) .fc-search-form {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.post-type-archive-product) .fc-search-form input[type="search"] {
  min-height: 44px;
  margin: 0;
}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.post-type-archive-product) .fc-category-chips {
  margin-top: 0;
  margin-bottom: 0;
}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.post-type-archive-product) .fc-category-chips .fc-chip {
  min-height: 38px;
  padding: 7px 13px;
}

/* Woo result count/sort controls and the first product row. */
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.post-type-archive-product) .woocommerce-result-count,
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.post-type-archive-product) .woocommerce-ordering {
  margin-top: 2px !important;
  margin-bottom: 15px !important;
}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.post-type-archive-product) .woocommerce ul.products {
  margin-top: 0 !important;
}

/* Compact mobile viewport: reveal actual products sooner. */
@media (max-width: 921px) {
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.post-type-archive-product) .ast-woocommerce-container {
    padding-top: 12px !important;
  }
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.post-type-archive-product) .woocommerce-breadcrumb {
    margin-bottom: 10px !important;
  }
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.post-type-archive-product) .woocommerce-products-header {
    padding: 13px 15px !important;
    border-radius: 15px;
    margin-bottom: 12px !important;
  }
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.post-type-archive-product) .woocommerce-products-header__title {
    font-size: 25px;
  }
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.post-type-archive-product) .fc-shop-filters {
    display: block;
    padding: 11px !important;
    margin: 0 0 14px !important;
    border-radius: 14px;
  }
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.post-type-archive-product) .fc-search-form {
    width: 100%;
  }
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.post-type-archive-product) .fc-search-form input[type="search"] {
    min-height: 45px;
    width: 100%;
  }
  /* Make the existing category links swipeable instead of 3+ tall rows.
     Keep the active category visible and preserve horizontal touch input. */
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.post-type-archive-product) .fc-category-chips {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto !important;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    gap: 8px;
    margin-top: 10px !important;
    padding: 0 0 6px !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.post-type-archive-product) .fc-category-chips .fc-chip {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none;
    min-height: 38px;
    white-space: nowrap;
    padding: 7px 13px;
    scroll-snap-align: start;
  }
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.post-type-archive-product) .woocommerce-result-count,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.post-type-archive-product) .woocommerce-ordering {
    margin-bottom: 10px !important;
  }
}
