/*
Theme Name: Tiny Tumble
Theme URI: https://example.com/tinytumble
Author: Tiny Tumble
Description: A warm, playful WooCommerce theme for Tiny Tumble. Includes a Shop by category dropdown, a full homepage, a Contact page with an enquiry form and social icons, and one-click setup of categories and menus.
Version: 1.1.0
Requires at least: 6.0
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: tinytumble
Tags: e-commerce, custom-menu, custom-logo, featured-images, translation-ready, wide-blocks
*/

:root{
  --cream:#fdf8f2; --paper:#fffdf9; --ink:#3f2f27; --muted:#7a6a5f;
  --olive:#5f6a48; --olive-dark:#4a5337; --terra:#a95a37; --gold:#e6a95b;
  --t1:#dfe3d0; --t2:#f0d5c2; --t3:#ebdcc9; --t4:#f7e2bd; --line:#eadfd0;
  --head:'Fredoka','Trebuchet MS',system-ui,sans-serif; --body:'Nunito',system-ui,-apple-system,'Segoe UI',sans-serif;
  --wrap:1320px; --r:14px; --r-lg:26px;
}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--cream);color:var(--ink);font:400 1.02rem/1.65 var(--body);-webkit-font-smoothing:antialiased}
img{max-width:100%;height:auto;display:block}
a{color:var(--olive);text-underline-offset:3px}
a:hover{color:var(--olive-dark)}
h1,h2,h3,h4{font-family:var(--head);font-weight:600;line-height:1.15;letter-spacing:-.005em;margin:0 0 .5em;color:var(--ink)}
h1{font-size:clamp(2.2rem,5vw,3.6rem)} h2{font-size:clamp(1.5rem,3vw,2.1rem)} h3{font-size:1.15rem}
p{margin:0 0 1em}
:focus-visible{outline:3px solid var(--gold);outline-offset:2px}
.screen-reader-text,.skip-link{position:absolute;left:-9999px}
.skip-link:focus{left:1rem;top:1rem;background:#fff;padding:.5rem 1rem;z-index:200}
.wrap{max-width:var(--wrap);margin:0 auto;padding:0 1.25rem}
.site-main{padding:2.5rem 1.25rem 4rem}

/* Announcement + header */
.announce{background:var(--olive);color:#fff;text-align:center;font-size:.92rem;padding:.5rem 1rem}
.site-header{background:var(--paper);border-bottom:1px solid var(--line);position:relative;z-index:60}
.header-main{display:flex;align-items:center;gap:1.5rem;padding-top:.9rem;padding-bottom:.9rem}
.brand{display:flex;align-items:center;gap:.7rem;text-decoration:none;color:var(--olive-dark);flex-shrink:0}
.brand img{height:42px;width:auto}
.brand-text{font:700 1.55rem/1 var(--head);color:var(--olive-dark)}
.brand-text small{display:block;font:500 .7rem/1.4 var(--body);color:var(--muted);margin-top:.2rem}
.custom-logo{max-height:52px;width:auto}
.header-search{flex:1;display:flex;max-width:560px;margin:0 auto}
.header-search input[type=search]{flex:1;border-radius:99px 0 0 99px;border:2px solid var(--line);border-right:0;padding:.7rem 1.1rem;background:#fff}
.header-search button{background:var(--olive);color:#fff;border:0;border-radius:0 99px 99px 0;padding:0 1.4rem;font:600 .95rem var(--body);cursor:pointer}
.header-search button:hover{background:var(--olive-dark)}
.header-tools{display:flex;align-items:center;gap:1.1rem}
.header-tools a{color:var(--ink);text-decoration:none;font-weight:600}
.header-tools a:hover{color:var(--olive)}
.cart-link{display:inline-flex;align-items:center;gap:.4rem}
.cart-count{background:var(--terra);color:#fff;border-radius:99px;min-width:1.5rem;padding:0 .45rem;text-align:center;font-size:.8rem;line-height:1.5rem}
.nav-toggle{display:none;background:#fff;border:2px solid var(--line);border-radius:99px;padding:.45rem 1rem;font:600 .95rem var(--body);cursor:pointer;color:var(--ink)}

/* Navigation bar + mega menu */
.nav-bar{background:var(--t1);border-top:1px solid var(--line)}
.nav-inner{display:flex;align-items:center;gap:1.5rem}
.mega{position:relative}
.mega-toggle{background:var(--olive);color:#fff;border:0;padding:.85rem 1.4rem;font:600 1rem var(--body);cursor:pointer;border-radius:0}
.mega-toggle::after{content:"";display:inline-block;margin-left:.6rem;border:5px solid transparent;border-top-color:#fff;border-bottom:0;vertical-align:middle}
.mega-toggle:hover,.mega.open .mega-toggle{background:var(--olive-dark)}
.mega-panel{display:none;position:absolute;left:0;top:100%;width:min(1100px,94vw);background:var(--paper);border:1px solid var(--line);border-radius:0 0 var(--r-lg) var(--r-lg);box-shadow:0 18px 40px rgba(63,47,39,.14);padding:1.6rem;z-index:80}
.mega.open .mega-panel{display:block}
.mega-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:1.4rem 1.6rem;max-height:70vh;overflow:auto}
.mega-title{font:600 1rem var(--head);color:var(--olive-dark);text-decoration:none;display:block;margin-bottom:.35rem}
.mega-title:hover{text-decoration:underline}
.mega-col ul{list-style:none;margin:0;padding:0}
.mega-col li a{color:var(--ink);text-decoration:none;font-size:.92rem;display:block;padding:.12rem 0}
.mega-col li a:hover{color:var(--terra);text-decoration:underline}
.mega-col li.mega-all a{font-weight:700;color:var(--olive)}
.main-nav ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:.2rem 1.4rem}
.main-nav li{position:relative}
.main-nav a{color:var(--ink);text-decoration:none;font-weight:700;display:block;padding:.85rem 0}
.main-nav a:hover,.main-nav .current-menu-item>a{color:var(--olive-dark);text-decoration:underline}
.main-nav .sub-menu{display:none;position:absolute;left:-1rem;top:100%;min-width:240px;background:var(--paper);border:1px solid var(--line);border-radius:var(--r);box-shadow:0 12px 28px rgba(63,47,39,.12);padding:.5rem 1rem;flex-direction:column;gap:0;z-index:90}
.main-nav li:hover>.sub-menu,.main-nav li:focus-within>.sub-menu{display:flex}
.main-nav .sub-menu a{padding:.5rem 0;font-weight:600}

/* Forms + buttons */
input[type=text],input[type=email],input[type=search],input[type=tel],input[type=password],input[type=number],select,textarea{
  width:100%;padding:.7rem .9rem;border:2px solid var(--line);border-radius:var(--r);font:inherit;background:#fff;color:var(--ink)}
input:focus,select:focus,textarea:focus{border-color:var(--olive);outline:0}
.button,button.button,input[type=submit],.wp-block-button__link,
.woocommerce a.button,.woocommerce button.button,.woocommerce input.button,.woocommerce #respond input#submit,
.woocommerce a.button.alt,.woocommerce button.button.alt,.woocommerce #place_order{
  display:inline-block;background:var(--olive);color:#fff;border:0;border-radius:99px;padding:.8rem 1.6rem;
  font:600 1rem var(--body);text-decoration:none;cursor:pointer;line-height:1.2}
.button:hover,input[type=submit]:hover,.woocommerce a.button:hover,.woocommerce button.button:hover,
.woocommerce a.button.alt:hover,.woocommerce button.button.alt:hover,.woocommerce #place_order:hover{background:var(--olive-dark);color:#fff}
.button.ghost{background:transparent;color:var(--olive-dark);box-shadow:inset 0 0 0 2px var(--olive)}
.button.ghost:hover{background:var(--olive);color:#fff}
.button.light{background:#fff;color:var(--olive-dark)}
.button.light:hover{background:var(--t4);color:var(--ink)}

/* Homepage */
.hero{background:var(--cream)}
.hero-inner{display:grid;grid-template-columns:1fr 1fr;gap:2.5rem;align-items:center;padding-top:2rem;padding-bottom:2rem}
.hero h1{max-width:13ch;color:var(--olive-dark)}
.hero p{font-size:1.15rem;color:var(--muted);max-width:44ch}
.hero-actions{display:flex;gap:.8rem;flex-wrap:wrap;margin-top:1.5rem}
.hero-art img{width:100%;max-width:560px;margin:0 auto;border-radius:var(--r-lg)}
.values{background:var(--paper);border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.values-row{display:grid;grid-template-columns:repeat(4,1fr);gap:1rem;padding-top:1.2rem;padding-bottom:1.2rem}
.value{display:flex;align-items:center;gap:.8rem;font-weight:700;justify-content:center}
.vi{width:46px;height:46px;border-radius:50%;display:inline-grid;place-items:center;color:#fff;flex-shrink:0}
.v1,.v4{background:var(--olive)} .v2{background:#c9a584} .v3{background:#c37e54}
.section{padding:2.25rem 0}
.section:not(.band)+.section:not(.band){padding-top:0}
.band{background:var(--paper);border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.section-head{display:flex;justify-content:space-between;align-items:baseline;gap:1rem;margin-bottom:1.1rem}
.section-head h2{margin:0}
.more{font-weight:700}
.cat-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:1rem}
.cat-tile{display:flex;flex-direction:column;justify-content:flex-end;min-height:150px;padding:1.2rem;border-radius:var(--r-lg);text-decoration:none;color:var(--ink);position:relative;overflow:hidden}
.cat-tile img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.9}
.cat-tile .cat-name,.cat-tile .cat-count{position:relative}
.cat-name{font:600 1.08rem/1.2 var(--head)}
.cat-count{font-size:.88rem;color:var(--muted)}
.tone-1{background:var(--t1)} .tone-2{background:var(--t2)} .tone-3{background:var(--t3)} .tone-4{background:var(--t4)}
.cat-tile:hover{outline:3px solid var(--olive);outline-offset:-3px;color:var(--ink)}
.age-row{display:flex;flex-wrap:wrap;gap:.9rem}
.age-pill{background:var(--t4);color:var(--ink);text-decoration:none;font:600 1.15rem var(--head);padding:1rem 1.8rem;border-radius:99px}
.age-pill:nth-child(2n){background:var(--t1)} .age-pill:nth-child(3n){background:var(--t2)}
.age-pill:hover{background:var(--olive);color:#fff}
.promo{background:var(--terra);color:#fff;padding:2.5rem 0}
.promo-inner{display:flex;align-items:center;justify-content:space-between;gap:1.5rem;flex-wrap:wrap}
.promo h2{color:#fff;margin-bottom:.3rem} .promo p{margin:0;max-width:56ch}
.trust{background:var(--t1);padding:2.25rem 0;margin-top:1.5rem}
.trust-row{display:grid;grid-template-columns:repeat(4,1fr);gap:1.5rem}
.trust-item h3{margin-bottom:.2rem;color:var(--olive-dark)} .trust-item p{margin:0;color:var(--ink);font-size:.95rem}

/* Product grid. WooCommerce draws empty ::before/::after boxes (they became grid cells = the gap before the first product)
   and forces ~22% widths (tiny products). Both are overridden firmly here. */
body ul.products{display:grid;grid-template-columns:repeat(4,1fr);gap:1.8rem;list-style:none;margin:0 0 2rem;padding:0;clear:none}
body.tt-cols-3 ul.products{grid-template-columns:repeat(3,1fr)}
.woocommerce ul.products::before,.woocommerce ul.products::after,
.woocommerce-page ul.products::before,.woocommerce-page ul.products::after,
ul.products::before,ul.products::after{content:none!important;display:none!important}
.woocommerce ul.products li.product,.woocommerce-page ul.products li.product,
.woocommerce ul.products[class*="columns-"] li.product,.woocommerce-page ul.products[class*="columns-"] li.product,
body ul.products li.product{width:100%!important;max-width:none!important;float:none!important;clear:none!important;margin:0!important;padding:0;position:relative;display:flex;flex-direction:column}
ul.products li.product a.woocommerce-LoopProduct-link{display:block}
ul.products li.product img{aspect-ratio:1/1;object-fit:cover;width:100%;border-radius:var(--r-lg);background:var(--t3);margin:0 0 .8rem}
ul.products li.product .woocommerce-loop-product__title{font:600 1.25rem/1.3 var(--head);padding:0;margin:0 0 .25rem}
ul.products li.product a{color:var(--ink);text-decoration:none}
ul.products li.product .button{margin-top:auto;align-self:flex-start;padding:.75rem 1.5rem;font-size:1rem;color:#fff}
ul.products li.product-category a{display:block}
ul.products li.product-category .woocommerce-loop-category__title{font:600 1.05rem var(--head);text-align:center}
ul.products li.product-category mark{background:none;color:var(--muted);font-weight:400}
.price{color:var(--ink);font-weight:700;display:block;margin-bottom:.75rem;font-size:1.2rem}
.price del{color:var(--muted);font-weight:400;margin-right:.4rem}
.price ins{text-decoration:none;color:var(--terra)}
.woocommerce span.onsale,span.onsale{position:absolute;top:.7rem;left:.7rem;z-index:2;margin:0;min-height:0;min-width:0;
  background:var(--terra);color:#fff;border-radius:99px;padding:.25rem .7rem;font-size:.82rem;font-weight:700;line-height:1.4}
.woocommerce-result-count{color:var(--muted)}
.woocommerce-ordering select{width:auto}
.woocommerce-breadcrumb{color:var(--muted);font-size:.9rem;margin-bottom:1.5rem}
.term-description{max-width:70ch;color:var(--muted);margin-bottom:2rem}
.woocommerce-products-header__title{color:var(--olive-dark)}

/* Single product */
.woocommerce div.product .product_title{font-size:clamp(1.8rem,3.5vw,2.6rem);color:var(--olive-dark)}
.woocommerce div.product p.price,.woocommerce div.product span.price{font-size:1.5rem;color:var(--ink)}
.woocommerce div.product div.images img{border-radius:var(--r-lg)}
.woocommerce div.product form.cart{margin:1.5rem 0;display:flex;gap:.75rem;flex-wrap:wrap}
.woocommerce .quantity .qty{width:5rem;padding:.7rem;border:2px solid var(--line);border-radius:var(--r)}
.woocommerce div.product .woocommerce-tabs ul.tabs{padding:0;margin:0 0 1.5rem;border-bottom:2px solid var(--line)}
.woocommerce div.product .woocommerce-tabs ul.tabs::before{display:none}
.woocommerce div.product .woocommerce-tabs ul.tabs li{background:none;border:0;border-radius:0;margin:0 1.5rem 0 0;padding:0}
.woocommerce div.product .woocommerce-tabs ul.tabs li::before,.woocommerce div.product .woocommerce-tabs ul.tabs li::after{display:none}
.woocommerce div.product .woocommerce-tabs ul.tabs li a{padding:.7rem 0;font-weight:700;color:var(--muted)}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a{color:var(--ink);box-shadow:inset 0 -4px var(--olive)}

/* Cart, checkout, account, notices */
.woocommerce table.shop_table{border:2px solid var(--line);border-radius:var(--r);border-collapse:separate;border-spacing:0;background:var(--paper)}
.woocommerce table.shop_table th,.woocommerce table.shop_table td{padding:1rem;border-top:1px solid var(--line)}
.woocommerce-message,.woocommerce-info,.woocommerce-error{background:var(--t1);border-top:0;border-left:5px solid var(--olive);padding:1rem 1.25rem;border-radius:var(--r);margin-bottom:1.5rem;list-style:none}
.woocommerce-error{background:#f6ddd2;border-left-color:var(--terra)}
.woocommerce-message::before,.woocommerce-info::before,.woocommerce-error::before{display:none}
.woocommerce-message .button,.woocommerce-info .button{float:right;padding:.5rem 1.1rem}
.woocommerce form .form-row label{font-weight:700;margin-bottom:.25rem;display:block}
.woocommerce-checkout #payment{background:var(--t1);border-radius:var(--r)}
.woocommerce-checkout #payment div.payment_box{background:#fff;border-radius:var(--r)}
.woocommerce-MyAccount-navigation ul{list-style:none;padding:0}
.woocommerce-MyAccount-navigation a{display:block;padding:.6rem 0;border-bottom:1px solid var(--line);color:var(--ink);text-decoration:none;font-weight:600}
.woocommerce-MyAccount-navigation .is-active a{color:var(--olive);font-weight:700}

/* Blog + pages */
.post-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:2rem}
.post-card img{aspect-ratio:3/2;object-fit:cover;width:100%;border-radius:var(--r-lg);margin-bottom:.8rem}
.post-card h2{font-size:1.3rem}.post-card h2 a{color:var(--ink);text-decoration:none}
.meta{color:var(--muted);font-size:.9rem}
.entry{max-width:720px;margin:0 auto}
.entry-content>*{margin-bottom:1.2em}
.nav-links{display:flex;gap:.5rem;flex-wrap:wrap;margin-top:2rem}
.nav-links a,.nav-links span{padding:.4rem .9rem;border:2px solid var(--line);border-radius:99px;text-decoration:none;background:var(--paper)}
.nav-links .current{background:var(--olive);color:#fff;border-color:var(--olive)}
.page-title-bar{margin-bottom:2rem}

/* Footer + WhatsApp */
.site-footer{background:var(--olive-dark);color:#e8eadf;padding:3.5rem 0 1.5rem}
.site-footer a{color:#fff}
.site-footer h3{color:#fff}
.footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr;gap:2.5rem;margin-bottom:2.5rem}
.footer-menu{list-style:none;margin:0;padding:0}
.footer-menu li{margin-bottom:.5rem}
.footer-contact{font-size:.95rem}
.footer-bottom{border-top:1px solid rgba(255,255,255,.2);padding-top:1.25rem;font-size:.9rem;color:#c9cdb8}
.wa-float{position:fixed;right:1rem;bottom:1rem;z-index:70;background:#25a244;color:#fff;text-decoration:none;font-weight:700;padding:.8rem 1.2rem;border-radius:99px;box-shadow:0 6px 18px rgba(0,0,0,.2)}
.wa-float:hover{background:#1c8a39;color:#fff}

/* Social icons + Contact page + enquiry form */
.social-icons{display:flex;gap:.7rem;margin:1rem 0}
.social-icon{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.16);color:#fff;text-decoration:none;transition:background .15s}
.social-icon:hover{background:var(--terra);color:#fff}
.social-icons.large .social-icon{width:54px;height:54px;background:var(--olive)}
.social-icons.large .social-icon:hover{background:var(--terra)}
.social-icons.large svg{width:26px;height:26px}
.contact-page{max-width:960px;margin:0 auto}
.contact-page h1{color:var(--olive-dark)}
.contact-intro{color:var(--muted);font-size:1.1rem;margin-bottom:2rem}
.contact-grid{display:grid;grid-template-columns:1.2fr 1fr;gap:2.5rem;align-items:start}
.contact-list{list-style:none;margin:0;padding:0;background:var(--paper);border:2px solid var(--line);border-radius:var(--r-lg)}
.contact-list li{padding:1.1rem 1.5rem;border-bottom:1px solid var(--line);display:flex;flex-direction:column;gap:.1rem}
.contact-list li:last-child{border-bottom:0}
.cl-label{font-size:.88rem;font-weight:700;color:var(--muted)}
.contact-list a,.cl-text{font:600 1.2rem var(--head);color:var(--olive-dark);text-decoration:none}
.contact-list a:hover{color:var(--terra);text-decoration:underline}
.contact-social{background:var(--t1);border-radius:var(--r-lg);padding:1.6rem}
.contact-social h2{font-size:1.4rem}
.contact-side{display:flex;flex-direction:column;gap:1.5rem}
.enquiry{background:var(--paper);border:2px solid var(--line);border-radius:var(--r-lg);padding:1.8rem}
.enquiry h2{font-size:1.5rem}
.enquiry-form p{margin:0 0 1rem}
.enquiry-form label{display:block;font-weight:700;margin-bottom:.3rem}
.enquiry-form textarea{resize:vertical}
.enquiry-form .hp{position:absolute;left:-9999px;height:0;overflow:hidden}
.form-notice{padding:1rem 1.2rem;border-radius:var(--r);margin-bottom:1.2rem;font-weight:600}
.form-notice.success{background:var(--t1);border-left:5px solid var(--olive)}
.form-notice.error{background:#f6ddd2;border-left:5px solid var(--terra)}

/* Responsive */
@media (max-width:1000px){
  .header-main{flex-wrap:wrap}
  .header-search{order:5;flex-basis:100%;max-width:none}
  body ul.products,body.tt-cols-3 ul.products,body.tt-cols-4 ul.products{grid-template-columns:repeat(3,1fr)}
}
@media (max-width:860px){
  .nav-toggle{display:inline-block;margin-left:auto}
  .header-tools{margin-left:0}
  .nav-bar{display:none}
  .nav-bar.open{display:block}
  .nav-inner{flex-direction:column;align-items:stretch;gap:0;padding-top:.5rem;padding-bottom:.8rem}
  .mega-panel{position:static;width:100%;box-shadow:none;border-radius:var(--r);margin-top:.5rem}
  .mega-grid{max-height:50vh}
  .main-nav ul{flex-direction:column;gap:0}
  .main-nav .sub-menu{display:flex;position:static;border:0;box-shadow:none;background:none;padding:0 0 0 1rem}
  .hero-inner{grid-template-columns:1fr;padding-top:1.5rem}
  .values-row,.trust-row{grid-template-columns:1fr 1fr}
  .post-grid{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:760px){.contact-grid{grid-template-columns:1fr}}
@media (max-width:600px){
  body ul.products,body.tt-cols-3 ul.products,body.tt-cols-4 ul.products{grid-template-columns:repeat(2,1fr);gap:1rem}
  ul.products li.product .woocommerce-loop-product__title{font-size:1.05rem}
  ul.products li.product .price{font-size:1.05rem}
  ul.products li.product .button{padding:.65rem 1.1rem;font-size:.95rem}
  .values-row,.trust-row,.post-grid,.footer-grid{grid-template-columns:1fr}
  .cat-tile{min-height:130px;padding:1rem}
  .section{padding:1.5rem 0}
  .header-tools{gap:.8rem}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
