/* ============================================================
   Philomene Paris — ph-catalog.css
   Pages catalogue : drawer filtres, toolbar, titre, pager.
   Maquette Lea (Figma). Echelle typo --t-*.
   ============================================================ */


/* === 1. LAYOUT PLEINE LARGEUR === */

.main-content--page-shop .main-content__section {
  padding: 10px 0 30px;
}


/* === 2. TITRE DE PAGE CATALOGUE === */

.main-content--page-shop h1.page-title,
.path-taxonomy h1.page-title {
  text-align: center;
  text-transform: uppercase;
  font-weight: 700;
  font-size: var(--t-2xl);
  letter-spacing: 0.08em;
  margin: 0 0 10px;
}


/* === 3. TOOLBAR TRIER / FILTRER === */

.ph-catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 0 0 16px;
  margin-bottom: 8px;
}
.ph-catalog-toolbar__left {
  display: flex;
  align-items: center;
}
.ph-catalog-toolbar__right {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

/* === 3b. PILLS SOUS-CATEGORIES === */

.ph-subcategory-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.ph-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border: 1px solid var(--ph-color-black);
  border-radius: 0;
  font-family: inherit;
  font-size: var(--t-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ph-color-black);
  text-decoration: none;
  background: transparent;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.ph-pill:hover {
  background: var(--ph-color-black);
  color: var(--ph-color-white);
  text-decoration: none;
}
.ph-pill.is-active {
  background: var(--ph-color-black);
  color: var(--ph-color-white);
}
.ph-toolbar-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: var(--t-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--ph-color-black);
  padding: 4px 0;
  transition: color 0.2s;
}
.ph-toolbar-btn:hover {
  color: var(--ph-color-camel);
}


/* === 4. SORT DROPDOWN === */

.ph-sort-wrapper {
  position: relative;
}
.ph-sort-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 50;
  background: var(--ph-color-white);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  padding: 16px 20px;
  min-width: 200px;
}
.ph-sort-dropdown.is-open {
  display: block;
}
.ph-sort-dropdown label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 8px 0;
  font-size: var(--t-sm);
  font-weight: 400;
  color: var(--ph-color-black);
}
.ph-sort-dropdown input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid #acacac;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
}
.ph-sort-dropdown input[type="radio"]:checked {
  border-color: var(--ph-color-black);
}
.ph-sort-dropdown input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ph-color-black);
}


/* === 5. DRAWER FILTRES (droite) === */

.ph-filter-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.ph-filter-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.ph-filter-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  width: 380px;
  max-width: 90vw;
  background: var(--ph-color-white);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}
.ph-filter-drawer.is-open {
  transform: translateX(0);
}

.ph-filter-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 20px;
  flex-shrink: 0;
}
.ph-filter-drawer__title {
  font-size: var(--t-lg);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ph-color-black);
}
.ph-filter-drawer__close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  color: var(--ph-color-black);
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}
.ph-filter-drawer__close:hover {
  color: var(--ph-color-camel);
}

.ph-filter-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 0 28px 28px;
}

/* Facet blocks inside drawer */
.ph-filter-drawer .block-facets {
  border-bottom: 1px solid var(--ph-color-border);
  padding: 0 0 16px;
  margin-bottom: 16px;
}
.ph-filter-drawer .block-facets:last-child {
  border-bottom: none;
}
.ph-filter-drawer .block-facets .facet-block-title {
  font-size: var(--t-base);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-left: 0;
  padding-right: 30px;
  margin-bottom: 12px;
  position: relative;
  cursor: pointer;
}
.ph-filter-drawer .block-facets .facet-block-title::after {
  left: auto;
  right: 0;
  font-size: 12px;
}

/* Masquer les anciens elements slideout (plus necessaires) */
.ph-filter-drawer .slideout-filters-toggle,
.ph-filter-drawer .slideout-filters-close-toggle {
  display: none;
}


/* === 6. PAGER CATALOGUE (maquette : bouton VOIR PLUS centré noir) === */

/* Container pager */
.main-content--page-shop .pager,
.path-taxonomy .pager {
  text-align: center;
  padding: 30px 0 10px;
  margin: 0;
}
.main-content--page-shop .pager__items,
.path-taxonomy .pager__items {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  margin: 0;
  list-style: none;
  border: none;
}
.main-content--page-shop .pager__items::before,
.path-taxonomy .pager__items::before {
  display: none;
}

/* Masquer first/last, ne garder que prev / pages / next */
.main-content--page-shop .pager__item--first,
.main-content--page-shop .pager__item--last,
.path-taxonomy .pager__item--first,
.path-taxonomy .pager__item--last {
  display: none;
}

/* Items de page : cercles minimalistes */
.main-content--page-shop li.pager__item,
.path-taxonomy li.pager__item {
  margin: 0 2px;
}
.main-content--page-shop li.pager__item > a,
.path-taxonomy li.pager__item > a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: var(--t-sm);
  font-weight: 400;
  color: var(--ph-color-black);
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.2s;
}
.main-content--page-shop li.pager__item > a:hover,
.path-taxonomy li.pager__item > a:hover {
  border-color: var(--ph-color-border);
  color: var(--ph-color-black);
  background: transparent;
}

/* Page active */
.main-content--page-shop li.pager__item.is-active > a,
.path-taxonomy li.pager__item.is-active > a {
  background: var(--ph-color-black);
  color: var(--ph-color-white);
  border-color: var(--ph-color-black);
  font-weight: 600;
}

/* Fleches prev/next */
.main-content--page-shop .pager__item--previous > a,
.main-content--page-shop .pager__item--next > a,
.path-taxonomy .pager__item--previous > a,
.path-taxonomy .pager__item--next > a {
  width: auto;
  border-radius: 0;
  font-size: 0;
  border: none;
}
.main-content--page-shop .pager__item--previous > a::before,
.path-taxonomy .pager__item--previous > a::before {
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 14px;
  content: "\f053";
  color: var(--ph-color-black);
}
.main-content--page-shop .pager__item--next > a::before,
.path-taxonomy .pager__item--next > a::before {
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 14px;
  content: "\f054";
  color: var(--ph-color-black);
}
.main-content--page-shop .pager__item--previous > a:hover::before,
.main-content--page-shop .pager__item--next > a:hover::before,
.path-taxonomy .pager__item--previous > a:hover::before,
.path-taxonomy .pager__item--next > a:hover::before {
  color: var(--ph-color-camel);
}
/* Masquer le texte "Previous" / "Next" natif */
.main-content--page-shop .pager__item--previous > a > span,
.main-content--page-shop .pager__item--next > a > span,
.path-taxonomy .pager__item--previous > a > span,
.path-taxonomy .pager__item--next > a > span {
  display: none;
}

/* Ellipsis */
.main-content--page-shop .pager__item--ellipsis,
.path-taxonomy .pager__item--ellipsis {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--t-sm);
  color: var(--ph-color-black);
}

/* Infinite scroll pager (si réactivé plus tard) */
.main-content--page-shop .views-infinite-scroll-pager,
.path-taxonomy .views-infinite-scroll-pager {
  text-align: center;
  padding: 30px 0 10px;
}
.main-content--page-shop .views-infinite-scroll-pager .mt-button,
.path-taxonomy .views-infinite-scroll-pager .mt-button {
  background-color: var(--ph-color-black);
  color: var(--ph-color-white);
  border-color: var(--ph-color-black);
  text-transform: uppercase;
  font-size: var(--t-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 14px 50px;
}
.main-content--page-shop .views-infinite-scroll-pager .mt-button:hover,
.path-taxonomy .views-infinite-scroll-pager .mt-button:hover {
  background-color: var(--ph-color-camel);
  border-color: var(--ph-color-camel);
  color: var(--ph-color-white);
}


/* === 7. MASQUER LE VIEWS-EXPOSED-FORM (remplace par toolbar custom) === */

.main-content--page-shop .views-exposed-form,
.path-taxonomy .views-exposed-form {
  display: none;
}


/* === 8. LOCK BODY SCROLL (drawer open) === */


body.ph-drawer-open {
  overflow: hidden;
}


/* === 9. RESPONSIVE === */

@media (max-width: 991px) {
  .ph-filter-drawer {
    width: 320px;
  }
  .main-content--page-shop li.pager__item > a,
  .path-taxonomy li.pager__item > a {
    width: 36px;
    height: 36px;
  }
  .ph-catalog-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .ph-catalog-toolbar__left {
    order: 1;
  }
  .ph-catalog-toolbar__right {
    order: 0;
    justify-content: center;
  }
  .ph-subcategory-pills {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }
  .ph-subcategory-pills::-webkit-scrollbar {
    display: none;
  }
  /* Grille produits : 2 colonnes */
  .view-mt-commerce-products .row.list-unstyled {
    display: flex;
    flex-wrap: wrap;
    margin-left: -10px;
    margin-right: -10px;
  }
  .view-mt-commerce-products .row.list-unstyled > li {
    flex: 0 0 50%;
    max-width: 50%;
    float: none;
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 20px;
  }
}
@media (max-width: 575px) {
  .view-mt-commerce-products .row.list-unstyled {
    margin-left: -6px;
    margin-right: -6px;
  }
  .view-mt-commerce-products .row.list-unstyled > li {
    padding-left: 6px;
    padding-right: 6px;
    margin-bottom: 16px;
  }
}
@media (max-width: 480px) {
  .ph-filter-drawer {
    width: 100vw;
    max-width: 100vw;
  }
}