/*
Theme Name: Saratl Toys
Theme URI: https://saratl.com/
Author: Saratl
Description: A bright, playful, mobile-first WooCommerce theme for a kids' toy store. Colors are taken from the Saratl logo.
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: saratl-toys
*/

:root {
  --c-orange: #ff5a0e;
  --c-yellow: #ffc20a;
  --c-blue: #1a8cff;
  --c-green: #4caf12;
  --c-pink: #ff2f86;
  --c-purple: #8e3bea;
  --c-ink: #2b2250;
  --c-text: #46405f;
  --c-bg: #fffaf3;
  --c-card: #ffffff;
  --c-line: #f0e6d8;
  --radius: 22px;
  --shadow: 0 8px 24px rgba(43, 34, 80, .08);
  --c-pink-dark: #c71d66;
  --c-yellow-dark: #d49c00;
  --header-bg: #ffffff;
  --topbar-from: #8e3bea; --topbar-mid: #ff2f86; --topbar-to: #ff5a0e;
  --hero-from: #fff1d6; --hero-mid: #ffe3ef; --hero-to: #e3f1ff;
  --f-bg: #2b2250; --f-text: #d9d4ee; --f-hover: #ffc20a;
  --i-cart-bg: #1a8cff; --i-cart-fg: #ffffff; --i-menu-bg: #ffc20a; --i-menu-fg: #2b2250;
  --i-phone-bg: #ffc20a; --i-phone-fg: #2b2250; --i-wa-bg: #25d366; --i-wa-fg: #ffffff;
  --i-social-bg: #ff2f86; --i-social-fg: #ffffff; --i-badge: #ffc20a; --i-why: #ffffff;
  --i-call-bg: #4caf12; --i-shop-bg: #ff2f86;
  --logo-h: 56px;
  --font: "Baloo 2", "Hind Siliguri", "Noto Sans Bengali", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-blue); text-decoration: none; }
a:hover { color: var(--c-pink); }
h1, h2, h3, h4 { color: var(--c-ink); line-height: 1.2; margin: 0 0 .5em; font-weight: 800; }
.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.screen-reader-text { position: absolute; left: -9999px; }

/* Buttons */
.btn, .button, button.button, input[type="submit"], .woocommerce a.button, .woocommerce button.button,
.woocommerce #respond input#submit, .woocommerce a.button.alt, .woocommerce button.button.alt {
  display: inline-block;
  background: var(--c-pink);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 12px 26px;
  font-family: var(--font);
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 6px 0 var(--c-pink-dark);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover, .button:hover, .woocommerce a.button:hover, .woocommerce button.button:hover,
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover {
  background: var(--c-pink);
  color: #fff;
  transform: translateY(2px);
  box-shadow: 0 4px 0 var(--c-pink-dark);
}
.btn-yellow { background: var(--c-yellow); color: var(--c-ink); box-shadow: 0 6px 0 var(--c-yellow-dark); }
.btn-yellow:hover { background: var(--c-yellow); color: var(--c-ink); box-shadow: 0 4px 0 var(--c-yellow-dark); }

/* Top bar */
.topbar {
  background: linear-gradient(90deg, var(--topbar-from), var(--topbar-mid), var(--topbar-to));
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  padding: 6px 12px;
}
.topbar a { color: #fff; text-decoration: underline; }

/* Header */
.site-header {
  background: var(--header-bg);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 14px rgba(43, 34, 80, .07);
}
.header-inner { display: flex; align-items: center; gap: 16px; padding: 10px 0; }
.site-logo img, .custom-logo { max-height: var(--logo-h); width: auto; }
.site-title-text { font-size: 30px; font-weight: 800; margin: 0; }
.site-title-text a span:nth-child(6n+1) { color: var(--c-orange); }
.site-title-text a span:nth-child(6n+2) { color: var(--c-yellow); }
.site-title-text a span:nth-child(6n+3) { color: var(--c-blue); }
.site-title-text a span:nth-child(6n+4) { color: var(--c-green); }
.site-title-text a span:nth-child(6n+5) { color: var(--c-pink); }
.site-title-text a span:nth-child(6n+6) { color: var(--c-purple); }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; align-items: center; }
.main-nav li { position: relative; }
.main-nav a { display: block; padding: 8px 14px; border-radius: 999px; color: var(--c-ink); font-weight: 700; }
.main-nav a:hover, .main-nav .current-menu-item > a { background: var(--c-yellow); color: var(--c-ink); }
.main-nav .sub-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 210px;
  background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 8px; flex-direction: column; align-items: stretch;
}
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: flex; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.cart-link {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; background: var(--i-cart-bg); color: var(--i-cart-fg); font-size: 20px;
}
.cart-link:hover { background: var(--c-purple); color: var(--i-cart-fg); }
.cart-count {
  position: absolute; top: -4px; right: -4px; background: var(--c-orange); color: #fff;
  font-size: 12px; font-weight: 800; min-width: 20px; height: 20px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.menu-toggle { display: none; color: var(--i-menu-fg); background: var(--i-menu-bg); border: 0; border-radius: 12px; width: 44px; height: 44px; font-size: 22px; cursor: pointer; }
.header-search { background: #fff; border-top: 1px solid var(--c-line); padding: 8px 0; }
.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] {
  flex: 1; border: 2px solid var(--c-line); border-radius: 999px; padding: 10px 18px; font-family: var(--font); font-size: 16px;
}
.search-form input[type="search"]:focus { outline: none; border-color: var(--c-blue); }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--hero-from) 0%, var(--hero-mid) 50%, var(--hero-to) 100%);
  position: relative; overflow: hidden; padding: 56px 0 72px;
}
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; opacity: .5; }
.hero::before { width: 260px; height: 260px; background: var(--c-yellow); top: -80px; right: 8%; }
.hero::after { width: 180px; height: 180px; background: var(--c-blue); bottom: -60px; left: 4%; opacity: .3; }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; }
.hero h1 { font-size: clamp(32px, 5vw, 58px); }
.hero h1 .w1 { color: var(--c-orange); } .hero h1 .w2 { color: var(--c-blue); } .hero h1 .w3 { color: var(--c-pink); }
.hero p { font-size: 18px; max-width: 520px; }
.hero-art { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.hero-art .blob {
  aspect-ratio: 1; border-radius: 38% 62% 55% 45% / 50% 40% 60% 50%;
  display: flex; align-items: center; justify-content: center; font-size: 54px;
  box-shadow: var(--shadow); animation: float 4s ease-in-out infinite;
}
.hero-art .blob:nth-child(2) { animation-delay: .5s; } .hero-art .blob:nth-child(3) { animation-delay: 1s; }
.hero-art .blob:nth-child(4) { animation-delay: 1.5s; } .hero-art .blob:nth-child(5) { animation-delay: 2s; } .hero-art .blob:nth-child(6) { animation-delay: 2.5s; }
@keyframes float { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }
@media (prefers-reduced-motion: reduce) { .hero-art .blob { animation: none; } }

/* Sections */
.section { padding: 48px 0; }
.section-title { text-align: center; font-size: clamp(26px, 4vw, 38px); margin-bottom: 28px; }
.section-title::after {
  content: ""; display: block; width: 90px; height: 6px; margin: 10px auto 0; border-radius: 3px;
  background: linear-gradient(90deg, var(--c-orange), var(--c-yellow), var(--c-green), var(--c-blue), var(--c-purple));
}
.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.cat-card {
  background: var(--c-card); border-radius: var(--radius); padding: 16px; text-align: center;
  box-shadow: var(--shadow); border: 3px solid transparent; transition: transform .2s, border-color .2s; color: var(--c-ink);
}
.cat-card:hover { transform: translateY(-6px) rotate(-1deg); border-color: var(--c-yellow); color: var(--c-ink); }
.cat-card .cat-img { aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: #fff4e0; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.cat-card .cat-img img { width: 100%; height: 100%; object-fit: contain; }
.cat-card h3 { font-size: 18px; margin: 0; }

.band-alt { background: #fff; }
.band-sale { background: linear-gradient(135deg, #fff0f6, #fff7da); }

/* Products */
ul.products { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.woocommerce ul.products[class*="columns-"] li.product, ul.products li.product {
  width: auto; margin: 0; float: none; background: var(--c-card); border-radius: var(--radius);
  padding: 12px 12px 18px; box-shadow: var(--shadow); text-align: center; position: relative; transition: transform .2s;
}
ul.products li.product:hover { transform: translateY(-5px); }
ul.products li.product img { border-radius: 16px; margin-bottom: 10px; width: 100%; }
.woocommerce-loop-product__title { font-size: 16px !important; color: var(--c-ink); font-weight: 800; padding: 0 !important; }
.price { color: var(--c-green) !important; font-weight: 800; font-size: 18px; }
.price del { color: #a7a2b8 !important; font-weight: 600; font-size: 14px; }
.price ins { text-decoration: none; }
.woocommerce span.onsale {
  background: var(--c-orange); color: #fff; min-height: 0; min-width: 0; line-height: 1; padding: 8px 12px;
  border-radius: 999px; top: 14px; left: 14px; right: auto; font-weight: 800;
}
.woocommerce ul.products li.product .button { margin-top: 8px; padding: 9px 18px; font-size: 14px; }
.star-rating span::before { color: var(--c-yellow); }

/* Why us */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.why-card { border-radius: var(--radius); padding: 26px 18px; text-align: center; color: #fff; box-shadow: var(--shadow); }
.why-card .ico { display: block; margin-bottom: 8px; color: var(--i-why); line-height: 0; }
.why-card .ico svg { width: 46px; height: 46px; display: inline-block; }
.why-card h3 { color: #fff; font-size: 20px; }
.why-card p { margin: 0; font-size: 15px; opacity: .95; }
.why-1 { background: var(--c-blue); } .why-2 { background: var(--c-green); }
.why-3 { background: var(--c-purple); } .why-4 { background: var(--c-orange); }

/* Content pages */
.page-wrap { padding: 36px 0 56px; }
.entry { background: #fff; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.entry-title { font-size: clamp(26px, 4vw, 40px); }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.post-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.post-card .body { padding: 16px; }

/* WooCommerce details */
.woocommerce div.product .product_title { font-size: clamp(24px, 4vw, 34px); }
.woocommerce div.product p.price, .woocommerce div.product span.price { font-size: 26px; }
.woocommerce div.product div.images img { border-radius: var(--radius); }
.woocommerce-tabs ul.tabs li { border-radius: 14px 14px 0 0 !important; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select {
  border: 2px solid var(--c-line); border-radius: 14px; padding: 10px 14px; font-family: var(--font);
}
.woocommerce-message, .woocommerce-info { border-top-color: var(--c-blue); border-radius: 12px; }
.woocommerce table.shop_table { border-radius: 16px; overflow: hidden; }
.woocommerce-breadcrumb { font-size: 14px; margin-bottom: 18px !important; }
.woocommerce nav.woocommerce-pagination ul li a, .woocommerce nav.woocommerce-pagination ul li span { border-radius: 10px; }
.woocommerce nav.woocommerce-pagination ul li span.current { background: var(--c-pink); color: #fff; }

/* Footer */
.site-footer { background: var(--f-bg); color: var(--f-text); padding-top: 44px; margin-top: 30px; position: relative; }
.site-footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 8px;
  background: linear-gradient(90deg, var(--c-orange), var(--c-yellow), var(--c-green), var(--c-blue), var(--c-pink), var(--c-purple));
}
.footer-grid { display: grid; grid-template-columns: 1.3fr 1.6fr 1.1fr; gap: 28px; padding-bottom: 30px; }
.site-footer h4 { color: #fff; font-size: 18px; }
.site-footer a { color: var(--f-text); }
.site-footer a:hover { color: var(--f-hover); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 14px 0; text-align: center; font-size: 14px; }
.cod-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cod-badges span { background: rgba(255,255,255,.1); padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }

/* Mobile sticky bar */
.mobile-bar { display: none; }

/* Responsive */
@media (max-width: 1024px) {
  ul.products { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-links { grid-column: 1 / -1; order: 3; }
}
@media (max-width: 820px) {
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; }
  .header-actions { margin-left: 0; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff;
    padding: 12px 16px 18px; box-shadow: 0 12px 20px rgba(43,34,80,.1); margin: 0;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; }
  .main-nav .sub-menu { display: none; position: static; box-shadow: none; padding: 0 0 0 14px; width: 100%; }
  .main-nav li:hover > .sub-menu { display: none; }
  .main-nav li.sub-open > .sub-menu { display: flex; }
  .main-nav .menu-item-has-children { flex-wrap: wrap; }
  .main-nav .menu-item-has-children > a { flex: 1; }
  .hero { padding: 36px 0 48px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { max-width: 380px; }
  .hero-photo { max-width: 520px; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .post-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  ul.products { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cat-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .section { padding: 34px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .post-grid { grid-template-columns: 1fr; }
  .site-logo img, .custom-logo { max-height: 44px; }
  .mobile-bar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; background: #fff;
    box-shadow: 0 -4px 16px rgba(43,34,80,.12); padding: 8px 12px; gap: 8px;
  }
  .mobile-bar a { flex: 1; text-align: center; padding: 10px; border-radius: 999px; font-weight: 800; color: #fff; }
  .mobile-bar .call { background: var(--i-call-bg); } .mobile-bar .shop { background: var(--i-shop-bg); }
  body { padding-bottom: 62px; }
}

/* ===== v2: dropdown, hero photo, footer icons, promos ===== */
.main-nav .menu-item-has-children { display: flex; align-items: center; }
.main-nav .menu-item-has-children > a { padding-right: 4px; }
.sub-toggle { background: none; border: 0; padding: 0 8px 0 0; color: var(--c-ink); cursor: pointer; line-height: 0; display: inline-flex; align-items: center; }
.sub-toggle svg { transition: transform .2s; }
.menu-item-has-children.sub-open > .sub-toggle svg, .menu-item-has-children:hover > .sub-toggle svg { transform: rotate(180deg); }
.main-nav .sub-menu { min-width: 290px; z-index: 60; }
.main-nav .sub-menu li { display: block; }
.main-nav .sub-menu a { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 14px; }
.main-nav .sub-menu a .menu-cat-label { flex: 1; }
.menu-cat-img { width: 44px; height: 44px; object-fit: contain; flex: none; border-radius: 50%; }

.saratl-icon { display: inline-block; vertical-align: middle; flex: none; }
.cart-link .saratl-icon { width: 22px; height: 22px; }
.menu-toggle .saratl-icon { width: 24px; height: 24px; }
.topbar a { display: inline-flex; align-items: center; }

.hero-photo { position: relative; }
.hero-photo img {
  width: 100%; aspect-ratio: 6 / 5; object-fit: cover; border-radius: 34px;
  box-shadow: 0 18px 40px rgba(43, 34, 80, .22); border: 6px solid #fff;
}
.hero-art .blob img { width: 72%; height: 72%; object-fit: contain; }
.hero--bg { background-size: cover; background-position: center; }
.hero--bg::before, .hero--bg::after { display: none; }
.hero--bg .hero-inner { grid-template-columns: 1fr; min-height: 340px; }
.hero--bg .hero-copy {
  max-width: 560px; padding: 26px 28px; border-radius: 28px;
  background: rgba(255, 255, 255, .86); box-shadow: var(--shadow);
}

.promo-section { padding: 24px 0 8px; }
.promo-grid { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
.promo-grid.promo-count-1 { grid-template-columns: 1fr; }
.promo-grid.promo-count-2 { grid-template-columns: repeat(2, 1fr); }
.promo { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.promo img { width: 100%; height: 100%; object-fit: cover; }

.site-footer h5 { color: #fff; font-size: 15px; margin: 0 0 8px; font-weight: 800; }
.quick-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.follow-title { margin-top: 22px !important; }
.social-row { display: flex; gap: 10px; flex-wrap: wrap; }
.social-btn {
  width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--i-social-bg); color: var(--i-social-fg) !important; transition: transform .15s;
}
.social-btn:hover { transform: translateY(-3px); color: var(--i-social-fg) !important; }
.contact-list li { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.contact-list a { font-weight: 700; font-size: 17px; }
.f-ico {
  width: 38px; height: 38px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center;
  background: var(--i-phone-bg); color: var(--i-phone-fg);
}
.f-ico-wa { background: var(--i-wa-bg); color: var(--i-wa-fg); }
.cod-badges span { display: inline-flex; align-items: center; gap: 6px; }
.cod-badges .saratl-icon { color: var(--i-badge); }
.mobile-bar a { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }

@media (max-width: 820px) {
  .hero--bg .hero-copy { max-width: none; }
  .promo-grid, .promo-grid.promo-count-3 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .quick-cols { grid-template-columns: 1fr 1fr; }
}
