/* ==========================================================================
   3DPRIME WHITE v2.0 - APPLE / IPHONE STYLE HIGH-TECH THEME
   Sito: 3DPrime.it // Precisione, Creatività, Tecnologia
   Palette: Pure Ceramic White (#fff), Matte Gray (#f5f5f7), Space Black (#1d1d1f), Apple Blue (#0071e3)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. APPLE DESIGN SYSTEM & TOKENS
   -------------------------------------------------------------------------- */
:root {
  --apple-bg: #ffffff;
  --apple-bg-subtle: #f5f5f7;
  --apple-bg-card: #ffffff;
  --apple-bg-card-hover: #fafafc;
  --apple-bg-dark: #1d1d1f;

  --apple-text-main: #1d1d1f;
  --apple-text-secondary: #86868b;
  --apple-text-tertiary: #6e6e73;

  --apple-blue: #0071e3;
  --apple-blue-hover: #0077ed;
  --apple-blue-subtle: rgba(0, 113, 227, 0.08);

  --apple-orange: #f56300;
  --apple-orange-subtle: rgba(245, 99, 0, 0.08);

  --apple-border: rgba(0, 0, 0, 0.08);
  --apple-border-light: rgba(0, 0, 0, 0.05);
  --apple-border-strong: rgba(0, 0, 0, 0.16);

  --apple-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Plus Jakarta Sans", system-ui, sans-serif;
  --apple-font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, monospace;

  --apple-radius-sm: 10px;
  --apple-radius-md: 16px;
  --apple-radius-lg: 24px;
  --apple-radius-pill: 980px;

  --apple-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.03);
  --apple-shadow-md: 0 8px 30px rgba(0, 0, 0, 0.05);
  --apple-shadow-lg: 0 16px 45px rgba(0, 0, 0, 0.08);

  --apple-blur: blur(20px) saturate(180%);
  --apple-transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   2. BASE & RESET
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.p3-white-mode {
  background-color: var(--apple-bg);
  color: var(--apple-text-main);
  font-family: var(--apple-font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.p3-wrap, .p3-apple-wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--apple-transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --------------------------------------------------------------------------
   3. APPLE TOP ANNOUNCEMENT BAR
   -------------------------------------------------------------------------- */
.p3-apple-topbar {
  background: var(--apple-bg-subtle);
  border-bottom: 1px solid var(--apple-border);
  padding: 10px 0;
  font-size: 13px;
  color: var(--apple-text-tertiary);
  text-align: center;
}

.p3-topbar-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.p3-topbar-badge {
  background: var(--apple-orange);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: var(--apple-radius-pill);
}

.p3-topbar-link {
  color: var(--apple-blue);
  font-weight: 600;
}
.p3-topbar-link:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   4. APPLE FROSTED GLASS HEADER
   -------------------------------------------------------------------------- */
.p3-apple-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: var(--apple-blur);
  -webkit-backdrop-filter: var(--apple-blur);
  border-bottom: 1px solid var(--apple-border);
}

.p3-header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 24px;
}

/* Apple Logo */
.p3-apple-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--apple-text-main);
}

.p3-logo-cube {
  width: 32px;
  height: 32px;
  color: var(--apple-blue);
  display: flex;
  align-items: center;
  justify-content: center;
}

.p3-logo-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--apple-text-main);
}

.p3-accent-it {
  color: var(--apple-blue);
}

/* Apple Centered Navigation */
.p3-apple-nav {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.25vw, 20px);
  flex-wrap: nowrap;
}

@media (max-width: 991px) {
  .p3-apple-nav { display: none; }
}

.p3-nav-link {
  font-size: clamp(12px, 0.92vw, 13.5px);
  font-weight: 500;
  color: var(--apple-text-main);
  opacity: 0.85;
  white-space: nowrap;
  position: relative;
  transition: var(--apple-transition);
}

.p3-nav-link:hover {
  opacity: 1;
  color: var(--apple-blue);
}

/* Navigation Dropdown Menu (Apple Style) */
.p3-nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.p3-dropdown-trigger {
  background: transparent;
  border: none;
  padding: 6px 10px;
  border-radius: var(--apple-radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.p3-dropdown-trigger:hover,
.p3-nav-dropdown:hover .p3-dropdown-trigger,
.p3-nav-dropdown.is-open .p3-dropdown-trigger {
  background: rgba(0, 113, 227, 0.08);
  color: var(--apple-blue);
  opacity: 1;
}

.p3-dropdown-arrow {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: currentColor;
}

.p3-nav-dropdown:hover .p3-dropdown-arrow,
.p3-nav-dropdown.is-open .p3-dropdown-arrow {
  transform: rotate(180deg);
}

.p3-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 330px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
}

.p3-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.p3-nav-dropdown:hover .p3-dropdown-menu,
.p3-nav-dropdown.is-open .p3-dropdown-menu,
.p3-nav-dropdown:focus-within .p3-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.p3-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--apple-text-main);
  transition: all 0.15s ease;
  position: relative;
  text-align: left;
}

.p3-dropdown-item:hover {
  background: rgba(0, 113, 227, 0.07);
  color: var(--apple-blue);
  transform: translateX(2px);
}

.p3-item-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.p3-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.p3-item-info strong {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--apple-text-main);
  line-height: 1.25;
}

.p3-dropdown-item:hover .p3-item-info strong {
  color: var(--apple-blue);
}

.p3-item-info small {
  font-size: 11.5px;
  color: var(--apple-text-secondary);
  line-height: 1.25;
}

.p3-dropdown-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.06);
  margin: 6px 8px;
}

.p3-item-special {
  background: rgba(0, 113, 227, 0.04);
}

.p3-item-special:hover {
  background: rgba(0, 113, 227, 0.12);
}

.p3-item-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--apple-radius-pill);
  background: var(--apple-blue);
  color: #fff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Apple Mobile Horizontal Subnav Strip */
.p3-apple-subnav-mobile {
  display: none;
}

@media (max-width: 991px) {
  .p3-apple-subnav-mobile {
    display: block;
    width: 100%;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: var(--apple-blur);
    -webkit-backdrop-filter: var(--apple-blur);
    padding: 8px 0 10px;
  }

  .p3-subnav-scroll {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 16px;
  }
  .p3-subnav-scroll::-webkit-scrollbar {
    display: none;
  }

  .p3-subnav-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    padding: 6px 14px;
    border-radius: var(--apple-radius-pill);
    color: var(--apple-text-main);
    background: var(--apple-bg-subtle);
    border: 1px solid var(--apple-border);
    transition: var(--apple-transition);
    flex-shrink: 0;
    text-decoration: none;
  }

  .p3-subnav-pill:active,
  .p3-subnav-pill.is-active {
    background: #ffffff;
    color: var(--apple-blue);
    border-color: var(--apple-blue);
    box-shadow: 0 2px 6px rgba(0, 113, 227, 0.16);
  }

  .p3-subnav-gear {
    background: rgba(0, 113, 227, 0.06);
    border-color: rgba(0, 113, 227, 0.25);
    color: var(--apple-blue);
    font-weight: 600;
  }

  .p3-subnav-custom {
    background: var(--apple-blue-subtle);
    border-color: rgba(0, 113, 227, 0.3);
    color: var(--apple-blue);
    font-weight: 700;
  }
}

.p3-nav-link:hover {
  opacity: 1;
  color: var(--apple-blue);
}

.p3-nav-highlight {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--apple-blue) !important;
  font-weight: 600;
  opacity: 1;
}

.p3-nav-dot {
  width: 5px;
  height: 5px;
  background: var(--apple-blue);
  border-radius: 50%;
}

/* Actions: Search Capsule & Cart Bag */
.p3-apple-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.p3-search-capsule {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--apple-bg-subtle);
  border: 1px solid var(--apple-border);
  border-radius: var(--apple-radius-pill);
  padding: 6px 14px;
  transition: var(--apple-transition);
}

.p3-search-capsule:focus-within {
  background: #ffffff;
  border-color: var(--apple-blue);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

.p3-search-icon {
  width: 15px;
  height: 15px;
  color: var(--apple-text-secondary);
  margin-right: 8px;
}

.p3-search-capsule input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  width: 120px;
  color: var(--apple-text-main);
  font-family: var(--apple-font);
  transition: width 0.25s ease;
}

.p3-search-capsule:focus-within input {
  width: 180px;
}

@media (max-width: 680px) {
  .p3-search-capsule { display: none; }
}

.p3-action-btn {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--apple-text-main);
  border-radius: 50%;
  transition: var(--apple-transition);
}

.p3-action-btn:hover {
  background: var(--apple-bg-subtle);
  color: var(--apple-blue);
}

.p3-action-btn svg {
  width: 20px;
  height: 20px;
}

.p3-bag-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--apple-blue);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.p3-apple-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 6px;
}

.p3-apple-hamburger span {
  display: block;
  height: 1.5px;
  background: var(--apple-text-main);
  border-radius: 1px;
}

@media (max-width: 991px) {
  .p3-apple-hamburger { display: flex; }
}

/* --------------------------------------------------------------------------
   5. APPLE HERO SECTION
   -------------------------------------------------------------------------- */
.p3-apple-hero {
  padding: 64px 0 40px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfd 100%);
  text-align: center;
}

.p3-hero-center {
  max-width: 860px;
  margin: 0 auto 48px;
}

.p3-dynamic-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--apple-border);
  box-shadow: var(--apple-shadow-sm);
  padding: 6px 16px;
  border-radius: var(--apple-radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--apple-text-main);
  margin-bottom: 24px;
}

.p3-pill-dot {
  width: 7px;
  height: 7px;
  background: var(--apple-blue);
  border-radius: 50%;
}

.p3-apple-title {
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--apple-text-main);
  margin-bottom: 20px;
}

.p3-blue-gradient {
  background: linear-gradient(90deg, #0071e3 0%, #2997ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.p3-apple-subtitle {
  font-size: clamp(17px, 2.2vw, 21px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--apple-text-secondary);
  max-width: 680px;
  margin: 0 auto 36px;
}

.p3-apple-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.p3-apple-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--apple-blue);
  color: #ffffff;
  padding: 13px 26px;
  border-radius: var(--apple-radius-pill);
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.25);
  transition: var(--apple-transition);
}

.p3-apple-btn-primary:hover {
  background: var(--apple-blue-hover);
  transform: scale(1.02);
  color: #ffffff;
}

.p3-apple-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--apple-bg-subtle);
  color: var(--apple-text-main);
  padding: 13px 26px;
  border-radius: var(--apple-radius-pill);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--apple-border);
  transition: var(--apple-transition);
}

.p3-apple-btn-secondary:hover {
  background: #ebebee;
  transform: scale(1.02);
}

/* Feature Showcase Hero Card */
.p3-apple-showcase-box {
  position: relative;
  background: #ffffff;
  border-radius: var(--apple-radius-lg);
  border: 1px solid var(--apple-border);
  box-shadow: var(--apple-shadow-lg);
  padding: 32px;
  margin-top: 10px;
}

.p3-showcase-inner {
  position: relative;
  background: var(--apple-bg-subtle);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 440px;
}

.p3-showcase-media img {
  max-height: 400px;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.p3-apple-showcase-box:hover .p3-showcase-media img {
  transform: scale(1.03);
}

/* Floating Specs Badges (iPhone Hardware Specs Style) */
.p3-floating-badge {
  position: absolute;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: var(--apple-blur);
  border: 1px solid var(--apple-border);
  box-shadow: var(--apple-shadow-md);
  padding: 10px 18px;
  border-radius: var(--apple-radius-md);
  text-align: left;
}

.p3-badge-top-left {
  top: 24px;
  left: 24px;
}

.p3-badge-top-right {
  top: 24px;
  right: 24px;
}

.p3-badge-bottom-left {
  bottom: 24px;
  left: 24px;
}

@media (max-width: 768px) {
  .p3-floating-badge {
    position: static;
    margin: 8px auto;
    display: inline-block;
  }
  .p3-showcase-inner {
    flex-direction: column;
    padding: 20px;
  }
}

.p3-fbadge-val {
  display: block;
  font-family: var(--apple-font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--apple-text-main);
}

.p3-fbadge-lbl {
  display: block;
  font-size: 11px;
  color: var(--apple-text-secondary);
  font-weight: 500;
  margin-top: 2px;
}

/* --------------------------------------------------------------------------
   6. APPLE BENTO GRID SECTION
   -------------------------------------------------------------------------- */
.p3-apple-bento-section {
  padding: 80px 0;
  background: #ffffff;
}

.p3-section-intro {
  text-align: center;
  margin-bottom: 48px;
}

.p3-eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--apple-blue);
  margin-bottom: 8px;
}

.p3-bento-heading {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--apple-text-main);
}

.p3-bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 991px) {
  .p3-bento-grid { grid-template-columns: 1fr; }
}

.p3-bento-card {
  position: relative;
  background: var(--apple-bg-subtle);
  border-radius: var(--apple-radius-lg);
  border: 1px solid var(--apple-border);
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
  transition: var(--apple-transition);
}

.p3-bento-card:hover {
  box-shadow: var(--apple-shadow-lg);
  transform: translateY(-3px);
}

.p3-bento-wide {
  grid-column: span 2;
}

@media (max-width: 991px) {
  .p3-bento-wide { grid-column: span 1; }
}

/* Dark Bento Card Contrast */
.p3-bento-dark {
  background: #151821;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.1);
}

.p3-bento-dark h3 {
  color: #ffffff;
}

.p3-bento-dark p {
  color: #a1a1a6;
}

/* Blue Bento Card */
.p3-bento-blue {
  background: linear-gradient(135deg, #0071e3 0%, #0056b3 100%);
  color: #ffffff;
  border: none;
}

.p3-bento-blue h3 {
  color: #ffffff;
}

.p3-bento-blue p {
  color: rgba(255, 255, 255, 0.9);
}

.p3-bento-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--apple-blue);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.p3-tag-white {
  color: rgba(255, 255, 255, 0.8) !important;
}

.p3-bento-card h3 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--apple-text-main);
  margin-bottom: 10px;
}

.p3-bento-card p {
  font-size: 15px;
  color: var(--apple-text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

.p3-bento-link {
  color: var(--apple-blue);
  font-weight: 600;
  font-size: 14.5px;
}

.p3-bento-dark .p3-bento-link {
  color: #2997ff;
}

.p3-bento-spec-pill {
  display: inline-block;
  background: rgba(0, 0, 0, 0.04);
  font-family: var(--apple-font-mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--apple-radius-pill);
  color: var(--apple-text-main);
}

.p3-apple-btn-white {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: #0071e3;
  padding: 12px 24px;
  border-radius: var(--apple-radius-pill);
  font-size: 14.5px;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: var(--apple-transition);
}

.p3-apple-btn-white:hover {
  transform: scale(1.03);
  color: #0056b3;
}

/* --------------------------------------------------------------------------
   7. APPLE CATEGORY PILLS SECTION
   -------------------------------------------------------------------------- */
.p3-apple-categories {
  padding: 60px 0;
  background: var(--apple-bg-subtle);
}

.p3-apple-cats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 991px) {
  .p3-apple-cats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .p3-apple-cats-grid { grid-template-columns: 1fr; }
}

.p3-apple-cat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #ffffff;
  border: 1px solid var(--apple-border);
  border-radius: var(--apple-radius-md);
  padding: 20px;
  box-shadow: var(--apple-shadow-sm);
  transition: var(--apple-transition);
}

.p3-apple-cat-card:hover {
  border-color: var(--apple-blue);
  box-shadow: var(--apple-shadow-md);
  transform: translateY(-2px);
}

.p3-acat-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.p3-acat-body h4 {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--apple-text-main);
  margin-bottom: 3px;
}

.p3-acat-body p {
  font-size: 12.5px;
  color: var(--apple-text-secondary);
  line-height: 1.4;
}

.p3-acat-arrow {
  margin-left: auto;
  color: var(--apple-blue);
  font-weight: 700;
  font-size: 16px;
}

/* --------------------------------------------------------------------------
   8. APPLE STORE PRODUCT GRID & CARDS
   -------------------------------------------------------------------------- */
.p3-apple-products {
  padding: 80px 0;
  background: #ffffff;
}

.p3-section-head-apple {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 36px;
}

.p3-apple-textlink {
  color: var(--apple-blue);
  font-size: 14.5px;
  font-weight: 600;
}

.p3-apple-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 1199px) {
  .p3-apple-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .p3-apple-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (max-width: 480px) {
  .p3-apple-grid { grid-template-columns: 1fr; }
}

.p3-card {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--apple-border);
  border-radius: var(--apple-radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--apple-shadow-sm);
  transition: var(--apple-transition);
}

.p3-card:hover {
  border-color: rgba(0, 113, 227, 0.3);
  transform: translateY(-5px);
  box-shadow: var(--apple-shadow-lg);
}

.p3-image {
  position: relative;
  background: var(--apple-bg-subtle);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-bottom: 1px solid var(--apple-border-light);
}

.p3-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.p3-card:hover .p3-image img {
  transform: scale(1.05);
}

.p3-sale {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--apple-orange);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--apple-radius-pill);
}

.p3-image-arrow {
  display: none;
}

.p3-cardbody {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.p3-cardbody small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--apple-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.p3-cardbody h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 12px;
  flex: 1;
}

.p3-cardbody h3 a {
  color: var(--apple-text-main);
}

.p3-card:hover .p3-cardbody h3 a {
  color: var(--apple-blue);
}

.p3-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--apple-text-main);
  margin-bottom: 16px;
}

.p3-price del {
  color: var(--apple-text-secondary);
  font-size: 14px;
  font-weight: 400;
  margin-right: 6px;
}

.p3-price ins {
  text-decoration: none;
  color: var(--apple-text-main);
}

.p3-productlink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  background: var(--apple-blue);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: var(--apple-radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  transition: var(--apple-transition);
}

.p3-card:hover .p3-productlink {
  background: var(--apple-blue-hover);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   9. APPLE GUARANTEE / LAB BANNER
   -------------------------------------------------------------------------- */
.p3-apple-guarantee {
  padding: 40px 0 80px;
  background: #ffffff;
}

.p3-guarantee-box {
  background: var(--apple-bg-subtle);
  border-radius: var(--apple-radius-lg);
  border: 1px solid var(--apple-border);
  padding: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}

@media (max-width: 768px) {
  .p3-guarantee-box {
    grid-template-columns: 1fr;
    padding: 32px 24px;
  }
}

.p3-gicon {
  display: block;
  font-size: 30px;
  margin-bottom: 14px;
}

.p3-gcol h4 {
  font-size: 18px;
  font-weight: 700;
  color: var(--apple-text-main);
  margin-bottom: 8px;
}

.p3-gcol p {
  font-size: 14px;
  color: var(--apple-text-secondary);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   10. APPLE MINIMALIST FOOTER
   -------------------------------------------------------------------------- */
.p3-apple-footer {
  background: var(--apple-bg-subtle);
  border-top: 1px solid var(--apple-border);
  padding: 40px 0 24px;
  font-size: 12px;
  color: var(--apple-text-secondary);
}

.p3-afooter-top {
  border-bottom: 1px solid var(--apple-border);
  padding-bottom: 16px;
  margin-bottom: 32px;
  line-height: 1.6;
}

.p3-afooter-notes p {
  margin-bottom: 8px;
}

.p3-afooter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .p3-afooter-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .p3-afooter-grid { grid-template-columns: 1fr; }
}

.p3-afooter-col h5 {
  font-size: 12px;
  font-weight: 700;
  color: var(--apple-text-main);
  margin-bottom: 12px;
}

.p3-afooter-col ul {
  list-style: none;
}

.p3-afooter-col li {
  margin-bottom: 8px;
}

.p3-afooter-col a {
  color: var(--apple-text-secondary);
}

.p3-afooter-col a:hover {
  color: var(--apple-text-main);
  text-decoration: underline;
}

.p3-afooter-bio {
  line-height: 1.6;
  margin-bottom: 12px;
}

.p3-lang-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.p3-lang-pill a.is-active {
  font-weight: 700;
  color: var(--apple-blue);
}

.p3-afooter-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--apple-border);
  padding-top: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.p3-abottom-links {
  display: flex;
  gap: 16px;
}

.p3-abottom-links a:hover {
  text-decoration: underline;
}

.p3-vat-pill {
  margin-left: 10px;
  padding: 1px 6px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   11. APPLE MOBILE DRAWER
   -------------------------------------------------------------------------- */
.p3-apple-drawer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  visibility: hidden;
  transition: visibility 0.3s ease;
}

.p3-apple-drawer.is-open {
  visibility: visible;
}

.p3-adrawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.p3-apple-drawer.is-open .p3-adrawer-overlay {
  opacity: 1;
}

.p3-adrawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 85%;
  max-width: 320px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: var(--apple-blur);
  border-left: 1px solid var(--apple-border);
  padding: 24px;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.p3-apple-drawer.is-open .p3-adrawer-panel {
  transform: translateX(0);
}

.p3-adrawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.p3-adrawer-brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--apple-text-main);
}

.p3-adrawer-close {
  background: transparent;
  border: none;
  font-size: 18px;
  color: var(--apple-text-secondary);
  cursor: pointer;
}

.p3-adrawer-search input {
  width: 100%;
  background: var(--apple-bg-subtle);
  border: 1px solid var(--apple-border);
  border-radius: var(--apple-radius-pill);
  padding: 10px 16px;
  font-size: 14px;
  outline: none;
  margin-bottom: 24px;
}

.p3-adrawer-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--apple-text-secondary);
  text-transform: uppercase;
  padding: 14px 14px 6px;
}

.p3-adrawer-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--apple-text-main);
  border-radius: var(--apple-radius-sm);
  margin-bottom: 3px;
  text-decoration: none;
  transition: var(--apple-transition);
}

.p3-adrawer-nav a:hover,
.p3-adrawer-nav a:active {
  background: var(--apple-bg-subtle);
  color: var(--apple-blue);
}

.p3-adrawer-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--apple-radius-pill);
  background: rgba(0, 113, 227, 0.12);
  color: var(--apple-blue);
}

.p3-adrawer-viewer {
  background: rgba(147, 51, 234, 0.06);
  border: 1px solid rgba(147, 51, 234, 0.22);
  color: #7c3aed !important;
}
.p3-adrawer-viewer .p3-adrawer-pill {
  background: rgba(147, 51, 234, 0.15);
  color: #7c3aed;
}

.p3-adrawer-calc {
  background: rgba(0, 113, 227, 0.05);
  border: 1px solid rgba(0, 113, 227, 0.2);
  color: var(--apple-blue) !important;
}
.p3-adrawer-calc .p3-adrawer-pill {
  background: rgba(0, 113, 227, 0.14);
  color: var(--apple-blue);
}

.p3-adrawer-enc {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.22);
  color: #059669 !important;
}
.p3-adrawer-enc .p3-adrawer-pill {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.p3-adrawer-gear {
  background: rgba(0, 113, 227, 0.05);
  border: 1px solid rgba(0, 113, 227, 0.18);
  color: var(--apple-blue) !important;
}

.p3-adrawer-custom {
  background: var(--apple-blue-subtle) !important;
  color: var(--apple-blue) !important;
  border: 1px solid rgba(0, 113, 227, 0.25);
  font-weight: 700 !important;
}

/* --------------------------------------------------------------------------
   12. WOOCOMMERCE SINGLE PRODUCT OVERRIDES (APPLE STYLE)
   -------------------------------------------------------------------------- */
.p3-apple-single-product div.product {
  background: #ffffff;
  border-radius: var(--apple-radius-lg);
  border: 1px solid var(--apple-border);
  box-shadow: var(--apple-shadow-md);
  padding: 40px;
}

.p3-apple-single-product .product_title {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--apple-text-main);
  margin-bottom: 12px;
}

.p3-apple-single-product p.price {
  font-size: 24px;
  font-weight: 700;
  color: var(--apple-text-main) !important;
  margin-bottom: 24px;
}

.p3-apple-single-product .single_add_to_cart_button {
  background: var(--apple-blue) !important;
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  padding: 14px 36px !important;
  border-radius: var(--apple-radius-pill) !important;
  border: none !important;
  box-shadow: 0 4px 15px rgba(0, 113, 227, 0.25) !important;
  transition: var(--apple-transition) !important;
}

.p3-apple-single-product .single_add_to_cart_button:hover {
  background: var(--apple-blue-hover) !important;
  transform: scale(1.02);
}

.p3-apple-archive-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--apple-text-main);
  margin-bottom: 24px;
}

.p3-apple-loop-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--apple-border);
  font-size: 14px;
  color: var(--apple-text-secondary);
}

/* --------------------------------------------------------------------------
   13. QUICK SECTORS PILLS (HERO EXTENSION)
   -------------------------------------------------------------------------- */
.p3-quick-sectors {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
  font-size: 13px;
}

.p3-qs-label {
  color: var(--apple-text-secondary);
  font-weight: 500;
}

.p3-qs-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.p3-qs-pills a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  border: 1px solid var(--apple-border);
  padding: 6px 14px;
  border-radius: var(--apple-radius-pill);
  font-weight: 600;
  color: var(--apple-text-main);
  box-shadow: var(--apple-shadow-sm);
  transition: var(--apple-transition);
}

.p3-qs-pills a:hover {
  background: var(--apple-bg-subtle);
  border-color: var(--apple-blue);
  color: var(--apple-blue);
  transform: translateY(-1px);
}

.p3-badge-bottom-right {
  bottom: 24px;
  right: 24px;
}

/* --------------------------------------------------------------------------
   14. INTERACTIVE MATERIAL LAB SECTION
   -------------------------------------------------------------------------- */
.p3-material-lab-section {
  padding: 80px 0;
  background: var(--apple-bg-subtle);
}

.p3-mat-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.p3-mat-btn {
  background: #ffffff;
  border: 1px solid var(--apple-border);
  color: var(--apple-text-main);
  padding: 10px 20px;
  border-radius: var(--apple-radius-pill);
  font-family: var(--apple-font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--apple-shadow-sm);
  transition: var(--apple-transition);
}

.p3-mat-btn:hover {
  border-color: var(--apple-blue);
}

.p3-mat-btn.is-active {
  background: var(--apple-blue);
  color: #ffffff;
  border-color: var(--apple-blue);
  box-shadow: 0 4px 15px rgba(0, 113, 227, 0.3);
}

.p3-mat-card {
  background: #ffffff;
  border-radius: var(--apple-radius-lg);
  border: 1px solid var(--apple-border);
  box-shadow: var(--apple-shadow-md);
  padding: 40px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 48px;
}

@media (max-width: 991px) {
  .p3-mat-card {
    grid-template-columns: 1fr;
    padding: 30px 24px;
  }
}

.p3-mat-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--apple-blue);
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.p3-mat-info h3 {
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--apple-text-main);
  margin-bottom: 14px;
}

.p3-mat-info p {
  font-size: 15px;
  color: var(--apple-text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.p3-mat-application {
  background: var(--apple-bg-subtle);
  border-radius: var(--apple-radius-md);
  padding: 14px 18px;
  font-size: 13.5px;
  color: var(--apple-text-main);
  border-left: 3px solid var(--apple-blue);
}

.p3-mat-gauges {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--apple-bg-subtle);
  border-radius: var(--apple-radius-md);
  padding: 28px;
}

.p3-gauge-row {
  display: grid;
  grid-template-columns: 140px 1fr 60px;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}

@media (max-width: 575px) {
  .p3-gauge-row { grid-template-columns: 110px 1fr 45px; font-size: 12px; }
}

.p3-gauge-label {
  font-weight: 600;
  color: var(--apple-text-main);
}

.p3-gauge-track {
  background: rgba(0, 0, 0, 0.08);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
}

.p3-gauge-fill {
  height: 100%;
  background: linear-gradient(90deg, #0071e3, #2997ff);
  border-radius: 4px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.p3-gauge-val {
  font-family: var(--apple-font-mono);
  font-weight: 700;
  color: var(--apple-blue);
  text-align: right;
}

/* --------------------------------------------------------------------------
   15. BROKEN VS 3D REBUILT VALUE PROPOSITION
   -------------------------------------------------------------------------- */
.p3-compare-section {
  padding: 60px 0;
  background: #ffffff;
}

.p3-compare-box {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: var(--apple-bg-subtle);
  border-radius: var(--apple-radius-lg);
  border: 1px solid var(--apple-border);
  overflow: hidden;
  box-shadow: var(--apple-shadow-sm);
}

@media (max-width: 860px) {
  .p3-compare-box {
    grid-template-columns: 1fr;
  }
}

.p3-compare-col {
  padding: 44px;
}

@media (max-width: 575px) {
  .p3-compare-col { padding: 28px 20px; }
}

.p3-compare-tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: var(--apple-radius-pill);
  margin-bottom: 14px;
}

.p3-tag-danger {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

.p3-tag-success {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.p3-compare-col h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--apple-text-main);
}

.p3-compare-col ul {
  list-style: none;
}

.p3-compare-col li {
  position: relative;
  padding-left: 20px;
  font-size: 14.5px;
  color: var(--apple-text-secondary);
  line-height: 1.5;
  margin-bottom: 10px;
}

.p3-compare-col li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: var(--apple-blue);
  font-size: 18px;
  line-height: 1;
}

.p3-col-broken li::before {
  color: #dc2626;
}

.p3-compare-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.p3-divider-vs {
  width: 44px;
  height: 44px;
  background: #ffffff;
  border: 1px solid var(--apple-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: var(--apple-text-main);
  box-shadow: var(--apple-shadow-sm);
}

/* --------------------------------------------------------------------------
   16. FILTER TABS & PRODUCT UPGRADE
   -------------------------------------------------------------------------- */
.p3-filter-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.p3-ftab {
  background: var(--apple-bg-subtle);
  border: 1px solid var(--apple-border);
  color: var(--apple-text-main);
  padding: 8px 18px;
  border-radius: var(--apple-radius-pill);
  font-family: var(--apple-font);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--apple-transition);
}

.p3-ftab:hover {
  background: #ebebee;
}

.p3-ftab.is-active {
  background: var(--apple-text-main);
  color: #ffffff;
  border-color: var(--apple-text-main);
}

/* --------------------------------------------------------------------------
   17. REVIEWS & SOCIAL PROOF
   -------------------------------------------------------------------------- */
.p3-reviews-section {
  padding: 80px 0;
  background: var(--apple-bg-subtle);
}

.p3-rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--apple-border);
  padding: 6px 16px;
  border-radius: var(--apple-radius-pill);
  font-size: 13px;
  margin-top: 14px;
}

.p3-stars {
  color: #f59e0b;
  font-size: 14px;
  letter-spacing: 2px;
}

.p3-reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 991px) {
  .p3-reviews-grid { grid-template-columns: 1fr; }
}

.p3-review-card {
  background: #ffffff;
  border-radius: var(--apple-radius-lg);
  border: 1px solid var(--apple-border);
  padding: 32px;
  box-shadow: var(--apple-shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.p3-rc-stars {
  color: #f59e0b;
  font-size: 15px;
  letter-spacing: 2px;
  margin-bottom: 14px;
}

.p3-rc-text {
  font-size: 14.5px;
  color: var(--apple-text-main);
  line-height: 1.6;
  margin-bottom: 20px;
  font-style: italic;
  flex: 1;
}

.p3-rc-author strong {
  display: block;
  font-size: 14px;
  color: var(--apple-text-main);
}

.p3-rc-author small {
  display: block;
  font-size: 12px;
  color: var(--apple-text-secondary);
}

/* --------------------------------------------------------------------------
   GEAR GENERATOR PAGE
   -------------------------------------------------------------------------- */
.p3-gear-page { background: var(--apple-bg-subtle); }

.p3-gear-intro {
  padding-top: 56px;
  padding-bottom: 32px;
  text-align: center;
}
.p3-gear-kicker {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--apple-radius-pill);
  background: var(--apple-blue-subtle);
  color: var(--apple-blue);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.p3-gear-intro h1 {
  margin: 16px 0 12px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.p3-gear-intro p {
  max-width: 640px;
  margin: 0 auto;
  font-size: 17px;
  color: var(--apple-text-tertiary);
}

.p3-gear-stage {
  position: relative;
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  border-radius: var(--apple-radius-lg);
  overflow: hidden;
  background: #0a192f;
  border: 1px solid var(--apple-border);
  box-shadow: var(--apple-shadow-lg);
}
.p3-gear-frame {
  display: block;
  width: 100%;
  height: clamp(640px, 82vh, 980px);
  border: 0;
}
.p3-gear-stage:fullscreen { width: 100%; border-radius: 0; }
.p3-gear-stage:fullscreen .p3-gear-frame { height: 100vh; }
.p3-gear-fs {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--apple-border);
  border-radius: var(--apple-radius-pill);
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: var(--apple-blur);
  backdrop-filter: var(--apple-blur);
  color: var(--apple-text-main);
  font: 500 13px var(--apple-font);
  cursor: pointer;
  transition: var(--apple-transition);
}
.p3-gear-fs svg { width: 16px; height: 16px; }
.p3-gear-fs:hover { background: #fff; box-shadow: var(--apple-shadow-md); }
.p3-gear-fs:focus-visible { outline: 2px solid var(--apple-blue); outline-offset: 2px; }

.p3-gear-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 40px auto 64px;
  padding: 32px 36px;
  border-radius: var(--apple-radius-lg);
  background: var(--apple-bg-dark);
  color: #fff;
}
.p3-gear-cta h2 { font-size: 24px; letter-spacing: -0.02em; margin-bottom: 6px; }
.p3-gear-cta p { color: rgba(255, 255, 255, 0.7); max-width: 560px; }
.p3-gear-cta-btn {
  flex: none;
  padding: 12px 24px;
  border-radius: var(--apple-radius-pill);
  background: var(--apple-blue);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: var(--apple-transition);
}
.p3-gear-cta-btn:hover { background: var(--apple-blue-hover); }

@media (max-width: 720px) {
  .p3-gear-intro { padding-top: 36px; }
  .p3-gear-frame { height: 85vh; min-height: 560px; }
  .p3-gear-cta { flex-direction: column; align-items: flex-start; padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .p3-gear-fs, .p3-gear-cta-btn { transition: none; }
}

/* --------------------------------------------------------------------------
   GEAR PAGE SEO CONTENT & FAQ (Apple Card Style)
   -------------------------------------------------------------------------- */
.p3-gear-seo-content {
  margin: 0 auto 80px;
  padding: 0 16px;
}
.p3-gear-seo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}
.p3-gear-seo-col {
  background: #ffffff;
  border: 1px solid var(--apple-border);
  border-radius: var(--apple-radius-lg);
  padding: 32px;
  box-shadow: var(--apple-shadow-sm);
}
.p3-gear-seo-col h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--apple-text-main);
}
.p3-gear-seo-col p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--apple-text-tertiary);
}
.p3-gear-faq {
  background: #ffffff;
  border: 1px solid var(--apple-border);
  border-radius: var(--apple-radius-lg);
  padding: 36px 32px;
  box-shadow: var(--apple-shadow-sm);
}
.p3-gear-faq h3 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--apple-text-main);
}
.p3-faq-item {
  border-bottom: 1px solid var(--apple-border-light);
  padding: 16px 0;
  transition: var(--apple-transition);
}
.p3-faq-item:last-child {
  border-bottom: none;
}
.p3-faq-item summary {
  font-size: 16px;
  font-weight: 600;
  color: var(--apple-text-main);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.p3-faq-item summary::-webkit-details-marker {
  display: none;
}
.p3-faq-item summary::after {
  content: '+';
  font-size: 20px;
  font-weight: 400;
  color: var(--apple-blue);
  transition: transform 0.2s ease;
}
.p3-faq-item[open] summary::after {
  transform: rotate(45deg);
}
.p3-faq-item p {
  margin-top: 12px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--apple-text-tertiary);
}

@media (max-width: 800px) {
  .p3-gear-seo-grid { grid-template-columns: 1fr; }
  .p3-gear-seo-col, .p3-gear-faq { padding: 24px; }
}

/* --------------------------------------------------------------------------
   15. GLOBAL APPLE PAGES & WOOCOMMERCE ESSENTIALS (CART, CHECKOUT, ACCOUNT)
   -------------------------------------------------------------------------- */
.p3-apple-page {
  padding: 48px 0 80px;
  min-height: 60vh;
}

.p3-apple-page-header {
  margin-bottom: 36px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--apple-border-light);
}

.p3-apple-page-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--apple-text-main);
  margin: 0;
}

.p3-apple-page-body {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--apple-text-main);
}

.p3-apple-page-body p {
  margin-bottom: 20px;
}

.p3-apple-page-body h2 {
  font-size: 26px;
  font-weight: 700;
  margin: 36px 0 16px;
  color: var(--apple-text-main);
}

.p3-apple-page-body h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 28px 0 12px;
  color: var(--apple-text-main);
}

/* Form inputs (Quote page, WooCommerce checkout, Account) */
.p3-apple-page input[type="text"],
.p3-apple-page input[type="email"],
.p3-apple-page input[type="tel"],
.p3-apple-page input[type="password"],
.p3-apple-page input[type="number"],
.p3-apple-page input[type="search"],
.p3-apple-page select,
.p3-apple-page textarea,
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
  width: 100%;
  background: var(--apple-bg-subtle);
  border: 1px solid var(--apple-border);
  border-radius: var(--apple-radius-sm);
  padding: 12px 16px;
  font-size: 14.5px;
  font-family: var(--apple-font);
  color: var(--apple-text-main);
  outline: none;
  transition: var(--apple-transition);
  box-sizing: border-box;
}

.p3-apple-page input:focus,
.p3-apple-page select:focus,
.p3-apple-page textarea:focus,
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus {
  background: #ffffff;
  border-color: var(--apple-blue);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

/* Primary buttons in pages & WooCommerce */
.p3-apple-page input[type="submit"],
.p3-apple-page button[type="submit"],
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #payment #place_order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--apple-blue);
  color: #ffffff !important;
  font-family: var(--apple-font);
  font-size: 14.5px;
  font-weight: 600;
  border-radius: var(--apple-radius-pill);
  padding: 12px 28px;
  border: none;
  cursor: pointer;
  transition: var(--apple-transition);
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.25);
  text-decoration: none;
}

.p3-apple-page input[type="submit"]:hover,
.p3-apple-page button[type="submit"]:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #payment #place_order:hover {
  background: var(--apple-blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.35);
}

/* WooCommerce Cart & Checkout Cards */
.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce,
.woocommerce-account .woocommerce {
  background: #ffffff;
  border: 1px solid var(--apple-border);
  border-radius: var(--apple-radius-lg);
  padding: clamp(20px, 3vw, 40px);
  box-shadow: var(--apple-shadow-md);
}

.woocommerce table.shop_table {
  border: 1px solid var(--apple-border);
  border-radius: var(--apple-radius-md);
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 30px;
}

.woocommerce table.shop_table th {
  background: var(--apple-bg-subtle);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 18px;
  border-bottom: 1px solid var(--apple-border);
}

.woocommerce table.shop_table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--apple-border-light);
  font-size: 14.5px;
}

.woocommerce table.shop_table tr:last-child td {
  border-bottom: none;
}

.woocommerce .cart-collaterals .cart_totals {
  background: var(--apple-bg-subtle);
  border: 1px solid var(--apple-border);
  border-radius: var(--apple-radius-md);
  padding: 24px;
}

.woocommerce #payment {
  background: var(--apple-bg-subtle);
  border: 1px solid var(--apple-border);
  border-radius: var(--apple-radius-md);
  padding: 20px;
}

/* --------------------------------------------------------------------------
   16. ENCYCLOPEDIA & FILAMENT GUIDE (3DPRIME ACADEMY)
   -------------------------------------------------------------------------- */
.p3-enc-page {
  padding: 32px 0 80px;
}

.p3-enc-hero {
  text-align: center;
  padding: 40px 0 50px;
  background: radial-gradient(circle at 50% 10%, rgba(0, 113, 227, 0.05) 0%, transparent 70%);
}

.p3-enc-hero-inner {
  max-width: 860px;
  margin: 0 auto;
}

.p3-enc-title {
  font-size: clamp(30px, 4.5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--apple-text-main);
  line-height: 1.15;
  margin: 16px 0 18px;
}

.p3-enc-subtitle {
  font-size: clamp(15px, 1.8vw, 17.5px);
  line-height: 1.6;
  color: var(--apple-text-secondary);
  max-width: 720px;
  margin: 0 auto 30px;
}

.p3-enc-quicknav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.p3-enc-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: #ffffff;
  border: 1px solid var(--apple-border);
  border-radius: var(--apple-radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--apple-text-main);
  box-shadow: var(--apple-shadow-sm);
  transition: var(--apple-transition);
  text-decoration: none;
}

.p3-enc-pill:hover {
  background: var(--apple-blue);
  color: #ffffff;
  border-color: var(--apple-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.25);
}

.p3-enc-section {
  padding: 60px 0 30px;
}

.p3-enc-section-head {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 40px;
}

.p3-enc-section-head h2 {
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--apple-text-main);
  margin: 10px 0 12px;
}

.p3-enc-section-head p {
  font-size: 15px;
  color: var(--apple-text-secondary);
  line-height: 1.6;
}

/* Filament Cards Grid */
.p3-enc-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 24px;
}

.p3-enc-card {
  background: #ffffff;
  border: 1px solid var(--apple-border);
  border-radius: var(--apple-radius-lg);
  padding: 28px;
  box-shadow: var(--apple-shadow-sm);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.p3-enc-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--apple-shadow-lg);
  border-color: rgba(0, 113, 227, 0.3);
}

.p3-enc-highlight {
  border-color: rgba(0, 113, 227, 0.25);
  background: linear-gradient(180deg, #ffffff 0%, #fafcff 100%);
}

.p3-enc-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.p3-enc-card-icon {
  font-size: 32px;
  line-height: 1;
}

.p3-enc-card-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--apple-text-secondary);
  margin-bottom: 4px;
}

.p3-tag-pro {
  color: var(--apple-blue);
}

.p3-enc-card h3 {
  font-size: 21px;
  font-weight: 700;
  color: var(--apple-text-main);
  margin: 0;
}

.p3-enc-card h3 small {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--apple-text-secondary);
}

.p3-enc-card-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--apple-text-secondary);
  margin-bottom: 20px;
}

.p3-enc-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: var(--apple-bg-subtle);
  border: 1px solid var(--apple-border-light);
  border-radius: var(--apple-radius-md);
  padding: 14px;
  margin-bottom: 20px;
}

.p3-spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.p3-spec-item span {
  font-size: 11px;
  font-weight: 600;
  color: var(--apple-text-secondary);
  text-transform: uppercase;
}

.p3-spec-item strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--apple-text-main);
}

.p3-grade-easy { color: #34c759 !important; }
.p3-grade-mid { color: #ff9500 !important; }
.p3-grade-hard { color: #0071e3 !important; }

.p3-enc-box-what {
  background: #ffffff;
  border: 1px solid var(--apple-border);
  border-radius: var(--apple-radius-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
  flex-grow: 1;
}

.p3-enc-box-what strong {
  display: block;
  font-size: 12.5px;
  color: var(--apple-text-main);
  margin-bottom: 8px;
}

.p3-enc-box-what ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.p3-enc-box-what li {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--apple-text-main);
  margin-bottom: 6px;
  position: relative;
  padding-left: 14px;
}

.p3-enc-box-what li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--apple-blue);
  font-weight: bold;
}

.p3-enc-limits {
  border-top: 1px solid var(--apple-border-light);
  padding-top: 10px;
  color: var(--apple-text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

/* Comparison Table */
.p3-enc-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #ffffff;
  border: 1px solid var(--apple-border);
  border-radius: var(--apple-radius-lg);
  box-shadow: var(--apple-shadow-sm);
}

.p3-enc-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.p3-enc-table th {
  background: var(--apple-bg-subtle);
  padding: 16px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--apple-text-secondary);
  border-bottom: 1px solid var(--apple-border);
  white-space: nowrap;
}

.p3-enc-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--apple-border-light);
  color: var(--apple-text-main);
  vertical-align: middle;
}

.p3-tr-highlight {
  background: rgba(0, 113, 227, 0.03);
}

.p3-pill-top { background: rgba(0, 113, 227, 0.15); color: #0071e3; padding: 2px 8px; border-radius: 4px; font-weight: 700; font-size: 11px; }
.p3-pill-high { background: rgba(52, 199, 89, 0.15); color: #28a745; padding: 2px 8px; border-radius: 4px; font-weight: 700; font-size: 11px; }
.p3-pill-mid { background: rgba(255, 149, 0, 0.15); color: #d97706; padding: 2px 8px; border-radius: 4px; font-weight: 700; font-size: 11px; }
.p3-pill-low { background: rgba(108, 117, 125, 0.15); color: #6c757d; padding: 2px 8px; border-radius: 4px; font-weight: 600; font-size: 11px; }
.p3-pill-none { background: rgba(230, 230, 230, 0.5); color: #888; padding: 2px 8px; border-radius: 4px; font-size: 11px; }
.p3-pill-easy { background: rgba(52, 199, 89, 0.12); color: #28a745; padding: 2px 8px; border-radius: 4px; font-weight: 700; font-size: 11px; }
.p3-pill-hard { background: rgba(0, 113, 227, 0.12); color: #0071e3; padding: 2px 8px; border-radius: 4px; font-weight: 700; font-size: 11px; }

/* Decision Wizard Grid */
.p3-wiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.p3-wiz-card {
  background: #ffffff;
  border: 1px solid var(--apple-border);
  border-radius: var(--apple-radius-lg);
  padding: 24px;
  box-shadow: var(--apple-shadow-sm);
  display: flex;
  flex-direction: column;
}

.p3-wiz-badge {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--apple-blue);
  margin-bottom: 8px;
}

.p3-wiz-card h4 {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--apple-text-main);
  margin: 0 0 10px;
}

.p3-wiz-card p {
  font-size: 13.5px;
  color: var(--apple-text-secondary);
  line-height: 1.55;
  margin-bottom: 16px;
  flex-grow: 1;
}

.p3-wiz-choice {
  background: var(--apple-blue-subtle);
  border: 1px solid rgba(0, 113, 227, 0.2);
  border-radius: var(--apple-radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.p3-wiz-choice span {
  font-size: 12px;
  font-weight: 600;
  color: var(--apple-text-secondary);
}

.p3-wiz-choice strong {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--apple-blue);
}

/* FAQ Container */
.p3-faq-container {
  max-width: 860px;
  margin: 0 auto;
}

.p3-faq-item {
  background: #ffffff;
  border: 1px solid var(--apple-border);
  border-radius: var(--apple-radius-md);
  margin-bottom: 14px;
  box-shadow: var(--apple-shadow-sm);
  transition: var(--apple-transition);
}

.p3-faq-item[open] {
  border-color: rgba(0, 113, 227, 0.4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.p3-faq-item summary {
  padding: 18px 24px;
  font-size: 16px;
  font-weight: 700;
  color: var(--apple-text-main);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  outline: none;
}

.p3-faq-item summary::-webkit-details-marker {
  display: none;
}

.p3-faq-item summary::after {
  content: '+';
  font-size: 22px;
  font-weight: 400;
  color: var(--apple-blue);
  transition: transform 0.25s ease;
  margin-left: 12px;
}

.p3-faq-item[open] summary::after {
  transform: rotate(45deg);
}

.p3-faq-content {
  padding: 0 24px 22px;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--apple-text-main);
  border-top: 1px solid var(--apple-border-light);
  margin-top: 4px;
  padding-top: 14px;
}

.p3-faq-content p {
  margin-bottom: 12px;
}

.p3-faq-content ul, .p3-faq-content ol {
  margin-bottom: 12px;
  padding-left: 20px;
}

.p3-faq-content li {
  margin-bottom: 6px;
}

/* Encyclopedia CTA Box */
.p3-enc-cta-box {
  background: linear-gradient(135deg, #f5f9ff 0%, #ffffff 100%);
  border: 1px solid rgba(0, 113, 227, 0.2);
  border-radius: var(--apple-radius-xl);
  padding: 48px 32px;
  text-align: center;
  box-shadow: var(--apple-shadow-md);
  margin-top: 60px;
}

.p3-enc-cta-inner {
  max-width: 720px;
  margin: 0 auto;
}

.p3-enc-cta-inner h3 {
  font-size: clamp(24px, 3.2vw, 32px);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--apple-text-main);
  margin: 14px 0 12px;
}

.p3-enc-cta-inner p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--apple-text-secondary);
  margin-bottom: 28px;
}

.p3-enc-cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .p3-enc-cards-grid {
    grid-template-columns: 1fr;
  }
  .p3-enc-card {
    padding: 22px;
  }
  .p3-enc-cta-box {
    padding: 32px 20px;
  }
  .p3-enc-cta-actions {
    flex-direction: column;
    width: 100%;
  }
  .p3-enc-cta-actions a {
    width: 100%;
    justify-content: center;
  }
}
/* --------------------------------------------------------------------------
   17. 3D PRINTING CALCULATORS & TECHNICAL TOOLS (APPLE WHITE)
   -------------------------------------------------------------------------- */
.p3-calc-page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 36px 20px 80px;
}

.p3-calc-hero {
  text-align: center;
  margin-bottom: 36px;
}

.p3-calc-hero-inner {
  max-width: 860px;
  margin: 0 auto;
}

.p3-calc-title {
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 16px 0 14px;
  color: var(--apple-text-main);
}

.p3-calc-subtitle {
  font-size: 17px;
  line-height: 1.6;
  color: var(--apple-text-secondary);
  max-width: 760px;
  margin: 0 auto 30px;
}

.p3-calc-tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.p3-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--apple-radius-pill);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 14px;
  font-weight: 600;
  color: var(--apple-text-main);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.p3-tab-btn:hover {
  background: rgba(0, 113, 227, 0.06);
  border-color: rgba(0, 113, 227, 0.3);
  color: var(--apple-blue);
  transform: translateY(-1px);
}

.p3-tab-btn.is-active {
  background: var(--apple-blue);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(0, 113, 227, 0.35);
}

.p3-tab-icon {
  font-size: 16px;
}

.p3-calc-panel {
  margin-bottom: 48px;
  animation: p3FadeIn 0.3s ease;
}

.p3-panel-head {
  text-align: center;
  margin-bottom: 28px;
}

.p3-panel-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--apple-blue);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.p3-panel-head h2 {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--apple-text-main);
  margin-bottom: 8px;
}

.p3-panel-head p {
  font-size: 15px;
  color: var(--apple-text-secondary);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.5;
}

.p3-calc-grid {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 28px;
  align-items: start;
}

.p3-calc-card {
  background: var(--apple-card-bg, #ffffff);
  border: 1px solid var(--apple-card-border, rgba(0, 0, 0, 0.08));
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.p3-inputs-card h3,
.p3-results-card h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--apple-text-main);
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.p3-field-group {
  margin-bottom: 20px;
}

.p3-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.p3-field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.p3-field-group label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--apple-text-main);
  margin-bottom: 6px;
}

.p3-field-val {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--apple-blue);
}

.p3-calc-page select,
.p3-calc-page .p3-select {
  display: block !important;
  width: 100% !important;
  height: 48px !important;
  min-height: 48px !important;
  line-height: 24px !important;
  font-size: 14.5px !important;
  font-family: inherit !important;
  padding: 11px 40px 11px 16px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(0, 0, 0, 0.14) !important;
  background-color: #fbfbfd !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230071e3' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: calc(100% - 14px) center !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  color: var(--apple-text-main) !important;
  box-sizing: border-box !important;
  outline: none !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.p3-calc-page input[type="number"],
.p3-calc-page input[type="text"],
.p3-calc-page .p3-input {
  display: block !important;
  width: 100% !important;
  height: 48px !important;
  min-height: 48px !important;
  line-height: 24px !important;
  font-size: 14.5px !important;
  font-family: inherit !important;
  padding: 11px 16px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(0, 0, 0, 0.14) !important;
  background: #fbfbfd !important;
  color: var(--apple-text-main) !important;
  box-sizing: border-box !important;
  outline: none !important;
  transition: all 0.2s ease !important;
}

.p3-calc-page select:focus,
.p3-calc-page .p3-select:focus,
.p3-calc-page input:focus,
.p3-calc-page .p3-input:focus {
  border-color: var(--apple-blue) !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 3.5px rgba(0, 113, 227, 0.15) !important;
}

.p3-calc-page .p3-mini-input {
  display: inline-block !important;
  width: 105px !important;
  height: 38px !important;
  min-height: 38px !important;
  line-height: 20px !important;
  padding: 8px 12px !important;
  font-size: 14px !important;
  margin-top: 8px !important;
  border-radius: 10px !important;
}

.p3-range {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e5e5ea;
  outline: none;
  accent-color: var(--apple-blue);
  cursor: pointer;
  margin: 6px 0;
}

.p3-quick-pills {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.p3-mini-pill {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--apple-radius-pill);
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #f5f5f7;
  color: var(--apple-text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.p3-mini-pill:hover,
.p3-mini-pill.is-active {
  background: rgba(0, 113, 227, 0.12);
  color: var(--apple-blue);
  border-color: rgba(0, 113, 227, 0.25);
}

.p3-kpi-block {
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.06) 0%, rgba(0, 113, 227, 0.01) 100%);
  border: 1px solid rgba(0, 113, 227, 0.2);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  margin-bottom: 22px;
}

.p3-kpi-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--apple-text-secondary);
  text-transform: uppercase;
}

.p3-kpi-val {
  font-size: clamp(30px, 3.5vw, 42px);
  font-weight: 800;
  color: var(--apple-blue);
  letter-spacing: -0.03em;
  margin: 6px 0 4px;
}

.p3-kpi-sub {
  font-size: 13px;
  color: var(--apple-text-secondary);
}

.p3-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
}

.p3-subkpi {
  background: #f9f9fb;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.p3-subkpi-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--apple-text-secondary);
}

.p3-subkpi-val {
  font-size: 18px;
  font-weight: 700;
  color: var(--apple-text-main);
  letter-spacing: -0.01em;
}

.p3-subkpi-total {
  grid-column: span 2;
  background: rgba(0, 113, 227, 0.04);
  border-color: rgba(0, 113, 227, 0.16);
}

.p3-bar-wrap {
  margin-bottom: 22px;
}

.p3-bar-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--apple-text-secondary);
  margin-bottom: 6px;
}

.p3-prog-bar {
  height: 12px;
  background: #e5e5ea;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  margin-bottom: 8px;
}

.p3-bar-seg {
  height: 100%;
  transition: width 0.3s ease;
}

.p3-seg-mat { background: #0071e3; }
.p3-seg-elec { background: #f59e0b; }
.p3-seg-depr { background: #10b981; }

.p3-bar-legend {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--apple-text-secondary);
  flex-wrap: wrap;
  gap: 8px;
}

.p3-bar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.p3-bar-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.p3-dot-mat { background: #0071e3; }
.p3-dot-elec { background: #f59e0b; }
.p3-dot-depr { background: #10b981; }

.p3-btn-copy {
  width: 100%;
  padding: 13px;
  background: #f5f5f7;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--apple-text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.p3-btn-copy:hover {
  background: rgba(0, 113, 227, 0.08);
  color: var(--apple-blue);
  border-color: rgba(0, 113, 227, 0.2);
}

/* Gauge circle for Spool remaining */
.p3-gauge-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.p3-gauge-circle {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 6px solid rgba(0, 113, 227, 0.15);
  border-top-color: var(--apple-blue);
  border-right-color: var(--apple-blue);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fbfbfd;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.03);
}

.p3-gauge-number {
  font-size: 32px;
  font-weight: 800;
  color: var(--apple-blue);
  letter-spacing: -0.02em;
}

.p3-gauge-unit {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--apple-text-secondary);
  text-align: center;
  max-width: 120px;
  margin-top: 4px;
}

.p3-spool-bar-wrap {
  margin-bottom: 22px;
}

.p3-spool-bar {
  height: 12px;
  background: #e5e5ea;
  border-radius: 6px;
  overflow: hidden;
}

.p3-spool-fill {
  height: 100%;
  background: var(--apple-blue);
  transition: width 0.3s ease;
}

.p3-equiv-box {
  background: #f9f9fb;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 18px 20px;
}

.p3-equiv-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--apple-text-main);
  margin-bottom: 10px;
}

.p3-equiv-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--apple-text-secondary);
}

.p3-equiv-list strong {
  color: var(--apple-text-main);
}

.p3-tip-card {
  background: rgba(0, 113, 227, 0.04);
  border: 1px solid rgba(0, 113, 227, 0.16);
  border-radius: 14px;
  padding: 18px 20px;
  margin-top: 20px;
}

.p3-tip-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--apple-blue);
  margin-bottom: 8px;
}

.p3-tip-body {
  font-size: 13px;
  line-height: 1.6;
  color: var(--apple-text-secondary);
  margin: 0;
}

.p3-tip-body code {
  background: rgba(0, 113, 227, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--apple-blue);
  font-weight: 600;
  font-family: monospace;
}

/* Flow rate dynamic styles */
.p3-flow-safe {
  border-color: rgba(16, 185, 129, 0.35) !important;
  background: rgba(16, 185, 129, 0.05) !important;
}
.p3-flow-safe .p3-kpi-val { color: #10b981 !important; }

.p3-flow-warn {
  border-color: rgba(245, 158, 11, 0.35) !important;
  background: rgba(245, 158, 11, 0.05) !important;
}
.p3-flow-warn .p3-kpi-val { color: #f59e0b !important; }

.p3-flow-danger {
  border-color: rgba(239, 68, 68, 0.4) !important;
  background: rgba(239, 68, 68, 0.07) !important;
}
.p3-flow-danger .p3-kpi-val { color: #ef4444 !important; }

/* Calculators CTA Banner */
.p3-calc-cta {
  margin-top: 56px;
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.06) 0%, rgba(0, 113, 227, 0.01) 100%);
  border: 1px solid rgba(0, 113, 227, 0.16);
  border-radius: 24px;
  padding: 48px 32px;
  text-align: center;
}

.p3-calc-cta-inner {
  max-width: 820px;
  margin: 0 auto;
}

.p3-calc-cta h2 {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  color: var(--apple-text-main);
  margin: 14px 0 12px;
  letter-spacing: -0.02em;
}

.p3-calc-cta p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--apple-text-secondary);
  margin-bottom: 28px;
}

.p3-cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

@media (max-width: 840px) {
  .p3-calc-grid {
    grid-template-columns: 1fr;
  }
  .p3-calc-card {
    padding: 22px;
  }
  .p3-field-row {
    grid-template-columns: 1fr;
  }
  .p3-calc-tabs {
    gap: 8px;
  }
  .p3-tab-btn {
    padding: 10px 14px;
    font-size: 13px;
  }
  .p3-calc-cta {
    padding: 32px 20px;
  }
  .p3-cta-actions {
    flex-direction: column;
    width: 100%;
  }
  .p3-cta-actions a {
    width: 100%;
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   18. 3D STUDIO VIEWER & RENDERING ENGINE (APPLE WHITE PRO)
   -------------------------------------------------------------------------- */
.p3-viewer-page {
  max-width: 1360px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

.p3-viewer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.p3-viewer-title {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--apple-text-main);
  margin: 10px 0 6px;
  line-height: 1.15;
}

.p3-viewer-subtitle {
  font-size: 15px;
  color: var(--apple-text-secondary);
  max-width: 700px;
  line-height: 1.5;
  margin: 0;
}

.p3-viewer-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.p3-btn-upload-label {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.p3-shared-banner {
  background: rgba(0, 113, 227, 0.08);
  border: 1px solid rgba(0, 113, 227, 0.25);
  border-radius: 14px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.p3-shared-icon {
  font-size: 22px;
}

.p3-shared-text {
  font-size: 14px;
  color: var(--apple-text-main);
}

.p3-shared-sub {
  display: block;
  font-size: 12px;
  color: var(--apple-text-secondary);
  margin-top: 2px;
}

/* 3D Main Workspace Container */
.p3-viewer-workspace {
  display: grid;
  grid-template-columns: 1fr 310px;
  background: var(--apple-card-bg, #ffffff);
  border: 1px solid var(--apple-card-border, rgba(0, 0, 0, 0.08));
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
  position: relative;
}

.p3-hud-topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  z-index: 20;
  flex-wrap: wrap;
}

.p3-hud-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.p3-hud-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--apple-text-secondary);
  text-transform: uppercase;
}

.p3-hud-select {
  font-size: 13px;
  font-weight: 600;
  color: var(--apple-text-main);
  background: #fbfbfd;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  padding: 6px 12px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
  cursor: pointer;
}

.p3-hud-select:focus {
  border-color: var(--apple-blue);
}

.p3-hud-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.p3-hud-btn {
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--apple-radius-pill);
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #f5f5f7;
  color: var(--apple-text-main);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.p3-hud-btn:hover,
.p3-hud-btn.is-active {
  background: rgba(0, 113, 227, 0.12);
  color: var(--apple-blue);
  border-color: rgba(0, 113, 227, 0.25);
}

/* 3D Canvas Area */
.p3-canvas-wrapper {
  position: relative;
  width: 100%;
  min-height: 580px;
  height: 600px;
  background: #f5f5f7;
  overflow: hidden;
  touch-action: none;
}

#p3WebGLCanvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Drag & Drop Overlay */
.p3-dropzone-hint {
  position: absolute;
  inset: 0;
  background: rgba(0, 113, 227, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 50;
}

.p3-dropzone-hint.is-active {
  opacity: 1;
  pointer-events: auto;
}

.p3-dropzone-box {
  text-align: center;
  color: #ffffff;
  padding: 24px;
}

.p3-drop-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
}

.p3-dropzone-box strong {
  font-size: 20px;
  display: block;
  margin-bottom: 6px;
}

.p3-dropzone-box small {
  font-size: 13.5px;
  opacity: 0.88;
}

/* Loading Overlay */
.p3-loader-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 40;
}

.p3-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(0, 113, 227, 0.18);
  border-top-color: var(--apple-blue);
  border-radius: 50%;
  animation: p3Spin 0.7s linear infinite;
}

@keyframes p3Spin {
  to { transform: rotate(360deg); }
}

.p3-loader-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--apple-text-main);
}

/* Gizmo Camera Views */
.p3-camera-gizmo {
  position: absolute;
  bottom: 16px;
  left: 16px;
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--apple-radius-pill);
  padding: 4px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  z-index: 25;
}

.p3-gizmo-btn {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--apple-radius-pill);
  border: none;
  background: transparent;
  color: var(--apple-text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.p3-gizmo-btn:hover {
  background: rgba(0, 113, 227, 0.1);
  color: var(--apple-blue);
}

/* Sidebar HUD */
.p3-hud-sidebar {
  padding: 20px;
  background: #fbfbfd;
  border-left: 1px solid rgba(0, 0, 0, 0.06);
}

.p3-hud-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.p3-hud-card-icon {
  font-size: 18px;
}

.p3-hud-card-header h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--apple-text-main);
  margin: 0;
}

.p3-hud-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 8px;
}

.p3-hud-k {
  color: var(--apple-text-secondary);
}

.p3-hud-v {
  font-weight: 700;
  color: var(--apple-text-main);
}

.p3-hud-filename {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--apple-mono, monospace);
  font-size: 11.5px;
}

.p3-hud-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.06);
  margin: 12px 0;
}

.p3-hud-weights {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 16px 0;
}

.p3-hud-weights-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--apple-text-main);
  margin-bottom: 8px;
}

.p3-weight-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 4px;
  color: var(--apple-text-secondary);
}

.p3-weight-row strong {
  color: var(--apple-text-main);
}

.p3-btn-block {
  width: 100%;
  justify-content: center;
  text-align: center;
}

/* Share Modal */
.p3-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.p3-modal-card {
  background: #ffffff;
  border-radius: 22px;
  padding: 28px 32px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
  animation: p3FadeIn 0.25s ease;
}

.p3-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.p3-modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: var(--apple-text-main);
}

.p3-modal-close {
  background: rgba(0, 0, 0, 0.06);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.p3-modal-close:hover {
  background: rgba(0, 0, 0, 0.12);
}

.p3-modal-desc {
  font-size: 13.5px;
  color: var(--apple-text-secondary);
  line-height: 1.5;
  margin-bottom: 18px;
}

.p3-share-input-wrap {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.p3-share-input-wrap input {
  flex: 1;
  font-size: 13px;
  font-family: var(--apple-mono, monospace);
}

.p3-share-extra {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.p3-btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25D366;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--apple-radius-pill);
  text-decoration: none;
  transition: opacity 0.15s;
}

.p3-btn-whatsapp:hover {
  opacity: 0.9;
}

.p3-qr-wrap {
  text-align: center;
  background: #fbfbfd;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 14px;
  width: 100%;
}

.p3-qr-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--apple-text-secondary);
  margin-bottom: 10px;
}

#p3-qr-image {
  border-radius: 10px;
  display: inline-block;
}

/* Feature Info Grid below Viewer */
.p3-viewer-info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.p3-vinfo-card {
  background: var(--apple-card-bg, #ffffff);
  border: 1px solid var(--apple-card-border, rgba(0, 0, 0, 0.08));
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.p3-vinfo-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.p3-vinfo-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--apple-text-main);
  margin: 0 0 8px;
}

.p3-vinfo-card p {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--apple-text-secondary);
  margin: 0;
}

/* Mobile & Tablet Responsive */
@media (max-width: 960px) {
  .p3-viewer-workspace {
    grid-template-columns: 1fr;
  }
  .p3-canvas-wrapper {
    height: 480px;
    min-height: 420px;
  }
  .p3-hud-sidebar {
    border-left: none;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
  }
  .p3-viewer-info-grid {
    grid-template-columns: 1fr 1fr;
  }
  .p3-viewer-top-actions {
    width: 100%;
  }
  .p3-viewer-top-actions > * {
    flex: 1;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .p3-viewer-info-grid {
    grid-template-columns: 1fr;
  }
  .p3-hud-topbar {
    gap: 10px;
    padding: 10px 14px;
  }
  .p3-hud-buttons {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }
  .p3-canvas-wrapper {
    height: 380px;
    min-height: 340px;
  }
}

/* =========================================================
   SECTION 19: 3D METROLOGY & MEASUREMENT TOOLS (CAD SUITE)
   ========================================================= */
.p3-measure-toolbar {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--apple-radius-pill, 980px);
  padding: 4px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  z-index: 30;
}

.p3-measure-btn {
  background: transparent;
  border: none;
  padding: 6px 11px;
  border-radius: var(--apple-radius-pill, 980px);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--apple-text-main);
  transition: all 0.15s ease;
  user-select: none;
}

.p3-measure-btn:hover {
  background: rgba(0, 113, 227, 0.08);
  color: var(--apple-blue);
}

.p3-measure-btn.is-active {
  background: var(--apple-blue);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.35);
}

.p3-measure-btn.p3-m-btn-clear {
  color: #86868b;
  padding: 6px 8px;
}

.p3-measure-btn.p3-m-btn-clear:hover {
  background: rgba(255, 59, 48, 0.12);
  color: #ff3b30;
}

/* Helper Prompt Banner */
.p3-measure-prompt {
  position: absolute;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(24, 24, 26, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: var(--apple-radius-pill, 980px);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 35;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  animation: p3FadeIn 0.2s ease;
  pointer-events: auto;
}

.p3-mp-icon {
  font-size: 14px;
}

.p3-mp-cancel {
  background: rgba(255, 255, 255, 0.18);
  border: none;
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.p3-mp-cancel:hover {
  background: rgba(255, 255, 255, 0.32);
}

/* Dynamic Section Panel */
.p3-section-panel {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 380px;
}

.p3-section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.p3-section-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--apple-text-main);
}

.p3-section-axes {
  display: flex;
  gap: 4px;
}

.p3-axis-btn {
  background: #f5f5f7;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 600;
  color: var(--apple-text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.p3-axis-btn:hover {
  color: var(--apple-blue);
  border-color: rgba(0, 113, 227, 0.3);
}

.p3-axis-btn.is-active {
  background: var(--apple-blue);
  color: #ffffff;
  border-color: var(--apple-blue);
}

.p3-section-slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.p3-slider {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: #d2d2d7;
  outline: none;
  -webkit-appearance: none;
}

.p3-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--apple-blue);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 113, 227, 0.4);
}

.p3-section-val {
  font-family: var(--apple-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  color: var(--apple-text-main);
  min-width: 48px;
  text-align: right;
}

/* Measurement 3D Labels Overlay */
.p3-measure-labels-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 28;
}

.p3-measure-tag {
  position: absolute;
  transform: translate(-50%, -100%);
  margin-top: -8px;
  pointer-events: auto;
  background: rgba(24, 24, 26, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  user-select: none;
}

.p3-measure-tag.p3-tag-hole {
  border-color: rgba(52, 199, 89, 0.5);
}

.p3-measure-tag-del {
  cursor: pointer;
  opacity: 0.6;
  font-size: 10px;
  padding: 0 2px;
  border-radius: 3px;
  transition: opacity 0.15s, background 0.15s;
}

.p3-measure-tag-del:hover {
  opacity: 1;
  background: rgba(255, 59, 48, 0.4);
}

/* Sidebar Measurements Card */
.p3-hud-measures-card {
  margin-bottom: 20px;
}

.p3-hud-badge-count {
  background: var(--apple-blue);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 980px;
  margin-left: auto;
}

.p3-measures-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
}

.p3-measures-empty {
  color: var(--apple-text-secondary);
  font-size: 12px;
  padding: 8px 0;
  text-align: center;
  line-height: 1.45;
}

.p3-measure-entry {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: border-color 0.15s;
}

.p3-measure-entry:hover {
  border-color: var(--apple-blue);
}

.p3-me-left {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.p3-me-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.p3-me-details {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.p3-me-val {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--apple-text-main);
}

.p3-me-sub {
  font-size: 10.5px;
  color: var(--apple-text-secondary);
  font-family: var(--apple-mono, monospace);
}

.p3-me-del {
  background: transparent;
  border: none;
  color: #86868b;
  cursor: pointer;
  font-size: 13px;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.p3-me-del:hover {
  color: #ff3b30;
  background: rgba(255, 59, 48, 0.1);
}

@media (max-width: 768px) {
  .p3-measure-toolbar {
    top: 10px;
    left: 10px;
    right: 10px;
    overflow-x: auto;
    max-width: calc(100% - 20px);
    -webkit-overflow-scrolling: touch;
  }
  .p3-measure-btn .p3-m-text {
    display: none;
  }
  .p3-measure-btn {
    padding: 6px 10px;
  }
  .p3-section-panel {
    left: 10px;
    right: 10px;
    max-width: none;
  }
}

/* =========================================================
   AUTOCAD SUITE: DYNAMIC INPUT & COMMAND LINE HUD
   ========================================================= */
/* AutoCAD Dynamic Input Tooltip (Follows Cursor) */
.p3-cad-dyn-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(18, 18, 22, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 230, 118, 0.45);
  border-radius: 6px;
  padding: 4px 10px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  font-family: var(--apple-mono, 'Consolas', 'Courier New', monospace);
  color: #ffffff;
  font-size: 11.5px;
  white-space: nowrap;
  animation: p3FadeIn 0.15s ease;
}

.p3-cad-snap-glyph {
  color: #00e676; /* AutoCAD neon green OSNAP color */
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.p3-cad-snap-lbl {
  color: #a1a1aa;
  font-weight: 600;
  font-size: 11px;
}

.p3-cad-snap-coord {
  color: #ffd60a; /* AutoCAD dimension yellow */
  font-weight: 700;
  font-size: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  padding-left: 6px;
}

/* AutoCAD Command Line Bar (Bottom of 3D Canvas) */
.p3-cad-command-bar {
  position: absolute;
  bottom: 12px;
  left: 14px;
  right: 14px;
  max-width: 680px;
  background: rgba(15, 17, 23, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 32;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  font-family: var(--apple-mono, 'Consolas', 'Courier New', monospace);
  font-size: 12px;
}

.p3-cad-cmd-prefix {
  color: #00d2ff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.p3-cad-cmd-msg {
  color: #f3f4f6;
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.p3-cad-cmd-esc {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e4e4e7;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.p3-cad-cmd-esc:hover {
  background: rgba(255, 59, 48, 0.4);
  color: #ffffff;
  border-color: #ff3b30;
}

/* AutoCAD Crosshair Canvas Class */
.p3-crosshair-mode {
  cursor: crosshair !important;
}

/* Technical CAD Dimension Badges */
.p3-measure-tag {
  background: rgba(15, 17, 23, 0.95);
  border: 1px solid rgba(255, 214, 10, 0.4);
  color: #ffd60a;
  font-family: var(--apple-mono, 'Consolas', monospace);
}

.p3-measure-tag.p3-tag-hole {
  border-color: rgba(0, 230, 118, 0.6);
  color: #00e676;
}

.p3-measure-tag.p3-tag-angle {
  border-color: rgba(0, 210, 255, 0.6);
  color: #00d2ff;
}

.p3-measure-tag.p3-tag-id {
  border-color: rgba(255, 149, 0, 0.6);
  color: #ff9500;
}

/* ================= CUSTOMIZABLE FILAMENT PRICE STYLES ================= */
.p3-input-affix-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.p3-input-affix-wrap .p3-input,
.p3-input-affix-wrap .p3-hud-price-input {
  width: 100% !important;
  padding-right: 50px !important;
}

.p3-affix-label {
  position: absolute;
  right: 14px;
  font-size: 13px;
  font-weight: 700;
  color: #86868b;
  pointer-events: none;
}

.p3-price-quick-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.p3-pill-caption {
  font-size: 12px;
  font-weight: 600;
  color: #86868b;
}

/* 3D Visualizer HUD Filament Cost Box */
.p3-hud-cost-calc {
  background: rgba(0, 113, 227, 0.04);
  border: 1px solid rgba(0, 113, 227, 0.15);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 14px 0;
}

.p3-hud-cost-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.p3-hud-cost-field label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: #555558;
  margin-bottom: 4px;
}

.p3-hud-field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.p3-hud-price-tag {
  font-size: 11px;
  font-weight: 700;
  color: #0071e3;
  background: rgba(0, 113, 227, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.p3-hud-select,
.p3-hud-price-input {
  width: 100%;
  height: 36px;
  padding: 6px 10px;
  font-size: 12.5px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: #ffffff;
  color: #1d1d1f;
  outline: none;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
}

.p3-hud-select:focus,
.p3-hud-price-input:focus {
  border-color: #0071e3;
}

.p3-hud-cost-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(0, 113, 227, 0.2);
}

.p3-cost-kpi-item {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.p3-cost-kpi-label {
  font-size: 10.5px;
  color: #86868b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.p3-cost-kpi-val {
  font-size: 15px;
  font-weight: 700;
  color: #1d1d1f;
  margin-top: 2px;
}

.p3-cost-kpi-highlight {
  background: #f0f7ff;
  border-color: rgba(0, 113, 227, 0.25);
}

.p3-cost-kpi-highlight .p3-cost-kpi-val {
  color: #0071e3;
  font-size: 16px;
}

