/* ==========================================================================
   GNC MODA - NATIVE MOBILE APP RESPONSIVE ARCHITECTURE (<= 991px & <= 767px)
   Unified Desktop & Mobile Theme (so-revo Hybrid Architecture)
   ========================================================================== */

@media (max-width: 991px) {
  /* 1. Viewport & Overflow Safety */
  html,
  body,
  #wrapper {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  /* 2. Defeat Legacy responsive.css Header 3 Rules */
  header.typeheader-3 .header-center,
  #header.typeheader-3 .header-center {
    padding: 0 !important;
    position: static !important;
  }
  header.typeheader-3 .header-center .navbar-logo,
  #header.typeheader-3 .header-center .navbar-logo {
    position: static !important;
    margin: 0 !important;
  }

  /* 3. Clean App-Like Header 3 on Mobile & Tablet */
  #header.typeheader-3 .h3-cobalt-topbar {
    padding: 6px 0 !important;
  }
  #header.typeheader-3 .h3-cobalt-topbar > .container,
  #header.typeheader-3 .h3-center-deck > .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    box-sizing: border-box !important;
  }
  #header.typeheader-3 .h3-center-deck {
    padding: 8px 0 10px 0 !important;
    border-bottom: 1px solid #eef2f6 !important;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04) !important;
  }
  #header.typeheader-3 .h3-mobile-toggle-box {
    flex: 0 0 38px !important;
  }
  #header.typeheader-3 .h3-mobile-hamburger {
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    padding: 0 !important;
  }
  #header.typeheader-3 .h3-logo-box img {
    max-height: 30px !important;
    max-width: 145px !important;
    width: auto !important;
    height: auto !important;
    aspect-ratio: auto !important;
  }
  #header.typeheader-3 .h3-search-capsule-col {
    margin: 8px 0 0 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }
  #header.typeheader-3 .h3-capsule-form {
    height: 40px !important;
    border-radius: 12px !important;
    background: #f8fafc !important;
    border: 1.5px solid #e2e8f0 !important;
    padding: 2px 4px 2px 12px !important;
  }

  /* 4. Page Builder Container & Grid Alignment (Eliminates Clipping & 0px Edge Bleed) */
  #content .so-page-builder .container,
  .common-home #content .so-page-builder .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }
  #content .so-page-builder .row,
  .common-home #content .so-page-builder .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  #content .so-page-builder [class*="col_"],
  .common-home #content .so-page-builder [class*="col_"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    box-sizing: border-box !important;
  }

  /* 5. Hero Slider & GNC Deals ("Bu ürünleri kaçırma") Mobile Harmony */
  .col_b2zy {
    margin-bottom: 12px !important;
  }
  .module.sohomepage-slider,
  .common-home .sohomepage-slider {
    margin: 2px 0 0 0 !important;
    border-radius: 14px !important;
  }
  .col_l7wn {
    margin-bottom: 14px !important;
  }
  .gnc-deals,
  .gnc-deals.best-seller-custom {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 12px 12px 14px !important;
    border-radius: 14px !important;
  }
  .gnc-deals .extraslider-inner .item {
    justify-content: flex-start !important;
    gap: 8px !important;
  }
  .gnc-deals .gnc-deal {
    margin: 0 !important;
  }
  .gnc-deals .owl2-dots {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    justify-content: center !important;
    margin-top: 10px !important;
    display: flex !important;
  }
}

@media (max-width: 767px) {
  /* 6. Instagram Story Strip Mobile Polish */
  .instagram-story-wrapper .story-nav-btn {
    display: none !important;
  }
  .InstagramStory {
    padding: 8px 12px 10px 12px !important;
    margin: 0 !important;
    gap: 10px !important;
  }
  .InstagramStory .Item {
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
    flex: 0 0 68px !important;
    margin: 0 !important;
  }
  .InstagramStory .story-thumb {
    width: 60px !important;
    height: 60px !important;
  }
  .InstagramStory .story-thumb img {
    width: 100% !important;
    height: 100% !important;
  }
  .InstagramStory .Item span.story-title {
    font-size: 10.5px !important;
    line-height: 1.2 !important;
    width: 68px !important;
    max-width: 68px !important;
    min-height: 26px !important;
  }
  html body .InstagramStory .Item span.story-badge,
  .InstagramStory .Item .story-badge {
    width: auto !important;
    min-width: 0 !important;
    max-width: 64px !important;
    height: auto !important;
    min-height: 0 !important;
    font-size: 7px !important;
    line-height: 1.15 !important;
    padding: 1.5px 5.5px !important;
    bottom: -3px !important;
    border-radius: 10px !important;
    border: 1.5px solid #ffffff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* 7. Trust Badges (.block-infos) - 3x2 Modern App Card Grid */
  .block-infos {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
    padding: 0 !important;
    margin: 0 0 14px 0 !important;
    border: none !important;
    background: transparent !important;
    float: none !important;
    width: 100% !important;
  }
  .block-infos .info,
  .block-infos .info.info1,
  .block-infos .info.info2,
  .block-infos .info.info3,
  .block-infos .info.info4,
  .block-infos .info.info5,
  .block-infos .info.info6 {
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
    display: flex !important;
  }
  .block-infos .info .inner {
    width: 100% !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 10px 4px !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }
  .block-infos .info .inner img {
    height: 26px !important;
    width: auto !important;
    margin-bottom: 5px !important;
    object-fit: contain !important;
  }
  .block-infos .info .inner .info-cont span {
    font-size: 9.5px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.2 !important;
    display: block !important;
    letter-spacing: -0.2px !important;
  }
  .block-infos .info .inner .info-cont p {
    display: block !important;
    font-size: 8.5px !important;
    color: #64748b !important;
    margin: 2px 0 0 0 !important;
    line-height: 1.15 !important;
  }

  /* 8. 6 Promotional Banners (.block_11 / .bn-bar) Mobile Polish */
  .col_h7dr,
  .col_gm45,
  .col_7k67,
  .col_f5ai,
  .col_g7ki,
  .col_bda5 {
    margin-bottom: 12px !important;
  }
  .block.block_11 .module > div {
    border-radius: 12px !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06) !important;
    display: block !important;
  }
  .block.block_11 .bn-bar {
    height: 32px !important;
    padding: 0 12px !important;
    border-bottom-left-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
  }
  .block.block_11 .bn-bar > span {
    font-size: 12px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 68% !important;
  }
  .block.block_11 .bn-bar .bn-htxt {
    opacity: 1 !important;
    transform: none !important;
    gap: 5px !important;
    flex-shrink: 0 !important;
  }
  .block.block_11 .bn-bar .bn-htxt span {
    font-size: 11px !important;
  }

  /* 9. Product Carousels (Haftanın Fırsatları & Yeni Gelen Okul Kıyafetleri) */
  .module.custom_listingtab_h3 {
    margin-top: 6px !important;
    margin-bottom: 16px !important;
  }
  .module.custom_listingtab_h3 h3.modtitle {
    margin: 4px 0 12px 0 !important;
    text-align: center !important;
  }
  .module.custom_listingtab_h3 h3.modtitle span {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
  }
  .module.custom_listingtab_h3 .wap-listing-tabs {
    margin: 0 -4px !important;
  }

  /* Product Card Mobile Fixes (Defeat orange.css invisible button-group & caption hide) */
  .product-item-container,
  .module.custom_listingtab_h3 .product-layout .product-item-container,
  div.module.custom-listingtab .product-layout .product-item-container {
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    padding: 6px !important;
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }
  .product-item-container .left-block,
  .module.custom_listingtab_h3 .product-layout .product-item-container .left-block {
    border-radius: 9px !important;
    margin-bottom: 6px !important;
    float: none !important;
    width: 100% !important;
  }
  .product-item-container .product-image-container img {
    aspect-ratio: 3 / 4 !important;
    object-fit: cover !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 9px !important;
  }
  /* Scale stickers and color badges proportionally on mobile cards */
  .product-item-container .gnc-stickers-box {
    transform: scale(0.85) !important;
    transform-origin: top left !important;
  }
  .product-item-container .color-options-badge {
    transform: scale(0.85) !important;
    transform-origin: top right !important;
    top: 6px !important;
    right: 6px !important;
  }
  .product-item-container .right-block,
  .module.custom_listingtab_h3 .product-layout .product-item-container .right-block,
  div.module.custom-listingtab .product-layout .product-item-container .right-block {
    padding: 4px 2px 2px 2px !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    text-align: center !important;
    position: relative !important;
  }
  .product-item-container:hover .caption,
  .module.custom_listingtab_h3 .product-layout .product-item-container:hover .caption,
  div.module.custom-listingtab .product-layout .product-item-container:hover .caption,
  .product-item-container .right-block .price,
  .product-item-container:hover .right-block .price {
    opacity: 1 !important;
    visibility: visible !important;
  }
  .product-item-container .right-block h4,
  .module.custom_listingtab_h3 .product-item-container .right-block h4 {
    margin: 0 0 4px 0 !important;
    height: 32px !important;
    overflow: hidden !important;
  }
  .product-item-container .right-block h4 a,
  .module.custom_listingtab_h3 .product-item-container .right-block h4 a {
    font-size: 12px !important;
    line-height: 1.3 !important;
    height: 32px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
  }
  .product-item-container .right-block .price,
  .module.custom_listingtab_h3 .product-item-container .right-block .price {
    display: flex !important;
    align-items: baseline !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    margin: 2px 0 6px 0 !important;
    padding: 0 !important;
    height: auto !important;
    line-height: 1.2 !important;
  }
  .product-item-container .right-block .price .price-new,
  .module.custom_listingtab_h3 .product-item-container .right-block .price .price-new {
    font-size: 14.5px !important;
    font-weight: 800 !important;
    color: #ff5500 !important;
  }
  .product-item-container .right-block .price .price-old,
  .module.custom_listingtab_h3 .product-item-container .right-block .price .price-old {
    font-size: 11.5px !important;
    color: #94a3b8 !important;
  }
  .product-item-container .right-block .button-group,
  .module.custom_listingtab_h3 .product-layout .product-item-container .button-group,
  div.module.custom-listingtab .product-layout .product-item-container .button-group {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
    display: flex !important;
    width: 100% !important;
    height: auto !important;
    margin: 2px 0 0 0 !important;
    padding: 0 !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
  }
  .product-item-container .right-block .button-group button.addToCart,
  .module.custom_listingtab_h3 .product-layout .product-item-container .button-group button.addToCart,
  div.module.custom-listingtab .product-layout .product-item-container .button-group button.addToCart {
    position: static !important;
    bottom: auto !important;
    width: 100% !important;
    height: 34px !important;
    line-height: 34px !important;
    background: linear-gradient(135deg, #ff6a00 0%, #ff4500 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 0 8px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 6px rgba(255, 85, 0, 0.22) !important;
  }
  .product-item-container .right-block .button-group button.addToCart span,
  .module.custom_listingtab_h3 .product-layout .product-item-container .button-group button.addToCart span {
    color: #ffffff !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    display: inline-block !important;
  }
  .product-item-container .right-block .button-group button.wishlist,
  .product-item-container .right-block .button-group button.compare,
  .module.custom_listingtab_h3 .product-layout .product-item-container .button-group button.wishlist,
  .module.custom_listingtab_h3 .product-layout .product-item-container .button-group button.compare,
  div.module.custom-listingtab .product-layout .product-item-container .button-group button.wishlist,
  div.module.custom-listingtab .product-layout .product-item-container .button-group button.compare {
    display: none !important;
  }

  /* 10. Okul Modülü (#gnc-moda-okul-modul) & Intro Section (.gnc-section) Mobile Polish */
  #gnc-moda-okul-modul {
    padding: 16px 12px !important;
    margin: 8px 0 14px 0 !important;
    border-radius: 14px !important;
  }
  #gnc-moda-okul-modul .gnc-banner-box {
    padding: 14px 12px !important;
    margin-bottom: 14px !important;
  }
  #gnc-moda-okul-modul .gnc-banner-box h1 {
    font-size: 19px !important;
    line-height: 1.25 !important;
  }
  #gnc-moda-okul-modul .gnc-banner-box p {
    font-size: 12.5px !important;
    line-height: 1.45 !important;
  }
  #gnc-moda-okul-modul .gnc-tab-btn {
    padding: 7px 12px !important;
    font-size: 12px !important;
    margin: 2px !important;
  }
  .container.gnc-section,
  .gnc-section {
    width: 100% !important;
    max-width: 100% !important;
    padding: 18px 14px !important;
    margin: 4px 0 14px 0 !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
  }
  .gnc-section .gnc-main-title {
    font-size: 19px !important;
    line-height: 1.3 !important;
  }
  .gnc-section .gnc-quote {
    font-size: 13px !important;
  }
  .gnc-section .gnc-description {
    font-size: 12.5px !important;
    line-height: 1.55 !important;
  }

  /* 11. Footer (typefooter-2) Newsletter & Layout Mobile Polish */
  footer.typefooter-2 .footer-top {
    padding: 16px 12px !important;
  }
  footer.typefooter-2 .news-letter .title-block {
    text-align: center !important;
    width: 100% !important;
  }
  footer.typefooter-2 .news-letter .page-heading {
    font-size: 16px !important;
    font-weight: 700 !important;
  }
  footer.typefooter-2 .news-letter .block_content {
    width: 100% !important;
    padding: 8px 0 4px 0 !important;
  }
  footer.typefooter-2 .news-letter form.signup {
    width: 100% !important;
    margin: 0 !important;
  }
  footer.typefooter-2 .news-letter .input-group {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 8px !important;
  }
  footer.typefooter-2 .news-letter .input-box {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
  }
  footer.typefooter-2 .news-letter .input-box input#txtemail {
    width: 100% !important;
    max-width: 100% !important;
    height: 40px !important;
    border-radius: 10px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
    box-sizing: border-box !important;
  }
  footer.typefooter-2 .news-letter .subcribe {
    position: static !important;
    width: auto !important;
    height: auto !important;
    flex-shrink: 0 !important;
    display: block !important;
  }
  footer.typefooter-2 .news-letter .subcribe button {
    height: 40px !important;
    border-radius: 10px !important;
    padding: 0 16px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
  }
  footer.typefooter-2 .socials-wrap {
    float: none !important;
    text-align: center !important;
    width: 100% !important;
    margin-top: 12px !important;
  }
  footer.typefooter-2 .socials-wrap h3.title-follow {
    display: block !important;
    margin-bottom: 8px !important;
    font-size: 14px !important;
  }

  /* ==========================================================================
     12. CATEGORY & PRODUCT LISTING PAGES (2-Col Default, 3-Col with Sepete Ekle)
     Overrides responsive.css @media (max-width: 480px) .product-layout { width: 100% }
     ========================================================================== */
  .products-category .products-list.row,
  .product-listing .products-list.row {
    margin-left: -5px !important;
    margin-right: -5px !important;
    display: flex !important;
    flex-wrap: wrap !important;
  }

  .products-category .products-list.row::before,
  .products-category .products-list.row::after,
  .product-listing .products-list.row::before,
  .product-listing .products-list.row::after {
    display: none !important;
  }

  /* Default & 2-Column Mobile Grid (50%) */
  .products-category .product-layout,
  .products-category .products-list > .product-layout,
  .product-listing .products-list > .product-layout,
  .products-category .product-layout.product-grid-2,
  .products-list .product-layout.product-grid-2 {
    width: 50% !important;
    max-width: 50% !important;
    flex: 0 0 50% !important;
    float: none !important;
    padding: 5px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
  }

  /* 3-Column Mobile Grid (33.333%) */
  .products-category .product-layout.product-grid-3,
  .products-list .product-layout.product-grid-3 {
    width: 33.333333% !important;
    max-width: 33.333333% !important;
    flex: 0 0 33.333333% !important;
    float: none !important;
    padding: 3px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
  }

  /* 1-Column Big Card & List View (100%) */
  .products-category .product-layout.product-grid-1,
  .products-list .product-layout.product-grid-1,
  .products-category .product-layout.product-list,
  .products-list .product-layout.product-list {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    float: none !important;
    padding: 6px 5px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  .products-category .product-layout .product-item-container,
  .product-listing .product-layout .product-item-container {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    background: #ffffff !important;
    border: 1px solid #eef2f6 !important;
    border-radius: 12px !important;
    padding: 6px !important;
    margin: 0 !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
  }

  .products-category .product-layout.product-list .product-item-container {
    flex-direction: row !important;
    padding: 8px !important;
  }

  /* 2-Column Mobile Add to Cart Button */
  .products-category .product-layout .product-item-container .right-block .button-group,
  .products-category .product-layout .product-item-container .right-block .cartinfo--static {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    display: flex !important;
    width: 100% !important;
    height: auto !important;
    margin-top: 6px !important;
    padding: 0 !important;
  }

  .products-category .product-layout .product-item-container .right-block .addToCart {
    width: 100% !important;
    height: 34px !important;
    line-height: 34px !important;
    background: linear-gradient(135deg, #ff6000 0%, #ea580c 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    padding: 0 8px !important;
    box-shadow: 0 2px 6px rgba(255, 96, 0, 0.22) !important;
  }

  .products-category .product-layout .product-item-container .right-block .addToCart span,
  .products-category .product-layout .product-item-container .right-block .addToCart i {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #ffffff !important;
    line-height: 1 !important;
  }

  /* 3-Column Mobile Card & Sepete Ekle Text Always Visible */
  .products-category .product-layout.product-grid-3 .product-item-container {
    padding: 4px !important;
    border-radius: 10px !important;
  }

  .products-category .product-layout.product-grid-3 .product-item-container .right-block {
    padding: 6px 2px 4px 2px !important;
  }

  .products-category .product-layout.product-grid-3 .product-item-container .right-block h4 a {
    font-size: 11px !important;
    line-height: 1.28 !important;
    height: 28px !important;
  }

  .products-category .product-layout.product-grid-3 .product-item-container .price .price-new {
    font-size: 13px !important;
  }

  .products-category .product-layout.product-grid-3 .product-item-container .price .price-old {
    font-size: 10.5px !important;
  }

  .products-category .product-layout.product-grid-3 .product-item-container .right-block .addToCart {
    height: 29px !important;
    line-height: 29px !important;
    padding: 0 4px !important;
    gap: 3px !important;
    border-radius: 7px !important;
  }

  .products-category .product-layout.product-grid-3 .product-item-container .right-block .addToCart span {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    letter-spacing: -0.2px !important;
    color: #ffffff !important;
    white-space: nowrap !important;
  }

  .products-category .product-layout.product-grid-3 .product-item-container .right-block .addToCart i {
    display: inline-block !important;
    font-size: 10px !important;
    color: #ffffff !important;
  }
}

