/*
Theme Name: STEMSET Child
Theme URI: https://stemset.pk
Description: Child theme for STEMSET.pk built on Astra. Holds all custom branding: the homepage left category panel, the Play / Think / Learn sliding posters, the product grid, product-page video + Buy Now, and the contact/social footer. Colours are matched to the STEMSET logo.
Author: STEMSET.pk
Author URI: https://stemset.pk
Template: astra
Version: 1.0.0
Text Domain: stemset-child
*/

/* ============================================================
   1. Brand tokens — matched to the STEMSET logo
   (blue, orange, red, green with a purple accent)
   ============================================================ */
:root {
  --ss-blue: #2f6db5;
  --ss-blue-dark: #24568e;
  --ss-orange: #e8842b;
  --ss-orange-dark: #cf6f1c;
  --ss-red: #d0392e;
  --ss-red-dark: #b02b22;
  --ss-green: #3ea34d;
  --ss-green-dark: #2f8a3d;
  --ss-purple: #6b3b78;
  --ss-ink: #2c2536;
  --ss-muted: #6b7280;
  --ss-line: #eef1f5;
  --ss-radius: 14px;
  --ss-shadow: 0 10px 30px rgba(44, 37, 54, 0.10);
}

/* ============================================================
   2. Top announcement bar
   ============================================================ */
.stemset-announce {
  background: linear-gradient(90deg, var(--ss-blue), var(--ss-green), var(--ss-orange), var(--ss-red));
  color: #fff;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 9px 14px;
  letter-spacing: 0.02em;
}

/* Keep the wide wordmark logo tidy in the header */
.custom-logo { max-height: 66px; width: auto; }

/* ============================================================
   3. Homepage layout: left category panel + main column
   ============================================================ */
.ss-home {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 26px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 26px 20px 10px;
}
.ss-home-main { min-width: 0; }
.ss-home-aside { align-self: start; min-width: 0; }

/* Category panel dropped into the WooCommerce (Products) sidebar widget:
   strip the default widget chrome so it matches the homepage exactly. */
.widget .ss-cats-panel { margin: 0; }
#secondary .widget_custom_html .widget-title,
#secondary .widget_text .widget-title { display: none; }

/* --- Left category panel --- */
.ss-cats-panel {
  background: #fff;
  border: 1px solid var(--ss-line);
  border-radius: var(--ss-radius);
  box-shadow: var(--ss-shadow);
  overflow: hidden;
  align-self: start;
}
.ss-cats-panel__head {
  background: var(--ss-ink);
  color: #fff;
  font-weight: 800;
  font-size: 1.02rem;
  padding: 14px 18px;
  letter-spacing: 0.02em;
}
.ss-cats-panel__list { list-style: none; margin: 0; padding: 6px; }
.ss-cats-panel__list li { margin: 0; }
.ss-cat-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ss-ink);
  font-weight: 600;
  transition: background 0.15s ease, transform 0.15s ease, color 0.15s ease;
  border-left: 4px solid transparent;
}
.ss-cat-link:hover { transform: translateX(3px); }
.ss-cat-link__icon {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 9px;
  font-size: 1.15rem;
  color: #fff;
  flex: 0 0 auto;
}
.ss-cat-link__name { flex: 1; }
.ss-cat-link__count { font-size: 0.78rem; color: var(--ss-muted); font-weight: 600; }

/* Cycle the four brand colours across categories */
.ss-cat--c0 .ss-cat-link__icon { background: var(--ss-blue); }
.ss-cat--c0:hover { background: rgba(47,109,181,0.10); border-left-color: var(--ss-blue); color: var(--ss-blue-dark); }
.ss-cat--c1 .ss-cat-link__icon { background: var(--ss-green); }
.ss-cat--c1:hover { background: rgba(62,163,77,0.12); border-left-color: var(--ss-green); color: var(--ss-green-dark); }
.ss-cat--c2 .ss-cat-link__icon { background: var(--ss-red); }
.ss-cat--c2:hover { background: rgba(208,57,46,0.10); border-left-color: var(--ss-red); color: var(--ss-red-dark); }
.ss-cat--c3 .ss-cat-link__icon { background: var(--ss-orange); }
.ss-cat--c3:hover { background: rgba(232,132,43,0.12); border-left-color: var(--ss-orange); color: var(--ss-orange-dark); }
.ss-cat--c4 .ss-cat-link__icon { background: var(--ss-purple); }
.ss-cat--c4:hover { background: rgba(107,59,120,0.10); border-left-color: var(--ss-purple); color: var(--ss-purple); }

/* ============================================================
   4. Play / Think / Learn sliding posters (carousel)
   ============================================================ */
.ss-carousel {
  position: relative;
  border-radius: var(--ss-radius);
  overflow: hidden;
  box-shadow: var(--ss-shadow);
  margin-bottom: 34px;
}
.ss-carousel__track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
}
.ss-slide {
  position: relative;
  flex: 0 0 100%;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px 56px;
  color: #fff;
  overflow: hidden;
}
.ss-slide--play  { background: linear-gradient(120deg, var(--ss-blue), var(--ss-blue-dark)); }
.ss-slide--think { background: linear-gradient(120deg, var(--ss-red), var(--ss-orange)); }
.ss-slide--learn { background: linear-gradient(120deg, var(--ss-green), var(--ss-green-dark)); }

/* Playful floating shapes in the poster background */
.ss-slide::before,
.ss-slide::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}
.ss-slide::before { width: 240px; height: 240px; right: -60px; top: -80px; }
.ss-slide::after  { width: 150px; height: 150px; right: 120px; bottom: -60px; background: rgba(255,255,255,0.08); }

.ss-slide__motto {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 900;
  line-height: 1;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.12);
}
.ss-slide__text {
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  max-width: 34ch;
  margin: 0 0 22px;
  opacity: 0.96;
  position: relative;
  z-index: 1;
}
.ss-slide__cta {
  align-self: flex-start;
  background: #fff;
  color: var(--ss-ink);
  font-weight: 800;
  padding: 13px 26px;
  border-radius: 999px;
  text-decoration: none;
  position: relative;
  z-index: 1;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ss-slide__cta:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0,0,0,0.18); }

/* Arrows */
.ss-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ss-ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: background 0.15s ease;
  z-index: 3;
}
.ss-carousel__arrow:hover { background: #fff; }
.ss-carousel__arrow--prev { left: 16px; }
.ss-carousel__arrow--next { right: 16px; }

/* Dots */
.ss-carousel__dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 3;
}
.ss-carousel__dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}
.ss-carousel__dot.is-active { background: #fff; transform: scale(1.2); }

/* ============================================================
   5. Section headings + products grid
   ============================================================ */
.ss-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 6px 0 20px;
  border-bottom: 3px solid var(--ss-line);
  padding-bottom: 10px;
}
.ss-section-heading h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  margin: 0;
  color: var(--ss-ink);
  font-weight: 800;
}
.ss-section-heading h2 span { color: var(--ss-orange); }
.ss-section-heading .ss-viewall {
  font-weight: 700;
  text-decoration: none;
  color: var(--ss-blue);
  white-space: nowrap;
}
.ss-section-heading .ss-viewall:hover { color: var(--ss-blue-dark); }

/* Tame WooCommerce shortcode grid inside the home main column */
.ss-products .woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: 0;
}
.ss-products .woocommerce ul.products li.product {
  width: auto !important;
  margin: 0 !important;
  float: none !important;
  background: #fff;
  border: 1px solid var(--ss-line);
  border-radius: var(--ss-radius);
  padding: 14px;
  box-shadow: 0 6px 16px rgba(44,37,54,0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ss-products .woocommerce ul.products li.product:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(44,37,54,0.12);
}

/* ============================================================
   6. WooCommerce brand accents (buttons, prices, sale badge)
   ============================================================ */
.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price { color: var(--ss-green-dark); font-weight: 800; }

.woocommerce span.onsale {
  background: var(--ss-red) !important;
  color: #fff !important;
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt {
  background: var(--ss-blue) !important;
  color: #fff !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover { background: var(--ss-blue-dark) !important; }

/* ============================================================
   7. Product page: video block + Buy Now button
   ============================================================ */
.stemset-product-video { margin: 22px 0; }
.stemset-product-video__label { font-weight: 800; margin-bottom: 10px; color: var(--ss-ink); }
.stemset-product-video__frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: var(--ss-radius);
  overflow: hidden;
  background: #000;
}
.stemset-product-video__frame iframe,
.stemset-product-video__frame video {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}

.woocommerce div.product form.cart .single_add_to_cart_button { margin-right: 6px; }
.button.stemset-buy-now,
.woocommerce div.product form.cart .button.stemset-buy-now {
  background: var(--ss-orange) !important;
  color: #fff !important;
  display: inline-block;
  vertical-align: top;
  margin-left: 12px;
}
.button.stemset-buy-now:hover { background: var(--ss-orange-dark) !important; }
@media (max-width: 480px) {
  .woocommerce div.product form.cart .button.stemset-buy-now {
    margin-left: 0; margin-top: 12px; display: block; width: 100%;
  }
}

/* ============================================================
   7b. Header: centre the nav links, pin the Cart to the right corner
   ============================================================ */
@media (min-width: 922px) {
  #primary-site-navigation-desktop .main-header-menu {
    display: flex;
    align-items: center;
    width: 100%;
  }
  /* Left spacer balances the Cart on the right so the links stay centred. */
  #primary-site-navigation-desktop .main-header-menu::before {
    content: "";
    flex: 1 1 0;
  }
  /* Cart (last item) takes an equal flexible column and hugs the right edge. */
  #primary-site-navigation-desktop .main-header-menu > .menu-item:last-child {
    flex: 1 1 0;
    flex-direction: row;
    justify-content: flex-end;
  }
  #primary-site-navigation-desktop .main-header-menu > .menu-item:last-child .menu-link {
    white-space: nowrap;
  }
}

/* --- Cart count badge (small red number on the Cart menu item) --- */
.ss-cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 999px;
  background: var(--ss-red);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
  vertical-align: super;
}
.ss-cart-count.is-empty { display: none; }

/* ============================================================
   8. Footer (contact + social + copyright) & WhatsApp button
   ============================================================ */
.ss-footer {
  background: var(--ss-ink);
  color: #cbd5e1;
  padding: 46px 20px 0;
}
.ss-footer__grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
}
.ss-footer h4 {
  color: #fff;
  font-size: 1.05rem;
  margin: 0 0 14px;
  font-weight: 800;
}
.ss-footer a { color: #cbd5e1; text-decoration: none; }
.ss-footer a:hover { color: #fff; }
.ss-footer__contact li { list-style: none; margin: 0 0 10px; padding-left: 26px; position: relative; }
.ss-footer__contact { padding: 0; margin: 0; }
.ss-footer__contact li::before { position: absolute; left: 0; top: 0; }
.ss-footer__contact li.is-company::before { content: "\1F3E2"; }
.ss-footer__contact li.is-addr::before  { content: "\1F4CD"; }
.ss-footer__contact li.is-phone::before { content: "\1F4DE"; }
.ss-footer__contact li.is-mail::before  { content: "\2709\FE0F"; }
.ss-footer__links { list-style: none; margin: 0; padding: 0; }
.ss-footer__links li { margin: 0 0 10px; }
.ss-footer__social { display: flex; gap: 12px; margin-top: 4px; }
.ss-footer__social a {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-weight: 800;
  color: #fff;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.ss-footer__social a:hover { transform: translateY(-3px); opacity: 0.9; }
.ss-footer__social .is-fb { background: #1877f2; }
.ss-footer__social .is-ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #bc1888); }
.ss-footer__social .is-yt { background: #ff0000; }
.ss-footer__social .is-tt { background: #000; }
.ss-footer__social .is-tt svg { width: 18px; height: 18px; }
.ss-footer__copy {
  max-width: 1240px;
  margin: 40px auto 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 18px 0;
  text-align: center;
  font-size: 0.88rem;
  color: #9aa5b1;
}

/* Floating WhatsApp button */
.ss-whatsapp {
  position: fixed;
  right: 22px; bottom: 22px;
  width: 58px; height: 58px;
  background: #25d366;
  border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: 0 8px 22px rgba(37, 211, 102, 0.5);
  z-index: 9999;
  transition: transform 0.15s ease;
}
.ss-whatsapp:hover { transform: scale(1.08); }
.ss-whatsapp svg { width: 32px; height: 32px; fill: #fff; }

/* ============================================================
   8b. Order received / thank-you — Invoice + Packing Slip downloads
   ============================================================ */
.ss-checkout-docs {
  margin: 24px 0;
  padding: 20px 22px;
  background: linear-gradient(135deg, rgba(47,109,181,0.08), rgba(62,163,77,0.10));
  border: 1px solid var(--ss-line);
  border-radius: var(--ss-radius);
  box-shadow: var(--ss-shadow);
}
.ss-checkout-docs h3 {
  margin: 0 0 14px;
  font-size: 1.15rem;
  color: var(--ss-ink);
}
.ss-checkout-docs__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.ss-checkout-docs__btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.ss-checkout-docs__btn:hover {
  transform: translateY(-2px);
  opacity: 0.92;
  color: #fff;
}
.ss-checkout-docs__btn.is-invoice { background: var(--ss-blue); }
.ss-checkout-docs__btn.is-packing  { background: var(--ss-green); }
.ss-checkout-docs__note {
  margin: 14px 0 0;
  font-size: 0.88rem;
  color: var(--ss-muted);
  line-height: 1.45;
}

/* ============================================================
   9. Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .ss-products .woocommerce ul.products { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .ss-home { grid-template-columns: 1fr; }
  .ss-cats-panel__list {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px;
  }
}
@media (max-width: 768px) {
  .ss-footer__grid { grid-template-columns: 1fr; gap: 26px; }
  .ss-slide { padding: 34px 26px; min-height: 240px; }
}
@media (max-width: 560px) {
  .ss-products .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); }
  .ss-cats-panel__list { grid-template-columns: 1fr; }
}
