/*
Theme Name:   Twenty Twenty-Five Child
Theme URI:    https://the-good-coffee.com
Description:  Thème enfant pour Twenty Twenty-Five avec personnalisations Dokan
Author:       Yannick Vandenthoren
Template:     twentytwentyfive
Version:      1.0.0
*/

/* ==== Global ==== */
.desktop{
    display: inherit;
}
.mobile{
    display: none;
}
.wp-block-navigation__responsive-container{
    left: auto;
}
.wp-block-navigation__responsive-container.is-menu-open{
    max-width: 380px;
    width: 100%;
    justify-self: flex-end;
}
.text-border{
	-webkit-text-stroke: 1px var(--wp--preset--color--contrast);
	text-stroke: 1px var(--wp--preset--color--contrast);
	text-shadow: 2px 2px 0px var(--wp--preset--color--contrast);
}
.full-bleed{
	width: 100vw;
	margin-left: calc(50vw - 50%);
}
.page-padding{
	padding-right: 0;
	padding-left: 0;
}
.page-padding > *{
	padding-right: var(--wp--style--root--padding-right);
	padding-left: var(--wp--style--root--padding-left);
}
/* ==== Fix Sticky Header ==== */
header:has(>.is-position-sticky) {
	position: sticky;
	top: calc( 0px + var( --wp-admin--admin-bar--height, 0px ) );
	z-index: 100;
}

@media (max-width: 600px) {
	header:has(>.is-position-sticky) {
		top: 0;
	}
	.desktop{
	    display: none;
	}
	.mobile{
	    display: initial;
	}
	.wp-block-navigation__responsive-container.is-menu-open{
    max-width: initial;
    justify-self: initial;
}
}
/* ==== Personalise woocommerce ==== */
.woocommerce-ordering{
    display: flex;
    gap: 4px;
}
.woocommerce-ordering select{
    border: 0 !important;
    font-size: var(--wp--preset--font-size--custom-1);
    color: var(--wp--preset--color--contrast);
    font-family: 'Ohno Softie Variable';
}
.woocommerce-ordering::before{
   content: url("data:image/svg+xml,%3C!--%0Atags: %5Btop, bottom, parallel, order%5D%0Acategory: Arrows%0Aversion: '1.2'%0Aunicode: 'eb5a'%0A--%3E%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23472d2a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%0A%3E%3Cpath d='M3 9l4 -4l4 4m-4 -4v14' /%3E%3Cpath d='M21 15l-4 4l-4 -4m4 4v-14' /%3E%3C/svg%3E%0A");
   display: block;
    width: 16px;
    height: 16px;
}

/* ==== Aroma chips ==== */
.tgc-aroma-chips {
    display: flex;
    gap: 8px;
}
.tgc-aroma-chips br{
    display: none;
}
.tgc-aroma-chip {
    margin: 0;
  padding: 4px 16px;
  font-size: var(--wp--preset--font-size--custom-2);
  border-radius: 50px;
  line-height: 1;
  flex-shrink: 0;
    color: var(--wp--preset--color--contrast);
    background: var(--wp--preset--color--accent-3);
}

.tgc-vendor-name{
    margin: 0;
    color: var(--wp--preset--color--contrast);
    font-size: var(--wp--preset--font-size--custom-2);
    
}
.tgc-product-chips-container{
	display: flex;
	gap: 8px;
}
.tgc-product-chips-container .tgc-aroma-chip{
	border: 1px solid var(--wp--preset--color--contrast);
	    background: transparent;
}
.wp-block-column:has(.dokan-variation-custom-fields-container) .dokan-variation-custom-fields-container{
	display: none !important;
}
/* ==== Dokan Roaster page style ==== */

/* Adapt broken wp styles */
body:has(.roaster_page) .supheader > div,
body:has(.roaster_page) .main_header > div > div {
    width: 100%;
    justify-content: space-between;
}
body:has(.roaster_page) .main_header ul{
    gap: 24px;
}
body:has(.roaster_page) .supheader > div div {
    gap: 8px;
}

body:has(.roaster_page) .footer > div{
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    width: 100%;
}
body:has(.roaster_page) footer{
    width: 100vw;
}
body:has(.roaster_page) .footer .wp-block-social-links{
    gap: 16px;
}
body:has(.roaster_page) .wp-block-columns{
    width: 100%;
}
body:has(.roaster_page) .subfooter >div {
    justify-content: space-between;
}
body:has(.roaster_page) .subfooter ul {
    gap: 8px;
}
/* end broken wp styles */

.dokan {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 24px;
}
.roaster_page .site-main{
    box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 1050px;
}
.roaster_page #breadcrumbs {
    font-size: var(--wp--preset--font-size--small);
}
.roaster_page #breadcrumbs > span{
    display: flex;
    gap: 8px;
}
.roaster_page .roaster {
  display: flex;
  flex-direction: column-reverse;
  gap: 24px;
}
.roaster_page .roaster_details {
  display: grid;
  grid-template-columns: 80px 1fr;
  grid-template-areas:
    "logo title title"
    "desc desc desc"
    "social social social";
  justify-content: center;
  align-content: center;
  align-items: flex-start;
  padding: 24px;
  background: var(--wp--preset--color--accent-3);
  border-radius: 12px;
  gap: 24px;
}
.roaster_page .title {
  grid-area: title;
  display: flex;
  flex-direction: column;
  align-self: center;
  gap: 4px;
}
.roaster_page .logo {
  grid-area: logo;
  aspect-ratio: 1/1;
  width: 80px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--wp--preset--color--accent-1);
}
.roaster_page .logo img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.roaster_page .title_text{
    margin: 0;
    line-height: 1;
    font-weight: bold;
    font-size: var(--wp--preset--font-size--x-large);
}
.roaster_page .address,.roaster_page .rating{
    color: var(--wp--preset--color--custom-grey);
    font-size: var(--wp--preset--font-size--custom-1);
}
.roaster_page .address .street_1,
.roaster_page .address .street_2{
    display: none;
}
.roaster_page .desc {
    grid-area: desc;
    color: var(--wp--preset--color--custom-grey);
    font-size: var(--wp--preset--font-size--small);
    
}
.roaster_page .desc > * {
    margin: 0;
}
.roaster_page .socials {
  grid-area: social;
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 16px;
}
.roaster_page .cover{
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 12px;
    overflow: hidden;
}
.roaster_page .cover img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.roaster_page .dokan-store-products-filter-area{
    padding-top: 24px;
    margin: 0;
    border-top: 1px solid rgba(71,45,42,.2);
}
.roaster_page .dokan-store-products-filter-area input{
    display: none;
}
.roaster_page ul.products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-areas: "products products";
    align-items: baseline;
    width: 100%;
    padding: 0;
    margin: 0;
    gap: 24px;
    list-style: none;
}
.roaster_page .woocommerce-LoopProduct-link.woocommerce-loop-product__link{
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-decoration: none;
}
.roaster_page .attachment-woocommerce_thumbnail.size-woocommerce_thumbnail{
    width: 100%;
    height: auto;
    margin-bottom: 12px;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    
}
.roaster_page .price{
    
    font-size: var(--wp--preset--font-size--small);
    margin-bottom: 0.75rem;
}
.roaster_page .woocommerce-loop-product__title{
    
    font-size: var(--wp--preset--font-size--medium) !important;
    font-style: normal;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}
.roaster_page .tgc-aroma-chips{
    
}
.roaster_page .button.wp-element-button.product_type_variable,
.roaster_page .button.wp-element-button.product_type_simple,
.roaster_page .tgc-vendor-name{
    display: none;
}
@media screen and (min-width: 768px) {
  .roaster_page .roaster {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-areas: "details details image";
  }
  .roaster_page .roaster_details {
    grid-area: details;
  }
  .roaster_page .cover {
    grid-area: image;
    align-self: stretch;
    flex-grow: 1;
    heigth: auto;
  }
  .roaster_page ul.products {
    grid-template-columns: repeat(4, 1fr);
    grid-template-areas: "products products products products";
  }
  .roaster_page .products_section {
    grid-area: products;
  }
  .roaster_page .products_list {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fill, minmax(calc(100% / 5), 1fr));
    justify-content: flex-start;
  }
}

/* ==== Dokan Roaster card style ==== */
.sellers_list{
    padding: 0;
    list-style: none;
}
.sellers_list .cover{
    aspect-ratio: 0.79 / 1;
    border-radius: 12px;
    height: auto;
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: initial;
    display: block;
    overflow: hidden;
    position: relative;
    width: 100%;
    z-index: 0;
}
.sellers_list img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}
.sellers_list .details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: -54px;
}
.sellers_list .details_link{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.sellers_list .details_title h2{
    margin: 0;
    font-size: var(--wp--preset--font-size--large);
    font-weight: 600;
}
.sellers_list .details_title a{
    text-decoration: none;
}
.sellers_list .details_address {
  display: flex;
  align-items: center;
  margin: 0;
  gap: 4px;
  font-size: var(--wp--preset--font-size--small);
}
.sellers_list .details_address .street_1,
.sellers_list .details_address .street_2{
    display: none;
}
.sellers_list .details_address .country{
    order: 0;
}
.sellers_list .details_address .city{
    order: 1;
}
.sellers_list .logo_link{
	width: 80px;
	height: 80px;
	  z-index: 1;
}
.sellers_list .logo {
	box-sizing: border-box;
	overflow: hidden;
	display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1/1;
  background: white;
  border: 4px solid white;
  border-radius: 12px;
		  z-index: 1;
}
.sellers_list .logo img{
    border-radius: 8px;
}
.sellers_list .picture {
  position: relative;
}
.sellers_list_page .sellers_list {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(calc(100% / 3), 1fr));
  justify-content: flex-start;
  width: 100%;
}
@media screen and (min-width: 768px) {
  .sellers_list_page .sellers_list{
    grid-template-columns: repeat(auto-fill, minmax(calc(100% / 5), 1fr));
  }
}

/* ==== Style spécifique pour le slider de torréfacteurs ==== */
/* ===== Conteneur principal ===== */
.scroll-carousel-container {
    position: relative;
    z-index:1;
    width: 100%;
}

/* ===== Contrôles ===== */

.scroll-carousel-container .ctrls {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.scroll-carousel-container .ctrls button {
    border: none;
    cursor: pointer;
    line-height: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.scroll-carousel-container .ctrls button:disabled {
    opacity: 30%;
    cursor: not-allowed;
}

.scroll-carousel-container .ctrls svg {
    width: 18px;
    height: 18px;
    stroke-width: 1.5px;
    stroke: #5a3e2b;
}

/* ===== Carousel ===== */
.scroll-carousel ul{
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none; /* Cache la scrollbar dans IE/Edge */
    scrollbar-width: none; /* Cache la scrollbar dans Firefox */
    scroll-padding: 24px;
    padding-bottom: 10px; /* Espace pour éviter que le contenu soit collé au bord */
}

/* Cache la scrollbar dans Chrome/Safari/Opera */
.scroll-carousel::-webkit-scrollbar {
    display: none;
}

/* ===== Style des cartes (adapté à Dokan) ===== */
.scroll-carousel ul li {
    flex: 0 0 calc(calc(100% / 3) - 16px);
    scroll-snap-align: start;
}

/* ==== Catégory cards ==== */
.cat_card{
    position: relative;
}
.cat_card a::before{
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

/* ==== Form style ==== */
.contact_page .wpcf7-form{
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "name email" "subject ." "message message" "nl nl" "btn .";
    gap: 16px;
    max-width: 70ch;
}
.contact_page .wpcf7-form p{
    width: 100%;
    margin: 0;
    padding: 0;
}
.contact_page .wpcf7-form p:has(#contact_name){
    grid-area: name;
}
.contact_page .wpcf7-form p:has(#contact_email){
    grid-area: email;
}
.contact_page .wpcf7-form p:has(#contact_subject){
    grid-area: subject;
}
.contact_page .wpcf7-form p:has(#contact_message){
    grid-area: message
}
.contact_page .wpcf7-form p:has(#contact_nl){
    grid-area: nl
}
.contact_page .wpcf7-form p:has(#contact_btn){
    grid-area: btn
}
.contact_page .wpcf7-form label{
    font-size: var(--wp--preset--font-size--custom-1);
    width: 100%;
}
.contact_page .wpcf7-form input, .contact_page .wpcf7-form textarea{
    border: 1px solid var(--wp--preset--color--custom-grey);
    border-radius: 8px;
    font-size: var(--wp--preset--font-size--small);
    font-family: var(--wp--preset--font-family--ohno-softie-variable);
    padding: 12px;
    width: 100%;
	box-sizing: border-box;
}
.contact_page .wpcf7-form p:has(#contact_btn) input{
    grid-area: btn;
	width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--wp--preset--color--contrast);
    background: var(--wp--preset--color--accent-1);
    box-shadow: var(--wp--preset--shadow--shadow-1);
    border-radius: 50px;
}
.contact_page .wpcf7-form p:has(#contact_nl) span{
    padding: 0;
    margin: 0;
}
.contact_page .wpcf7-form p:has(#contact_nl) label{
    display: flex;
    gap: 4px;
}
.contact_page .wpcf7-form p:has(#contact_nl) input{
    width: auto;
}
@media screen and (max-width: 768px) {
    .contact_page .wpcf7-form{
        grid-template-columns: 1fr 1fr;
        grid-template-areas: "name name" "email email" "subject subject" "message message" "nl nl" "btn btn";
        gap: 16px;
    }
}

/** ====== Fiche produit ====== **/
.is-style-swatch .wc-block-product-filter-chips__item[aria-checked=true],
.is-style-swatch .wc-block-product-filter-chips__label{
	align-items: center;
	border: none;
	border-radius: 12px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	justify-content: center;
	border: 1px solid var(--wp--preset--color--accent-3);
}
.is-style-swatch .wc-block-product-filter-chips__item{
		background: var(--wp--preset--color--accent-3);
		border-radius: 12px;
		border: 1px solid var(--wp--preset--color--accent-3);
}
@media (hover:hover){
	.is-style-swatch .wc-block-product-filter-chips__item:hover{
	border-radius: 12px;
	}
}
.is-style-swatch .wc-block-product-filter-chips__label{
	padding: 16px;
}
.is-style-swatch :where(.wc-block-product-filter-chips__swatch){
	background-position: center;
	border-radius: 0;
	height: 56px;
	width: 56px;
	background-size: contain;
	border: 0;
}
.is-style-swatch .wc-block-product-filter-chips__count, .is-style-swatch .wc-block-product-filter-chips__text{
	clip: none;
	clip-path: none;
	display: block;
	height: initial;
	overflow: visible;
	position: relative;
	white-space: nowrap;
	width: initial;
}
.wp-block-woocommerce-add-to-cart-with-options-variation-selector {
	display: flex;
	flex-direction: column;
}
.wp-block-woocommerce-add-to-cart-with-options-variation-selector-attribute:has([data-wp-context*="Mouture"]){
	background: red;
	order: 1;
}