/*
Theme Name: StoreCraft
Theme URI: https://example.com/storecraft
Author: Mickey Raga
Author URI: https://example.com
Description: StoreCraft is a multipurpose WooCommerce theme for non-technical store owners — bold hero sections, product grids, category showcases, testimonials and a live-editable brand color system in the Customizer. Built in the spirit of Avada & OceanWP, but lightweight.
Version: 1.5.0
Requires at least: 5.9
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: storecraft
Tags: e-commerce, woocommerce, custom-colors, custom-menu, featured-images, full-width-template, block-styles, editor-style
WC requires at least: 6.0
WC tested up to: 9.0
*/

/* ==========================================================================
   Design tokens — overridden live by the Customizer (see functions.php)
   ========================================================================== */
:root{
  --brand:#6c5ce7;
  --accent:#ff7a59;
  --ink:#1d2233;
  --paper:#ffffff;
  --soft:#f5f6fb;
  --radius:14px;
  --font:'Segoe UI',system-ui,-apple-system,Roboto,Helvetica,Arial,sans-serif;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:var(--font);
  color:var(--ink);
  background:var(--paper);
  line-height:1.5;
}
img{max-width:100%;height:auto;display:block}
a{color:inherit;text-decoration:none}
.sc-container{max-width:1180px;margin:0 auto;padding:0 24px}
.screen-reader-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap}

/* ---------- Announcement top-bar ---------- */
.s-topbar{background:var(--ink);color:#fff;font-size:13px}
.s-topbar-inner{max-width:var(--container,1180px);margin:0 auto;padding:9px 24px;display:flex;align-items:center;justify-content:center;gap:20px;text-align:center}
.s-topbar-menu{display:flex;gap:16px;list-style:none;margin:0;padding:0;opacity:.85}
.s-topbar-menu a:hover{opacity:1}

/* ---------- Header ---------- */
.s-header{display:flex;align-items:center;justify-content:space-between;padding:18px 34px;background:var(--header-bg,var(--paper));border-bottom:1px solid #eee;z-index:50}
.s-header.is-sticky{position:sticky;top:0}
.s-header-actions{display:flex;align-items:center;gap:12px}
.s-icon-btn{background:var(--soft);border:0;width:38px;height:38px;border-radius:50%;font-size:15px;cursor:pointer}
.s-icon-btn:hover{background:var(--brand);color:#fff}
.s-header-cta{padding:9px 18px !important;font-size:13px !important}
.s-search-panel{background:var(--soft);border-bottom:1px solid #eee;padding:18px 0}
.s-search-panel form{display:flex;gap:10px;max-width:var(--container,1180px);margin:0 auto;padding:0 24px}
.s-search-panel input[type=search],.s-search-panel input[type=text]{flex:1;padding:12px 16px;border:1px solid #ddd;border-radius:var(--radius);font-size:14px}
.s-search-panel button{background:var(--brand);color:#fff;border:0;border-radius:var(--radius);padding:0 22px;font-weight:800;cursor:pointer}
.s-header .s-logo{font-weight:900;font-size:20px;color:var(--ink);display:flex;align-items:center;gap:9px;flex:0 0 auto}
.s-header .s-logo .m{width:30px;height:30px;border-radius:9px;background:var(--brand);display:grid;place-items:center;color:#fff;font-size:15px}
/* Constrain an uploaded custom logo so it fits the header bar */
.s-header .s-logo.has-logo{max-width:220px}
.s-header .custom-logo,.s-header .s-logo img{max-height:52px;width:auto;height:auto;display:block;border-radius:8px}
.s-header .custom-logo-link{display:inline-flex;align-items:center}
.s-topbar + .s-header .s-logo img{max-height:52px}
@media(max-width:640px){.s-header .custom-logo,.s-header .s-logo img{max-height:40px}}
.s-nav{display:flex;gap:22px;font-size:14px;font-weight:600;color:var(--ink);list-style:none;margin:0;padding:0}
.s-nav a{opacity:.85}
.s-nav a:hover{opacity:1;color:var(--brand)}
.s-header .s-cart{display:flex;align-items:center;gap:8px;background:var(--soft);padding:8px 14px;border-radius:30px;font-weight:700;font-size:13px;color:var(--ink)}
.s-header .s-cart .b{background:var(--brand);color:#fff;border-radius:50%;min-width:20px;height:20px;padding:0 5px;display:grid;place-items:center;font-size:11px}
.s-burger{display:none;background:none;border:0;font-size:22px;color:var(--ink)}

/* ---------- Hero ---------- */
.s-hero{padding:70px 40px;display:grid;grid-template-columns:1.1fr .9fr;gap:30px;align-items:center;background:linear-gradient(135deg,var(--soft),#fff)}
.s-hero .eyebrow{color:var(--brand);font-weight:800;letter-spacing:1px;text-transform:uppercase;font-size:12px}
.s-hero h1{font-size:44px;line-height:1.08;margin:12px 0;color:var(--ink);font-weight:900}
.s-hero p{font-size:17px;line-height:1.6;color:#555;max-width:460px}
.s-hero .cta{display:flex;gap:12px;margin-top:22px;flex-wrap:wrap}
.s-btn{background:var(--brand);color:#fff;border:0;padding:14px 26px;border-radius:var(--radius);font-weight:800;font-size:14px;cursor:pointer;display:inline-block}
.s-btn:hover{filter:brightness(1.07)}
.s-btn.alt{background:transparent;color:var(--ink);border:2px solid #ddd}
.s-hero-art{aspect-ratio:1/1;border-radius:calc(var(--radius) + 8px);background:linear-gradient(135deg,var(--brand),var(--accent));display:grid;place-items:center;font-size:120px;box-shadow:0 30px 60px rgba(0,0,0,.18)}

/* ---------- Generic section ---------- */
.s-sec{padding:60px 40px}
.s-sec-head{text-align:center;max-width:640px;margin:0 auto 36px}
.s-sec-head .eyebrow{color:var(--brand);font-weight:800;letter-spacing:1px;text-transform:uppercase;font-size:12px}
.s-sec-head h2{font-size:32px;margin:8px 0;color:var(--ink);font-weight:900}
.s-sec-head p{color:#666;font-size:15px;line-height:1.6}

/* ---------- Product grid (placeholder + WooCommerce) ---------- */
.s-products{display:grid;grid-template-columns:repeat(4,1fr);gap:22px}
.s-card{background:var(--paper);border:1px solid #eee;border-radius:var(--radius);overflow:hidden;transition:.15s}
.s-card:hover{box-shadow:0 16px 40px rgba(0,0,0,.1);transform:translateY(-4px)}
.s-card .ph{aspect-ratio:1/1;position:relative;display:grid;place-items:center;font-size:44px}
.s-card .tag{position:absolute;top:10px;left:10px;background:var(--accent);color:#fff;font-size:10px;font-weight:800;padding:3px 9px;border-radius:20px;letter-spacing:.4px}
.s-card .info{padding:15px}
.s-card .info .nm{font-weight:700;color:var(--ink);font-size:14px}
.s-card .info .rt{color:#f5a623;font-size:12px;margin:4px 0}
.s-card .info .pr{display:flex;align-items:center;gap:8px;margin-top:6px}
.s-card .info .pr .now{font-weight:900;color:var(--ink);font-size:17px}
.s-card .info .pr .was{color:#aaa;text-decoration:line-through;font-size:13px}
.s-card .info .add{margin-top:12px;width:100%;background:var(--soft);color:var(--ink);border:0;padding:10px;border-radius:10px;font-weight:800;font-size:13px;cursor:pointer}
.s-card .info .add:hover{background:var(--brand);color:#fff}

/* ---------- Categories ---------- */
.s-cats{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.s-cat{height:190px;border-radius:var(--radius);position:relative;overflow:hidden;display:flex;align-items:flex-end;padding:20px;color:#fff;font-weight:900;font-size:20px}
.s-cat .shade{position:absolute;inset:0;background:linear-gradient(180deg,transparent,rgba(0,0,0,.55))}
.s-cat span{position:relative;z-index:2}
.s-cat small{position:relative;z-index:2;display:block;font-weight:600;font-size:12px;opacity:.9}

/* ---------- Featured ---------- */
.s-feature{display:grid;grid-template-columns:1fr 1fr;border-radius:var(--radius);overflow:hidden;border:1px solid #eee}
.s-feature .art{min-height:320px;background:linear-gradient(135deg,var(--brand),var(--accent));display:grid;place-items:center;font-size:90px}
.s-feature .txt{padding:44px;display:flex;flex-direction:column;justify-content:center;background:var(--paper)}
.s-feature .txt .eyebrow{color:var(--accent);font-weight:800;text-transform:uppercase;font-size:12px;letter-spacing:1px}
.s-feature .txt h3{font-size:30px;margin:10px 0;color:var(--ink);font-weight:900}
.s-feature .txt p{color:#666;line-height:1.6}
.s-feature .txt .price{font-size:26px;font-weight:900;color:var(--brand);margin:14px 0}

/* ---------- Promo ---------- */
.s-promo{background:linear-gradient(135deg,var(--brand),var(--accent));border-radius:var(--radius);padding:50px;text-align:center;color:#fff}
.s-promo h3{font-size:32px;margin:0 0 8px;font-weight:900}
.s-promo p{opacity:.92;font-size:16px;margin:0 0 22px}
.s-promo .s-btn{background:#fff;color:var(--ink)}

/* ---------- Trust bar ---------- */
.s-trust{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;padding:36px 40px;background:var(--soft)}
.s-trust .item{text-align:center}
.s-trust .item .i{font-size:26px}
.s-trust .item b{display:block;color:var(--ink);font-size:14px;margin-top:8px}
.s-trust .item small{color:#777;font-size:12px}

/* ---------- Testimonials ---------- */
.s-tests{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.s-test{background:var(--soft);border-radius:var(--radius);padding:24px}
.s-test .stars{color:#f5a623;font-size:14px}
.s-test p{color:#444;line-height:1.6;font-size:14px;margin:10px 0 16px}
.s-test .who{display:flex;align-items:center;gap:10px}
.s-test .who .av{width:38px;height:38px;border-radius:50%;background:linear-gradient(135deg,var(--brand),var(--accent));display:grid;place-items:center;color:#fff;font-weight:800}
.s-test .who b{font-size:13px;color:var(--ink)}
.s-test .who small{display:block;color:#888;font-size:11px}

/* ---------- Newsletter ---------- */
.s-news{padding:60px 40px;text-align:center;background:var(--ink);color:#fff}
.s-news h3{font-size:28px;margin:0 0 8px;font-weight:900}
.s-news p{opacity:.8;margin:0 0 22px}
.s-news .form{display:flex;gap:10px;max-width:460px;margin:0 auto}
.s-news input{flex:1;padding:14px 16px;border-radius:var(--radius);border:0;font-size:14px}
.s-news .s-btn{background:var(--accent)}

/* ---------- Footer ---------- */
.s-footer{background:var(--footer-bg,#12141d);color:#c9cddb;padding:46px 40px 26px}
.s-footer .cols{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:30px;max-width:var(--container,1180px);margin:0 auto}
.s-footer .footer-widget{margin-bottom:20px}
.s-footer .footer-widget h5,.s-footer-col h5{color:#fff;font-size:13px;margin:0 0 12px}
.s-footer .footer-widget ul{list-style:none;margin:0;padding:0}
.s-footer .footer-widget li{font-size:13px;opacity:.7;margin:8px 0}
.s-footer .footer-widget a:hover{opacity:1;color:#fff}
.s-footer-col .footer-links{list-style:none;margin:0;padding:0}
.s-footer-col .footer-links li{font-size:13px;opacity:.7;margin:8px 0}
/* ---------- Custom widgets ---------- */
.sc-widget{margin:0;padding:0;list-style:none}
.sc-w-contact li{display:flex;gap:9px;align-items:flex-start;font-size:13px;opacity:.85;margin:9px 0;line-height:1.5}
.sc-w-contact li .ic{opacity:.9}
.sc-w-contact a:hover{color:#fff;opacity:1}
.sc-w-news p{font-size:13px;opacity:.75;margin:0 0 10px}
.sc-w-news-form{display:flex;gap:8px;flex-wrap:wrap}
.sc-w-news-form input{flex:1;min-width:120px;padding:9px 11px;border:0;border-radius:8px;font-size:13px}
.sc-w-news-form button{background:var(--brand);color:#fff;border:0;border-radius:8px;padding:9px 14px;font-weight:800;font-size:13px;cursor:pointer}
.sc-w-badges{display:flex;flex-direction:column;gap:7px;font-size:13px;opacity:.85;margin-bottom:12px}
.sc-w-about .sc-w-logo{display:flex;align-items:center;gap:8px;font-weight:900;font-size:17px;color:#fff;margin-bottom:10px}
.sc-w-about .sc-w-logo .m{width:26px;height:26px;border-radius:7px;background:var(--brand);display:grid;place-items:center;color:#fff}
.sc-w-about p{font-size:13px;opacity:.7;line-height:1.6}
.sc-w-products{display:flex;flex-direction:column;gap:12px}
.sc-w-products a{display:flex;gap:10px;align-items:center}
.sc-w-products .thumb img{width:56px;height:56px;object-fit:cover;border-radius:8px;display:block}
.sc-w-products .nm{display:block;font-size:13px;font-weight:700;color:inherit}
.sc-w-products .pr{font-size:12px;opacity:.75}
.sc-w-products a:hover .nm{color:#fff}
.sc-w-note{font-size:12px;opacity:.6}
/* widgets also look right in a light sidebar */
.widget .sc-w-about .sc-w-logo,.widget .sc-w-products .nm{color:var(--ink)}
.widget .sc-w-contact li,.widget .sc-w-news p,.widget .sc-w-about p,.widget .sc-w-badges{opacity:1;color:#444}

.s-socials{display:flex;gap:10px;margin-top:16px}
.s-social{width:36px;height:36px;border-radius:50%;background:rgba(255,255,255,.08);display:grid;place-items:center;color:#fff;font-size:15px;font-weight:800}
.s-social:hover{background:var(--brand)}
.s-footer-bottom{border-top:1px solid #262a37;margin-top:30px;padding-top:18px;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;max-width:var(--container,1180px);margin-left:auto;margin-right:auto}
.s-payments{display:flex;gap:8px}
.s-pay{background:rgba(255,255,255,.1);color:#fff;font-size:11px;font-weight:800;padding:4px 9px;border-radius:6px;letter-spacing:.4px}
.s-footer .s-logo{color:#fff;font-weight:900;font-size:19px;display:flex;align-items:center;gap:9px;margin-bottom:12px}
.s-footer .s-logo .m{width:28px;height:28px;border-radius:8px;background:var(--brand);display:grid;place-items:center;color:#fff}
.s-footer p{font-size:13px;line-height:1.6;opacity:.7;max-width:260px}
.s-footer h5{color:#fff;font-size:13px;margin:0 0 12px}
.s-footer .lnk{font-size:13px;opacity:.7;margin:8px 0}
.s-footer .lnk:hover{opacity:1;color:#fff}
.s-footer .bottom{font-size:12px;opacity:.6}

/* ---------- Block homepage (front page rendered from a page) ---------- */
.sc-home{width:100%}
.sc-home .alignfull{width:100%;margin-left:0;margin-right:0}
.sc-home .alignwide{max-width:var(--container,1180px);margin-left:auto;margin-right:auto}
.sc-home > *:not(.alignfull):not(.alignwide){max-width:var(--container,1180px);margin-left:auto;margin-right:auto;padding-left:24px;padding-right:24px}
.sc-home .wp-block-columns{gap:22px}
.sc-home .wp-block-cover{margin-top:0;margin-bottom:0}

/* ---------- WordPress core / content ---------- */
.sc-content{max-width:820px;margin:0 auto;padding:60px 24px}
.sc-content h1,.sc-content h2,.sc-content h3{color:var(--ink)}
.sc-content a{color:var(--brand);text-decoration:underline}
.sc-post{margin-bottom:40px;padding-bottom:30px;border-bottom:1px solid #eee}
.sc-post .meta{color:#888;font-size:13px;margin:6px 0 14px}
.sticky,.bypostauthor{display:block}
.wp-caption{max-width:100%}
.alignleft{float:left;margin:6px 20px 6px 0}
.alignright{float:right;margin:6px 0 6px 20px}
.aligncenter{margin:6px auto;display:block}
.pagination{display:flex;gap:8px;justify-content:center;margin-top:30px}
.pagination a,.pagination span{padding:8px 14px;border-radius:10px;background:var(--soft);font-weight:700}
.pagination .current{background:var(--brand);color:#fff}

/* ---------- WooCommerce polish (only used when WC active) ---------- */
.woocommerce ul.products li.product,.woocommerce-page ul.products li.product{border:1px solid #eee;border-radius:var(--radius);overflow:hidden;text-align:center;padding-bottom:16px;transition:.15s;background:var(--paper);list-style:none}
.woocommerce ul.products li.product:hover{box-shadow:0 16px 40px rgba(0,0,0,.1);transform:translateY(-4px)}
.woocommerce ul.products li.product a img{margin:0 0 12px}
.woocommerce ul.products li.product .price{color:var(--ink);font-weight:900}
.woocommerce ul.products li.product .price del{color:#aaa;font-weight:400}
.woocommerce span.onsale{background:var(--accent);border-radius:20px}
.woocommerce a.button,.woocommerce button.button,.woocommerce #respond input#submit,.woocommerce .woocommerce-message a.button{background:var(--brand);color:#fff;border-radius:var(--radius);font-weight:800}
.woocommerce a.button.alt,.woocommerce button.button.alt{background:var(--accent)}
.woocommerce .woocommerce-message,.woocommerce .woocommerce-info{border-top-color:var(--brand)}

/* ---------- Responsive ---------- */
@media(max-width:900px){
  .s-hero{grid-template-columns:1fr;padding:48px 24px}
  .s-hero h1{font-size:32px}
  .s-products{grid-template-columns:repeat(2,1fr)}
  .s-feature{grid-template-columns:1fr}
  .s-sec{padding:44px 24px}
}
@media(max-width:640px){
  .s-nav{display:none}
  .s-burger{display:block}
  .s-products{grid-template-columns:repeat(2,1fr)}
  .s-cats,.s-tests,.s-trust,.s-footer .cols{grid-template-columns:1fr}
  .s-news .form{flex-direction:column}
  .s-header{padding:14px 20px}
}
