/*
Theme Name: Porto Child
Theme URI: https://www.portotheme.com/wordpress/porto
Author: P-THEMES
Author URI: https://www.portotheme.com/
Description: Porto Responsive WordPress + eCommerce Theme.
Version: 1.1
Template: porto
License: Commercial
License URI: http://themeforest.net/licenses/regular_extended
Tags: woocommerce, corporate, ecommerce, responsive, blue, black, green, white, light, dark, red, two-columns, three-columns, four-columns, left-sidebar, right-sidebar, fixed-layout, responsive-layout, custom-menu, editor-style, featured-images, flexible-header, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready, accessibility-ready
*/

/*************** ADD YOUR CUSTOM CSS HERE  ***************/


/* PetAvenue home category icons: Porto's category cards do not output thumbnails here. */
.home .porto-tb-item.product_cat-27 .porto-ibanner-layer,
.home .porto-tb-item.product_cat-53 .porto-ibanner-layer,
.home .porto-tb-item.product_cat-54 .porto-ibanner-layer,
.home .porto-tb-item.product_cat-57 .porto-ibanner-layer,
.home .porto-tb-item.product_cat-58 .porto-ibanner-layer {
	width: 55px;
	height: 55px;
	background: url('https://petavenue.ma/wp-content/uploads/2024/12/shop51-icon-cat.png') center / contain no-repeat;
}
.home .porto-tb-item.product_cat-28 .porto-ibanner-layer,
.home .porto-tb-item.product_cat-55 .porto-ibanner-layer,
.home .porto-tb-item.product_cat-56 .porto-ibanner-layer,
.home .porto-tb-item.product_cat-59 .porto-ibanner-layer,
.home .porto-tb-item.product_cat-60 .porto-ibanner-layer,
.home .porto-tb-item.product_cat-61 .porto-ibanner-layer {
	width: 55px;
	height: 55px;
	background: url('https://petavenue.ma/wp-content/uploads/2024/12/shop51-icon-dog.png') center / contain no-repeat;
}


/* Pet Avenue – category visual cards */
.custom-cat-type .porto-ibanner {
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
}
.custom-cat-type .porto-ibanner .porto-ibanner-layer {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 168px;
  padding: 4px;
}
.custom-cat-type .porto-ibanner .porto-tb-featured-image,
.custom-cat-type .porto-ibanner .img-thumbnail {
  display: flex;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  align-items: center;
  justify-content: center;
}
.custom-cat-type .porto-ibanner .porto-tb-featured-image img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  object-fit: contain;
  transform: scale(1.12);
}
.custom-cat-type .porto-ibanner i[class*="porto-icon"] {
  display: none !important;
}
@media (max-width: 767px) {
  .custom-cat-type .porto-ibanner .porto-ibanner-layer { min-height: 132px; }
  .custom-cat-type .porto-ibanner .porto-tb-featured-image img { transform: scale(1.06); }
}


/* Keep category artwork large and contained inside Porto circles */
.custom-cat-type .porto-ibanner {
  width: 130px !important;
  height: 130px !important;
}
.custom-cat-type .porto-ibanner .porto-ibanner-layer {
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 0 !important;
}
.custom-cat-type .porto-ibanner .porto-tb-featured-image,
.custom-cat-type .porto-ibanner .porto-tb-featured-image .img-thumbnail {
  flex: 0 0 100% !important;
  width: 100% !important;
  height: 100% !important;
}
@media (max-width: 767px) {
  .custom-cat-type .porto-ibanner { width: 108px !important; height: 108px !important; }
}


/* Home: replace all legacy category icons with category artwork */
body.home .cat-icon-wrapper .porto-heading,
body.home .cat-icon-wrapper .porto-ibanner-layer > img {
  display: none !important;
}
body.home .cat-icon-wrapper .porto-ibanner-layer {
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;
}
body.home .cat-icon-wrapper:has(a[href*="/product-category/cat/"]) .porto-ibanner-layer {
  background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/ChatGPT-Image-Sep-20-2026-03_20_01-PM.png") !important;
}
body.home .cat-icon-wrapper:has(a[href*="/product-category/dog/"]) .porto-ibanner-layer {
  background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/ChatGPT-Image-Sep-20-2026-03_19_56-PM.png") !important;
}
body.home .cat-icon-wrapper:has(a[href*="alimentation-humide-chats"]) .porto-ibanner-layer { background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/cat-wet-food.png") !important; }
body.home .cat-icon-wrapper:has(a[href*="croquettes-chats"]) .porto-ibanner-layer { background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/cat-dry-food.png") !important; }
body.home .cat-icon-wrapper:has(a[href*="friandises-chats"]) .porto-ibanner-layer { background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/cat-treats.png") !important; }
body.home .cat-icon-wrapper:has(a[href*="soins-complements-chats"]) .porto-ibanner-layer { background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/cat-care.png") !important; }
body.home .cat-icon-wrapper:has(a[href*="croquettes-chiens"]) .porto-ibanner-layer { background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/dog-dry-food.png") !important; }
body.home .cat-icon-wrapper:has(a[href*="friandises-chiens"]) .porto-ibanner-layer { background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/dog-treats.png") !important; }
body.home .cat-icon-wrapper:has(a[href*="patee-repas-humides-chiens"]) .porto-ibanner-layer { background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/dog-wet-food.png") !important; }
body.home .cat-icon-wrapper:has(a[href*="soins-complements-chiens"]) .porto-ibanner-layer { background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/dog-care.png") !important; }
body.home .cat-icon-wrapper:has(a[href*="jouets-accessoires-chiens"]) .porto-ibanner-layer { background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/dog-toys-accessories.png") !important; }


/* Porto positions category layers at -50%; reset this on the home carousel */
body.home .cat-icon-wrapper .porto-ibanner-layer {
  left: 0 !important;
  top: 0 !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
}


/* Pet Avenue — archive subcategory cards: keep product and pet together */
.tax-product_cat .custom-cat-type .porto-ibanner {
  position: relative !important;
  width: 154px !important;
  height: 154px !important;
  overflow: hidden !important;
}
.tax-product_cat .custom-cat-type .porto-ibanner .porto-ibanner-layer {
  left: 0 !important;
  top: 0 !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  height: 100% !important;
  transform: none !important;
}
.tax-product_cat .custom-cat-type .porto-ibanner .porto-tb-featured-image,
.tax-product_cat .custom-cat-type .porto-ibanner .porto-tb-featured-image .img-thumbnail {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  width: 72% !important;
  height: 100% !important;
  margin: 0 !important;
}
.tax-product_cat .custom-cat-type .porto-ibanner .porto-tb-featured-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  transform: none !important;
}
.tax-product_cat .custom-cat-type .porto-ibanner::after {
  content: "";
  position: absolute;
  z-index: 3;
  right: -3%;
  bottom: -2%;
  width: 47%;
  height: 78%;
  background: center bottom / contain no-repeat;
  pointer-events: none;
}
.tax-product_cat .custom-cat-type .porto-ibanner:has(a[href*="/product-category/cat/"])::after {
  background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/cat-companion.png");
}
.tax-product_cat .custom-cat-type .porto-ibanner:has(a[href*="/product-category/dog/"])::after {
  background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/dog-companion.png");
}
@media (max-width: 767px) {
  .tax-product_cat .custom-cat-type .porto-ibanner {
    width: 118px !important;
    height: 118px !important;
  }
}


/* Pet Avenue — archive subcategory cards: product + pet companion */
.tax-product_cat .custom-cat-type .porto-ibanner { position: relative !important; width: 154px !important; height: 154px !important; overflow: hidden !important; }
.tax-product_cat .custom-cat-type .porto-ibanner .porto-ibanner-layer { left: 0 !important; top: 0 !important; right: auto !important; bottom: auto !important; width: 100% !important; height: 100% !important; transform: none !important; }
.tax-product_cat .custom-cat-type .porto-ibanner .porto-tb-featured-image, .tax-product_cat .custom-cat-type .porto-ibanner .porto-tb-featured-image .img-thumbnail { position: absolute !important; left: 0 !important; top: 0 !important; width: 72% !important; height: 100% !important; margin: 0 !important; }
.tax-product_cat .custom-cat-type .porto-ibanner .porto-tb-featured-image img { width: 100% !important; height: 100% !important; object-fit: contain !important; transform: none !important; }
.tax-product_cat .custom-cat-type .porto-ibanner::after { content: ""; position: absolute; z-index: 3; right: -3%; bottom: -2%; width: 47%; height: 78%; background: center bottom / contain no-repeat; pointer-events: none; }
.tax-product_cat .custom-cat-type .porto-ibanner:has(a[href*="/product-category/cat/"])::after { background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/cat-companion.png"); }
.tax-product_cat .custom-cat-type .porto-ibanner:has(a[href*="/product-category/dog/"])::after { background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/dog-companion.png"); }
@media (max-width: 767px) { .tax-product_cat .custom-cat-type .porto-ibanner { width: 118px !important; height: 118px !important; } }


/* Pet Avenue — unified generated subcategory artwork */
.custom-cat-type .porto-ibanner { overflow: hidden !important; background: #94c144 !important; }
.custom-cat-type .porto-ibanner .porto-ibanner-layer { left: 0 !important; top: 0 !important; right: auto !important; bottom: auto !important; width: 100% !important; height: 100% !important; transform: none !important; background-position: center !important; background-repeat: no-repeat !important; background-size: cover !important; }
.custom-cat-type .porto-ibanner .porto-tb-featured-image, .custom-cat-type .porto-ibanner .porto-tb-featured-image .img-thumbnail { display: none !important; }
.tax-product_cat .custom-cat-type .porto-ibanner::after { display: none !important; }
.custom-cat-type .porto-ibanner:has(a[href*="alimentation-humide-chats"]) .porto-ibanner-layer { background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/cat-wet-food-unified.png") !important; }
.custom-cat-type .porto-ibanner:has(a[href*="croquettes-chats"]) .porto-ibanner-layer { background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/cat-dry-food-unified.png") !important; }
.custom-cat-type .porto-ibanner:has(a[href*="friandises-chats"]) .porto-ibanner-layer { background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/cat-treats-unified.png") !important; }
.custom-cat-type .porto-ibanner:has(a[href*="soins-complements-chats"]) .porto-ibanner-layer { background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/cat-care-unified.png") !important; }
.custom-cat-type .porto-ibanner:has(a[href*="croquettes-chiens"]) .porto-ibanner-layer { background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/dog-dry-food-unified.png") !important; }
.custom-cat-type .porto-ibanner:has(a[href*="patee-repas-humides-chiens"]) .porto-ibanner-layer { background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/dog-wet-food-unified.png") !important; }
.custom-cat-type .porto-ibanner:has(a[href*="friandises-chiens"]) .porto-ibanner-layer { background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/dog-treats-unified.png") !important; }
.custom-cat-type .porto-ibanner:has(a[href*="soins-complements-chiens"]) .porto-ibanner-layer { background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/dog-care-unified.png") !important; }
.custom-cat-type .porto-ibanner:has(a[href*="jouets-accessoires-chiens"]) .porto-ibanner-layer { background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/dog-toys-accessories-unified.png") !important; }

/* Hide Porto's legacy image inside unified category cards */
.custom-cat-type .porto-ibanner .porto-ibanner-layer > img { display: none !important; }

/* Unified artwork on the home category carousel */
body.home .cat-icon-wrapper:has(a[href*="alimentation-humide-chats"]) .porto-ibanner-layer { background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/cat-wet-food-unified.png") !important; }
body.home .cat-icon-wrapper:has(a[href*="croquettes-chats"]) .porto-ibanner-layer { background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/cat-dry-food-unified.png") !important; }
body.home .cat-icon-wrapper:has(a[href*="friandises-chats"]) .porto-ibanner-layer { background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/cat-treats-unified.png") !important; }
body.home .cat-icon-wrapper:has(a[href*="soins-complements-chats"]) .porto-ibanner-layer { background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/cat-care-unified.png") !important; }
body.home .cat-icon-wrapper:has(a[href*="croquettes-chiens"]) .porto-ibanner-layer { background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/dog-dry-food-unified.png") !important; }
body.home .cat-icon-wrapper:has(a[href*="patee-repas-humides-chiens"]) .porto-ibanner-layer { background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/dog-wet-food-unified.png") !important; }
body.home .cat-icon-wrapper:has(a[href*="friandises-chiens"]) .porto-ibanner-layer { background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/dog-treats-unified.png") !important; }
body.home .cat-icon-wrapper:has(a[href*="soins-complements-chiens"]) .porto-ibanner-layer { background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/dog-care-unified.png") !important; }
body.home .cat-icon-wrapper:has(a[href*="jouets-accessoires-chiens"]) .porto-ibanner-layer { background-image: url("https://petavenue.ma/wp-content/uploads/2026/09/dog-toys-accessories-unified.png") !important; }


/* Pet Avenue — category card visibility and compact mobile titles */
.woocommerce-shop .custom-cat-type .porto-ibanner {
  overflow: visible !important;
  margin-bottom: 34px !important;
}
.woocommerce-shop .custom-cat-type .porto-ibanner-desc,
.woocommerce-shop .custom-cat-type .porto-ibanner-layer,
.woocommerce-shop .custom-cat-type .porto-tb-featured-image,
.woocommerce-shop .custom-cat-type .porto-tb-featured-image .img-thumbnail {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
}
.woocommerce-shop .custom-cat-type .porto-tb-featured-image .img-thumbnail {
  overflow: hidden !important;
  border-radius: 50% !important;
}
.woocommerce-shop .custom-cat-type .porto-tb-featured-image img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
}
.custom-cat-type .porto-ibanner { overflow: visible !important; }
.custom-cat-type .porto-ibanner::before {
  position: absolute;
  z-index: 4;
  top: calc(100% + 8px);
  left: 50%;
  display: block;
  width: calc(100% + 18px);
  transform: translateX(-50%);
  color: #243042;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  pointer-events: none;
}
.custom-cat-type .porto-ibanner:has(a[href$="/product-category/cat/"])::before { content: "Chats"; }
.custom-cat-type .porto-ibanner:has(a[href$="/product-category/dog/"])::before { content: "Chiens"; }
.custom-cat-type .porto-ibanner:has(a[href*="/croquettes-chats/"])::before { content: "Croquettes chats"; }
.custom-cat-type .porto-ibanner:has(a[href*="/alimentation-humide-chats/"])::before { content: "Alimentation humide"; }
.custom-cat-type .porto-ibanner:has(a[href*="/friandises-chats/"])::before { content: "Friandises chats"; }
.custom-cat-type .porto-ibanner:has(a[href*="/soins-complements-chats/"])::before { content: "Soins & compléments"; }
.custom-cat-type .porto-ibanner:has(a[href*="/croquettes-chiens/"])::before { content: "Croquettes chiens"; }
.custom-cat-type .porto-ibanner:has(a[href*="/patee-repas-humides-chiens/"])::before { content: "Repas humides"; }
.custom-cat-type .porto-ibanner:has(a[href*="/friandises-chiens/"])::before { content: "Friandises chiens"; }
.custom-cat-type .porto-ibanner:has(a[href*="/soins-complements-chiens/"])::before { content: "Soins & compléments"; }
.custom-cat-type .porto-ibanner:has(a[href*="/jouets-accessoires-chiens/"])::before { content: "Jouets & accessoires"; }
@media (max-width: 767px) {
  .custom-cat-type .porto-ibanner { margin-bottom: 28px !important; }
  .custom-cat-type .porto-ibanner::before {
    top: calc(100% + 6px);
    width: calc(100% + 8px);
    max-width: 116px;
    overflow: hidden;
    color: #243042;
    font-size: 11px;
    line-height: 1.15;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
}

/* Pet Avenue: reserve label space within each mobile carousel item. */
@media (min-width:768px) {
 body:is(.home, .woocommerce-shop, .tax-product_cat) .custom-cat-type .porto-ibanner::before { display:none !important; }
 body.woocommerce-shop .custom-cat-type .porto-ibanner { margin-bottom:0 !important; }
}
@media (max-width:767px) {
 body:is(.home, .woocommerce-shop, .tax-product_cat) .custom-cat-type { box-sizing:border-box; padding-bottom:30px !important; min-width:0; }
 body:is(.home, .woocommerce-shop, .tax-product_cat) .custom-cat-type .porto-ibanner {
   position:relative !important;
   width:100% !important; max-width:118px !important;
   height:auto !important; aspect-ratio:1 / 1;
   margin:0 auto !important; overflow:visible !important;
 }
 body:is(.home, .woocommerce-shop, .tax-product_cat) .custom-cat-type .porto-ibanner .porto-ibanner-desc {
   position:absolute !important; inset:0 !important; width:100% !important; height:100% !important;
   overflow:hidden !important; border-radius:50% !important;
 }
 body:is(.home, .woocommerce-shop, .tax-product_cat) .custom-cat-type .porto-ibanner::before {
   display:block !important; top:calc(100% + 8px) !important;
   left:0 !important; transform:none !important;
   width:100% !important; max-width:100% !important;
   height:16px !important; line-height:16px !important;
   font-size:11px !important; white-space:nowrap !important;
   overflow:hidden !important; text-overflow:ellipsis !important;
 }
}
/* Match the existing animal artwork to the correct parent category. */
body:is(.home, .woocommerce-shop, .tax-product_cat) .custom-cat-type .porto-ibanner:has(a[href$="/product-category/cat/"]) .porto-ibanner-layer {
 background-image:url("https://petavenue.ma/wp-content/uploads/2026/09/ChatGPT-Image-Sep-20-2026-03_19_56-PM.png") !important;
}
body:is(.home, .woocommerce-shop, .tax-product_cat) .custom-cat-type .porto-ibanner:has(a[href$="/product-category/dog/"]) .porto-ibanner-layer {
 background-image:url("https://petavenue.ma/wp-content/uploads/2026/09/ChatGPT-Image-Sep-20-2026-03_20_01-PM.png") !important;
}
body:is(.home, .woocommerce-shop, .tax-product_cat) .custom-cat-type .porto-ibanner:is(:has(a[href$="/product-category/cat/"]),:has(a[href$="/product-category/dog/"])) .porto-tb-featured-image {display:none !important;}

/* Keep all category artwork inside its circular visual frame. */
body .custom-cat-type .porto-ibanner .porto-ibanner-desc,
body .custom-cat-type .porto-ibanner .porto-ibanner-layer {
 border-radius:50% !important;
 overflow:hidden !important;
 clip-path:circle(50% at 50% 50%) !important;
}

/* Subcategory desktop artwork must fit its carousel cell, leaving the native 20px gap. */
@media (min-width:768px) {
 body.tax-product_cat .custom-cat-type { width:100% !important; min-width:0 !important; }
 body.tax-product_cat .custom-cat-type .porto-ibanner {
  width:100% !important; max-width:130px !important; height:auto !important; aspect-ratio:1 / 1; margin-left:auto !important; margin-right:auto !important;
 }
}

@media (min-width:768px) { body.tax-product_cat .custom-cat-type { max-width:none !important; } }


/* Pet Avenue — category names below every category card on desktop and mobile. */
body .custom-cat-type .cat-title { display:none !important; }
body .custom-cat-type { padding-bottom:34px !important; }
body .custom-cat-type .porto-ibanner { overflow:visible !important; }
body .custom-cat-type .porto-ibanner::before {
  display:block !important;
  top:calc(100% + 8px) !important;
  left:50% !important;
  transform:translateX(-50%) !important;
  width:100% !important;
  max-width:130px !important;
  height:18px !important;
  overflow:hidden !important;
  color:#243042 !important;
  font-size:13px !important;
  font-weight:700 !important;
  line-height:18px !important;
  text-align:center !important;
  white-space:nowrap !important;
  text-overflow:ellipsis !important;
}
@media (max-width:767px) {
  body .custom-cat-type { padding-bottom:30px !important; }
  body .custom-cat-type .porto-ibanner::before {
    top:calc(100% + 6px) !important;
    max-width:100% !important;
    height:16px !important;
    font-size:11px !important;
    line-height:16px !important;
  }
}

/* Show labels in Shop and selected category pages at every viewport. */
body:is(.woocommerce-shop, .tax-product_cat) .custom-cat-type .porto-ibanner::before { display:block !important; }

/* Allow category captions to sit beneath cards without clipping them. */
body.tax-product_cat .custom-cat-type .porto-ibanner,
body.woocommerce-shop .custom-cat-type .porto-ibanner { overflow:visible !important; }


/* Blog cards: hide the author line on the homepage only. */
body.home .porto-tb-item .tb-meta-author {
  display: none !important;
}
