/*
Theme Name: Flatsome Child
Description: This is a child theme for Flatsome Theme
Author: UX Themes
Template: flatsome
Version: 3.0.202610021605
*/

/*************** ADD CUSTOM CSS HERE.   ***************/

.theme-wishlist-icon {
  position: relative;
  margin-left: 6px;
}
.theme-wishlist-icon .wishlist-link {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px;
  height: 32px;
  border: 1px solid #e0e0e0;
  border-radius: 50%;
  background: #fff;
  color: #222 !important;
  transition: all 0.2s ease;
}
.theme-wishlist-icon .wishlist-link:hover {
  border-color: #c9191e;
  color: #c9191e !important;
  background: #fff5f4;
}
.theme-wishlist-icon .icon-heart {
  font-size: 16px !important;
  line-height: 1;
}
.theme-wishlist-icon .wishlist-count-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  background: #c9191e;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  padding: 0 4px;
  line-height: 1;
}

@media only screen and (max-width: 48em) {
/*************** ADD MOBILE ONLY CSS HERE  ***************/
}

/* ==== FIX PRODUCT GRID 5 COLUMNS + WISHLIST BUTTON CONTAINMENT (2026-08-07 v3) ==== */
@media (min-width:850px){
  body .row.large-columns-5,body .products.row.large-columns-5{display:flex!important;flex-flow:row wrap!important;align-items:stretch!important;}
  body .row.large-columns-5>.col,body .products.row.large-columns-5>.col{flex:0 0 20%!important;max-width:20%!important;width:20%!important;min-width:0!important;box-sizing:border-box!important;float:none!important;}
  body .row.large-columns-5>.col>.col-inner{width:100%!important;min-width:0!important;max-width:100%!important;}
}
@media (min-width:550px) and (max-width:849px){body .row.medium-columns-3>.col,body .products.row.medium-columns-3>.col{flex:0 0 33.333333%!important;max-width:33.333333%!important;width:33.333333%!important;}}
body .product-small.box,body .product-small .box-text,body .product-small .xct-group{min-width:0!important;max-width:100%!important;box-sizing:border-box!important;}
body .product-small .xct-group{width:100%!important;overflow:hidden!important;flex-wrap:nowrap!important;}
body .product-small .xct-group a.button.alert.has-block{flex:1 1 auto!important;min-width:0!important;max-width:calc(100% - 80px)!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;}
body .product-small .xct-group .xct-btn,body .product-small .xct-group .xct-wishlist{flex:0 0 34px!important;width:34px!important;min-width:34px!important;max-width:34px!important;}



/* ==== PRODUCT GALLERY IMAGE RATIO 1:1 / HINH VUONG (2026-10-02) ==== */
body.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image img.wp-post-image,
body.single-product .woocommerce-product-gallery .product-gallery-slider .woocommerce-product-gallery__image img {
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  width: 100% !important;
  height: auto !important;
  display: block;
}
/* thumbnail nav cung vuong cho dong bo */
body.single-product .product-thumbnails .col img {
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
}


/* ==== LIGHTBOX anh san pham (PhotoSwipe): khung 1:1 / hinh vuong (2026-10-02) ==== */
.pswp .pswp__zoom-wrap,
.pswp .pswp__img {
  -webkit-transform: none !important;
  transform: none !important;
}
.pswp .pswp__img {
  position: absolute !important;
  top: 0 !important; right: 0 !important; bottom: 0 !important; left: 0 !important;
  margin: auto !important;
  width: min(88vh, 88vw) !important;
  height: min(88vh, 88vw) !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  background: #fff !important;
}
