/**
 * PRODEXA marketing — mobil stilleri (max-width breakpoint’ler)
 * Masaüstü: marketing.css | Mobil: bu dosya
 */

@media (max-width: 1100px) {
  .px-nav__link { padding: 0.55rem 0.35rem; font-size: 11px; }
  .px-btn { font-size: 11px; padding: 6px 10px 6px 32px; }
}

@media (max-width: 980px) {
  .px-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .px-actions { display: none; }

  .px-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
    padding: 0.5rem 0 1rem;
    background: #fff;
    border-bottom: 1px solid #e8eef4;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
    max-height: calc(100vh - 75px);
    overflow: auto;
    z-index: 90;
  }

  .px-nav.is-open { display: flex; }

  .px-nav__item {
    width: 100%;
    border-bottom: 1px solid #f1f5f9;
  }

  .px-header .px-nav a.px-nav__link,
  .px-nav__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 14px !important;
    font-weight: 700 !important;
  }

  .px-nav__caret {
    flex-shrink: 0;
    margin-left: 0.5rem;
    transition: transform 0.15s ease;
  }

  .px-nav__item.is-open > .px-nav__link .px-nav__caret {
    transform: rotate(225deg) translateY(1px);
    opacity: 1;
  }

  /* Accordion alt menü — fixed/absolute masaüstü stillerini ezer */
  .px-mega,
  .px-mega--wide,
  .px-mega--urunler,
  .px-mega--ozellikler {
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    display: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    pointer-events: auto !important;
    box-shadow: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    grid-template-columns: 1fr;
    padding: 0 0.75rem 0.75rem 1rem;
    background: #f8fafc;
    z-index: auto !important;
    overflow: visible !important;
  }

  .px-nav__item.is-open > .px-mega,
  .px-nav__item.is-open > .px-mega--wide,
  .px-nav__item.is-open > .px-mega--urunler,
  .px-nav__item.is-open > .px-mega--ozellikler {
    display: block !important;
  }

  .px-nav__item.is-open > .px-mega--wide {
    display: grid !important;
  }

  .px-mega-ozellikler {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .px-mega-ozellikler__main {
    padding: 0.5rem 0 0;
  }

  .px-mega-ozellikler__grid {
    grid-template-columns: 1fr;
    row-gap: 0;
  }

  .px-mega a.px-mega-oz-link {
    padding: 0.7rem 0.35rem;
    font-size: 0.9375rem;
  }

  .px-mega-ozellikler__aside {
    border-left: 0;
    border-top: 1px solid #f3e6d8;
    border-radius: 12px;
    padding: 1rem;
    margin: 0.25rem 0 0.5rem;
  }

  .px-mega-ozellikler__aside-title {
    font-size: 1.05rem;
  }

  .px-mega-urunler {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .px-urun-card { min-height: 72px; border-radius: 4px; }

  .px-mega a:not(.px-urun-card) {
    padding: 0.65rem 0.5rem;
    font-size: 0.875rem;
  }

  .px-hero {
    height: calc(100vh - var(--px-header-h));
    min-height: 460px;
    max-height: 640px;
  }

  body.px-home .px-hero {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  .px-slide__inner { padding: 2.5rem 15px 100px; }
  .px-products { transform: translateY(40%); }
  .px-product { min-height: 58px; padding: 10px 6px; }
  .px-product .px-name { font-size: 0.95rem; }
  .px-footer__inner { grid-template-columns: 1fr 1fr; }
  .px-social { margin-left: 0; width: 100%; }
  .px-compare { grid-template-columns: 1fr; }

  .px-header .px-actions-mobile {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 1rem 0.25rem;
    border-bottom: 0;
  }

  .px-demo--mobile { width: 100%; }
  .px-demo--mobile .px-demo__toggle {
    width: 100%;
    justify-content: center;
    padding-left: 12px;
  }
  .px-demo--mobile .px-demo__panel {
    position: static;
    width: 100%;
    margin-top: 0.5rem;
    border-radius: 10px;
    opacity: 0;
    visibility: hidden;
    transform: none;
    display: none;
    pointer-events: none;
  }
  .px-demo--mobile.is-open .px-demo__panel {
    display: block;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .px-demo--mobile:hover .px-demo__panel {
    display: none;
    opacity: 0;
    visibility: hidden;
  }
  .px-demo--mobile.is-open:hover .px-demo__panel {
    display: block;
    opacity: 1;
    visibility: visible;
  }
  .px-demo--mobile .px-demo__toggle,
  .px-demo--mobile.is-open .px-demo__toggle { border-radius: 8px; }
  .px-demo--mobile.is-open .px-demo__toggle { background: #2196f3; }

  .px-login--mobile { width: 100%; }
  .px-login--mobile .px-login__toggle {
    width: 100%;
    justify-content: center;
    padding-left: 12px;
  }
  .px-login--mobile .px-login__toggle,
  .px-login--mobile.is-open .px-login__toggle { border-radius: 8px; }

  /* Tam ekran Sistem Giriş sheet */
  .px-login__panel--fs {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: rgba(15, 23, 42, 0.5) !important;
    box-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    display: none !important;
    pointer-events: none;
    z-index: 10050 !important;
    align-items: stretch;
    justify-content: stretch;
  }
  .px-login--mobile.is-open .px-login__panel--fs,
  body.px-login-fs-open .px-login__panel--fs.is-mounted {
    display: flex !important;
    pointer-events: auto;
  }
  .px-login__sheet {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100%;
    background: #f3f5f8;
    padding: max(12px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  .px-login__sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
  }
  .px-login__sheet-head strong {
    font-family: "PT Sans", sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
  }
  .px-login__close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: #e2e8f0;
    color: #0f172a;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
  }
  .px-login__sheet-sub {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    color: #64748b;
  }
  .px-login--mobile .px-login__grid,
  .px-login__panel--fs .px-login__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    max-width: none;
    margin: 0;
    padding: 0;
  }
  .px-login__panel--fs .px-mega-urunler {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    max-width: none;
    margin: 0;
    padding: 0;
  }
  .px-login__panel--fs .px-urun-card {
    min-height: 76px;
    border-radius: 12px;
  }
  body.px-login-fs-open {
    overflow: hidden !important;
  }
  body.px-login-fs-open .px-chat {
    visibility: hidden;
  }

  .px-bar__inner {
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
  }
  .px-bar__brand {
    order: 1;
    width: 100%;
    justify-content: center;
  }
  .px-bar__brand img {
    height: 36px;
  }
  .px-bar__links {
    order: 2;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    flex-wrap: unset;
  }
  .px-bar__links a,
  .px-bar__btn {
    flex: none;
    max-width: none;
    min-height: 72px;
    padding: 14px 12px;
    white-space: normal;
    font-size: 12px;
    letter-spacing: 0.06em;
    background: #fff;
    color: var(--px-navy);
    border: 1px solid #d7e0ea;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    position: relative;
    overflow: hidden;
  }
  .px-bar__links a::before,
  .px-bar__btn::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: currentColor;
  }
  .px-bar__btn--crm { color: var(--px-crm); border-color: #99f6e4; }
  .px-bar__btn--erp { color: var(--px-erp); border-color: #bfdbfe; }
  .px-bar__btn--mes { color: var(--px-mes); border-color: #fed7aa; }
  .px-bar__btn--ik { color: var(--px-ik); border-color: #bae6fd; }
  .px-bar__btn--loj { color: var(--px-loj); border-color: #bbf7d0; }
  .px-bar__links a:hover,
  .px-bar__btn:hover {
    filter: none;
    color: inherit;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
  }
  .px-bar__social {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 10px;
    padding-top: 4px;
  }
  .px-bar__social a {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 900px) {
  .px-security {
    padding: 3.25rem 1.15rem 3.5rem;
  }
  .px-security__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
  }
  .px-security__card:last-child {
    grid-column: 1 / -1;
    max-width: 280px;
    margin-inline: auto;
    width: 100%;
  }
}

@media (max-width: 640px) {
  body.px-home { overflow: auto; height: auto; max-height: none; }
  body.px-home .px-hero {
    min-height: 52vh !important;
    height: auto !important;
    margin-bottom: calc(var(--px-products-h) / 2);
  }
  .px-security {
    padding: 2.75rem 1rem 3rem;
  }
  .px-security__lead {
    margin-bottom: 1.75rem;
    font-size: 0.925rem;
  }
  .px-security__grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .px-security__card:last-child {
    grid-column: auto;
    max-width: none;
  }
  .px-security__card {
    padding: 1.25rem 1rem;
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 0.85rem;
  }
  .px-security__icon {
    flex-shrink: 0;
    margin-bottom: 0;
    width: 44px;
    height: 44px;
  }
  .px-security__icon svg {
    width: 22px;
    height: 22px;
  }
  .px-security__card h2,
  .px-security__card h3 {
    font-size: 0.98rem;
    margin-bottom: 0.35rem;
  }
  .px-security__card p {
    font-size: 0.84rem;
  }
  .px-footer__inner { grid-template-columns: 1fr; }
  .px-product { padding: 10px 4px; min-height: 54px; }
  .px-product .px-line { font-size: 0.55rem; }
  .px-hero__dots { bottom: 18px; }
  .px-bar { padding: calc(var(--px-products-h) / 2 + 16px) 0 20px; }
  .px-bar__links {
    grid-template-columns: 1fr 1fr;
  }
  .px-bar__links a,
  .px-bar__btn {
    min-height: 68px;
    font-size: 11px;
  }
  /* 5. kart ortada tek başına */
  .px-bar__links a:last-child {
    grid-column: 1 / -1;
    max-width: 100%;
  }

  .px-mega-urunler {
    grid-template-columns: 1fr;
  }
}
