/* =====================================================================
   SafePath Header 1.2 – الموقع عربي RTL
   القواعد مربوطة بمعرّفات الإضافة (:is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal)) حتى لا تغيّرها أنماط WoodMart.
   ===================================================================== */

/* Hide the WoodMart header if the theme still prints it. */
.sph-active .whb-header,
.sph-active .whb-sticky-prepared .whb-header,
.sph-active .mobile-nav.wd-side-hidden { display: none !important; }

:is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) {
	--sph-border: #E7E9EE;
	--sph-line: #F0F2F5;
	--sph-muted: #6B7280;
	--sph-soft: #F3F5F8;
	--sph-radius: 14px;
	--sph-h: 52px;
	--sph-shadow: 0 24px 60px rgba(16, 24, 40, .18);
	--t-blue: #0072FD; --t-blue-bg: #E8F1FF;
	--t-orange: #D66B01; --t-orange-bg: #FFF1E5;
	--t-green: #019761; --t-green-bg: #E6F6EF;
	--t-red: #E5260B; --t-red-bg: #FFEDEA;
	font-family: var(--sph-font, inherit);
	color: var(--sph-dark);
	direction: rtl;
	text-align: right;
	line-height: 1.5;
	box-sizing: border-box;
}
:is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) *, :is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) *::before, :is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) *::after { box-sizing: border-box; }
:is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) a { color: inherit; text-decoration: none; }
:is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) ul { list-style: none; margin: 0; padding: 0; }
:is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) li { margin: 0; padding: 0; }
:is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) p, :is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) h2, :is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) h3 { margin: 0; }
:is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) button {
	position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	margin: 0; padding: 0; min-width: 0; min-height: 0; height: auto; width: auto;
	border: 0; border-radius: 0; background: none; box-shadow: none; outline-offset: 2px;
	font: inherit; color: inherit; line-height: 1.3; text-transform: none; letter-spacing: 0;
	cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .2s, color .2s, border-color .2s;
}
:is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) button::before, :is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) button::after { content: none; }
:is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) input[type="search"], :is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) input[type="text"], :is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) input[type="email"], :is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) input[type="password"] {
	box-sizing: border-box; margin: 0; box-shadow: none; font: inherit; color: var(--sph-dark);
	-webkit-appearance: none; appearance: none; text-transform: none;
}
:is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
:is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) :focus-visible { outline: 2px solid var(--sph-primary); outline-offset: 2px; }
:is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) :focus:not(:focus-visible) { outline: 0; }
.sph-ico { width: 1em; height: 1em; display: inline-block; flex-shrink: 0; vertical-align: middle; }

#sph-header .sph-container { max-width: calc(var(--sph-container, 1320px) + 2 * var(--sph-pad, 24px)); margin-inline: auto; padding-inline: var(--sph-pad, 24px); }
#sph-header.sph-w-full .sph-container { max-width: none; }

/* ---------- Announcement bar + brand strip ---------- */
#sph-header .sph-bar { background: var(--sph-bar-bg); color: var(--sph-bar-text); }
#sph-header .sph-bar-text { padding: 10px 0; text-align: center; font-size: 14.5px; font-weight: 700; }
#sph-header .sph-bar-text a { color: inherit; margin-inline-start: 16px; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1.5px; }
#sph-header .sph-strip { display: flex; height: 4px; direction: ltr; }
#sph-header .sph-strip span { flex: 1; }
#sph-header .sph-strip span:nth-child(1) { background: var(--sph-s1); }
#sph-header .sph-strip span:nth-child(2) { background: var(--sph-s2); }
#sph-header .sph-strip span:nth-child(3) { background: var(--sph-s3); }
#sph-header .sph-strip span:nth-child(4) { background: var(--sph-s4); }

/* ---------- Top bar ---------- */
#sph-header .sph-top { background: var(--sph-bg); border-bottom: 1px solid var(--sph-border); font-size: 13.5px; }
#sph-header .sph-top-inner { display: flex; align-items: center; justify-content: space-between; height: 40px; gap: 16px; }
#sph-header .sph-top-start, #sph-header .sph-top-end { display: flex; align-items: center; gap: 22px; }
#sph-header .sph-top-item { display: inline-flex; align-items: center; gap: 7px; color: #4B5563; font-weight: 500; }
#sph-header .sph-top-item .sph-ico { font-size: 16px; color: var(--sph-primary); }
#sph-header a.sph-top-item:hover { color: var(--sph-primary); }

/* ---------- Sticky ---------- */
#sph-header { position: relative; z-index: 400; }
.sph-is-sticky #sph-header { position: sticky; top: var(--sph-stick-top, 0px); }
#sph-header .sph-sticky { background: var(--sph-bg); position: relative; transition: box-shadow .25s ease; }
#sph-header .sph-sticky.is-stuck { box-shadow: 0 6px 24px rgba(16, 24, 40, .08); }

/* ---------- Main row: one height, one centre line ---------- */
#sph-header .sph-main { border-bottom: 1px solid var(--sph-border); }
#sph-header .sph-main-inner { display: flex; align-items: center; gap: 20px; height: 96px; transition: height .25s ease; }
#sph-header .sph-sticky.is-stuck .sph-main-inner { height: 80px; }
#sph-header .sph-logo { display: inline-flex; align-items: center; height: var(--sph-h); flex-shrink: 0; }
#sph-header .sph-logo-img, #sph-drawer .sph-logo-img { height: var(--sph-logo-h); width: auto; max-width: 260px; object-fit: contain; display: block; }
.sph-logo-text { font-size: 22px; font-weight: 800; color: var(--sph-dark); }

#sph-header .sph-cats-btn {
	display: inline-flex; height: var(--sph-h); padding: 0 20px; gap: 10px; flex-shrink: 0;
	border: 1px solid #E3E6EB; border-radius: var(--sph-radius); background: #F7F8FA;
	font-size: 15px; font-weight: 700; color: var(--sph-dark);
}
#sph-header .sph-cats-btn .sph-ico { font-size: 20px; color: var(--sph-primary); }
#sph-header .sph-cats-btn:hover { border-color: var(--sph-primary); background: #fff; color: var(--sph-primary); }

/* actions */
#sph-header .sph-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; margin-inline-start: auto; }
#sph-header .sph-search + .sph-actions { margin-inline-start: 0; }
#sph-header .sph-action { display: inline-flex; align-items: center; gap: 10px; height: var(--sph-h); padding: 0 10px; border-radius: var(--sph-radius); }
#sph-header .sph-action:hover { background: var(--sph-soft); }
#sph-header .sph-action-ico { position: relative; width: 40px; height: 40px; border-radius: 50%; background: var(--sph-soft); display: grid; place-items: center; font-size: 22px; color: var(--sph-dark); flex-shrink: 0; }
#sph-header .sph-action:hover .sph-action-ico { background: #fff; color: var(--sph-primary); }
#sph-header .sph-action-text { display: flex; flex-direction: column; line-height: 1.25; }
#sph-header .sph-action-text small { font-size: 12.5px; color: var(--sph-muted); }
#sph-header .sph-action-text strong { font-size: 15px; font-weight: 700; color: var(--sph-dark); white-space: nowrap; }
#sph-header .sph-cart-total { font-size: 15px; font-weight: 800; color: var(--sph-dark); white-space: nowrap; }
#sph-header .sph-actions-sep { width: 1px; height: 32px; background: var(--sph-border); margin: 0 4px; }
#sph-header .sph-cart-count {
	position: absolute; top: -4px; left: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
	border: 2px solid #fff; background: var(--sph-badge); color: #fff; font-size: 11px; font-weight: 700; line-height: 16px; text-align: center;
}

#sph-header .sph-icon-btn, #sph-drawer .sph-icon-btn, #sph-cart-drawer .sph-icon-btn, #sph-login .sph-icon-btn {
	display: none; width: 44px; height: 44px; border-radius: 12px; font-size: 24px; color: var(--sph-dark);
}
#sph-header .sph-icon-btn:hover { background: var(--sph-soft); color: var(--sph-primary); }

/* ---------- Search field ---------- */
#sph-header .sph-search { flex: 1; min-width: 0; }
:is(#sph-header, #sph-search-modal) .sph-search-form { position: relative; display: block; margin: 0; padding: 0; width: 100%; }
:is(#sph-header, #sph-search-modal) .sph-sf-field {
	display: flex; align-items: center; height: var(--sph-h); padding: 0 6px 0 6px; gap: 4px;
	border: 1.5px solid #D6DAE1; border-radius: var(--sph-radius); background: #fff; transition: border-color .2s, box-shadow .2s;
}
:is(#sph-header, #sph-search-modal) .sph-search-form:focus-within .sph-sf-field,
:is(#sph-header, #sph-search-modal) .sph-search-form.is-open .sph-sf-field { border-color: var(--sph-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sph-primary) 14%, transparent); }
:is(#sph-header, #sph-search-modal) .sph-sf-ico { display: grid; place-items: center; width: 36px; font-size: 20px; color: #8A919C; flex-shrink: 0; }
:is(#sph-header, #sph-search-modal) .sph-search-input {
	flex: 1; min-width: 0; height: 100%; width: auto; max-width: none; padding: 0 12px; border: 0; border-radius: 0;
	background: transparent; font-size: 15.5px; line-height: normal; outline: 0;
}
:is(#sph-header, #sph-search-modal) .sph-search-input::placeholder { color: #9AA1AC; }
:is(#sph-header, #sph-search-modal) .sph-search-input:focus-visible { outline: 0; }
:is(#sph-header, #sph-search-modal) .sph-sf-clear { width: 32px; height: 32px; border-radius: 50%; background: var(--sph-soft); color: var(--sph-muted); font-size: 14px; flex-shrink: 0; }
:is(#sph-header, #sph-search-modal) .sph-sf-clear[hidden] { display: none; }
:is(#sph-header, #sph-search-modal) .sph-sf-clear:hover { background: #E5E8ED; color: var(--sph-dark); }
#sph-header .sph-sf-submit {
	height: 40px; padding: 0 18px; gap: 8px; border-radius: 10px; flex-shrink: 0;
	background: var(--sph-primary); color: #fff; font-size: 15px; font-weight: 700;
}
#sph-header .sph-sf-submit .sph-ico { font-size: 18px; }
#sph-header .sph-sf-submit.is-icon { width: 44px; padding: 0; }
#sph-header .sph-sf-submit:hover { filter: brightness(.92); }

/* panels under the field */
:is(#sph-header, #sph-search-modal) .sph-search-results,
:is(#sph-header, #sph-search-modal) .sph-search-suggest {
	position: absolute; top: calc(100% + 10px); right: 0; left: 0; z-index: 30;
	background: #fff; border: 1px solid var(--sph-border); border-radius: 18px; box-shadow: var(--sph-shadow);
	padding: 20px 22px; max-height: min(70vh, 620px); overflow: auto; text-align: right;
}
#sph-header .sph-search-results, #sph-header .sph-search-suggest { min-width: 620px; }
:is(#sph-header, #sph-search-modal) .sph-search-results[hidden],
:is(#sph-header, #sph-search-modal) .sph-search-suggest[hidden] { display: none; }
.sph-search-suggest.has-two, .sph-sr.has-two { display: grid; grid-template-columns: minmax(180px, 240px) minmax(0, 1fr); gap: 26px; }
.sph-search-suggest:not(.has-two) { display: block; }
.sph-ss-side { display: flex; flex-direction: column; gap: 20px; }
.sph-suggest-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sph-suggest-title { font-size: 14.5px !important; font-weight: 800; color: var(--sph-dark); margin-bottom: 10px !important; }
.sph-suggest-head .sph-suggest-title { margin-bottom: 0 !important; }
:is(#sph-header, #sph-search-modal) .sph-recent-clear { font-size: 13px; color: var(--sph-muted); padding: 2px 4px; }
:is(#sph-header, #sph-search-modal) .sph-recent-clear:hover { color: var(--t-red); }
.sph-recent-list li a { display: flex; align-items: center; gap: 10px; height: 38px; font-size: 14.5px; color: #374151; border-radius: 8px; padding: 0 6px; }
.sph-recent-list li a .sph-ico { font-size: 16px; color: #9AA1AC; }
.sph-recent-list li a:hover { background: var(--sph-soft); color: var(--sph-primary); }
.sph-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sph-chip { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 18px; background: var(--sph-soft); font-size: 14px; font-weight: 500; color: var(--sph-dark); transition: .2s; }
.sph-chip.is-offer { background: var(--t-orange-bg); color: #B45700; font-weight: 700; }
.sph-chip:hover { background: var(--sph-primary); color: #fff !important; }
.sph-suggest-more { font-size: 13.5px; font-weight: 700; color: var(--sph-primary) !important; }
.sph-pcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sph-pcards li a { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; border: 1px solid var(--sph-line); transition: .2s; }
.sph-pcards li a:hover { border-color: var(--sph-primary); box-shadow: 0 6px 18px rgba(0, 114, 253, .08); }
.sph-pc-img, .sph-r-img { width: 60px; height: 60px; border-radius: 10px; overflow: hidden; background: var(--sph-soft); flex-shrink: 0; display: block; }
.sph-pc-img img, .sph-r-img img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; }
.sph-pc-body, .sph-r-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.sph-pc-title, .sph-r-title { font-size: 14px; font-weight: 700; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sph-pc-price, .sph-r-price { font-size: 14px; font-weight: 800; color: var(--sph-primary); white-space: nowrap; }
.sph-pc-price del, .sph-r-price del { color: #9AA1AC; font-weight: 400; font-size: 12.5px; margin-inline-start: 6px; }
.sph-pc-price ins, .sph-r-price ins { text-decoration: none; }
.sph-r-price.is-sale { color: var(--t-red); }
.sph-r-title mark, .sph-sr-cats mark { background: #FFE9A8; color: inherit; border-radius: 3px; padding: 0 1px; }
.sph-r-stock { font-size: 12.5px; font-weight: 700; color: var(--t-green); }
.sph-r-stock.is-low { color: #B45700; }
.sph-r-stock.is-out { color: var(--t-red); }
.sph-results-list li a { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 12px; }
.sph-results-list li a:hover { background: #F4F8FF; }
.sph-sr-cats li a { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 8px; border-radius: 8px; font-size: 14.5px; }
.sph-sr-cats li a small { font-size: 12.5px; color: var(--sph-muted); }
.sph-sr-cats li a:hover { background: var(--sph-soft); color: var(--sph-primary); }
.sph-results-all { display: flex; align-items: center; justify-content: center; height: 46px; margin-top: 10px; border-radius: 12px; background: var(--sph-primary); color: #fff !important; font-size: 15px; font-weight: 700; }
.sph-results-all:hover { filter: brightness(.92); }
.sph-results-none, .sph-results-loading { padding: 18px 8px; text-align: center; color: var(--sph-muted); font-size: 14.5px; }
.sph-spinner { display: inline-block; width: 16px; height: 16px; margin-inline-end: 8px; vertical-align: -3px; border: 2px solid #D6DAE1; border-top-color: var(--sph-primary); border-radius: 50%; animation: sph-spin .8s linear infinite; }
@keyframes sph-spin { to { transform: rotate(360deg); } }

/* ---------- Navigation ---------- */
#sph-header .sph-nav { border-bottom: 1px solid var(--sph-border); }
#sph-header .sph-menu { display: flex; flex-wrap: wrap; align-items: center; gap: 0 2px; }
#sph-header .sph-nav-center .sph-menu { justify-content: center; }
#sph-header .sph-nav-end .sph-menu { justify-content: flex-end; }
/* align the first link's text with the logo edge */
#sph-header .sph-nav-start .sph-menu > li:first-child > a { padding-right: 0; }
#sph-header .sph-nav-start .sph-menu > li:first-child > a::before { right: 0; }
#sph-header .sph-nav-end .sph-menu > li:last-child > a { padding-left: 0; }
#sph-header .sph-nav-end .sph-menu > li:last-child > a::before { left: 0; }
#sph-header .sph-menu > li { position: relative; }
#sph-header .sph-menu > li > a { display: flex; align-items: center; gap: 6px; position: relative; height: 54px; padding: 0 12px; font-size: 15.5px; font-weight: 700; color: var(--sph-dark); white-space: nowrap; }
#sph-header .sph-menu > li > a::before { content: ""; position: absolute; bottom: 0; right: 12px; left: 12px; height: 3px; border-radius: 3px 3px 0 0; background: var(--sph-primary); transform: scaleX(0); transition: transform .25s ease; }
#sph-header .sph-menu > li:hover > a, #sph-header .sph-menu > li.current-menu-item > a, #sph-header .sph-menu > li.current-menu-ancestor > a { color: var(--sph-primary); }
#sph-header .sph-menu > li:hover > a::before, #sph-header .sph-menu > li.current-menu-item > a::before { transform: scaleX(1); }
#sph-header .sph-menu > .menu-item-has-children > a::after {
	content: ""; width: 12px; height: 12px; opacity: .55; background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}
#sph-header .sph-menu .sub-menu {
	position: absolute; top: 100%; right: 0; z-index: 50; min-width: 240px;
	background: #fff; border: 1px solid var(--sph-border); border-radius: 16px; box-shadow: var(--sph-shadow); padding: 8px;
	opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
#sph-header .sph-menu li:hover > .sub-menu, #sph-header .sph-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
#sph-header .sph-menu .sub-menu li { position: relative; }
#sph-header .sph-menu .sub-menu a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-radius: 10px; font-size: 15px; font-weight: 500; color: var(--sph-dark); }
#sph-header .sph-menu .sub-menu a:hover { background: var(--sph-soft); color: var(--sph-primary); }
#sph-header .sph-menu .sub-menu .menu-item-has-children > a::after {
	content: ""; width: 12px; height: 12px; opacity: .55; background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m15 6-6 6 6 6' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m15 6-6 6 6 6' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}
#sph-header .sph-menu .sub-menu .sub-menu { top: -9px; right: calc(100% + 6px); transform: translateX(8px); }
#sph-header .sph-menu .sub-menu li:hover > .sub-menu { transform: none; }
#sph-header .sph-menu .sub-menu.sph-flip { right: auto; left: 0; }
#sph-header .sph-menu .sub-menu .sub-menu.sph-flip { left: calc(100% + 6px); right: auto; }

/* =====================================================================
   Panels + modals
   ===================================================================== */
body.sph-lock { overflow: hidden; }
.sph-backdrop { position: fixed; inset: 0; z-index: 99990; background: rgba(12, 14, 20, .45); backdrop-filter: blur(2px); opacity: 0; transition: opacity .25s ease; }
.sph-backdrop.is-open { opacity: 1; }
.sph-backdrop[hidden] { display: none; }

:is(#sph-drawer, #sph-cart-drawer).sph-panel {
	position: fixed; top: 0; bottom: 0; z-index: 99995; width: min(420px, 92vw);
	background: #fff; display: flex; flex-direction: column;
	visibility: hidden; transition: transform .3s cubic-bezier(.2, .8, .2, 1), visibility .3s;
}
#sph-drawer.sph-panel { right: 0; transform: translateX(100%); }
#sph-drawer.sph-drawer-b { background: #F6F7F9; }
#sph-cart-drawer.sph-panel { left: 0; transform: translateX(-100%); }
:is(#sph-drawer, #sph-cart-drawer).sph-panel.is-open { transform: none; visibility: visible; }
.admin-bar :is(#sph-drawer, #sph-cart-drawer).sph-panel { top: var(--wp-admin--admin-bar--height, 0px); }

:is(#sph-drawer, #sph-cart-drawer) .sph-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 76px; padding: 0 20px; border-bottom: 1px solid var(--sph-border); background: #fff; flex-shrink: 0; }
#sph-drawer .sph-panel-head .sph-logo-img { height: 40px; max-width: 220px; }
:is(#sph-drawer, #sph-cart-drawer) .sph-panel-title { font-size: 20px; font-weight: 800; color: var(--sph-dark); }
:is(#sph-drawer, #sph-cart-drawer, #sph-login) .sph-close { display: inline-flex; width: 44px; height: 44px; border-radius: 12px; background: var(--sph-soft); font-size: 20px; color: var(--sph-dark); }
:is(#sph-drawer, #sph-cart-drawer, #sph-login) .sph-close:hover { background: #E5E8ED; }
:is(#sph-drawer, #sph-cart-drawer) .sph-panel-body { flex: 1; overflow-y: auto; padding: 8px 20px 24px; overscroll-behavior: contain; }
#sph-drawer .sph-panel-foot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px 20px 18px; border-top: 1px solid var(--sph-border); background: #fff; flex-shrink: 0; }
#sph-drawer .sph-panel-foot .sph-btn:only-child { grid-column: 1 / -1; }

/* tiles (icon or category image) */
:is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) .sph-tile { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; flex-shrink: 0; overflow: hidden; }
:is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) .sph-tile.has-img { background: var(--sph-soft); }
:is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) .sph-tile.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
:is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) .sph-tile-lg { width: 46px; height: 46px; font-size: 24px; }
:is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) .sph-tile-round { width: 58px; height: 58px; border-radius: 50%; font-size: 26px; background: #fff !important; }
:is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) .tone-blue { background: var(--t-blue-bg); color: var(--t-blue); }
:is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) .tone-orange { background: var(--t-orange-bg); color: var(--t-orange); }
:is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) .tone-green { background: var(--t-green-bg); color: var(--t-green); }
:is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) .tone-red { background: var(--t-red-bg); color: var(--t-red); }
:is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) .sph-badge { height: 22px; padding: 0 9px; border-radius: 11px; background: var(--sph-badge); color: #fff; font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; flex-shrink: 0; }

/* ---------- Drawer A: segmented tabs + list ---------- */
#sph-drawer .sph-seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin: 14px 20px 6px; padding: 4px; border-radius: 14px; background: var(--sph-soft); flex-shrink: 0; }
#sph-drawer .sph-seg-btn { height: 44px; border-radius: 11px; font-size: 15px; font-weight: 700; color: var(--sph-muted); }
#sph-drawer .sph-seg-btn[aria-selected="true"] { background: #fff; color: var(--sph-primary); font-weight: 800; box-shadow: 0 2px 8px rgba(16, 24, 40, .10); }
#sph-drawer .sph-dl-item { border-bottom: 1px solid var(--sph-line); }
#sph-drawer .sph-dl-row { display: flex; align-items: center; gap: 6px; min-height: 60px; }
#sph-drawer .sph-dl-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; min-height: 60px; font-size: 16.5px; font-weight: 700; color: var(--sph-dark); }
#sph-drawer .sph-dl-label { flex: 1; min-width: 0; }
#sph-drawer .sph-dl-go { color: #B4BAC4; font-size: 18px; display: grid; }
#sph-drawer .sph-dl-link:hover { color: var(--sph-primary); }
#sph-drawer .sph-dl-toggle { width: 40px; height: 40px; border-radius: 10px; color: #9AA1AC; font-size: 18px; flex-shrink: 0; }
#sph-drawer .sph-dl-toggle .sph-ico { transition: transform .2s; }
#sph-drawer .sph-dl-toggle:hover { background: var(--sph-soft); color: var(--sph-dark); }
#sph-drawer .sph-dl-item.is-open > .sph-dl-row .sph-dl-link { color: var(--sph-primary); font-weight: 800; }
#sph-drawer .sph-dl-item.is-open > .sph-dl-row .sph-dl-toggle { color: var(--sph-primary); }
#sph-drawer .sph-dl-item.is-open > .sph-dl-row .sph-dl-toggle .sph-ico { transform: rotate(180deg); }
#sph-drawer .sph-dl-item.is-open > .sph-dl-row .sph-tile:not(.has-img) { background: var(--sph-primary); color: #fff; }
#sph-drawer .sph-dl-sub { padding: 0 54px 10px 0; }
#sph-drawer .sph-dl-sub[hidden] { display: none; }
#sph-drawer .sph-dl-sub > li > a { display: flex; align-items: center; min-height: 40px; font-size: 15px; color: #374151; }
#sph-drawer .sph-dl-sub a:hover { color: var(--sph-primary); }
#sph-drawer .sph-dl-sub2 { padding: 0 14px 4px 0; }
#sph-drawer .sph-dl-sub2 a { display: block; padding: 6px 0; font-size: 14px; color: var(--sph-muted); }
#sph-drawer .sph-dl-all a { display: inline-flex !important; gap: 6px; font-weight: 700; color: var(--sph-primary) !important; }
#sph-drawer .sph-pane .sph-dl-link { font-size: 15.5px; min-height: 52px; }
#sph-drawer .sph-pane .sph-dl-row { min-height: 52px; }

#sph-drawer .sph-extra { margin-top: 18px; }
#sph-drawer .sph-rows li a { display: flex; align-items: center; justify-content: space-between; min-height: 46px; font-size: 15px; font-weight: 500; color: #374151; border-bottom: 1px solid var(--sph-line); }
#sph-drawer .sph-rows li:last-child a { border-bottom: 0; }
#sph-drawer .sph-rows li a .sph-ico { color: #B4BAC4; font-size: 16px; }
#sph-drawer .sph-rows li a:hover { color: var(--sph-primary); }

/* ---------- Drawer B: search + category cards ---------- */
#sph-drawer.sph-drawer-b .sph-panel-body { padding-top: 16px; }
#sph-drawer .sph-db-search { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; margin: 0 0 18px; border-radius: 12px; background: #fff; border: 1px solid #E3E6EB; color: var(--sph-muted); font-size: 18px; }
#sph-drawer .sph-db-search:focus-within { border-color: var(--sph-primary); }
#sph-drawer .sph-db-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; padding: 0; font-size: 15px; outline: 0; }
#sph-drawer .sph-db-title { font-size: 18px; font-weight: 800; margin-bottom: 12px; color: var(--sph-dark); }
#sph-drawer .sph-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
#sph-drawer .sph-card { height: 112px; padding: 14px; border-radius: 16px; background: #fff; border: 1px solid #ECEEF2; display: flex; flex-direction: column; justify-content: space-between; transition: .2s; }
#sph-drawer .sph-card:hover { border-color: var(--sph-primary); transform: translateY(-2px); }
#sph-drawer .sph-card-title { font-size: 15.5px; font-weight: 800; color: var(--sph-dark); line-height: 1.3; }
#sph-drawer .sph-card.is-offer { background: var(--sph-dark); border-color: var(--sph-dark); }
#sph-drawer .sph-card.is-offer .sph-card-title { color: #fff; }
#sph-drawer .sph-card.is-offer .sph-tile:not(.has-img) { background: var(--t-orange); color: #fff; }
#sph-drawer .sph-db-box { background: #fff; border-radius: 16px; border: 1px solid #ECEEF2; padding: 2px 16px; }

/* ---------- Drawer C: rail + panes ---------- */
#sph-drawer .sph-dc { flex: 1; min-height: 0; display: flex; }
#sph-drawer .sph-rail { width: 100px; flex-shrink: 0; background: #F6F7F9; overflow-y: auto; padding: 6px 0; }
#sph-drawer .sph-rail-btn { width: 100%; min-height: 84px; padding: 10px 6px; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 700; color: #4B5563; text-align: center; border-right: 4px solid transparent; }
#sph-drawer .sph-rail-btn .sph-ico { font-size: 24px; }
#sph-drawer .sph-rail-btn img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
#sph-drawer .sph-rail-btn span { line-height: 1.3; }
#sph-drawer .sph-rail-btn.is-offer { color: var(--t-orange); }
#sph-drawer .sph-rail-btn[aria-pressed="true"] { background: #fff; color: var(--sph-primary); font-weight: 800; border-right-color: var(--sph-primary); }
#sph-drawer .sph-dc-panes { flex: 1; min-width: 0; overflow-y: auto; padding: 18px 16px 24px; }
#sph-drawer .sph-pane[hidden] { display: none; }
#sph-drawer .sph-pane-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
#sph-drawer .sph-pane-title { font-size: 19px; font-weight: 800; color: var(--sph-dark); }
#sph-drawer .sph-pane > .sph-pane-title { margin-bottom: 8px; }
#sph-drawer .sph-pane-all { font-size: 14px; font-weight: 700; color: var(--sph-primary); white-space: nowrap; }
#sph-drawer .sph-subtiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
#sph-drawer .sph-subtiles a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px 12px; border-radius: 14px; background: #F6F7F9; font-size: 13.5px; font-weight: 700; text-align: center; line-height: 1.35; color: var(--sph-dark); transition: .2s; }
#sph-drawer .sph-subtiles a:hover { background: var(--t-blue-bg); color: var(--sph-primary); }
#sph-drawer .sph-pane-browse { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: #F6F7F9; font-weight: 700; }
#sph-drawer .sph-pane-browse span { flex: 1; }

/* ---------- Buttons ---------- */
:is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) .sph-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 20px; border-radius: 14px; font-weight: 700; font-size: 15px; transition: .2s; }
:is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) .sph-btn .sph-ico { font-size: 19px; }
:is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) .sph-btn-primary { background: var(--sph-primary); color: #fff !important; }
:is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) .sph-btn-wa { background: #019761; color: #fff !important; }
:is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) .sph-btn-wa:hover, :is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) .sph-btn-primary:hover { filter: brightness(.93); }
:is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) .sph-btn-outline { border: 1.5px solid var(--sph-dark); color: var(--sph-dark) !important; background: #fff; }
:is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) .sph-btn-outline:hover { border-color: var(--sph-primary); color: var(--sph-primary) !important; }
:is(#sph-header, #sph-drawer, #sph-cart-drawer, #sph-login, #sph-search-modal) .sph-btn-block { display: flex; width: 100%; }

/* ---------- Cart drawer content ---------- */
#sph-cart-drawer .sph-cart-empty { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; color: var(--sph-muted); }
#sph-cart-drawer .sph-cart-empty .sph-ico { font-size: 96px; color: #C9CBD0; }
#sph-cart-drawer .woocommerce-mini-cart { margin: 0; padding: 0; }
#sph-cart-drawer .woocommerce-mini-cart-item { position: relative; display: block; padding: 16px 0 16px 34px; border-bottom: 1px solid var(--sph-line); min-height: 96px; }
#sph-cart-drawer .woocommerce-mini-cart-item img { float: right; width: 72px; height: 72px; object-fit: cover; border-radius: 12px; margin: 0 0 0 14px; }
#sph-cart-drawer .woocommerce-mini-cart-item > a:not(.remove) { font-weight: 700; display: block; }
#sph-cart-drawer .woocommerce-mini-cart-item .quantity { display: block; margin-top: 4px; color: var(--sph-muted); font-size: 14px; }
#sph-cart-drawer .woocommerce-mini-cart-item .remove { position: absolute; top: 16px; left: 0; width: 26px; height: 26px; line-height: 24px; text-align: center; border-radius: 50%; color: var(--sph-muted) !important; border: 1px solid var(--sph-border); font-size: 18px; }
#sph-cart-drawer .woocommerce-mini-cart-item .remove:hover { background: var(--sph-badge); color: #fff !important; border-color: var(--sph-badge); }
#sph-cart-drawer .woocommerce-mini-cart__total { display: flex; justify-content: space-between; padding: 18px 0; margin: 0; font-size: 17px; }
#sph-cart-drawer .woocommerce-mini-cart__buttons { display: grid; gap: 10px; margin: 0; }
#sph-cart-drawer .woocommerce-mini-cart__buttons a { display: flex; align-items: center; justify-content: center; height: 50px; border-radius: 14px; font-weight: 700; border: 1.5px solid var(--sph-dark); margin: 0 !important; }
#sph-cart-drawer .woocommerce-mini-cart__buttons a.checkout { background: var(--sph-primary); border-color: var(--sph-primary); color: #fff !important; }

/* ---------- Modals ---------- */
:is(#sph-login, #sph-search-modal).sph-modal {
	position: fixed; inset: 0; z-index: 99996; display: grid; place-items: center; padding: 20px;
	visibility: hidden; opacity: 0; transition: opacity .25s ease, visibility .25s; pointer-events: none;
}
:is(#sph-login, #sph-search-modal).sph-modal.is-open { visibility: visible; opacity: 1; pointer-events: auto; }
:is(#sph-login, #sph-search-modal) .sph-modal-box { position: relative; width: 100%; max-width: 460px; background: #fff; border-radius: 24px; padding: 34px 32px 30px; box-shadow: var(--sph-shadow); transform: translateY(14px) scale(.98); transition: transform .25s ease; }
:is(#sph-login, #sph-search-modal).sph-modal.is-open .sph-modal-box { transform: none; }
#sph-login .sph-close { position: absolute; top: 14px; left: 14px; }
#sph-login .sph-login-avatar { width: 92px; height: 92px; margin: 0 auto 14px; border-radius: 50%; border: 1px solid var(--sph-border); display: grid; place-items: center; font-size: 40px; color: var(--sph-muted); }
#sph-login .sph-modal-title { margin: 0 0 22px; text-align: center; font-size: 24px; font-weight: 800; color: var(--sph-dark); }
#sph-login .sph-login-form form { margin: 0; border: 0; padding: 0; }
#sph-login .sph-login-form p { margin: 0 0 16px; }
#sph-login .sph-login-form label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 15px; color: var(--sph-dark); }
#sph-login .sph-login-form .required { color: var(--sph-badge); }
#sph-login .sph-login-form input[type="text"], #sph-login .sph-login-form input[type="email"], #sph-login .sph-login-form input[type="password"] { width: 100%; height: 52px; padding: 0 16px; border: 1px solid #D9DDE3; border-radius: 12px; font-size: 16px; background: #fff; }
#sph-login .sph-login-form input:focus { border-color: var(--sph-primary); outline: none; }
#sph-login .sph-login-form .woocommerce-form-login__rememberme, #sph-login .sph-login-form .login-remember label { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; margin: 0 0 14px; }
#sph-login .sph-login-form button[type="submit"], #sph-login .sph-login-form input[type="submit"] { display: block; width: 100%; height: 54px; border-radius: 14px; border: 0; background: var(--sph-primary); color: #fff; font-weight: 800; font-size: 17px; cursor: pointer; float: none; }
#sph-login .sph-login-form .lost_password { margin: 12px 0 0; text-align: center; font-size: 14px; }
#sph-login .sph-login-form .lost_password a { color: var(--sph-primary); }
#sph-login .sph-login-form .password-input { display: block; position: relative; }
#sph-login .sph-login-form .show-password-input { position: absolute; top: 50%; left: 14px; transform: translateY(-50%); }
#sph-login .sph-login-sep { display: flex; align-items: center; gap: 14px; margin: 22px 0 14px; color: var(--sph-muted); font-size: 14px; }
#sph-login .sph-login-sep::before, #sph-login .sph-login-sep::after { content: ""; flex: 1; height: 1px; background: var(--sph-border); }

/* search modal: full screen on phones, top sheet on tablets */
#sph-search-modal.sph-modal { place-items: start center; padding: 0; }
#sph-search-modal .sph-modal-box { max-width: 760px; margin-top: 24px; padding: 16px; border-radius: 20px; max-height: calc(100vh - 48px); overflow: auto; }
#sph-search-modal .sph-sf-back { width: 40px; height: 40px; border-radius: 10px; background: var(--sph-soft); font-size: 20px; flex-shrink: 0; }
#sph-search-modal .sph-search-results, #sph-search-modal .sph-search-suggest { position: static; box-shadow: none; border: 0; border-radius: 0; padding: 18px 2px 4px; max-height: none; }
#sph-search-modal .sph-search-suggest.has-two, #sph-search-modal .sph-sr.has-two { grid-template-columns: 1fr; gap: 20px; }
#sph-search-modal .sph-pcards { grid-template-columns: 1fr; }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1199px) {
	#sph-header .sph-action-text small { display: none; }
	#sph-header .sph-cats-btn span { display: none; }
	#sph-header .sph-cats-btn { padding: 0 15px; }
	#sph-header .sph-sf-submit span { display: none; }
	#sph-header .sph-sf-submit { width: 44px; padding: 0; }
	#sph-header .sph-search-results, #sph-header .sph-search-suggest { min-width: 0; }
}

@media (max-width: 1024px) {
	#sph-header .sph-top, #sph-header .sph-cats-btn, #sph-header .sph-search, #sph-header .sph-nav, #sph-header .sph-actions-sep { display: none; }
	#sph-header .sph-icon-btn { display: inline-flex; }
	#sph-header .sph-main-inner, #sph-header .sph-sticky.is-stuck .sph-main-inner { height: 66px; gap: 4px; }
	#sph-header .sph-container { padding-inline: min(var(--sph-pad, 24px), 14px); }
	#sph-header .sph-logo { height: 44px; margin-inline-end: auto; }
	#sph-header .sph-logo-img { height: var(--sph-logo-h-m); max-width: 170px; }
	#sph-header .sph-actions { gap: 2px; margin-inline-start: 0; }
	#sph-header .sph-action-text { display: none; }
	#sph-header .sph-action { height: 44px; width: 44px; padding: 0; justify-content: center; }
	#sph-header .sph-action:hover { background: none; }
	#sph-header .sph-action-ico { width: 40px; height: 40px; background: none; font-size: 24px; }
	#sph-header .sph-cart-count { top: -1px; left: -1px; min-width: 18px; height: 18px; font-size: 10.5px; line-height: 14px; }
	#sph-header .sph-bar-text { font-size: 13px; padding: 8px 0; line-height: 1.6; }
	#sph-header .sph-bar-text a { margin-inline-start: 8px; }
	#sph-header .sph-search-toggle { order: 1; }
	#sph-header .sph-account { order: 2; }
	#sph-header .sph-cart { order: 3; }
}

@media (min-width: 1025px) {
	#sph-header .sph-search-toggle { display: none !important; }
}

@media (max-width: 600px) {
	#sph-search-modal .sph-modal-box { max-width: none; width: 100%; height: 100%; max-height: none; margin: 0; border-radius: 0; padding: 14px 14px 24px; }
	#sph-search-modal .sph-modal-box { transform: none !important; }
	#sph-drawer .sph-seg-btn { font-size: 14.5px; }
}
