/*
Theme Name: DMStore Hygiene Commerce
Theme URI: https://example.com/themes/dmstore-hygiene
Author: DMStore & Contributors (Forked from Twenty Twenty-Five – WordPress Contributors)
Author URI: https://wordpress.org
Description: Optimized WooCommerce block theme tailored for "Benzid Hygiene" (Owner: Yassine Benzid, Safi, Morocco) – specialized in hygiene & beauty products sourced locally and internationally. Provides unified fresh palette, enhanced product cards, origin & trust badges (Morocco-first), improved navigation (categories, search, mini cart) and conversion-focused UX components.
Requires at least: 6.7
Tested up to: 6.8
Requires PHP: 7.2
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dmstore
Tags: woocommerce, e-commerce, full-site-editing, block-patterns, rtl-language-support, accessibility-ready, clean, minimalist
*/

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
	text-decoration-thickness: 1px !important;
	text-underline-offset: .1em;
}

/* Product Categories Header Nav */
.dmstore-categories-nav {margin-left:1rem;}
.dmstore-categories-nav__list {list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:.75rem;}
.dmstore-categories-nav__item a {display:inline-block;padding:.4rem .85rem;font-size:.85rem;font-weight:600;line-height:1;border:1px solid color-mix(in srgb, currentColor 25%, transparent);border-radius:2rem;text-decoration:none;color:var(--wp--preset--color--contrast);background:color-mix(in srgb, currentColor 3%, transparent);transition:.18s background-color,.18s color,.18s border-color;}
.dmstore-categories-nav__item a:hover {background:color-mix(in srgb, currentColor 8%, transparent);} 
.dmstore-categories-nav__item.is-active a {background:var(--wp--preset--color--contrast);color:var(--wp--preset--color--base);border-color:var(--wp--preset--color--contrast);}
@media (max-width:800px){.dmstore-categories-nav__list{overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none;}.dmstore-categories-nav__list::-webkit-scrollbar{display:none;}}

/* Category archive tweaks */
.dmstore-category-archive .products li.product{transition:box-shadow .2s ease;}
.dmstore-category-archive .products li.product:hover{box-shadow:0 4px 16px rgba(0,0,0,.07);} 

/* Focus styles */
:where(.wp-site-blocks *:focus) {
	outline-width: 2px;
	outline-style: solid;
}

/* -------------------------------------------------- */
/* Global Brand Identity Enhancements                  */
/* -------------------------------------------------- */
body.dmstore-woocommerce-page, body.benzid-hygiene {
		background: var(--wp--preset--color--accent-5);
}

/* Utility classes */
.dmstore-badge-inline {display:inline-flex;align-items:center;gap:.35rem;font-size:.65rem;font-weight:600;line-height:1;padding:.25rem .5rem;border-radius:1rem;text-transform:uppercase;letter-spacing:.5px;background:var(--wp--preset--color--accent-1);color:#fff;}
.dmstore-badge-inline.dmstore-badge-secondary {background:var(--wp--preset--color--accent-2);}

/* Product origin micro badge (loop) */
.dmstore-origin-badge {position:absolute;top:.6rem;left:.6rem;z-index:5;}
.dmstore-origin-badge span {background:rgba(13,110,253,.92);color:#fff;font-size:.55rem;font-weight:600;letter-spacing:.5px;padding:.25rem .45rem;border-radius:.35rem;display:inline-flex;align-items:center;gap:.3rem;box-shadow:0 2px 4px rgba(0,0,0,.12);}
.dmstore-origin-badge img {width:14px;height:10px;display:block;object-fit:cover;border-radius:2px;}

/* Product card */
.dmstore-product-item {position:relative;background:#fff;transition:box-shadow .25s ease,transform .25s ease;}
.dmstore-product-item:hover {box-shadow:0 6px 20px -2px rgba(0,48,120,.08),0 2px 6px rgba(0,0,0,.06);transform:translateY(-3px);}
.dmstore-product-item .price {font-weight:700;font-size:.95rem;}
.dmstore-product-item .woocommerce-loop-product__title {font-size:.9rem !important;min-height:2.3em;}
.dmstore-product-item .star-rating {margin:.25rem auto .35rem;}

/* Sale badge override */
.dmstore-sale-badge {position:absolute;top:.6rem;right:.6rem;background:var(--wp--preset--color--accent-3);color:#fff;font-size:.6rem;font-weight:700;line-height:1;padding:.35rem .5rem;border-radius:.4rem;letter-spacing:.5px;box-shadow:0 2px 4px rgba(0,0,0,.15);}

/* Add to cart button styling */
.dmstore-add-to-cart, .dmstore-product-item a.button, .dmstore-product-item .added_to_cart {font-size:.7rem !important;border-radius:2rem !important;padding:.55rem 1rem !important;font-weight:600 !important;letter-spacing:.4px;text-transform:uppercase;}
.dmstore-product-item a.button:hover {filter:brightness(.92);}

/* Trust badges (single product) */
.dmstore-trust-badges {display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:.85rem;margin:2rem 0 1.5rem;}
.dmstore-trust-badge {display:flex;align-items:flex-start;gap:.6rem;padding:.75rem .85rem;background:var(--wp--preset--color--accent-5);border:1px solid color-mix(in srgb,var(--wp--preset--color--contrast) 10%,transparent);border-radius:.75rem;font-size:.7rem;line-height:1.3;font-weight:600;letter-spacing:.3px;}
.dmstore-trust-badge svg {width:20px;height:20px;flex:0 0 20px;stroke:var(--wp--preset--color--accent-2);}

/* Mini cart icon area (block) */
.wp-block-woocommerce-mini-cart {--wc-mini-cart-padding: .25rem .75rem;border:1px solid color-mix(in srgb,currentColor 20%,transparent);border-radius:2rem;}
.wp-block-woocommerce-mini-cart button, .wp-block-woocommerce-mini-cart__toggle {background:transparent !important;color:currentColor !important;}

/* Header search emphasis */
.dmstore-header-search .wp-block-search__input {background:#fff !important;box-shadow:0 1px 2px rgba(0,0,0,.06);}

/* Shop top categories grid adjustments */
.dmstore-shop-top-categories .wp-block-columns {row-gap:var(--wp--preset--spacing--40);}

/* Horizontal featured carousel (taxonomy) */
.dmstore-horizontal-scroll::-webkit-scrollbar {height:8px;}
.dmstore-horizontal-scroll::-webkit-scrollbar-track {background:rgba(0,0,0,.05);border-radius:4px;}
.dmstore-horizontal-scroll::-webkit-scrollbar-thumb {background:rgba(0,0,0,.25);border-radius:4px;}

/* Filters details element */
.dmstore-taxonomy-filters summary::-webkit-details-marker {display:none;}
.dmstore-taxonomy-filters summary {list-style:none;}

/* Responsive tweaks */
@media (max-width:900px){
	.dmstore-trust-badges {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width:600px){
	.dmstore-trust-badges {grid-template-columns:1fr 1fr;}
	.dmstore-product-item {padding:var(--wp--preset--spacing--20) !important;}
	.dmstore-categories-nav__item a {font-size:.75rem;padding:.35rem .7rem;}
}

/* Increase the bottom margin on submenus, so that the outline is visible. */
.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-item:not(:last-child) {
	margin-bottom: 3px;
}

/* Increase the outline offset on the parent menu items, so that the outline does not touch the text. */
.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content {
	outline-offset: 4px;
}

/* Remove outline offset from the submenus, otherwise the outline is visible outside the submenu container. */
.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	outline-offset: 0;
}

/*
 * Progressive enhancement to reduce widows and orphans
 * https://github.com/WordPress/gutenberg/issues/55190
 */
h1, h2, h3, h4, h5, h6, blockquote, caption, figcaption, p {
	text-wrap: pretty;
}

/*
 * Change the position of the more block on the front, by making it a block level element.
 * https://github.com/WordPress/gutenberg/issues/65934
*/
.more-link {
	display: block;
}
