/*
 * Sweet Corner brand layer for Ecomus.
 * Loaded after the parent theme, WooCommerce and Elementor styles (see functions.php).
 *
 * Fonts (self-hosted, SIL Open Font License 1.1, from Fontsource 5.3.0):
 *   Cormorant Garamond: headings, product names
 *   Jost: body text, menus, buttons, prices
 *   Pinyon Script: opt-in accent, class "sc-script" only
 *
 * Palette, taken from the brand's Instagram (rattan, blush linen, sage, cream):
 *   cream  #F8F3EE   blush #F3E3E1   mauve #9C7B92   rattan #C49A6C
 *   sage   #B9C7B0   ink   #2B2427   magenta #CE027D (logo; accents only)
 */

/* ---------- Fonts ---------- */
@font-face {
	font-family: 'Cormorant Garamond';
	font-style: normal;
	font-weight: 300 700;
	font-display: swap;
	src: url('../fonts/cormorant-garamond-latin-ext-wght-normal.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Cormorant Garamond';
	font-style: normal;
	font-weight: 300 700;
	font-display: swap;
	src: url('../fonts/cormorant-garamond-latin-wght-normal.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Cormorant Garamond';
	font-style: italic;
	font-weight: 300 700;
	font-display: swap;
	src: url('../fonts/cormorant-garamond-latin-ext-wght-italic.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Cormorant Garamond';
	font-style: italic;
	font-weight: 300 700;
	font-display: swap;
	src: url('../fonts/cormorant-garamond-latin-wght-italic.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Jost';
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url('../fonts/jost-latin-ext-wght-normal.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Jost';
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url('../fonts/jost-latin-wght-normal.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Jost';
	font-style: italic;
	font-weight: 100 900;
	font-display: swap;
	src: url('../fonts/jost-latin-ext-wght-italic.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Jost';
	font-style: italic;
	font-weight: 100 900;
	font-display: swap;
	src: url('../fonts/jost-latin-wght-italic.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Pinyon Script';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/pinyon-script-latin-ext-400-normal.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Pinyon Script';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/pinyon-script-latin-400-normal.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
/* "body.theme-ecomus" outranks the theme's inline "body { ... }" and Elementor's ".elementor-kit-8" rules. */
:root,
body.theme-ecomus {
	--sc-cream: #F8F3EE;
	--sc-cream-light: #FCFAF7;
	--sc-blush: #F3E3E1;
	--sc-mauve: #9C7B92;
	--sc-rattan: #C49A6C;
	--sc-sage: #B9C7B0;
	--sc-ink: #2B2427;
	--sc-ink-soft: #5E5458;
	--sc-magenta: #CE027D;
	--sc-line: #E9DFD8;

	--sc-font-serif: 'Cormorant Garamond', 'Times New Roman', serif;
	--sc-font-sans: 'Jost', 'Helvetica Neue', Arial, sans-serif;
	--sc-font-script: 'Pinyon Script', cursive;

	/* Sizing */
	--sc-tap-target: 44px;          /* minimum touch target for icon-only controls (WCAG 2.5.5, Apple HIG) */
	--sc-header-icon-gap: 12px;     /* space between the mobile header icons */
	--sc-footer-title-size: 18px;   /* footer column titles: "Liens Utiles", "Aide", newsletter */

	/* Ecomus */
	--em-font__main: var(--sc-font-sans);
	--em-heading-font: var(--sc-font-serif);
	--em-heading-font-weight: 500;
	--em-heading-line-height: 1.1;
	--em-heading-color: var(--sc-ink);
	--em-color__base: var(--sc-ink-soft);
	--em-color__dark: var(--sc-ink);
	--em-color__primary: var(--sc-magenta);
	--em-link-color: var(--sc-ink);
	--em-link-color-hover: var(--sc-magenta);
	--em-header-color: var(--sc-ink);
	--em-border-color: var(--sc-line);
	--em-color-price-sale: var(--sc-magenta);
	--em-button-bg-color: var(--sc-ink);
	--em-button-bg-color-hover: var(--sc-mauve);
	--em-button-border-color: var(--sc-ink);

	/* Elementor kit globals (the kit still says Roboto / Roboto Slab) */
	--e-global-typography-primary-font-family: 'Cormorant Garamond';
	--e-global-typography-primary-font-weight: 500;
	--e-global-typography-secondary-font-family: 'Cormorant Garamond';
	--e-global-typography-secondary-font-weight: 400;
	--e-global-typography-text-font-family: 'Jost';
	--e-global-typography-text-font-weight: 400;
	--e-global-typography-accent-font-family: 'Jost';
	--e-global-typography-accent-font-weight: 500;
	--e-global-color-secondary: var(--sc-mauve);
	--e-global-color-text: var(--sc-ink-soft);
	--e-global-color-accent: var(--sc-sage);
}

/* ---------- Base type ---------- */
body.theme-ecomus {
	font-family: var(--sc-font-sans);
	color: var(--sc-ink-soft);
	-webkit-font-smoothing: antialiased;
}

.sc-script {
	font-family: var(--sc-font-script) !important;
	font-weight: 400 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
}

/* Section headings ("Luxury Collection", "Best Sellers"...) */
body.theme-ecomus .ecomus-heading:is(h1, h2, h3, h4) {
	font-family: var(--sc-font-serif);
	font-weight: 500;
	letter-spacing: 0.005em;
	color: var(--sc-ink);
}
/* Small headings (h5/h6: "ACHETER PAR CATÉGORIE", service box titles, footer menu titles, panels) stay in Jost:
 * Cormorant is too thin at 14-18px. The theme gives every h1-h6 the heading font, hence this reset.
 * Low specificity, so a font picked on the widget in Elementor still wins. */
:where(body.theme-ecomus) :is(h5, h6),
:where(body.theme-ecomus) :is(h5, h6).ecomus-heading,
:where(body.theme-ecomus) .ecomus-icon-box__title {
	font-family: var(--sc-font-sans);
}
/* Footer column titles ("Liens Utiles", "Aide", newsletter) all in the serif, like the theme's menu titles. */
:where(body.theme-ecomus) :is(.ecomus-navigation-menu__title, .ecomus-subscribe-box__title) {
	font-family: var(--sc-font-serif);
}
/* ...and one size for all of them, whichever widget prints them (menu widget vs newsletter widget). */
body.theme-ecomus .site-footer :is(.ecomus-navigation-menu__title, .ecomus-subscribe-box__title) {
	font-size: var(--sc-footer-title-size);
	line-height: 1.1;
}
body.theme-ecomus div.ecomus-heading {
	font-family: var(--sc-font-sans);
	color: var(--sc-ink-soft);
}

/* Hero slider */
body.theme-ecomus .ecomus-slide__title {
	font-family: var(--sc-font-serif);
	font-weight: 500;
	letter-spacing: -0.005em;
	line-height: 1.02;
}
body.theme-ecomus .ecomus-slide__description {
	font-family: var(--sc-font-sans);
	font-weight: 400;
}

/* Menus */
body.theme-ecomus .main-navigation a,
body.theme-ecomus .secondary-navigation a {
	font-family: var(--sc-font-sans);
	font-weight: 400;
	letter-spacing: 0.04em;
}

/* ---------- Buttons ---------- */
/* Defaults only: specificity (0,1,0), the same as the theme's ".em-button", so this wins over the theme
 * (loaded later) but loses to anything set on a widget in Elementor (".elementor-113 .elementor-element-x ...").
 * No font-size here: Elementor sets it per button, and some round "icon" buttons use font-size: 0 to hide their text. */
:where(body.theme-ecomus) .em-button:where(:not(.em-button-text, .em-button-subtle, .em-button-icon)),
:where(body.theme-ecomus) .button,
:where(body.theme-ecomus) .elementor-button {
	font-family: var(--sc-font-sans);
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
/* Category labels on the "shop by category" photos: sentence case as designed; uppercase made
 * "Oreillers & coussins" wrap onto two lines and overflow the label on phones. */
:where(body.theme-ecomus) .ecomus-image-box-carousel__button {
	text-transform: none;
	letter-spacing: 0.02em;
}
/* ...centred at the bottom of the photo; a long name wraps onto a second centred line instead of overflowing.
 * Higher specificity on purpose: Elementor pins the label to the left with margin-left (bottom margin kept). */
body.theme-ecomus .elementor-widget-ecomus-image-box-carousel .ecomus-image-box-carousel__button.ecomus-image-box-carousel__button {
	left: 0;
	right: 0;
	margin-left: auto;
	margin-right: auto;
	width: max-content;
	max-width: calc(100% - 20px);
	white-space: normal;
	text-align: center;
	line-height: 1.25;
}
/* The category carousel prints arrows twice: in its heading and over the photos. Keep the heading pair. */
body.theme-ecomus .elementor-widget-ecomus-image-box-carousel:has(.ecomus-image-box-carousel__heading--arrows .swiper-button) .ecomus-products-carousel--relative > .swiper-button {
	display: none;
}

/* ---------- Product cards ---------- */
/* Name size and font come from the theme / Elementor (Jost 16px): a 19px serif here made names wrap to
 * three lines on phones. Only the colour is set, and the link inherits the heading's font. */
:where(body.theme-ecomus) .woocommerce-loop-product__title {
	color: var(--sc-ink);
}
:where(body.theme-ecomus) .woocommerce-loop-product__title a {
	font: inherit;
	color: inherit;
}
body.theme-ecomus ul.products li.product .price,
body.theme-ecomus .product-card .price {
	font-family: var(--sc-font-sans);
	font-weight: 500;
	letter-spacing: 0.02em;
	color: var(--sc-ink);
}
body.theme-ecomus .price del {
	color: #A39A9E;
	font-weight: 400;
}

/* Category label above the product name */
body.theme-ecomus .product--cat,
body.theme-ecomus .product--cat a {
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--sc-mauve);
}

/* ---------- Quieter promo elements ---------- */
/* Announcement bar: blush instead of solid magenta */
body.theme-ecomus .campaign-bar {
	--em-campaign-background: var(--sc-blush);
	--em-campaign-text-color: var(--sc-ink);
	color: var(--sc-ink);
}
body.theme-ecomus .campaign-bar,
body.theme-ecomus .campaign-bar * {
	font-family: var(--sc-font-sans);
	font-weight: 500;
	letter-spacing: 0.16em;
}
body.theme-ecomus .campaign-bar .campaign-bar__item,
body.theme-ecomus .campaign-bar .campaign-bar__text {
	color: var(--sc-ink);
}

/* "Vente flash" strip on product photos: soft cream band, magenta text only.
 * Colours ONLY here: the theme's marquee script measures this strip, and changing its size
 * (letter-spacing, padding, font-weight) makes the script loop and freezes the page. */
body.theme-ecomus .ecomus-sale-flash-marquee {
	background-color: rgba(252, 250, 247, 0.92);
	color: var(--sc-ink);
}
body.theme-ecomus .ecomus-sale-flash-marquee .ecomus-marquee__item {
	color: var(--sc-ink);
}
body.theme-ecomus .ecomus-sale-flash-marquee .ecomus-marquee__text span {
	background-color: var(--sc-blush);
	color: var(--sc-magenta);
}
body.theme-ecomus .ecomus-sale-flash-marquee .ecomus-svg-icon {
	color: var(--sc-rattan);
}

/* Sale / new badges */
body.theme-ecomus .woocommerce-badges .onsale,
body.theme-ecomus .woocommerce-badges .woocommerce-badge {
	font-family: var(--sc-font-sans);
	font-weight: 500;
	letter-spacing: 0.08em;
}

/* WhatsApp badge: same colours (set in its settings), brand font, softer shadow */
#wbma-badge.wbma-badge {
	font-family: var(--sc-font-sans);
	font-weight: 500;
	letter-spacing: 0.02em;
	box-shadow: 0 2px 10px rgba(43, 36, 39, 0.12);
}

/* Homepage marquee strip (Elementor "Marquee" widget, set to magenta in the page): cream band, ink text.
 * Colours only, for the same reason as the "Vente flash" strip. The doubled classes outrank Elementor's per-widget CSS. */
body.theme-ecomus .elementor-widget-ecomus-marquee.elementor-element .ecomus-marquee.ecomus-marquee {
	background-color: var(--sc-cream);
}
body.theme-ecomus .elementor-widget-ecomus-marquee.elementor-element .ecomus-marquee .ecomus-marquee__text.ecomus-marquee__text {
	color: var(--sc-ink);
}
body.theme-ecomus .elementor-widget-ecomus-marquee.elementor-element .ecomus-marquee .ecomus-marquee__icon.ecomus-marquee__icon {
	color: var(--sc-rattan);
}

/* ---------- Mega menu (Boutique) ---------- */
body.theme-ecomus .mega-menu .menu-item--widget-heading > span,
body.theme-ecomus .mega-menu .menu-item--widget-heading > a {
	font-family: var(--sc-font-sans);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--sc-mauve);
}
body.theme-ecomus .mega-menu .menu-widget-banner__title.em-button {
	font-family: var(--sc-font-serif);
	font-size: 18px;
	font-weight: 500;
	letter-spacing: 0.02em;
	text-transform: none;
	white-space: nowrap;
}
body.theme-ecomus .mega-menu--grid .mega-menu__column {
	min-width: 175px;
}
body.theme-ecomus .mega-menu--grid .mega-menu__column:has(.menu-widget-banner) {
	min-width: 300px;
}
body.theme-ecomus .mega-menu .menu-item--widget-heading {
	white-space: nowrap;
}

/* ---------- Hero slide videos (inc/hero-video.php) ---------- */
.ecomus-slides-elementor__item .sc-slide-video {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	pointer-events: none;
}
.ecomus-slides-elementor__item .sc-slide-video video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 0.6s ease;
}
.ecomus-slides-elementor__item .sc-slide-video.is-playing video {
	opacity: 1;
}
.ecomus-slides-elementor__item:has(.sc-slide-video) > .ecomus-slide {
	position: relative;
	z-index: 1;
}

/* ---------- Mobile menu panel (template-parts/panels/hamburger.php, inc/mobile-panel.php) ---------- */
/* Header: social icons on the right; the close button stays at the top left. */
body.theme-ecomus .hamburger-panel .panel__header {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	min-height: 58px;
	padding: 7px 8px 7px 60px; /* the 44px icon boxes bring the header to the theme's ~58px */
}
/* Plain brand icons like secretmaison.tn's sidebar: no outline, a full-size tap box around each. */
.sc-panel-socials {
	display: flex;
}
.sc-panel-socials__link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--sc-tap-target);
	height: var(--sc-tap-target);
	border-radius: 50%;
	color: var(--sc-ink);
	transition: background-color 0.2s ease, color 0.2s ease;
}
.sc-panel-socials__link:hover,
.sc-panel-socials__link:focus-visible {
	background-color: var(--sc-cream);
	color: var(--sc-magenta);
}
/* The theme shifts icons onto the text baseline (vertical-align: -.125em); here they sit alone in a
 * flex box, so make them blocks or they end up below the centre. */
.sc-panel-socials__link .ecomus-svg-icon,
.sc-panel-socials__link svg {
	display: block;
	width: 18px;
	height: 18px;
}

/* Footer: a single account row pinned to the bottom of the panel. */
body.theme-ecomus .hamburger-panel .panel__footer {
	padding: 0 0 env(safe-area-inset-bottom, 0px);
	border-top: 1px solid var(--sc-line);
}
.sc-panel-account {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 54px;
	padding: 0 20px;
	font-size: 14px;
	font-weight: 500;
	color: var(--sc-ink);
}
.sc-panel-account:hover,
.sc-panel-account:focus-visible {
	color: var(--sc-magenta);
}
.sc-panel-account .sc-panel-account__icon,
.sc-panel-account svg {
	display: block;
	width: 18px;
	height: 18px;
}

/* Boutique mega menu on phones: one tap opens every category. The theme's second accordion level
 * (+ on each group, links hidden, nested border lines) is flattened: group names become labels,
 * links sit in two columns, and the Luxury Collection banner (hidden by the theme) closes the list. */
body.theme-ecomus .hamburger-panel .hambuger-navigation ul.menu .mega-menu.sub-menu {
	border-left: 0;
	margin: 0 0 16px;
	padding: 0;
}
body.theme-ecomus .hamburger-panel .hambuger-navigation .mega-menu ul.mega-menu__column {
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: 14px;
	min-width: 0; /* undo the desktop column widths (175px / 300px) set above */
	margin: 0 0 12px;
}
body.theme-ecomus .hamburger-panel .hambuger-navigation .mega-menu ul.mega-menu__column .menu-item--widget-heading {
	grid-column: 1 / -1;
	pointer-events: none;
	margin: 2px 0 2px;
}
body.theme-ecomus .hamburger-panel .hambuger-navigation .mega-menu .menu-item--widget-heading > span {
	padding: 6px 0 4px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.14em;
	color: var(--sc-mauve);
}
body.theme-ecomus .hamburger-panel .hambuger-navigation .mega-menu .menu-item--widget-heading > *::before,
body.theme-ecomus .hamburger-panel .hambuger-navigation .mega-menu .menu-item--widget-heading > *::after,
body.theme-ecomus .hamburger-panel .hambuger-navigation .mega-menu .menu-item--widget-heading .toggle-menu-children {
	display: none;
}
body.theme-ecomus .hamburger-panel .hambuger-navigation .mega-menu .mega-menu-sub-item {
	display: block !important; /* the theme's accordion script hides these with an inline style */
	border-left: 0;
	margin: 0;
	padding: 0;
}
body.theme-ecomus .hamburger-panel .hambuger-navigation .mega-menu .mega-menu-sub-item > a {
	display: block;
	padding: 6px 0;
	font-size: 14px;
	line-height: 1.3;
	color: var(--sc-ink-soft);
}
body.theme-ecomus .hamburger-panel .hambuger-navigation .mega-menu ul.mega-menu__column:has(.menu-item--widget-banner) {
	display: block;
	margin-top: 4px;
}
body.theme-ecomus .hamburger-panel .hambuger-navigation .mega-menu .menu-item--widget-banner {
	display: block !important; /* the theme hides banners on phones with !important */
	padding: 0;
}
body.theme-ecomus .hamburger-panel .hambuger-navigation .mega-menu .menu-widget-banner {
	--em-ratio-percent: 46% !important;
	border-radius: 8px;
}
/* Small phones (iPhone SE, older Androids): two columns would wrap most names onto two lines. */
@media (max-width: 359px) {
	body.theme-ecomus .hamburger-panel .hambuger-navigation .mega-menu ul.mega-menu__column {
		grid-template-columns: 1fr;
	}
}

/* ---------- Mobile header ---------- */
/* Room between the icons on the right (search, cart). The theme packs them at 30px apart. */
body.theme-ecomus .site-header__mobile .header-right-items {
	gap: var(--sc-header-icon-gap);
}

/* ---------- Side panels: close buttons ---------- */
/* The theme's close "×" is a 14px icon and only the icon reacts to a tap. An invisible box centred on it
 * gives every side panel (mini cart, menu, account, filters) a full-size target without moving the icon;
 * the ::after box belongs to the button, so the theme's click handler gets the tap.
 * Only add a close button here if the theme positions it (absolute/fixed): .panel__button-close always is.
 * The ::after box would otherwise anchor to some ancestor and catch taps in the wrong place. */
body.theme-ecomus .panel__button-close::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: var(--sc-tap-target);
	height: var(--sc-tap-target);
	transform: translate(-50%, -50%);
}
