/*
Theme Name: GP Apple WooCommerce
Theme URI: https://example.com/gp-apple-woocommerce
Author: Codex
Description: Child theme for GeneratePress tailored for an Apple-inspired WooCommerce store experience.
Template: generatepress
Version: 1.0.0
Text Domain: gp-apple-woocommerce
*/

:root {
  --apple-ink: #1d1d1f;
  --apple-muted: #6e6e73;
  --apple-border: #d2d2d7;
  --apple-bg: #f5f5f7;
  --apple-card: #ffffff;
  --apple-highlight: #0071e3;
  --apple-highlight-strong: #005bb5;
  --apple-radius: 14px;
  --apple-font: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: var(--apple-font);
  color: var(--apple-ink);
  background: var(--apple-bg);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

#page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--apple-highlight);
  text-decoration: none;
  transition: color 160ms ease;
}

a:hover,
a:focus-visible {
  color: var(--apple-highlight-strong);
}

.apple-site {
  min-height: 100vh;
}

.site-content {
  padding-top: 48px;
  padding-bottom: 64px;
  flex: 1 0 auto;
}

.site-content > .container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  z-index: 80;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-main {
  padding: 16px 28px;
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
}

.branding .logo img,
.branding .logo svg {
  height: 32px;
  width: auto;
  display: block;
}

.main-navigation {
  justify-self: center;
}

.primary-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0;
  padding: 0;
}

.primary-menu > li > a {
  text-decoration: none;
  color: var(--apple-ink);
  font-weight: 600;
  padding: 8px 0;
  letter-spacing: -0.01em;
  position: relative;
}

.primary-menu > li > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--apple-highlight);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.primary-menu > li > a:hover::after,
.primary-menu > li.current-menu-item > a::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
}

.search-wrap form {
  display: flex;
  align-items: center;
}

.search-wrap input[type="search"] {
  border: 1px solid var(--apple-border);
  background: #ffffff;
  color: var(--apple-ink);
  border-radius: var(--apple-radius);
  padding: 9px 12px;
  min-width: 180px;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.search-wrap input[type="search"]:focus {
  border-color: var(--apple-highlight);
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.14);
}

.search-wrap button,
.search-wrap input[type="submit"] {
  display: none;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--apple-border);
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 120ms ease;
}

.icon-btn:hover {
  border-color: #b9b9be;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--apple-highlight);
  color: #fff;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 12px;
  min-width: 18px;
  text-align: center;
}

.apple-bag__total {
  display: none;
}

.lead-toggle {
  display: none;
}

.lead-trigger {
  position: relative;
}

.lead-panel {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 10px;
  background: #ffffff;
  border: 1px solid var(--apple-border);
  border-radius: var(--apple-radius);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  padding: 10px;
  min-width: 320px;
  z-index: 90;
}

.lead-toggle:checked ~ .lead-panel {
  display: block;
}

.lead-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lead-form input {
  border: 1px solid var(--apple-border);
  background: var(--apple-bg);
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--apple-ink);
  flex: 1 1 45%;
}

.lead-form input:focus {
  outline: none;
  border-color: var(--apple-highlight);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
}

.lead-form button {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: var(--apple-highlight);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 160ms ease, transform 120ms ease;
}

.lead-form button:hover {
  background: var(--apple-highlight-strong);
}

.lead-panel.is-success {
  display: block;
}

.lead-success {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0a8f30;
  font-weight: 600;
  font-size: 14px;
}

.nav-toggle {
  display: none;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 36px;
  border: 1px solid var(--apple-border);
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--apple-ink);
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: -999;
}

.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 10px;
  background: var(--apple-highlight);
  color: #ffffff;
  z-index: 1000;
}

/* Footer */
.site-footer {
  background: #0b0b0f;
  color: #d9d9e3;
  padding: 48px 0 28px;
  margin-top: auto;
}

.apple-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 24px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: start;
}

.apple-footer__title {
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 20px;
  margin-bottom: 8px;
}

.apple-footer__text {
  color: #b1b1b8;
  margin: 0;
}

.apple-footer__cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.apple-footer__heading {
  font-weight: 700;
  margin-bottom: 10px;
  color: #f5f5f7;
}

.apple-footer__menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.apple-footer__menu a {
  color: #dfe0e5;
}

.apple-footer__menu a:hover {
  color: #ffffff;
}

.apple-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
  text-align: center;
  color: #8f90a6;
}

/* Responsive */
@media (max-width: 1100px) {
  .header-inner {
    grid-template-columns: auto auto;
    grid-template-areas:
      "logo actions"
      "menu menu";
    row-gap: 12px;
    position: relative;
  }

  .branding {
    grid-area: logo;
  }

  .header-actions {
    grid-area: actions;
    justify-self: end;
    flex-wrap: wrap;
  }

  .main-navigation {
    grid-area: menu;
    width: 100%;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .main-navigation {
    display: none;
    border: 1px solid var(--apple-border);
    border-radius: var(--apple-radius);
    background: #ffffff;
    padding: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
  }

  .primary-menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .nav-toggle:checked ~ .menu-toggle span:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  .nav-toggle:checked ~ .menu-toggle span:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }

  .nav-toggle:checked ~ .main-navigation {
    display: block;
  }

  .lead-panel {
    position: static;
    margin: 0;
    width: 100%;
  }

  .lead-form {
    flex-wrap: wrap;
  }

  .lead-form input {
    flex: 1 1 100%;
  }

  .search-wrap input[type="search"] {
    width: 100%;
    min-width: 100%;
  }

  .apple-footer__inner {
    grid-template-columns: 1fr;
  }

  .apple-footer__cols {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header-main {
    padding: 14px 18px;
  }

  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .header-actions {
    gap: 8px;
  }

  .site-content {
    padding-top: 36px;
    padding-bottom: 48px;
  }
}
