/*
Theme Name: Anwar Ecom Theme
Theme URI: https://anwar.dev
Author: Anwar Team
Description: Dynamic WooCommerce theme with playful colorful design. Full customizer support. Inspired by khelnabari.shop. All elements controllable from admin.
Version: 2.0.0
Tested up to: 7.0
Requires PHP: 8.0
License: GPL v2 or later
Text Domain: anwar-ecom-theme
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--theme-bg, #FFF9EE);
  color: var(--theme-dark, #1A1A2E);
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 9999; opacity: .6;
}

.bg-shapes { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bg-shapes .shape {
  position: absolute; border-radius: 50%; opacity: .06;
  animation: floatShape 12s ease-in-out infinite;
}
.bg-shapes .shape:nth-child(1){ width:280px;height:280px;background:var(--theme-primary,#FF3B3B);top:-80px;left:-60px;animation-delay:0s; }
.bg-shapes .shape:nth-child(2){ width:200px;height:200px;background:var(--theme-secondary,#FFD93D);top:40%;right:-60px;animation-delay:3s; }
.bg-shapes .shape:nth-child(3){ width:150px;height:150px;background:var(--theme-accent,#1A73E8);bottom:10%;left:5%;animation-delay:6s; }
.bg-shapes .shape:nth-child(4){ width:120px;height:120px;background:var(--theme-green,#22C55E);top:60%;left:40%;animation-delay:2s; }
.bg-shapes .shape:nth-child(5){ width:90px;height:90px;background:var(--theme-purple,#7C3AED);bottom:30%;right:20%;animation-delay:8s; }

@keyframes floatShape {
  0%,100%{ transform: translateY(0) rotate(0deg); }
  50%{ transform: translateY(-30px) rotate(15deg); }
}

a { color: var(--theme-dark); text-decoration: none; }
img { max-width: 100%; height: auto; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* HEADER */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,249,238,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 3px solid var(--theme-secondary, #FFD93D);
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 32px; max-width: 1200px; margin: 0 auto;
}
.site-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-icon {
  width: 42px; height: 42px;
  background: var(--theme-primary, #FF3B3B); border-radius: 12px;
  display: grid; place-items: center; font-size: 22px;
  transform: rotate(-8deg);
  box-shadow: 3px 3px 0 var(--theme-dark);
  transition: transform .2s;
}
.site-logo:hover .logo-icon { transform: rotate(0deg) scale(1.1); }
.logo-text {
  font-family: 'Fredoka One', cursive; font-size: 1.6rem;
  color: var(--theme-dark); line-height: 1;
}
.logo-text span { color: var(--theme-primary, #FF3B3B); }

.main-nav { display: flex; gap: 24px; list-style: none; flex-wrap: wrap; }
.main-nav a {
  font-weight: 700; font-size: .92rem; color: var(--theme-dark);
  position: relative; transition: color .2s;
}
.main-nav a::after {
  content: ''; position: absolute; bottom: -3px; left: 0;
  width: 0; height: 3px; background: var(--theme-primary, #FF3B3B);
  border-radius: 4px; transition: width .25s;
}
.main-nav a:hover { color: var(--theme-primary, #FF3B3B); }
.main-nav a:hover::after { width: 100%; }
.main-nav .current-menu-item > a { color: var(--theme-primary, #FF3B3B); }
.main-nav .current-menu-item > a::after { width: 100%; }
.header-actions { display: flex; align-items: center; gap: 12px; }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 22px; border-radius: 50px;
  font-family: 'Nunito', sans-serif; font-weight: 800; font-size: .9rem;
  cursor: pointer; border: none; text-decoration: none;
  transition: transform .18s, box-shadow .18s;
}
.btn-primary {
  background: var(--theme-primary, #FF3B3B); color: #fff;
  box-shadow: 4px 4px 0 var(--theme-dark);
}
.btn-primary:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--theme-dark); }
.btn-secondary {
  background: var(--theme-secondary, #FFD93D); color: var(--theme-dark);
  box-shadow: 4px 4px 0 var(--theme-dark);
}
.btn-secondary:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--theme-dark); }
.btn-outline {
  background: transparent; border: 3px solid var(--theme-dark);
  color: var(--theme-dark); box-shadow: 3px 3px 0 var(--theme-dark);
}
.btn-outline:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--theme-dark); }
.btn-sm { padding: 6px 16px; font-size: .8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

/* HERO */
.hero-section {
  position: relative; z-index: 1;
  padding: 80px 20px 60px; max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
  align-items: center; min-height: 85vh;
}
.hero-content { animation: slideUp .7s ease both; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--theme-secondary, #FFD93D); border: 3px solid var(--theme-dark);
  border-radius: 50px; padding: 6px 16px; font-size: .8rem;
  font-weight: 800; margin-bottom: 24px;
  box-shadow: 3px 3px 0 var(--theme-dark);
}
.badge-dot {
  width: 8px; height: 8px; background: var(--theme-primary, #FF3B3B);
  border-radius: 50%; animation: pulse 1.5s infinite;
}
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.5)} }
.hero-title {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.1; margin-bottom: 20px;
}
.hero-title .accent-primary { color: var(--theme-primary, #FF3B3B); }
.hero-title .accent-accent { color: var(--theme-accent, #1A73E8); }
.hero-sub {
  font-size: 1.05rem; line-height: 1.7; color: #555;
  margin-bottom: 32px; max-width: 440px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 36px; }
.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat-num {
  font-family: 'Fredoka One', cursive; font-size: 1.6rem;
  color: var(--theme-primary, #FF3B3B); display: block; line-height: 1;
}
.stat-label {
  font-size: .72rem; font-weight: 700; color: #777;
  text-transform: uppercase; letter-spacing: .05em;
}

.hero-visual { position: relative; display: flex; align-items: center; justify-content: center; }
.toy-card-main {
  width: 300px; min-height: 360px;
  background: #fff; border: 4px solid var(--theme-dark);
  border-radius: 24px; box-shadow: 10px 10px 0 var(--theme-dark);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 24px; position: relative; z-index: 2; overflow: hidden;
}
.toy-card-main::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: repeating-linear-gradient(90deg,
    var(--theme-primary,#FF3B3B) 0, var(--theme-primary,#FF3B3B) 20%,
    var(--theme-secondary,#FFD93D) 20%, var(--theme-secondary,#FFD93D) 40%,
    var(--theme-accent,#1A73E8) 40%, var(--theme-accent,#1A73E8) 60%,
    var(--theme-green,#22C55E) 60%, var(--theme-green,#22C55E) 80%,
    var(--theme-purple,#7C3AED) 80%, var(--theme-purple,#7C3AED) 100%);
}
.toy-card-main .product-img { height: 160px; font-size: 80px; }
.toy-name { font-family: 'Fredoka One', cursive; font-size: 1.2rem; margin-bottom: 6px; }
.toy-price { font-size: .85rem; font-weight: 800; color: var(--theme-primary, #FF3B3B); margin-bottom: 14px; }
.toy-price del { color: #aaa; margin-right: 8px; font-weight: 400; font-size: .78rem; }

.floating-card {
  position: absolute; background: #fff;
  border: 3px solid var(--theme-dark); border-radius: 16px;
  padding: 10px 14px; box-shadow: 5px 5px 0 var(--theme-dark);
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: .78rem; z-index: 3;
}
.fc1 { top: 20px; right: -10px; animation: floatCard 4s ease-in-out infinite; }
.fc2 { bottom: 40px; left: -20px; animation: floatCard 4s ease-in-out infinite 2s; }
.fc3 { top: 50%; right: -30px; animation: floatCard 4s ease-in-out infinite 1s; }
@keyframes floatCard { 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-10px); } }
.fc-emoji { font-size: 22px; }

/* MARQUEE */
.marquee-wrap {
  background: var(--theme-dark); color: var(--theme-secondary, #FFD93D);
  padding: 12px 0; overflow: hidden;
  border-top: 3px solid var(--theme-secondary, #FFD93D);
  border-bottom: 3px solid var(--theme-secondary, #FFD93D);
}
.marquee-track {
  display: flex; white-space: nowrap;
  animation: marquee 22s linear infinite;
  font-family: 'Fredoka One', cursive; font-size: 1.05rem; letter-spacing: .04em;
}
.marquee-item { display: inline-flex; align-items: center; gap: 10px; padding: 0 24px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* SECTIONS */
section { position: relative; z-index: 1; }
.section-pad { padding: 70px 20px; }
.section-dark { background: var(--theme-dark); color: #fff; }
.section-dark .section-sub { color: #aaa; }
.section-title {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  text-align: center; margin-bottom: 8px;
}
.section-title .c-primary { color: var(--theme-primary, #FF3B3B); }
.section-title .c-accent { color: var(--theme-accent, #1A73E8); }
.section-title .c-secondary { color: var(--theme-secondary, #FFD93D); }
.section-sub {
  text-align: center; font-size: .95rem; color: #666;
  font-weight: 600; margin-bottom: 44px;
}

/* CATEGORY GRID */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px;
}
.cat-card {
  background: #fff; border: 3px solid var(--theme-dark);
  border-radius: 18px; padding: 24px 14px; text-align: center;
  box-shadow: 5px 5px 0 var(--theme-dark);
  transition: transform .2s, box-shadow .2s;
  text-decoration: none; color: var(--theme-dark); display: block;
}
.cat-card:hover { transform: translate(-3px,-3px); box-shadow: 8px 8px 0 var(--theme-dark); }
.cat-icon { font-size: 2.6rem; display: block; margin-bottom: 8px; transition: transform .3s; }
.cat-card:hover .cat-icon { transform: scale(1.2) rotate(10deg); }
.cat-name { font-weight: 800; font-size: .9rem; }
.cat-count { font-size: .72rem; color: #999; font-weight: 600; }

/* PRODUCT GRID */
.product-grid, .anwar-ecom-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}
.product-card, .anwar-ecom-product-card {
  background: #fff; border: 3px solid var(--theme-dark);
  border-radius: 18px; overflow: hidden;
  box-shadow: 6px 6px 0 var(--theme-dark);
  transition: transform .2s, box-shadow .2s;
}
.product-card:hover, .anwar-ecom-product-card:hover { transform: translate(-4px,-4px); box-shadow: 10px 10px 0 var(--theme-dark); }
.product-img {
  height: 180px; display: flex; align-items: center; justify-content: center;
  font-size: 70px; border-bottom: 3px solid var(--theme-dark); position: relative;
  overflow: hidden;
}
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-badge { position: absolute; top: 10px; left: 10px; }
.product-info { padding: 14px; }
.product-info h3 {
  font-weight: 800; font-size: .95rem; margin-bottom: 4px;
}
.product-meta { font-size: .74rem; color: var(--gray, #888); margin-bottom: 10px; }
.product-footer { display: flex; align-items: center; justify-content: space-between; }
.price, .woocommerce div.product p.price, .woocommerce div.product span.price {
  font-family: 'Fredoka One', cursive; font-size: 1.2rem;
  color: var(--theme-primary, #FF3B3B) !important;
}
.price del, .woocommerce div.product p.price del, .woocommerce div.product span.price del {
  font-size: .75rem; color: #aaa;
}
.add-to-cart-btn, .product-card .add_to_cart_button, .anwar-ecom-product-card .add_to_cart_button {
  width: 38px; height: 38px;
  background: var(--theme-dark); color: #fff;
  border: none; border-radius: 12px; font-size: 1rem;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s, transform .15s;
  box-shadow: 3px 3px 0 rgba(0,0,0,.3);
}
.add-to-cart-btn:hover, .product-card .add_to_cart_button:hover {
  background: var(--theme-primary, #FF3B3B); transform: scale(1.1);
}

.tag {
  display: inline-block; padding: 4px 12px; border-radius: 50px;
  font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
}
.tag-sale { background: var(--theme-primary, #FF3B3B); color: #fff; }
.tag-new { background: var(--theme-green, #22C55E); color: #fff; }
.tag-hot { background: var(--theme-orange, #FF6B35); color: #fff; }

/* WOOCOMMERCE OVERRIDES */
.woocommerce .products ul, .woocommerce ul.products { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product {
  margin: 0; width: auto !important; float: none !important;
}
.woocommerce ul.products li.product a img, .woocommerce-page ul.products li.product a img { margin: 0; }
.woocommerce ul.products li.product .button { margin-top: 10px; }
.woocommerce a.added_to_cart { display: none; }
.woocommerce .woocommerce-ordering, .woocommerce .woocommerce-result-count { margin: 0; }
.woocommerce .woocommerce-pagination { margin-top: 30px; }
.woocommerce nav.woocommerce-pagination ul { border: 2px solid var(--theme-dark); border-radius: 12px; }
.woocommerce nav.woocommerce-pagination ul li { border-right: 1px solid var(--theme-dark); }
.woocommerce nav.woocommerce-pagination ul li span.current { background: var(--theme-primary, #FF3B3B); color: #fff; }
.woocommerce div.product .product_title { font-family: 'Fredoka One', cursive; font-size: 2rem; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { border-bottom-color: var(--theme-primary, #FF3B3B); }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--theme-primary, #FF3B3B); }
.woocommerce .quantity .qty { padding: 8px; border: 2px solid var(--theme-dark); border-radius: 8px; }
.woocommerce .button.alt, .woocommerce a.button.alt {
  background: var(--theme-primary, #FF3B3B) !important;
  box-shadow: 3px 3px 0 var(--theme-dark); border-radius: 50px;
}
.woocommerce .button.alt:hover, .woocommerce a.button.alt:hover {
  background: var(--theme-primary, #FF3B3B) !important;
  transform: translate(-1px,-1px); box-shadow: 5px 5px 0 var(--theme-dark);
}
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button { font-size: 1rem; padding: 14px 28px; }
.woocommerce-message { border-top-color: var(--theme-primary, #FF3B3B); }

/* WHY / FEATURES */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 22px;
}
.why-card {
  background: rgba(255,255,255,.06);
  border: 2px solid rgba(255,255,255,.12);
  border-radius: 18px; padding: 26px;
  transition: background .2s, transform .2s;
}
.why-card:hover { background: rgba(255,255,255,.1); transform: translateY(-4px); }
.why-icon { font-size: 2.2rem; display: block; margin-bottom: 12px; }
.why-card h3 {
  font-family: 'Fredoka One', cursive; font-size: 1.1rem;
  margin-bottom: 8px; color: var(--theme-secondary, #FFD93D);
}
.why-card p { font-size: .84rem; line-height: 1.7; color: #bbb; }

/* TESTIMONIALS */
.testi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.testi-card {
  background: #fff; border: 3px solid var(--theme-dark);
  border-radius: 18px; padding: 22px;
  box-shadow: 5px 5px 0 var(--theme-dark); position: relative;
}
.testi-card::before {
  content: '"'; font-family: 'Fredoka One', cursive;
  font-size: 4.5rem; color: var(--theme-secondary, #FFD93D);
  position: absolute; top: -15px; left: 18px; line-height: 1;
}
.testi-text { font-size: .88rem; line-height: 1.7; color: #555; margin-bottom: 14px; margin-top: 14px; }
.testi-author { display: flex; align-items: center; gap: 10px; }
.testi-avatar {
  width: 40px; height: 40px; background: var(--theme-secondary, #FFD93D);
  border-radius: 50%; display: grid; place-items: center;
  font-size: 1.3rem; border: 3px solid var(--theme-dark);
}
.testi-name { font-weight: 800; font-size: .85rem; }
.testi-loc { font-size: .7rem; color: var(--gray, #888); }

/* NEWSLETTER */
.newsletter-section {
  background: var(--theme-primary, #FF3B3B); position: relative; overflow: hidden;
}
.newsletter-section::before {
  content: '🎁🎈🧸🎊🎮🪀';
  position: absolute; font-size: 7rem; opacity: .06;
  top: -10px; right: -10px; letter-spacing: 8px;
  white-space: nowrap; transform: rotate(-10deg);
}
.newsletter-inner { max-width: 560px; margin: 0 auto; text-align: center; position: relative; z-index: 1; }
.newsletter-inner h2 {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem); color: #fff; margin-bottom: 10px;
}
.newsletter-inner p { color: rgba(255,255,255,.85); margin-bottom: 24px; font-size: .95rem; font-weight: 600; }
.newsletter-form {
  display: flex; max-width: 420px; margin: 0 auto;
  border: 3px solid var(--theme-dark); border-radius: 50px;
  overflow: hidden; box-shadow: 5px 5px 0 var(--theme-dark); background: #fff;
}
.newsletter-form input {
  flex: 1; padding: 12px 18px; border: none; outline: none;
  font-family: 'Nunito', sans-serif; font-weight: 700; font-size: .9rem; background: transparent;
}
.newsletter-form button {
  background: var(--theme-dark); color: #fff; border: none;
  padding: 12px 22px; font-family: 'Nunito', sans-serif;
  font-weight: 800; font-size: .85rem; cursor: pointer;
  transition: background .2s; border-left: 3px solid var(--theme-dark);
}
.newsletter-form button:hover { background: var(--theme-secondary, #FFD93D); color: var(--theme-dark); }

/* FOOTER */
.site-footer {
  background: var(--theme-dark); color: #fff;
  padding: 50px 20px 24px;
}
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 36px; margin-bottom: 40px;
}
.footer-brand .footer-logo { font-size: 1.4rem; color: #fff; font-family: 'Fredoka One', cursive; }
.footer-brand .footer-logo span { color: var(--theme-secondary, #FFD93D); }
.footer-brand p { font-size: .82rem; color: #aaa; line-height: 1.7; margin-top: 12px; margin-bottom: 18px; }
.social-row { display: flex; gap: 8px; }
.social-btn {
  width: 36px; height: 36px; background: rgba(255,255,255,.08);
  border: 2px solid rgba(255,255,255,.12); border-radius: 10px;
  display: grid; place-items: center; font-size: 1rem;
  cursor: pointer; transition: background .2s, transform .2s; text-decoration: none;
}
.social-btn:hover { background: var(--theme-secondary, #FFD93D); transform: translateY(-2px); }
.footer-col h4 {
  font-weight: 800; font-size: .85rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--theme-secondary, #FFD93D); margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: #aaa; text-decoration: none; font-size: .82rem; font-weight: 600; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 20px; display: flex;
  align-items: center; justify-content: space-between;
  font-size: .78rem; color: #666; flex-wrap: wrap; gap: 10px;
}
.footer-bottom a { color: var(--gray, #888); text-decoration: none; }
.footer-bottom a:hover { color: #fff; }

/* REVEAL */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* WooCommerce cart/checkout wrappers */
.woocommerce .woocommerce-breadcrumb { margin: 20px 0; }
.woocommerce table.shop_table { border: 3px solid var(--theme-dark); border-radius: 16px; }
.woocommerce table.shop_table thead { background: var(--theme-dark); color: #fff; }
.woocommerce table.shop_table thead th { font-family: 'Fredoka One', cursive; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero-section { grid-template-columns: 1fr; gap: 40px; min-height: auto; padding: 50px 20px; text-align: center; }
  .hero-sub { max-width: 100%; } .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; } .hero-visual { order: -1; }
  .main-nav { display: none; }
  .header-inner { padding: 10px 16px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .woocommerce ul.products { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .hero-stats { gap: 16px; } .toy-card-main { width: 240px; min-height: 300px; }
  .floating-card { display: none; } .hero-title { font-size: 2rem; }
  .newsletter-form { flex-direction: column; border-radius: 16px; }
  .newsletter-form button { border-left: none; border-top: 3px solid var(--theme-dark); }
}
