/*
Theme Name: AZ Theme Child
Theme URI: https://tndigi.com
Description: Giao diện riêng của website, kế thừa framework dùng chung từ AZ Theme.
Author: TN Digi Solution
Author URI: https://tndigi.com
Template: az-theme
Version: 1.0.0
Requires at least: 5.8
Requires PHP: 7.4
Text Domain: az-theme-child
*/

/* Chỉ thêm CSS riêng của website tại theme child này. */

/* Compact product-page heading area; thumbnails remain the gallery controls. */
body.single-product .az-site .az-main.az-product-detail {
  padding-top: 0;
}
body.single-product .az-site .az-product-breadcrumb {
  padding-top: 12px;
  padding-bottom: 14px;
}
body.single-product .az-site .az-product-gallery-nav,
body.single-product .az-site .az-product-gallery-zoom {
  display: none;
}
@media (max-width: 640px) {
  body.single-product .az-site .az-product-breadcrumb {
    padding-top: 10px;
    padding-bottom: 10px;
  }
}

/* Compact catalogue heading/controls; avoid gaps for absent grid sections. */
.az-site .az-shop-page { padding-top: 0; margin-top: 0; }
.az-site .az-shop-page .az-shop-notices:has(> .woocommerce-notices-wrapper:empty) { display: none; }
.az-site .az-shop-layout { padding-top: 8px; row-gap: 12px; }
.az-site .az-shop-catalog-toolbar { min-height: 40px; padding: 0; gap: 12px; }
.az-site .az-shop-catalog-toolbar select { min-height: 36px; font-size: 14px; }
.az-site .az-shop-layout--category .az-shop-top-filters { grid-row: var(--az-shop-filter-row, 3); }
.az-site .az-shop-layout--category > .az-shop-sidebar,
.az-site .az-shop-layout--category .az-shop-grid,
.az-site .az-shop-layout--category .az-shop-empty { grid-row: var(--az-shop-product-row, 4); }
/* On the shop index, put the toolbar in its own row above both columns. */
.az-site .az-shop-layout:not(.az-shop-layout--category) .az-shop-results { display: contents; }
.az-site .az-shop-layout:not(.az-shop-layout--category) > .az-shop-sidebar,
.az-site .az-shop-layout:not(.az-shop-layout--category) .az-shop-grid,
.az-site .az-shop-layout:not(.az-shop-layout--category) .az-shop-empty { grid-row: var(--az-shop-product-row, 2); }
.az-site .az-shop-layout:not(.az-shop-layout--category) .az-shop-top-filters { grid-row: var(--az-shop-filter-row, 2); }
.az-site .az-shop-layout .woocommerce-pagination { grid-column: 1 / -1; }
@media (max-width: 720px) {
  .az-site .az-shop-layout .az-shop-grid,
  .az-site .az-shop-layout .az-shop-empty { grid-row: calc(var(--az-shop-product-row, 2) + 1); }
  .az-site .az-shop-layout { padding-top: 6px; row-gap: 10px; }
  .az-site .az-shop-catalog-toolbar { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .az-site .az-shop-catalog-toolbar .woocommerce-ordering { max-width: 100%; }
  .az-site .az-shop-catalog-toolbar select { max-width: 100%; }
}

/* Allow article grid items to shrink below the intrinsic width of large images. */
.az-site .az-single-post__main,
.az-site .az-single-post__content {
  min-width: 0;
  box-sizing: border-box;
}

.az-site .az-single-post__featured img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.az-site .az-single-post__content .az-post-content {
  min-width: 0;
  overflow-wrap: anywhere;
}

.az-site .az-post-content img,
.az-site .az-post-content video,
.az-site .az-post-content iframe {
  max-width: 100%;
}

.az-site .az-post-content img {
  height: auto;
}

.az-site .az-post-content figure,
.az-site .az-post-content .wp-caption {
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .az-site .az-single-post__layout {
    grid-template-columns: minmax(0, 1fr);
  }
}
