/*
Theme Name: Ubazar
Theme URI: https://ubazar.pk
Description: Fast, mobile-first marketplace block theme for WooCommerce and WCFM shops. Every section is an editable block; works with the Ubazar Core plugin for location-aware shops.
Version: 1.1.0
Requires at least: 6.6
Requires PHP: 7.4
Author: Ubazar
Text Domain: ubazar
License: GPL-2.0-or-later
*/

*,*::before,*::after{box-sizing:border-box}
html{scroll-padding-top:90px;-webkit-text-size-adjust:100%}
body{overflow-x:clip}
img{max-width:100%;height:auto}
:where(.wp-site-blocks)>*{margin-block-start:0}
:focus-visible{outline:2px solid #1e1e1e;outline-offset:2px}

/* Top bar */
.ubz-top{border-bottom:1px solid var(--wp--preset--color--line);font-size:13px;color:var(--wp--preset--color--muted)}
.ubz-top a{color:inherit}
.ubz-top .wp-block-navigation{font-size:13px;font-weight:400;gap:18px}
.ubz-top .wp-block-navigation a{color:var(--wp--preset--color--muted)}

/* Sticky header */
.ubz-header{position:sticky;top:0;z-index:999;background:var(--wp--preset--color--base);border-bottom:1px solid var(--wp--preset--color--line)}
.admin-bar .ubz-header{top:32px}
@media(max-width:782px){.admin-bar .ubz-header{top:0}}
.ubz-header__row{gap:20px!important;min-height:76px}
.ubz-header__row .ubz-search-wrap{flex:1;max-width:660px}
.ubz-header__nav{min-height:50px;gap:28px!important}
.ubz-header__nav .ubz-dept--btn{width:270px;flex:none;align-self:flex-end}
.ubz-header__nav .wp-block-navigation a:hover{color:var(--wp--preset--color--link)}
.ubz-header .wp-block-site-title a{text-decoration:none}
.ubz-header .wp-block-site-title a::after{content:".";color:var(--wp--preset--color--primary)}
.ubz-header__mob{display:none}

/* Home hero row: departments + slider */
.ubz-hero{gap:28px!important;align-items:stretch!important}
.ubz-hero>.ubz-dept{flex:0 0 270px}
.ubz-hero>.ubz-slider{flex:1}
.ubz-slider .wp-block-cover{min-height:380px}
.ubz-slider .wp-block-cover__inner-container{max-width:560px;padding-left:clamp(4px,3vw,36px)}
.ubz-slider .wp-block-cover h2{font-weight:300;font-size:clamp(28px,4vw,50px);line-height:1.05}
.ubz-slider .wp-block-cover h2 strong{font-weight:700}

/* Promo cards */
.ubz-promo{border-radius:14px;padding:20px!important;gap:16px!important;height:100%}
.ubz-promo h3{font-weight:300;line-height:1.2;margin:0}
.ubz-promo h3 strong{font-weight:700}
.ubz-promo figure{margin:0;flex:0 0 96px}
.ubz-promo figure img{width:96px;height:96px;object-fit:contain}

/* Deal + tabs row */
.ubz-dealrow{gap:24px!important}
.ubz-dealrow>.wp-block-column:first-child{flex:0 0 300px!important}

/* Wide banner */
.ubz-banner{border-radius:14px}

/* Footer */
.ubz-footer{background:var(--wp--preset--color--soft)}
.ubz-footer ul{list-style:none;padding:0;margin:0;line-height:2}
.ubz-footer ul a{color:var(--wp--preset--color--muted)}
.ubz-footer .wp-block-site-title a::after{content:".";color:var(--wp--preset--color--primary)}

/* WooCommerce pages */
.woocommerce-breadcrumb{font-size:13px;color:var(--wp--preset--color--muted)}
.wc-block-components-product-sale-badge,.onsale{background:var(--wp--preset--color--sale)!important;color:#fff!important;border:0!important;border-radius:10px!important}
.wp-block-woocommerce-product-collection .wc-block-components-product-price,.price{color:var(--wp--preset--color--contrast)}
.price ins,.wc-block-components-product-price ins{color:var(--wp--preset--color--sale);text-decoration:none}

/* Phones and small tablets: app layout */
@media(max-width:899px){
	.ubz-top,.ubz-header__nav{display:none!important}
	.ubz-header__row{min-height:60px;gap:12px!important}
	.ubz-header__row .ubz-search-wrap{display:none}
	.ubz-header .wp-block-site-title{font-size:26px!important}
	.ubz-header__mob{display:block;padding-bottom:10px}
	.ubz-header__mob .ubz-search{height:42px}
	.ubz-hero>.ubz-dept{display:none}
	.ubz-slider .wp-block-cover{min-height:230px!important;padding:20px 18px 40px!important}
	.ubz-promos{flex-wrap:nowrap!important;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none}
	.ubz-promos>.wp-block-column{flex:0 0 82%!important;scroll-snap-align:start}
	.ubz-dealrow>.wp-block-column:first-child{flex-basis:100%!important}
	.ubz-footer .wp-block-columns{gap:24px!important}
}
@media(min-width:900px){.ubz-header__menu{display:none}}
/* Bigger tap areas on links. */
.ubz-footer ul a{display:inline-block;padding:9px 0;line-height:1.4}
.ubz-footer .wp-block-site-title a{display:inline-block;padding:6px 0}
.ubz-footer ul{line-height:1.4}
.ubz-promo p a{display:inline-block;padding:10px 0}
