/*
Theme Name: CreYo Storefront
Theme URI: https://www.creyo.nl
Description: CreYo child theme built on Storefront. Adds the CreYo brand look, a dynamic product-category mega menu, subcategory tiles on category pages, and a custom homepage template.
Author: CreYo
Template: storefront
Version: 1.0.0
Text Domain: creyo-storefront
*/

:root{
  --creyo-pink:#D6336C;
  --creyo-cyan:#2BB6C4;
  --creyo-mustard:#E8A33D;
  --creyo-cream:#FFF8F0;
  --creyo-ink:#2B2420;
  --creyo-muted:#6B6358;
  --creyo-border:#F0E5D6;
}

body{
  background:var(--creyo-cream);
  color:var(--creyo-ink);
  font-family:'Nunito Sans',sans-serif;
}

h1,h2,h3,h4,h5,h6,
.site-title,
.site-title a{
  font-family:'Baloo 2',sans-serif;
  font-weight:800;
}

a{color:var(--creyo-pink)}
a:hover{color:var(--creyo-ink)}

/* WooCommerce's own buttons (add to cart, checkout, my account, ...) get
   their brand color from Storefront's own settings (see
   creyo_storefront_defaults() in functions.php), not from CSS here.
   These two rules only cover the homepage template's own buttons, which
   sit outside any .woocommerce-scoped container. */
.creyo-hero-ctas .button,
.creyo-newsletter button{
  background-color:var(--creyo-pink);
  border:none;
  color:#fff;
  font-weight:800;
  border-radius:999px;
  padding:12px 24px;
  cursor:pointer;
  font-size:15px;
}

/* ---------- Site branding (CreYo wordmark) ---------- */
.creyo-logo{
  display:flex;
  align-items:baseline;
  gap:1px;
  font-family:'Baloo 2',sans-serif;
  font-weight:800;
  font-size:28px;
  text-decoration:none;
}
.creyo-logo span:nth-child(1),
.creyo-logo span:nth-child(4){color:var(--creyo-pink)}
.creyo-logo span:nth-child(2),
.creyo-logo span:nth-child(5){color:var(--creyo-cyan)}
.creyo-logo span:nth-child(3){color:var(--creyo-mustard)}

/* ---------- Category mega menu ---------- */
.creyo-cat-bar-wrap{background:#fff;border-bottom:1px solid var(--creyo-border)}
.creyo-cat-bar{display:flex;align-items:center;gap:2px;flex-wrap:wrap;list-style:none;margin:0 auto;padding-top:4px;padding-bottom:4px}
.creyo-cat-item{position:relative}
.creyo-cat-link{display:flex;align-items:center;gap:6px;padding:14px 16px;font-weight:700;font-size:15px;color:var(--creyo-ink);text-decoration:none}
.creyo-cat-link:hover{color:var(--creyo-pink)}
.creyo-cat-dropdown{
  display:none;
  position:absolute;top:100%;left:0;
  background:#fff;border:1px solid var(--creyo-border);
  border-radius:0 0 14px 14px;
  box-shadow:0 16px 28px rgba(43,36,32,0.14);
  padding:14px 8px;min-width:210px;z-index:30;
}
.creyo-cat-item:hover .creyo-cat-dropdown{display:block}
.creyo-cat-dropdown a{display:block;padding:9px 14px;font-size:14px;border-radius:8px;color:var(--creyo-ink);text-decoration:none}
.creyo-cat-dropdown a:hover{background:#FDEEF3;color:var(--creyo-pink)}

/* ---------- Subcategory tiles on category archive ---------- */
.creyo-subcat-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;
  margin:0 0 32px;
}
.creyo-subcat-tile{
  background:#FDEEF3;border-radius:16px;padding:18px;
  font-weight:800;font-size:15px;color:var(--creyo-ink);text-decoration:none;
  display:flex;align-items:center;min-height:56px;
}
.creyo-subcat-tile:hover{color:var(--creyo-pink)}
.creyo-subcat-tile:nth-child(4n+2){background:#E8F7F8}
.creyo-subcat-tile:nth-child(4n+3){background:#FDF3E3}
.creyo-subcat-tile:nth-child(4n+4){background:#EEF0FA}

/* ---------- Shop toolbar / view toggle ---------- */
.woocommerce-result-count,
.woocommerce-ordering{
  display:inline-flex;align-items:center;vertical-align:middle;margin:0 16px 16px 0 !important;
}
.woocommerce-ordering select{border-radius:8px;border:1px solid #e3d9c8;padding:7px 10px}
.creyo-view-toggle{display:inline-flex;gap:4px;vertical-align:middle;margin-bottom:16px}
.creyo-view-toggle a{
  width:34px;height:34px;border-radius:8px;border:1px solid #e3d9c8;background:#fff;
  display:inline-flex;align-items:center;justify-content:center;color:var(--creyo-ink);
}
.creyo-view-toggle a.is-active{border-color:var(--creyo-pink);background:#FDEEF3}

/* ---------- Product grid ---------- */
.woocommerce ul.products li.product{
  background:#fff;border:1px solid var(--creyo-border);border-radius:20px;padding:16px;
}
.woocommerce ul.products li.product img{border-radius:14px}
.woocommerce ul.products li.product .price{color:var(--creyo-ink);font-weight:800}
.woocommerce ul.products li.product h2,
.woocommerce ul.products li.product .woocommerce-loop-product__title{
  font-family:'Baloo 2',sans-serif;font-size:15px;
}

/* list view (no-JS toggle via ?creyo_view=list) */
.woocommerce ul.products.creyo-list-view{display:flex;flex-direction:column;gap:16px}
.woocommerce ul.products.creyo-list-view li.product{
  width:100% !important;display:flex;align-items:center;gap:20px;text-align:left;
}
.woocommerce ul.products.creyo-list-view li.product img{width:96px;height:96px;object-fit:cover;flex:0 0 auto}

/* ---------- Sidebar widgets ----------
   Sidebar position (left) is set via creyo_storefront_defaults() in
   functions.php, using Storefront's own layout setting -- Storefront's
   two-column layout is float-based, so a CSS `order` swap here would
   have no effect. */
.widget_product_categories ul,
.widget_price_filter{font-size:14px}
.widget_product_categories li.current-cat > a{color:var(--creyo-pink);font-weight:800}

/* Storefront adds extra breathing room after the header on the "Home"
   page whenever it isn't using Storefront's own bundled homepage
   template (.page-template-template-homepage) -- our custom "CreYo
   Home" template isn't that one, so this rule fires and leaves an
   unwanted gap above our category bar. Our own hero section already
   supplies that breathing room, so cancel it (same selector/specificity
   as Storefront's own rule, loaded after it). */
.home.blog .site-header,
.home.page:not(.page-template-template-homepage) .site-header,
.home.post-type-archive-product .site-header{
  margin-bottom:0;
}

/* ---------- Homepage template ---------- */
.creyo-home header.creyo-hero{padding:72px 5%;display:flex;gap:56px;align-items:center;flex-wrap:wrap}
.creyo-hero-copy{flex:1 1 440px;min-width:300px}
.creyo-hero-eyebrow{text-transform:uppercase;letter-spacing:.12em;font-weight:800;font-size:13px;color:var(--creyo-cyan);margin:0 0 14px}
.creyo-hero-copy h1{font-size:46px;line-height:1.1;margin:0 0 20px}
.creyo-hero-copy h1 em{font-style:normal;color:var(--creyo-pink)}
.creyo-hero-copy p{font-size:18px;line-height:1.6;color:var(--creyo-muted);max-width:460px;margin:0 0 32px}
.creyo-hero-ctas{display:flex;gap:16px;flex-wrap:wrap}
.creyo-hero-ctas .is-secondary{background:none;border:2px solid var(--creyo-pink);color:var(--creyo-pink)}
.creyo-hero-art{flex:1 1 320px;min-width:260px;display:flex;justify-content:center}

.creyo-trust{padding:32px 5%;background:#fff;border-top:1px solid var(--creyo-border);border-bottom:1px solid var(--creyo-border);display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
.creyo-trust div{display:flex;align-items:center;gap:12px;font-weight:700;font-size:14px}

.creyo-section{padding:64px 5%}
.creyo-section h2{font-size:28px;margin:0 0 28px}
.creyo-cat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px}
.creyo-cat-grid a{border-radius:24px;padding:28px;display:flex;flex-direction:column;gap:40px;font-weight:800;font-size:17px;text-decoration:none;color:var(--creyo-ink)}

.creyo-about{display:flex;gap:48px;align-items:center;flex-wrap:wrap}
.creyo-about figure{flex:1 1 360px;min-width:260px;height:280px;border-radius:28px;background:#E8F7F8;margin:0;display:flex;align-items:center;justify-content:center;overflow:hidden}
.creyo-about figure img{width:100%;height:100%;object-fit:cover}
.creyo-about div{flex:1 1 420px;min-width:280px}
.creyo-about p{font-size:16px;line-height:1.7;color:var(--creyo-muted)}

.creyo-newsletter{padding:48px 5%;background:var(--creyo-pink);color:#fff;display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap}
.creyo-newsletter form{display:flex;gap:10px;flex-wrap:wrap}
.creyo-newsletter input[type="email"]{padding:12px 18px;border-radius:999px;border:none;font-size:14px;min-width:220px}
.creyo-newsletter button{background:var(--creyo-ink)}

@media (max-width:900px){
  .creyo-cat-grid,.creyo-subcat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .creyo-trust{grid-template-columns:1fr}
}
@media (max-width:560px){
  .creyo-cat-grid,.creyo-subcat-grid{grid-template-columns:1fr}
  .creyo-cat-dropdown{position:static;box-shadow:none;border:none;padding:0 0 0 14px}
}
