/* Mirha Toys - Main Stylesheet */
:root {
  --pink: #ec1f7a;
  --purple: #7b2ff7;
  --green: #22b573;
  --orange: #ff9800;
  --yellow: #ffc93c;
  --navy: #1b2a4e;
  --white: #ffffff;
  --gray-bg: #f7f7fb;
  --gray-text: #5c6270;
  --radius: 16px;
  --shadow: 0 4px 16px rgba(27,42,78,0.08);
  --shadow-hover: 0 8px 28px rgba(27,42,78,0.15);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Segoe UI', 'Trebuchet MS', Verdana, Arial, sans-serif;
  color: var(--navy);
  background: var(--white);
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 50px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  font-size: 15px;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-primary { background: var(--pink); color: #fff; }
.btn-secondary { background: var(--purple); color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--pink); color: var(--pink); }
.btn-block { width: 100%; text-align: center; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-yellow { background: var(--yellow); color: var(--navy); }

/* Top bar */
.topbar {
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  padding: 6px 0;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap:6px;}
.topbar a { color: #fff; }
.topbar .whatsapp-inline { color: var(--yellow); font-weight: 600; }

/* Header */
header.site-header {
  background: #fff;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 200;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img.logo { height: 54px; width: auto; border-radius: 10px; }
.hamburger {
  background: var(--pink);
  border: none;
  border-radius: 10px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.hamburger span, .hamburger::before, .hamburger::after { display: none; }
.hamburger svg { width: 22px; height: 22px; stroke: #fff; }

nav.top-nav { display: flex; gap: 22px; }
nav.top-nav a {
  font-weight: 600;
  color: var(--navy);
  padding: 8px 4px;
  border-bottom: 3px solid transparent;
}
nav.top-nav a:hover { border-color: var(--pink); color: var(--pink); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.cart-icon { position: relative; font-size: 24px; }
.cart-badge {
  position: absolute;
  top: -8px; right: -10px;
  background: var(--pink);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  font-weight: 700;
}

/* Off-canvas menu */
.offcanvas-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(27,42,78,0.5);
  z-index: 998;
}
.offcanvas-overlay.active { display: block; }
.offcanvas {
  position: fixed;
  top: 0; left: -320px;
  width: 300px;
  height: 100%;
  background: #fff;
  z-index: 999;
  transition: left .25s ease;
  overflow-y: auto;
  box-shadow: 4px 0 20px rgba(0,0,0,0.15);
}
.offcanvas.active { left: 0; }
.offcanvas-header {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: #fff;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.offcanvas-header img { height: 40px; border-radius: 8px; background:#fff; padding:2px;}
.offcanvas-close { background: none; border: none; color: #fff; font-size: 26px; cursor: pointer; line-height:1;}
.offcanvas-body { padding: 10px 0; }
.offcanvas-section-title {
  padding: 14px 20px 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-text);
  font-weight: 700;
}
.offcanvas a.menu-link {
  display: block;
  padding: 12px 20px;
  font-weight: 600;
  color: var(--navy);
  border-left: 4px solid transparent;
}
.offcanvas a.menu-link:hover, .offcanvas a.menu-link:active { background: var(--gray-bg); border-color: var(--pink); }

/* Hero */
.hero {
  background: linear-gradient(120deg, var(--pink) 0%, var(--purple) 55%, var(--navy) 100%);
  color: #fff;
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  width: 300px; height: 300px;
  background: var(--yellow);
  opacity: .25;
  border-radius: 50%;
  top: -100px; right: -80px;
}
.hero::after {
  content: "";
  position: absolute;
  width: 220px; height: 220px;
  background: var(--green);
  opacity: .25;
  border-radius: 50%;
  bottom: -80px; left: -60px;
}
.hero-inner { position: relative; z-index: 2; text-align: center; max-width: 700px; margin: 0 auto; }
.hero h1 { font-size: 40px; margin-bottom: 10px; }
.hero p.tagline { font-size: 18px; opacity: .95; margin-bottom: 26px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Trust badges */
.trust-badges {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 34px 0;
}
.trust-badge {
  text-align: center;
  padding: 18px 10px;
  background: var(--gray-bg);
  border-radius: var(--radius);
}
.trust-badge .icon { font-size: 30px; margin-bottom: 8px; }
.trust-badge .label { font-weight: 700; font-size: 14px; }

/* Section titles */
.section { padding: 40px 0; }
.section-title { text-align: center; margin-bottom: 30px; }
.section-title h2 { font-size: 28px; color: var(--navy); }
.section-title .underline { width: 60px; height: 4px; background: var(--pink); margin: 8px auto 0; border-radius: 4px; }

/* Category grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.category-card {
  background: var(--gray-bg);
  border-radius: var(--radius);
  padding: 22px 14px;
  text-align: center;
  font-weight: 700;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
  border-bottom: 4px solid var(--pink);
}
.category-card:nth-child(4n+2) { border-color: var(--purple); }
.category-card:nth-child(4n+3) { border-color: var(--green); }
.category-card:nth-child(4n+4) { border-color: var(--orange); }
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.category-card .emoji { font-size: 34px; margin-bottom: 8px; }

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.product-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
  display: flex;
  flex-direction: column;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.product-card .thumb { aspect-ratio: 1/1; overflow: hidden; background: var(--gray-bg); }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .info { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card .name { font-weight: 600; font-size: 14.5px; min-height: 40px; }
.product-card .price { color: var(--pink); font-weight: 800; font-size: 17px; }
.product-card .add-form { margin-top: auto; }
.badge-featured {
  position: relative;
}
.badge-featured .tag {
  position: absolute; top: 10px; left: 10px;
  background: var(--yellow); color: var(--navy);
  font-size: 11px; font-weight: 800;
  padding: 4px 10px; border-radius: 20px;
  z-index: 2;
}

/* WhatsApp CTA section */
.whatsapp-cta {
  background: linear-gradient(120deg, var(--green), #16995f);
  color: #fff;
  border-radius: var(--radius);
  padding: 36px 24px;
  text-align: center;
  margin: 40px 0;
}
.whatsapp-cta h2 { font-size: 24px; }
.whatsapp-cta .btn { background: #fff; color: var(--green); margin-top: 14px; }

/* Floating WhatsApp button */
.wa-float {
  position: fixed;
  bottom: 22px; right: 22px;
  background: #25D366;
  color: #fff;
  width: 60px; height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  z-index: 500;
  font-size: 30px;
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37,211,102,0.5); }
  70% { box-shadow: 0 0 0 14px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

/* Breadcrumb */
.breadcrumb { font-size: 13px; color: var(--gray-text); padding: 16px 0; }
.breadcrumb a { color: var(--purple); font-weight: 600; }

/* Filters bar */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.filter-bar a {
  padding: 8px 16px;
  border-radius: 50px;
  background: var(--gray-bg);
  font-size: 13px;
  font-weight: 600;
}
.filter-bar a.active, .filter-bar a:hover { background: var(--pink); color: #fff; }

/* Product detail */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 30px 0; }
.pd-gallery .main-image { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio:1/1; background:var(--gray-bg);}
.pd-gallery .main-image img { width: 100%; height: 100%; object-fit: cover; }
.pd-gallery .thumbs { display: flex; gap: 10px; margin-top: 10px; }
.pd-gallery .thumbs img { width: 70px; height: 70px; object-fit: cover; border-radius: 10px; cursor: pointer; border: 2px solid transparent; }
.pd-gallery .thumbs img.active { border-color: var(--pink); }
.pd-info h1 { font-size: 26px; }
.pd-price { font-size: 28px; color: var(--pink); font-weight: 800; margin: 10px 0; }
.pd-desc { color: var(--gray-text); margin-bottom: 20px; }
.qty-selector { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.qty-selector button {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid #ddd; background: #fff; font-size: 18px; cursor: pointer;
}
.qty-selector input {
  width: 60px; height: 38px; text-align: center; border: 1px solid #ddd; border-radius: 10px; font-size: 16px;
}
.pd-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.stock-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; margin-bottom: 10px;}
.stock-in { background: #e3f7ec; color: var(--green); }
.stock-out { background: #fde7e7; color: #c0392b; }

/* Cart page */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { padding: 14px 10px; border-bottom: 1px solid #eee; text-align: left; vertical-align: middle;}
.cart-item-row img { width: 60px; height: 60px; object-fit: cover; border-radius: 10px; }
.cart-item-name { font-weight: 600; }
.cart-summary { background: var(--gray-bg); border-radius: var(--radius); padding: 22px; max-width: 380px; margin-left: auto; margin-top: 20px; }
.cart-summary .row { display: flex; justify-content: space-between; margin-bottom: 10px; }
.cart-summary .total { font-weight: 800; font-size: 20px; color: var(--pink); border-top: 2px dashed #ddd; padding-top: 10px; margin-top: 6px;}
.qty-inline { width: 55px; padding: 6px; border-radius: 8px; border: 1px solid #ddd; text-align:center;}
.remove-link { color: #c0392b; font-size: 13px; font-weight: 700; }

/* Forms */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
}
.form-control:focus { outline: none; border-color: var(--pink); }
textarea.form-control { resize: vertical; min-height: 80px; }
.checkout-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; padding: 30px 0; }
.order-summary-box { background: var(--gray-bg); border-radius: var(--radius); padding: 22px; height: fit-content; }
.order-summary-box .line { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #e5e5ee; font-size: 14px; }

/* Confirmation */
.confirm-box { text-align: center; padding: 60px 20px; max-width: 560px; margin: 0 auto; }
.confirm-box .check { font-size: 60px; margin-bottom: 10px; }
.order-number-box { background: var(--gray-bg); border-radius: var(--radius); padding: 20px; font-size: 22px; font-weight: 800; color: var(--pink); margin: 20px 0; }

/* Footer */
footer.site-footer { background: var(--navy); color: #cfd6e6; padding: 50px 0 20px; margin-top: 50px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 30px; }
.footer-grid h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer-grid img.logo { height: 44px; margin-bottom: 12px; border-radius: 8px; background:#fff; padding:2px;}
.footer-grid a { color: #cfd6e6; display: block; margin-bottom: 8px; font-size: 14px; }
.footer-grid a:hover { color: var(--yellow); }
.footer-bottom { text-align: center; padding-top: 24px; margin-top: 24px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 13px; color: #97a1bc; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 30px; }
.pagination a, .pagination span {
  padding: 8px 14px; border-radius: 8px; background: var(--gray-bg); font-weight: 600; font-size: 14px;
}
.pagination a.active, .pagination span.active { background: var(--pink); color: #fff; }

/* Alerts */
.alert { padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; font-weight: 600; }
.alert-success { background: #e3f7ec; color: #1c7c4f; }
.alert-error { background: #fde7e7; color: #c0392b; }

/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; color: var(--gray-text); }

/* Responsive */
@media (max-width: 992px) {
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  nav.top-nav { display: none; }
  .product-detail { grid-template-columns: 1fr; }
  .checkout-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 28px; }
  .hero p.tagline { font-size: 15px; }
  .trust-badges { grid-template-columns: repeat(2, 1fr); }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .brand img.logo { height: 40px; }
  .topbar .container { justify-content: center; text-align: center; }
}
@media (max-width: 480px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-card .name { font-size: 13px; min-height: 34px; }
  .hero { padding: 40px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .wa-float { width: 52px; height: 52px; font-size: 26px; bottom: 14px; right: 14px; }
}
