/*
Theme Name: Torfy Headless Backend
Theme URI: https://hlomart.com/
Author: Bishal / HloMart
Author URI: https://hlomart.com/
Description: Ultra-light backend-only WordPress/WooCommerce theme for a headless Next.js storefront. Apple-style black, white and gray fallback pages with a minimal icon + primary menu header.
Version: 1.0.2
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: torfy-headless
Tags: e-commerce, headless, woocommerce, minimal
*/

:root{
	--torfy-bg:#f5f5f7;
	--torfy-card:#fff;
	--torfy-text:#111;
	--torfy-muted:#6e6e73;
	--torfy-line:#d2d2d7;
	--torfy-line-soft:#e8e8ed;
	--torfy-link:#424245;
	--torfy-black:#000;
	--torfy-radius:16px;
}

html{box-sizing:border-box;-webkit-text-size-adjust:100%;scroll-behavior:smooth}
*,*::before,*::after{box-sizing:inherit}
body{
	margin:0;
	background:var(--torfy-bg);
	color:var(--torfy-text);
	font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,Arial,sans-serif;
	font-size:16px;
	line-height:1.5;
	-webkit-font-smoothing:antialiased;
	text-rendering:optimizeLegibility;
}
a{color:var(--torfy-link);text-decoration:none;transition:color .15s ease,opacity .15s ease}
a:hover,a:focus{color:var(--torfy-black);text-decoration:none}
img{max-width:100%;height:auto}
button,input,select,textarea{font:inherit}


/* Minimal icon + primary menu header */
.torfy-mini-header{
	position:relative;
	z-index:20;
	background:rgba(255,255,255,.92);
	border-bottom:1px solid var(--torfy-line-soft);
	backdrop-filter:saturate(180%) blur(14px);
	-webkit-backdrop-filter:saturate(180%) blur(14px);
}
.torfy-mini-header-inner{
	width:min(100% - 32px,1120px);
	min-height:56px;
	margin:0 auto;
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:18px;
}
.torfy-mini-brand{
	width:34px;
	height:34px;
	border-radius:10px;
	display:inline-flex;
	align-items:center;
	justify-content:center;
	flex:0 0 auto;
	background:#fff;
	border:1px solid var(--torfy-line-soft);
	overflow:hidden;
	text-decoration:none;
	box-shadow:0 2px 8px rgba(0,0,0,.04);
}
.torfy-mini-brand img{
	width:100%;
	height:100%;
	object-fit:cover;
	display:block;
}
.torfy-mini-brand-fallback{
	font-size:15px;
	font-weight:800;
	letter-spacing:-.04em;
	color:var(--torfy-black);
	line-height:1;
}
.torfy-mini-nav{min-width:0;display:flex;align-items:center;justify-content:flex-end}
.torfy-mini-menu{
	margin:0;
	padding:0;
	list-style:none;
	display:flex;
	align-items:center;
	justify-content:flex-end;
	gap:4px;
	min-width:0;
}
.torfy-mini-menu li{margin:0;padding:0;list-style:none}
.torfy-mini-menu a{
	display:inline-flex;
	align-items:center;
	min-height:34px;
	padding:7px 10px;
	border-radius:999px;
	color:#424245;
	font-size:14px;
	font-weight:650;
	line-height:1;
	white-space:nowrap;
	text-decoration:none!important;
	background: gray !important;
}
.torfy-mini-menu a:hover,
.torfy-mini-menu a:focus,
.torfy-mini-menu .current-menu-item>a,
.torfy-mini-menu .current_page_item>a{
	background:#f5f5f7;
	color:#000;
	text-decoration:none!important;
}

@media(max-width:768px){
	.torfy-mini-header-inner{width:min(100% - 20px,1120px);min-height:52px;gap:12px}
	.torfy-mini-brand{width:32px;height:32px;border-radius:9px}
	.torfy-mini-nav{overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
	.torfy-mini-nav::-webkit-scrollbar{display:none}
	.torfy-mini-menu{flex-wrap:nowrap;justify-content:flex-start}
	.torfy-mini-menu a{min-height:32px;padding:7px 9px;font-size:13px}
}

.torfy-headless-shell,
.woocommerce,
.woocommerce-page .site-main{
	width:min(100% - 32px,1120px);
	margin:32px auto;
}
.torfy-headless-card,
.woocommerce-cart-form,
.woocommerce-checkout,
.woocommerce-account .woocommerce-MyAccount-content,
.woocommerce-account .woocommerce-MyAccount-navigation,
.woocommerce-order,
.woocommerce-notices-wrapper:not(:empty){
	background:var(--torfy-card);
	border:1px solid var(--torfy-line-soft);
	border-radius:var(--torfy-radius);
	padding:clamp(18px,3vw,32px);
	box-shadow:0 8px 24px rgba(0,0,0,.04);
}
.torfy-headless-card h1,
.torfy-headless-card h2,
.woocommerce h1,.woocommerce h2,.woocommerce h3{
	margin:0 0 14px;
	color:var(--torfy-text);
	line-height:1.15;
	letter-spacing:-.03em;
}
.torfy-headless-card p,.torfy-headless-content p{color:var(--torfy-muted)}
.torfy-headless-status{
	display:inline-flex;
	align-items:center;
	gap:8px;
	margin-bottom:16px;
	padding:7px 12px;
	border:1px solid var(--torfy-line);
	border-radius:999px;
	font-size:13px;
	font-weight:700;
	color:var(--torfy-text);
	background:#fff;
}
.torfy-headless-status::before{content:"";width:8px;height:8px;border-radius:999px;background:#1d1d1f}

.woocommerce table.shop_table,
.woocommerce table.shop_table td,
.woocommerce table.shop_table th{border-color:var(--torfy-line-soft)}
.woocommerce table.shop_table{border-radius:14px;overflow:hidden;background:#fff}
.woocommerce table.shop_table th{color:var(--torfy-text);font-weight:700;background:#fafafa}
.woocommerce table.shop_table td{color:var(--torfy-text)}
.woocommerce .quantity .qty,
.woocommerce input.input-text,
.woocommerce textarea,
.woocommerce select,
.select2-container--default .select2-selection--single{
	min-height:44px;
	border:1px solid var(--torfy-line);
	border-radius:12px;
	background:#fff;
	color:var(--torfy-text);
	box-shadow:none;
	outline:none;
}
.woocommerce input.input-text,
.woocommerce textarea{padding:10px 12px}
.woocommerce input:focus,
.woocommerce textarea:focus,
.woocommerce select:focus,
.select2-container--default.select2-container--open .select2-selection--single{
	border-color:#86868b;
	box-shadow:0 0 0 3px rgba(0,0,0,.06);
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce .button,
.wp-element-button{
	border:1px solid var(--torfy-black)!important;
	border-radius:999px!important;
	background:var(--torfy-black)!important;
	color:#fff!important;
	padding:12px 18px!important;
	font-weight:700!important;
	line-height:1.1!important;
	text-decoration:none!important;
	box-shadow:none!important;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce .button:hover,
.wp-element-button:hover{background:#1d1d1f!important;border-color:#1d1d1f!important;color:#fff!important;opacity:.92}
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt{background:var(--torfy-black)!important;color:#fff!important}
.woocommerce a.remove{color:var(--torfy-muted)!important;text-decoration:none!important}
.woocommerce a.remove:hover{background:transparent!important;color:var(--torfy-black)!important}

.woocommerce-info,
.woocommerce-message,
.woocommerce-error{
	border-top:0;
	border-left:4px solid var(--torfy-black);
	border-radius:14px;
	background:#fff;
	color:var(--torfy-text);
	box-shadow:0 6px 18px rgba(0,0,0,.04);
}
.woocommerce-info::before,
.woocommerce-message::before,
.woocommerce-error::before{color:var(--torfy-black)}

.woocommerce-account .woocommerce-MyAccount-navigation ul{margin:0;padding:0;list-style:none}
.woocommerce-account .woocommerce-MyAccount-navigation li{border-bottom:1px solid var(--torfy-line-soft)}
.woocommerce-account .woocommerce-MyAccount-navigation li:last-child{border-bottom:0}
.woocommerce-account .woocommerce-MyAccount-navigation a{display:block;padding:12px 0;color:var(--torfy-link);font-weight:650;text-decoration:none}
.woocommerce-account .woocommerce-MyAccount-navigation a:hover,
.woocommerce-account .woocommerce-MyAccount-navigation .is-active a{color:var(--torfy-black)}

.woocommerce .cart_totals,
.woocommerce-checkout-review-order,
.woocommerce form.checkout_coupon,
.woocommerce form.login,
.woocommerce form.register{
	border:1px solid var(--torfy-line-soft);
	border-radius:var(--torfy-radius);
	background:#fff;
	padding:22px;
}
.woocommerce .price,
.woocommerce-Price-amount{color:var(--torfy-text);font-weight:700}
.woocommerce small,.woocommerce .woocommerce-breadcrumb{color:var(--torfy-muted)}
.woocommerce .woocommerce-breadcrumb a{color:var(--torfy-link);text-decoration:none}

@media(max-width:768px){
	.torfy-headless-shell,
	.woocommerce,
	.woocommerce-page .site-main{width:min(100% - 20px,1120px);margin:16px auto}
	.torfy-headless-card,
	.woocommerce-cart-form,
	.woocommerce-checkout,
	.woocommerce-account .woocommerce-MyAccount-content,
	.woocommerce-account .woocommerce-MyAccount-navigation,
	.woocommerce-order{padding:18px;border-radius:14px}
	.woocommerce a.button,
	.woocommerce button.button,
	.woocommerce input.button,
	.woocommerce .button{width:100%;text-align:center;margin-top:8px!important}
}
