/*
Theme Name: Partshpere
Theme URI: https://partshpere.com
Description: GeneratePress child theme for partshpere.com, the Korean car parts export shop.
Author: SK Parts team
Author URI: https://partshpere.com
Template: generatepress
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: partshpere
*/

/*
 * Design tokens + base type + site chrome (header, nav, search band, trust
 * strip, footer, mobile tab bar).
 *
 * WooCommerce components, the home page and the two page templates live in
 * assets/css/shop.css, which is enqueued after GP Premium's generate-woocommerce
 * handle so this cascade order is: GP dynamic CSS -> here -> shop.css.
 *
 * The colour options in GeneratePress (generate_settings) are set to the same
 * palette by _build/74-theme-mods.php, so GP's own generated CSS already paints
 * the header, nav, footer, links and form fields. The rules below are for the
 * parts GP has no option for.
 */

:root {
  --ps-primary: #0b3b66;
  --ps-primary-deep: #093055;
  --ps-action: #1565c0;
  --ps-action-hover: #0d47a1;
  --ps-secondary: #0369a1;
  --ps-sky-300: #7dd3fc;
  --ps-sky-50: #e0f2fe;
  --ps-surface: #f8fafc;
  --ps-card: #ffffff;
  --ps-ink: #0f172a;
  --ps-muted: #475569;
  --ps-border: #cbd5e1;
  --ps-border-soft: #e2e8f0;
  --ps-accent: #f5a524;
  --ps-accent-strong: #b45309;
  --ps-whatsapp: #15803d;
  --ps-whatsapp-hover: #116a33;
  --ps-success: #15803d;
  --ps-danger: #b91c1c;
  --ps-radius: 8px;
  --ps-radius-btn: 6px;
  --ps-shadow: 0 1px 2px rgb(15 23 42 / 6%);
  --ps-shadow-hover: 0 4px 14px rgb(15 23 42 / 10%);
  --ps-font-head: "Barlow Semi Condensed", system-ui, sans-serif;
  --ps-font-body: "Inter", system-ui, sans-serif;
  --ps-font-mono:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ps-gutter: 24px;
}

/* --------------------------------------------------------------- 1. base type */

body {
  font-family: var(--ps-font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ps-ink);
  background: var(--ps-surface);
  -webkit-text-size-adjust: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6,
.entry-title,
.widget-title {
  font-family: var(--ps-font-head);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--ps-ink);
}

h1 {
  font-size: 32px;
}
h2 {
  font-size: 24px;
}
h3 {
  font-size: 20px;
}

@media (min-width: 769px) {
  h1 {
    font-size: 40px;
  }
  h2 {
    font-size: 28px;
  }
  h3 {
    font-size: 21px;
  }
}

p {
  orphans: 3;
  widows: 3;
}

.ps-mono {
  font-family: var(--ps-font-mono);
  font-weight: 600;
  font-variant-ligatures: none;
}

::selection {
  background: var(--ps-sky-300);
  color: var(--ps-primary);
}

/* Prose for the plain pages (About, Contact, policy). */
.ps-prose {
  max-width: 46em;
  padding: 32px var(--ps-gutter) 48px;
  margin: 0 auto;
  background: var(--ps-card);
}
.ps-prose h2 {
  margin: 40px 0 12px;
  font-size: 22px;
}
.ps-prose h2:first-child {
  margin-top: 0;
}
.ps-prose p,
.ps-prose li {
  font-size: 16px;
  line-height: 1.7;
  color: #1e293b;
}
.ps-prose ul {
  margin-left: 20px;
}
.ps-prose li {
  margin-bottom: 6px;
}
.ps-prose strong {
  color: var(--ps-ink);
}
.ps-prose a {
  text-decoration: underline;
}

/* -------------------------------------------------------------- 2. focus ring */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--ps-action);
  outline-offset: 2px;
  box-shadow: none;
}

.site-header :focus-visible,
.site-footer :focus-visible,
.ps-footer-cta :focus-visible,
.ps-hero :focus-visible,
.ps-tabbar :focus-visible {
  outline-color: var(--ps-sky-300);
}

/* ---------------------------------------------------------- 3. header + wordmark */

.site-header {
  border-bottom: 0;
}

.site-header .inside-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.main-title.ps-wordmark,
.ps-wordmark {
  margin: 0;
  font-family: var(--ps-font-head);
  font-weight: 700;
  font-size: 27px;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: none;
}

.ps-wordmark a {
  color: #fff;
  text-decoration: none;
  display: inline-block;
}

.ps-wordmark a:hover {
  color: #fff;
}

.ps-wordmark span {
  color: var(--ps-sky-300);
}

.ps-wordmark--footer {
  font-size: 24px;
  margin-bottom: 10px;
}

.ps-wordmark--footer,
.ps-wordmark--footer span {
  color: #fff;
}

/* --------------------------------------------------------------- 4. primary nav */

.main-navigation {
  font-family: var(--ps-font-body);
}

.main-navigation .main-nav ul li a {
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 11px 14px;
  border-radius: var(--ps-radius-btn);
  text-decoration: none;
  transition:
    color 0.18s ease,
    background-color 0.18s ease;
}

.main-navigation .main-nav ul li:first-child > a {
  padding-left: 0;
}

.main-navigation .main-nav ul li.current-menu-item > a,
.main-navigation .main-nav ul li.current-menu-parent > a {
  color: #fff;
  background: var(--ps-primary-deep);
}

.main-navigation .main-nav ul li:first-child.current-menu-item > a {
  padding-left: 14px;
}

/* Sub-menus, including the cart mini-cart. */
.main-navigation ul ul {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--ps-radius);
  box-shadow: var(--ps-shadow-hover);
  padding: 6px;
  font-size: 15px;
}

.main-navigation ul ul a {
  border-radius: 4px;
  padding: 9px 14px;
}

/* Mobile toggle: GP tints it, which goes muddy on navy. */
.mobile-menu-control-wrapper .menu-toggle,
.mobile-menu-control-wrapper .menu-toggle:hover,
.mobile-menu-control-wrapper .menu-toggle:focus,
.has-inline-mobile-toggle #site-navigation.toggled {
  background-color: transparent;
}

.main-navigation .menu-toggle {
  color: #fff;
  font-weight: 600;
  padding: 10px 12px;
}

.main-navigation .menu-toggle .gp-icon {
  font-size: 24px;
}

/* Menu-bar items: cart + WhatsApp. */
.main-navigation .menu-bar-item > a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
}

.main-navigation .menu-bar-item.wc-menu-item a {
  position: relative;
  padding: 8px 10px;
  font-size: 20px;
  color: #fff;
}

.main-navigation .menu-bar-item.wc-menu-item .gp-icon {
  font-size: 20px;
}

.main-navigation .menu-bar-item.wc-menu-item .number-of-items {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--ps-accent);
  color: var(--ps-primary);
  font-family: var(--ps-font-body);
  font-size: 11px;
  font-weight: 700;
  line-height: 19px;
  text-align: center;
}

.main-navigation .menu-bar-item.wc-menu-item .number-of-items.no-items {
  display: none;
}

.ps-wa-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--ps-whatsapp);
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.18s ease;
}

.ps-wa-chip:hover {
  background: var(--ps-whatsapp-hover);
}
.ps-wa-chip .ps-icon {
  width: 18px;
  height: 18px;
}

/* ------------------------------------------------------------ 5. search band */

/*
 * The band itself lives here; the FiboSearch input and button are restyled in
 * assets/css/shop.css instead, because FiboSearch prints its own stylesheet
 * after generate-child and equal-specificity rules there beat anything in this
 * file. shop.css is the last stylesheet in the head, so it is the only place
 * that reliably wins without !important.
 */
.ps-searchbar {
  background: var(--ps-sky-50);
  border-bottom: 1px solid var(--ps-border-soft);
  padding: 13px 0 15px;
}

.ps-searchbar .inside-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-top: 0;
  padding-bottom: 0;
}

.ps-searchbar__hint {
  flex: 0 1 210px;
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.45;
  text-transform: uppercase;
  color: var(--ps-secondary);
}

.ps-searchbar .dgwt-wcas-search-wrapp {
  flex: 1 1 420px;
  max-width: 640px;
  width: 100%;
  margin: 0;
}

@media (max-width: 768px) {
  .ps-searchbar .inside-header {
    display: block;
  }

  .ps-searchbar__hint {
    flex: none;
    margin: 0 0 8px;
  }

  .ps-searchbar .dgwt-wcas-search-wrapp {
    max-width: none;
  }
}

/* ------------------------------------------------------------ 6. trust strip */

.ps-trust {
  background: var(--ps-sky-50);
  border-bottom: 1px solid var(--ps-border-soft);
  padding: 18px 0;
}

.ps-trust__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ps-trust__item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.ps-trust__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--ps-primary);
  color: var(--ps-sky-300);
}

.ps-trust__icon .ps-icon {
  width: 21px;
  height: 21px;
}

.ps-trust__text {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  line-height: 1.35;
  color: var(--ps-muted);
}

.ps-trust__text strong {
  font-family: var(--ps-font-head);
  font-size: 16px;
  font-weight: 600;
  color: var(--ps-primary);
}

/* ------------------------------------------------------------------ 7. footer */

.ps-footer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  padding-top: 48px;
  padding-bottom: 40px;
  color: var(--ps-border);
  font-size: 15px;
}

.ps-footer__col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ps-footer__col li {
  margin-bottom: 9px;
}

.ps-footer__col a {
  color: var(--ps-border);
  text-decoration: none;
  transition: color 0.18s ease;
}

.ps-footer__col a:hover {
  color: #fff;
  text-decoration: underline;
}

.ps-footer__head {
  margin: 0 0 14px;
  font-family: var(--ps-font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ps-sky-300);
}

.ps-footer__brand p {
  margin: 0 0 10px;
  max-width: 30em;
}
.ps-footer__pay {
  font-size: 13px;
  color: #94a3b8;
}
.ps-footer__link {
  padding: 0;
}

.ps-footer-cta {
  background: var(--ps-sky-50);
  border-top: 1px solid var(--ps-border-soft);
  padding: 22px 0;
}

.ps-footer-cta .grid-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.ps-footer-cta__text {
  color: var(--ps-ink);
  font-size: 16px;
  max-width: 640px;
}

.ps-footer-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.copyright-bar {
  font-size: 13px;
  color: #94a3b8;
}

/* ------------------------------------------------- 8. mobile bottom tab bar */

.ps-tabbar {
  display: none;
}

@media (max-width: 768px) {
  body.ps-has-tabbar {
    padding-bottom: 62px;
  }

  .ps-tabbar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--ps-border);
    box-shadow: 0 -2px 10px rgb(15 23 42 / 8%);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .ps-tabbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 56px;
    padding: 7px 4px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--ps-muted);
    text-decoration: none;
  }

  .ps-tabbar a:hover,
  .ps-tabbar a:focus-visible {
    color: var(--ps-action);
  }

  .ps-tabbar .ps-icon {
    width: 22px;
    height: 22px;
  }

  .ps-tabbar a:nth-child(2) {
    color: var(--ps-whatsapp);
  }

  .ps-footer-cta__actions {
    width: 100%;
  }
  .ps-footer-cta__actions .ps-btn {
    flex: 1 1 auto;
    justify-content: center;
    text-align: center;
  }
}

/* ------------------------------------------------------------- 9. animations */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
