/*
Theme Name: WooCP
Theme URI: https://woocommerceplugins.online
Description: Custom marketplace-style WooCommerce theme for a single-vendor plugin shop. Inspired by the WooCommerce.com marketplace layout.
Author: WooCommerce Plugins
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: woocp
Tags: woocommerce, marketplace
*/

/* ============ Design tokens ============ */
:root {
	--purple-100:#1f0342; --purple-90:#2c045d; --purple-80:#3c087e; --purple-70:#5007aa;
	--purple-60:#6108ce;  --purple-50:#720eec; --purple-40:#873eff; --purple-30:#a77eff;
	--purple-20:#b999ff;  --purple-10:#d1c1ff; --purple-5:#e1d7ff;  --purple-0:#f2edff;

	--text:#101517; --text-soft:#646970; --text-mute:#787c82;
	--border:rgba(0,0,0,.1); --border-soft:rgba(0,0,0,.06); --border-strong:#dcdcde;
	--bg:#ffffff; --bg-soft:#f6f7f7; --bg-canvas:#fbfbfb;

	--green:#0e7c40; --amber:#ff9000;

	--radius:8px; --radius-md:12px; --radius-lg:16px; --radius-xl:24px;
	--shadow-sm:0 1px 2px rgba(16,21,23,.04);
	--shadow:0 4px 16px rgba(16,21,23,.06);
	--shadow-lg:0 8px 32px rgba(16,21,23,.10);

	--font-body:'Inter','Inter var',-apple-system,'Segoe UI',Roboto,'Helvetica Neue',sans-serif;
	--font-display:var(--font-body);

	--container:1240px; --gap:24px;
}

/* ============ Reset & base ============ */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{margin:0;font-family:var(--font-body);color:var(--text);background:var(--bg);font-size:16px;line-height:1.55;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
img,svg,video{max-width:100%;height:auto;display:block}
a{color:var(--purple-50);text-decoration:none}
a:hover{color:var(--purple-60)}
button{font:inherit;cursor:pointer}
h1,h2,h3,h4,h5,h6{font-family:var(--font-display);color:var(--text);margin:0 0 .5em;line-height:1.15;font-weight:700;letter-spacing:-.015em}
h1{font-size:clamp(2rem,4vw,3.25rem)}
h2{font-size:clamp(1.5rem,2.6vw,2rem)}
h3{font-size:1.25rem}
p{margin:0 0 1em}
p:last-child{margin-bottom:0}
hr{border:0;border-top:1px solid var(--border-soft);margin:2em 0}

/* ============ Layout ============ */
.container{max-width:var(--container);margin:0 auto;padding:0 24px}
.section{padding:64px 0}
.section--soft{background:var(--bg-soft)}
.section--dark{background:var(--purple-100);color:#fff}
.section--dark h1,.section--dark h2,.section--dark h3{color:#fff}

/* ============ Buttons ============ */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 22px;border-radius:var(--radius);font-weight:600;font-size:15px;line-height:1;border:1.5px solid transparent;transition:all .15s ease;cursor:pointer;text-decoration:none;white-space:nowrap}
.btn:hover{text-decoration:none}
.btn--primary{background:var(--purple-40);color:#fff;border-color:var(--purple-40)}
.btn--primary:hover{background:var(--purple-50);border-color:var(--purple-50);color:#fff}
.btn--secondary{background:#fff;color:var(--purple-50);border-color:var(--purple-40)}
.btn--secondary:hover{background:var(--purple-0);color:var(--purple-60)}
.btn--ghost{background:transparent;color:var(--text);border-color:transparent}
.btn--ghost:hover{background:var(--bg-soft);color:var(--text)}
.btn--large{padding:14px 24px;font-size:16px}
.btn--block{width:100%}

/* ============ Header ============ */
.site-header{background:#fff;border-bottom:1px solid var(--border-soft);position:sticky;top:0;z-index:100}
.site-header__inner{display:flex;align-items:center;gap:32px;padding:16px 24px;max-width:var(--container);margin:0 auto}
.site-header__logo{display:inline-flex;align-items:center;gap:0;font-weight:700;color:var(--purple-40);text-decoration:none}
.site-header__logo-mark{display:inline-flex;color:var(--purple-40);height:24px}
.site-header__logo-mark svg{height:100%;width:auto}
.site-header__logo-word{color:var(--text);font-weight:600;font-size:16px;padding-left:12px;margin-left:12px;border-left:1.5px solid var(--border);line-height:1}
@media(max-width:520px){.site-header__logo-word{display:none}}
.screen-reader-text{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.site-header__nav{display:flex;gap:24px;margin-left:auto;align-items:center}
.site-header__nav a{color:var(--text);font-weight:500;font-size:15px}
.site-header__nav a:hover{color:var(--purple-50)}
.site-header__cart{position:relative;color:var(--text);padding:8px;line-height:0}
.site-header__cart .count{position:absolute;top:0;right:0;background:var(--purple-40);color:#fff;font-size:11px;border-radius:999px;padding:2px 6px;font-weight:700;line-height:1}
.menu-toggle{display:none;background:none;border:none;padding:8px}
@media(max-width:900px){
	.menu-toggle{display:block}
	.site-header__nav{display:none;position:absolute;top:100%;left:0;right:0;flex-direction:column;background:#fff;padding:16px;border-bottom:1px solid var(--border);align-items:stretch;gap:0}
	.site-header__nav.open{display:flex}
	.site-header__nav a{padding:12px 0;border-bottom:1px solid var(--border-soft)}
}

/* ============ Hero (homepage) ============ */
.hero{padding:96px 0;background:linear-gradient(135deg,var(--purple-100) 0%,var(--purple-70) 100%);color:#fff;text-align:center}
.hero h1{color:#fff;max-width:820px;margin:0 auto .3em;font-weight:800}
.hero__lede{font-size:clamp(1rem,1.5vw,1.25rem);color:rgba(255,255,255,.85);max-width:640px;margin:0 auto 2em}
.hero__ctas{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}

/* ============ Section heading ============ */
.section__head{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:32px;gap:16px;flex-wrap:wrap}
.section__head h2{margin:0 0 4px}
.section__head p{color:var(--text-soft);margin:0;max-width:640px}
.section__head a.more{color:var(--purple-50);font-weight:600;font-size:14px;white-space:nowrap}
.section__head a.more:hover{color:var(--purple-60)}

/* ============ Product card ============ */
.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px}
.product-card{background:#fff;border:1px solid var(--border);border-radius:var(--radius-lg);padding:20px;transition:transform .12s,border-color .12s,box-shadow .15s;display:flex;flex-direction:column;text-decoration:none;color:var(--text);position:relative;overflow:hidden}
.product-card:hover{border-color:rgba(0,0,0,.2);box-shadow:var(--shadow);text-decoration:none;color:var(--text)}
.product-card__badges{display:flex;gap:6px;position:absolute;top:16px;right:16px;flex-wrap:wrap;justify-content:flex-end}
.product-card__badge{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:600;padding:4px 8px;background:var(--purple-0);color:var(--purple-70);border-radius:999px;letter-spacing:.01em;line-height:1.2}
.product-card__badge--verified::before{content:"✓";font-weight:700}
.product-card__badge--new{background:#e6f7ee;color:var(--green)}
.product-card__badge--trending{background:#fff2df;color:#8a4a00}
.product-card__icon{width:48px;height:48px;border-radius:10px;background:var(--bg-soft);display:flex;align-items:center;justify-content:center;margin-bottom:16px;overflow:hidden;flex-shrink:0}
.product-card__icon img{width:100%;height:100%;object-fit:cover}
.product-card__title{font-weight:600;font-size:15.5px;color:var(--text);margin:0 0 4px;line-height:1.3;letter-spacing:-.005em}
.product-card__by{font-size:12px;color:var(--text-soft);margin:0 0 12px;line-height:1.3}
.product-card__by a{color:var(--purple-50);font-weight:500}
.product-card__desc{font-size:13px;color:var(--text-soft);margin:0 0 16px;line-height:1.5;flex:1;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.product-card__foot{display:flex;justify-content:space-between;align-items:center;margin-top:auto;padding-top:12px;border-top:1px solid var(--border-soft);gap:8px}
.product-card__price{font-weight:600;font-size:13.5px;color:var(--text)}
.product-card__price strong{font-weight:700;font-size:14px;color:var(--text)}
.product-card__price small{font-weight:500;color:var(--text-soft);font-size:12px}
.product-card__price--free{color:var(--text)}
.product-card__rating{display:inline-flex;align-items:center;gap:4px;font-size:13px;color:var(--text-soft)}
.product-card__rating .stars{color:var(--amber);font-size:14px;line-height:1}

/* ============ Shop archive layout (category page) ============ */
.shop-hero{padding:64px 0 24px}
.shop-hero h1{margin:0 0 8px;font-size:clamp(2rem,3.5vw,3rem);font-weight:800}
.shop-hero p{color:var(--text-soft);font-size:17px;margin:0}
.shop-hero__row{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;flex-wrap:wrap}
.shop-search{position:relative;max-width:320px;width:100%}
.shop-search input{width:100%;padding:12px 16px 12px 44px;border:1.5px solid var(--border-strong);border-radius:999px;background:#fff;font-size:14px;font-family:inherit}
.shop-search input:focus{outline:none;border-color:var(--purple-40)}
.shop-search::before{content:"";position:absolute;left:16px;top:50%;transform:translateY(-50%);width:16px;height:16px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='%23646970'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m21 21-4.35-4.35M9.5 17a7.5 7.5 0 100-15 7.5 7.5 0 000 15z'/%3E%3C/svg%3E") no-repeat center/contain}

.shop-tabs{display:flex;gap:0;margin:24px 0 32px;border-bottom:1px solid var(--border);overflow-x:auto}
.shop-tabs a{padding:12px 4px;margin-right:32px;color:var(--text-soft);font-weight:500;font-size:15px;border-bottom:2px solid transparent;white-space:nowrap;text-decoration:none}
.shop-tabs a:hover{color:var(--text)}
.shop-tabs a.active{color:var(--text);border-bottom-color:var(--purple-40)}
.shop-tabs a .count{font-size:12px;color:var(--text-mute);margin-left:6px}

.shop-layout{display:grid;grid-template-columns:240px 1fr;gap:40px;padding:0 0 64px}
@media(max-width:900px){.shop-layout{grid-template-columns:1fr;gap:24px}}

/* Sidebar filters */
.shop-sidebar{position:sticky;top:88px;align-self:start}
.shop-filter{margin-bottom:28px;padding-bottom:20px;border-bottom:1px solid var(--border-soft)}
.shop-filter:last-child{border-bottom:0}
.shop-filter__title{font-size:13px;text-transform:uppercase;letter-spacing:.06em;font-weight:700;color:var(--text-mute);margin:0 0 12px}
.shop-filter ul{list-style:none;padding:0;margin:0}
.shop-filter li{margin-bottom:8px}
.shop-filter li a{display:flex;justify-content:space-between;align-items:center;color:var(--text);font-size:14px;padding:2px 0;font-weight:500}
.shop-filter li a:hover{color:var(--purple-50)}
.shop-filter li.current a{color:var(--purple-50);font-weight:600}
.shop-filter li .count{color:var(--text-mute);font-size:12px;font-weight:400}
.shop-filter__toggle{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:500}
.shop-filter__toggle input{margin:0}

/* Shop main + WooCommerce grid overrides */
.woocommerce ul.products,
.shop-main ul.products{display:grid !important;grid-template-columns:repeat(auto-fill,minmax(240px,1fr)) !important;gap:16px;margin:0;padding:0;list-style:none}
.woocommerce ul.products::before,
.woocommerce ul.products::after{display:none !important}
.woocommerce ul.products li.product{margin:0 !important;padding:0 !important;width:auto !important;float:none !important;text-align:left;clear:none}
.woocommerce ul.products li.product > a{padding:0}
.woocommerce nav.woocommerce-pagination{margin-top:32px;text-align:left}
.woocommerce nav.woocommerce-pagination ul{border:none;display:inline-flex;gap:4px}
.woocommerce nav.woocommerce-pagination ul li{border:0}
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span{padding:8px 14px;border-radius:6px;border:1px solid var(--border);color:var(--text);background:#fff}
.woocommerce nav.woocommerce-pagination ul li span.current{background:var(--purple-40);color:#fff;border-color:var(--purple-40)}

.woocommerce-result-count,.woocommerce-ordering{color:var(--text-soft);font-size:14px}
.woocommerce-ordering select{padding:8px 12px;border:1.5px solid var(--border-strong);border-radius:6px;background:#fff;font-size:14px}

/* ============ Single product page ============ */
.product-single{padding:32px 0 64px}
.product-breadcrumb{font-size:13px;color:var(--text-soft);margin-bottom:24px}
.product-breadcrumb a{color:var(--text-soft)}
.product-breadcrumb a:hover{color:var(--purple-50)}
.product-breadcrumb .separator{margin:0 8px;color:var(--text-mute)}

.product-single__grid{display:grid;grid-template-columns:1fr 360px;gap:56px;align-items:start}
@media(max-width:900px){.product-single__grid{grid-template-columns:1fr;gap:32px}}

.product-single__badges{display:flex;gap:8px;margin-bottom:16px;flex-wrap:wrap}
.product-single__badges .product-card__badge{font-size:12px;padding:5px 10px}

.product-single__head{display:flex;gap:20px;align-items:center;margin-bottom:20px}
.product-single__icon{width:72px;height:72px;border-radius:14px;background:var(--bg-soft);overflow:hidden;flex-shrink:0}
.product-single__icon img{width:100%;height:100%;object-fit:cover}
.product-single__head h1{margin:0 0 4px;font-size:clamp(1.75rem,3vw,2.5rem);font-weight:700;letter-spacing:-.02em}
.product-single__by{color:var(--text-soft);font-size:14px;margin:0}
.product-single__by a{color:var(--purple-50);font-weight:600}
.product-single__desc{font-size:17px;color:var(--text);line-height:1.55;margin-bottom:24px}
.product-single__hero{border-radius:var(--radius-lg);overflow:hidden;margin-bottom:32px;background:var(--bg-soft);aspect-ratio:16/9;display:flex;align-items:center;justify-content:center}
.product-single__hero img{max-width:100%;height:auto;object-fit:cover}
.product-single__info-callout{background:#fff;border:1px solid var(--border);border-radius:var(--radius-md);padding:16px 20px;margin:24px 0;font-size:14px;color:var(--text-soft);display:flex;gap:12px;align-items:flex-start}
.product-single__info-callout::before{content:"i";display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;background:var(--purple-40);color:#fff;border-radius:50%;font-weight:700;font-size:12px;font-style:italic;flex-shrink:0;font-family:'Times New Roman',serif}
.product-single__features ul{padding-left:0;list-style:none;margin:24px 0}
.product-single__features li{margin-bottom:12px;padding-left:32px;position:relative;line-height:1.5}
.product-single__features li::before{content:"";position:absolute;left:0;top:2px;width:20px;height:20px;background:var(--purple-0);border-radius:50%;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23720eec'%3E%3Cpath fill-rule='evenodd' d='M16.7 5.3a1 1 0 010 1.4l-8 8a1 1 0 01-1.4 0l-4-4a1 1 0 011.4-1.4L8 12.6l7.3-7.3a1 1 0 011.4 0z' clip-rule='evenodd'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:center}

/* Sticky buy widget */
.buy-widget{position:sticky;top:88px;background:#fff;border:1px solid var(--border);border-radius:var(--radius-lg);padding:24px}
.buy-widget__opt-title{margin:0 0 12px;font-size:14px;font-weight:600;color:var(--text)}
.buy-widget__opts{display:flex;flex-direction:column;gap:8px;margin-bottom:20px}
.buy-widget__opt{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;border:1.5px solid var(--border);border-radius:var(--radius);cursor:pointer;transition:border-color .12s}
.buy-widget__opt:hover{border-color:var(--purple-20)}
.buy-widget__opt.selected{border-color:var(--purple-40);background:var(--purple-0)}
.buy-widget__opt-row{display:flex;align-items:center;gap:10px}
.buy-widget__opt-row input{margin:0;accent-color:var(--purple-40)}
.buy-widget__opt-name{font-weight:600;font-size:14px}
.buy-widget__opt-price{font-weight:700;font-size:15px}
.buy-widget__opt-price s{color:var(--text-mute);font-weight:500;margin-right:6px;font-size:13px}
.buy-widget__save{display:inline-block;background:var(--green);color:#fff;font-size:10px;font-weight:700;padding:2px 6px;border-radius:4px;margin-left:6px;text-transform:uppercase;vertical-align:middle;letter-spacing:.03em}
.buy-widget__actions{display:flex;flex-direction:column;gap:8px;margin-bottom:16px}
.buy-widget__actions .btn{padding:14px 20px;font-size:15px}
.buy-widget__monthly{font-size:13px;color:var(--text-soft);text-align:center;padding:12px 0;border-top:1px solid var(--border-soft);border-bottom:1px solid var(--border-soft);margin-bottom:16px}
.buy-widget__meta{display:grid;grid-template-columns:1fr 1fr;gap:16px 12px;font-size:13px}
.buy-widget__meta dt{color:var(--text-soft);margin-bottom:2px;font-weight:500;font-size:12px}
.buy-widget__meta dd{margin:0;font-weight:600;color:var(--text)}

.product-sidebar__links{margin-top:24px;background:#fff;border:1px solid var(--border);border-radius:var(--radius-lg);padding:20px}
.product-sidebar__links h4{margin:0 0 12px;font-size:13px;text-transform:uppercase;letter-spacing:.06em;color:var(--text-mute);font-weight:700}
.product-sidebar__links ul{list-style:none;padding:0;margin:0}
.product-sidebar__links li{margin-bottom:8px}
.product-sidebar__links a{display:flex;justify-content:space-between;align-items:center;color:var(--text);font-size:14px;font-weight:500}
.product-sidebar__links a:hover{color:var(--purple-50)}
.product-sidebar__links a::after{content:"↗";color:var(--text-mute);font-weight:400}

/* Woo buttons override */
.woocommerce .button,.woocommerce a.button,.woocommerce button.button,.woocommerce input.button{background:var(--purple-40) !important;color:#fff !important;border-radius:var(--radius) !important;padding:14px 22px !important;font-weight:600 !important;text-shadow:none !important;font-size:15px !important;border:1.5px solid var(--purple-40) !important}
.woocommerce .button:hover{background:var(--purple-50) !important;border-color:var(--purple-50) !important;color:#fff !important}
.woocommerce .button.alt{background:var(--purple-40) !important;color:#fff !important}
.woocommerce .quantity .qty{padding:10px;border:1.5px solid var(--border-strong);border-radius:var(--radius);width:70px;font-family:inherit}
.woocommerce div.product .product_title{font-family:var(--font-display);font-weight:700;letter-spacing:-.02em}
.woocommerce div.product p.price,.woocommerce div.product span.price{color:var(--text);font-size:1.75rem;font-weight:700}
.woocommerce table.shop_table{border-radius:var(--radius-lg);overflow:hidden;border-color:var(--border)}
.woocommerce table.shop_table th{background:var(--bg-soft);color:var(--text);font-weight:600}
.woocommerce-info,.woocommerce-message{border-top-color:var(--purple-40) !important;background:var(--purple-0) !important;color:var(--text) !important}
.woocommerce-info::before,.woocommerce-message::before{color:var(--purple-40) !important}

/* ============ Footer ============ */
.site-footer{background:#fff;border-top:1px solid var(--border-soft);padding:80px 0 24px;margin-top:96px;color:var(--text-soft)}
.site-footer__brand{margin-bottom:48px}
.site-footer__brand svg{height:36px;width:auto;color:var(--purple-40)}
.site-footer__grid{display:grid;grid-template-columns:repeat(5,1fr);gap:48px;margin-bottom:56px}
@media(max-width:1000px){.site-footer__grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:640px){.site-footer__grid{grid-template-columns:repeat(2,1fr);gap:32px}}
.site-footer h4{color:var(--text);font-family:var(--font-body);font-size:14px;font-weight:700;margin:0 0 20px;letter-spacing:-.005em}
.site-footer ul{list-style:none;padding:0;margin:0}
.site-footer li{margin-bottom:12px;font-size:14px;line-height:1.4}
.site-footer a{color:var(--text-soft);font-weight:500}
.site-footer a:hover{color:var(--text)}
.site-footer__bottom{border-top:1px solid var(--border-soft);padding-top:24px;display:flex;justify-content:space-between;font-size:13px;color:var(--text-soft);flex-wrap:wrap;gap:16px;align-items:center}
.site-footer__legal{display:flex;gap:20px;flex-wrap:wrap}
.site-footer__legal a{color:var(--text-soft)}
.site-footer__copyright{color:var(--text-soft)}

/* ============ Utilities ============ */
.mt-0{margin-top:0}.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}.mt-4{margin-top:32px}
.text-soft{color:var(--text-soft)}
.text-center{text-align:center}
.hidden{display:none !important}
