/*
Theme Name: HiPOP Store
Theme URI: https://store.hipoplab.com/
Author: HiPOP Lab – UPSI
Description: Tema kedai ceria untuk HiPOP – Kad Pop Timbul Hibrid. Menyokong WooCommerce.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: hipop
*/

:root {
  --sky: #5ec8f2;
  --sky-deep: #1f8fd1;
  --navy: #12355b;
  --sun: #ffd23f;
  --leaf: #4cb944;
  --berry: #ef476f;
  --orange: #ff8c42;
  --cream: #fffaf0;
  --paper: #ffffff;
  --ink: #1d2b3a;
  --muted: #5b6b7c;
  --line: #e6edf3;
  --radius: 22px;
  --shadow: 0 6px 0 rgba(18, 53, 91, .12), 0 18px 40px rgba(18, 53, 91, .12);
  --font-head: "Baloo 2", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sky-deep); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 800; }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 800; }
h3 { font-size: 1.35rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; background: var(--paper); padding: 8px 14px; z-index: 100; border-radius: 8px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }

/* ---------- Buttons ---------- */
.btn, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit, .wp-block-button__link, .wc-block-components-button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--font-head); font-weight: 700; font-size: 1.05rem;
  padding: .75em 1.5em; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--berry); color: #fff; text-decoration: none; line-height: 1.2;
  box-shadow: 0 5px 0 #b8264a; transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover, .woocommerce a.button:hover, .woocommerce button.button:hover,
.wp-block-button__link:hover { transform: translateY(2px); box-shadow: 0 3px 0 #b8264a; color: #fff; background: var(--berry); }
.btn:active { transform: translateY(5px); box-shadow: none; }
.btn--sun { background: var(--sun); color: var(--navy); box-shadow: 0 5px 0 #d6a800; }
.btn--sun:hover { background: var(--sun); color: var(--navy); box-shadow: 0 3px 0 #d6a800; }
.btn--ghost { background: var(--paper); color: var(--navy); box-shadow: 0 5px 0 #c9d6e2; }
.btn--ghost:hover { background: var(--paper); color: var(--navy); box-shadow: 0 3px 0 #c9d6e2; }
.woocommerce a.button.alt, .woocommerce button.button.alt { background: var(--berry); color: #fff; }
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover { background: var(--berry); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 250, 240, .92); backdrop-filter: blur(10px);
  border-bottom: 3px dashed rgba(31, 143, 209, .25);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand img { max-height: 54px; width: auto; }
.brand__text { font-family: var(--font-head); font-weight: 800; font-size: 1.7rem; color: var(--navy); letter-spacing: -.5px; }
.brand__text span { color: var(--berry); }
.main-nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.main-nav a {
  display: block; padding: .45em .95em; border-radius: 999px; text-decoration: none;
  font-family: var(--font-head); font-weight: 600; color: var(--navy);
}
.main-nav a:hover, .main-nav .current-menu-item > a { background: var(--sky); color: #fff; }
.cart-link {
  position: relative; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: var(--sun); color: var(--navy); text-decoration: none; box-shadow: 0 4px 0 #d6a800;
}
.cart-link svg { width: 22px; height: 22px; }
.cart-count {
  position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--berry); color: #fff; font-size: .75rem; font-weight: 800; display: grid; place-items: center;
}
.cart-count:empty, .cart-count[data-count="0"] { display: none; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--navy); }
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 820px) {
  .nav-toggle { display: block; order: 3; }
  .main-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--cream); border-bottom: 3px dashed rgba(31,143,209,.25); display: none; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; padding: 12px 20px 20px; }
  .main-nav a { padding: .7em 1em; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #8fdcfb 0%, var(--sky) 55%, #8ed58a 55.1%, var(--leaf) 100%);
  padding: 60px 0 0;
}
.hero::before, .hero::after { /* clouds */
  content: ""; position: absolute; background: #fff; border-radius: 999px; opacity: .9;
  box-shadow: 40px -18px 0 6px #fff, 85px 0 0 0 #fff;
}
.hero::before { width: 90px; height: 36px; top: 70px; left: 6%; }
.hero::after { width: 70px; height: 28px; top: 40px; right: 30%; }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero__copy { padding-bottom: 80px; }
.hero__badge {
  display: inline-block; background: var(--sun); color: var(--navy); font-family: var(--font-head); font-weight: 800;
  padding: .3em 1em; border-radius: 999px; transform: rotate(-3deg); box-shadow: 0 4px 0 #d6a800; margin-bottom: 18px;
}
.hero h1 { color: #fff; text-shadow: 0 4px 0 var(--navy), 0 8px 24px rgba(18,53,91,.25); }
.hero h1 em { font-style: normal; color: var(--sun); }
.hero__lead { color: var(--navy); font-size: 1.2rem; font-weight: 600; max-width: 34ch; background: rgba(255,255,255,.75); padding: 14px 18px; border-radius: 16px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 24px; }
.hero__price { display: inline-flex; align-items: baseline; gap: 8px; margin-top: 18px; font-family: var(--font-head); color: #fff; font-weight: 800; font-size: 1.6rem; text-shadow: 0 3px 0 var(--navy); }
.hero__price del { font-size: 1.05rem; opacity: .85; }
.hero__art { position: relative; align-self: end; }
.hero__art img { margin: 0 auto; max-height: 560px; width: auto; filter: drop-shadow(0 24px 30px rgba(18,53,91,.35)); animation: bob 5s ease-in-out infinite; }
.hero__sticker {
  position: absolute; top: 12%; left: 0; width: 120px; height: 120px; border-radius: 50%;
  background: var(--berry); color: #fff; display: grid; place-items: center; text-align: center;
  font-family: var(--font-head); font-weight: 800; line-height: 1.05; transform: rotate(-12deg);
  box-shadow: 0 6px 0 #b8264a; font-size: 1rem; padding: 10px;
}
.hero__sticker b { font-size: 1.7rem; display: block; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-12px) rotate(1deg); } }
@media (prefers-reduced-motion: reduce) { .hero__art img { animation: none; } html { scroll-behavior: auto; } }
@media (max-width: 860px) {
  .hero { padding-top: 36px; background: linear-gradient(180deg, #8fdcfb 0%, var(--sky) 70%, #8ed58a 70.1%, var(--leaf) 100%); }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero__copy { padding-bottom: 10px; }
  .hero__art img { max-height: 380px; }
  .hero__sticker { width: 96px; height: 96px; font-size: .85rem; }
}

/* ---------- Sections ---------- */
.section { padding: 90px 0; }
.section--white { background: var(--paper); }
.section--navy { background: var(--navy); color: #dbe8f5; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section__head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.eyebrow { display: inline-block; font-family: var(--font-head); font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--berry); font-size: .95rem; margin-bottom: 6px; }
.section--navy .eyebrow { color: var(--sun); }
.lead { font-size: 1.15rem; color: var(--muted); }
.section--navy .lead { color: #b9cde2; }

/* Trust strip */
.trust { background: var(--leaf); padding: 0 0 50px; }
.trust__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.trust__item { background: var(--paper); border-radius: var(--radius); padding: 22px 20px; box-shadow: var(--shadow); display: flex; gap: 14px; align-items: flex-start; }
.trust__item:nth-child(odd) { transform: rotate(-1deg); }
.trust__item:nth-child(even) { transform: rotate(1deg); }
.trust__icon { flex: none; width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 1.6rem; }
.trust__item h3 { font-size: 1.1rem; margin-bottom: 2px; }
.trust__item p { margin: 0; font-size: .95rem; color: var(--muted); line-height: 1.45; }
@media (max-width: 960px) { .trust__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .trust__grid { grid-template-columns: 1fr; } .trust__item { transform: none !important; } }

/* Features (pop-up cards) */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.feature {
  position: relative; background: var(--paper); border: 3px solid var(--navy); border-radius: var(--radius);
  padding: 30px 26px 26px; box-shadow: 8px 8px 0 var(--c, var(--sky)); transition: transform .2s ease, box-shadow .2s ease;
}
.feature:hover { transform: translate(-4px, -4px) rotate(-.6deg); box-shadow: 12px 12px 0 var(--c, var(--sky)); }
.feature__emoji { font-size: 2.4rem; line-height: 1; margin-bottom: 14px; }
.feature p { color: var(--muted); margin: 0; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

/* Video */
.video { display: grid; grid-template-columns: 1fr 1.2fr; gap: 50px; align-items: center; }
.video__frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  border: 5px solid var(--sun); box-shadow: 0 16px 50px rgba(0,0,0,.35); background: #000;
}
.video__frame img, .video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.video__play {
  position: absolute; inset: 0; display: grid; place-items: center; background: rgba(18,53,91,.25);
  border: 0; cursor: pointer; width: 100%; padding: 0;
}
.video__play span {
  width: 86px; height: 86px; border-radius: 50%; background: var(--berry); display: grid; place-items: center;
  box-shadow: 0 6px 0 #b8264a; transition: transform .15s ease;
}
.video__play:hover span { transform: scale(1.08); }
.video__play svg { width: 34px; height: 34px; margin-left: 6px; fill: #fff; }
.checklist { list-style: none; padding: 0; margin: 0 0 24px; }
.checklist li { position: relative; padding-left: 34px; margin-bottom: 10px; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%; background: var(--leaf); color: #fff; font-weight: 900; font-size: .8rem; display: grid; place-items: center; }
@media (max-width: 900px) { .video { grid-template-columns: 1fr; } }

/* Products */
.products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 28px; justify-content: center; }
.products-grid--single { grid-template-columns: minmax(0, 1fr); max-width: 980px; margin: 0 auto; }
.product-card {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column; position: relative;
}
.product-card__img { background: linear-gradient(180deg, #e3f6fe, #fff); padding: 24px; display: grid; place-items: center; aspect-ratio: 1; }
.product-card__img img { max-height: 100%; width: auto; object-fit: contain; }
.product-card__body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product-card__body h3 { margin: 0; }
.product-card__body h3 a { color: var(--navy); text-decoration: none; }
.price { font-family: var(--font-head); font-weight: 800; color: var(--berry); font-size: 1.5rem; }
.price del { color: var(--muted); font-size: 1rem; font-weight: 600; margin-right: 6px; }
.price ins { text-decoration: none; }
.product-card .btn { margin-top: auto; align-self: flex-start; }
.sale-tag { position: absolute; top: 16px; left: 16px; background: var(--sun); color: var(--navy); font-family: var(--font-head); font-weight: 800; padding: .25em .9em; border-radius: 999px; transform: rotate(-6deg); z-index: 2; box-shadow: 0 3px 0 #d6a800; }
.products-grid--single .product-card { flex-direction: row; }
.products-grid--single .product-card__img { flex: 0 0 46%; aspect-ratio: auto; min-height: 380px; }
.products-grid--single .product-card__body { padding: 40px; justify-content: center; }
.products-grid--single .product-card__body h3 { font-size: 2rem; }
@media (max-width: 760px) {
  .products-grid--single .product-card { flex-direction: column; }
  .products-grid--single .product-card__img { min-height: 0; aspect-ratio: 1; }
  .products-grid--single .product-card__body { padding: 24px; }
}

/* Team */
.team { display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; align-items: center; }
.team__people { display: grid; gap: 16px; }
.person { display: flex; gap: 16px; align-items: center; background: var(--paper); border-radius: 18px; padding: 16px 20px; box-shadow: var(--shadow); }
.person__avatar { flex: none; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; color: #fff; font-size: 1.2rem; }
.person b { display: block; font-family: var(--font-head); color: var(--navy); font-size: 1.08rem; line-height: 1.25; }
.person span { color: var(--muted); font-size: .92rem; }
.funding { margin-top: 18px; font-size: .95rem; color: var(--muted); background: #fff3c4; border-left: 5px solid var(--sun); padding: 12px 16px; border-radius: 10px; }
@media (max-width: 900px) { .team { grid-template-columns: 1fr; } }

/* CTA band */
.cta-band { background: var(--berry); color: #fff; text-align: center; padding: 70px 0; position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; }
.cta-band p { font-size: 1.15rem; opacity: .95; }
.cta-band .btn--sun { margin-top: 10px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #b9cde2; padding: 60px 0 30px; font-size: .97rem; }
.site-footer a { color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer h4 { color: #fff; font-size: 1.15rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .9rem; }
.footer__brand { font-family: var(--font-head); font-weight: 800; font-size: 1.8rem; color: #fff; }
.footer__brand span { color: var(--sun); }
@media (max-width: 800px) { .footer__grid { grid-template-columns: 1fr; gap: 26px; } }

/* WhatsApp float */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* ---------- Generic pages & WooCommerce ---------- */
.page-hero { background: var(--sky); padding: 54px 0 46px; text-align: center; border-bottom: 6px solid var(--leaf); }
.page-hero h1 { color: #fff; text-shadow: 0 4px 0 var(--navy); font-size: clamp(2rem, 5vw, 3.3rem); margin: 0; }
.page-content { padding: 60px 0 90px; }
.page-content .wrap > * { max-width: 100%; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.entry-content th { background: #eaf7fd; }

.woocommerce .woocommerce-breadcrumb { color: var(--muted); font-size: .9rem; margin-bottom: 24px; }
.woocommerce ul.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 26px; margin: 0; padding: 0; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product {
  width: auto !important; margin: 0 !important; float: none !important; background: var(--paper);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 18px 22px; text-align: center;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-family: var(--font-head); color: var(--navy); font-size: 1.15rem; }
.woocommerce ul.products li.product .price, .woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--berry); font-family: var(--font-head); font-weight: 800; font-size: 1.35rem; }
.woocommerce div.product p.price { font-size: 2rem; }
.woocommerce span.onsale { background: var(--sun); color: var(--navy); font-family: var(--font-head); font-weight: 800; min-height: 0; min-width: 0; line-height: 1; padding: .55em .9em; border-radius: 999px; }
.woocommerce div.product .product_title { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.woocommerce div.product div.images img { border-radius: var(--radius); background: #e3f6fe; }
.woocommerce div.product form.cart .button { font-size: 1.15rem; }
.woocommerce .quantity .qty { padding: .65em; border-radius: 12px; border: 2px solid var(--line); font-size: 1rem; width: 4.5em; }
.woocommerce div.product .woocommerce-tabs ul.tabs li { border-radius: 14px 14px 0 0; background: #eaf7fd; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { background: var(--paper); }
.woocommerce-message, .woocommerce-info { border-top-color: var(--leaf); border-radius: 12px; }
.woocommerce-message::before, .woocommerce-info::before { color: var(--leaf); }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select {
  border: 2px solid var(--line); border-radius: 12px; padding: .7em .9em; font: inherit;
}
.woocommerce table.shop_table { border-radius: var(--radius); background: var(--paper); }
