/* =====================================================
   RESPONSIVE — TABLETĂ, TELEFON ȘI ECRANE MICI
   Se încarcă ultimul după toate celelalte CSS-uri
===================================================== */

/* =====================================================
   TABLETĂ ȘI LAPTOP MIC
   Maximum 1100px
===================================================== */

@media (max-width: 1100px) {
  /* HEADER */

  .header-container {
    gap: 40px;
  }

  .logo-title {
    font-size: 2.5rem;
  }

  .logo-subtitle {
    margin-left: 55px;
    font-size: 2.3rem;
  }

  .logo-description {
    font-size: 1rem;
  }

  .header-search {
    max-width: 600px;
  }

  /* MENIU */

  .mega-menu {
    width: min(900px, calc(100vw - 32px));
  }

  .mega-menu-container {
    gap: 26px;
    padding: 28px;
  }

  /* FOOTER */

  .footer-intro {
    align-items: flex-start;
    gap: 40px;
  }

  .footer-columns {
    gap: 30px;
  }
}

/* =====================================================
   TABLETĂ
   Maximum 900px
===================================================== */

@media (max-width: 900px) {
  /* ELEMENTE GENERALE */

  .container {
    width: 94%;
    padding: 18px;
  }

  /* HEADER */

  .site-header {
    padding: 24px 0;
  }

  .header-container {
    flex-direction: column;
    align-items: stretch;
    gap: 26px;
  }

  .site-logo {
    justify-content: center;
  }

  .logo-text {
    align-items: flex-start;
  }

  .header-search {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
  }

  /* MENIU */

  .menu-list {
    gap: 28px;
  }

  .mega-menu {
    width: min(760px, calc(100vw - 32px));
  }

  .mega-menu-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mega-menu-column:last-child {
    grid-column: 1 / -1;
  }

  /* BENEFICII ȘI CONȚINUT */

  .beneficii-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-text-section {
    padding: 28px;
  }

  .main-landing-title {
    font-size: 1.8rem;
  }

  /* PRODUSE */

  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }

  /* PAGINĂ PRODUS */

  .product-detail-layout {
    gap: 32px;
  }

  .product-image-container,
  .product-info-container {
    min-width: 280px;
  }

  /* PRODUSE RECOMANDATE */

  .recommended-products-section .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* FOOTER */

  .footer-intro {
    flex-direction: column;
  }

  .footer-brand-description {
    max-width: 700px;
  }

  .footer-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* =====================================================
   MENIU MOBIL ȘI TABLETĂ MICĂ
   Maximum 1024px
===================================================== */

@media (max-width: 1024px) {
  /* HEADER */

  .site-logo {
    width: 100%;
  }

  .logo-icon {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
    font-size: 27px;
  }

  .logo-title {
    font-size: 2.1rem;
  }

  .logo-subtitle {
    margin-left: 42px;
    font-size: 1.95rem;
  }

  .logo-description {
    margin-top: 10px;
    font-size: 0.95rem;
  }

  /* MENIU PRINCIPAL */

  .menu-container {
    width: min(100%, calc(100% - 24px));
  }

  .menu-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .menu-item {
    width: 100%;
  }

  .menu-link {
    justify-content: space-between;
    width: 100%;
    padding: 14px 6px;
    border-bottom: 1px solid #ece7df;
  }

  .menu-item:last-child .menu-link {
    border-bottom: 0;
  }

  /* MEGA-MENU MOBIL */

  .mega-menu {
    position: static;
    width: 100%;
    padding-top: 0;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    display: none;
    transform: none;
    transition: none;
  }

  .has-dropdown:hover .mega-menu,
  .has-dropdown:focus-within .mega-menu {
    display: block;
    transform: none;
  }

  .mega-menu-container {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 22px 16px;
    background: #faf8f4;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .mega-menu-column:last-child {
    grid-column: auto;
  }

  .mega-menu-title {
    margin-bottom: 10px;
  }

  .mega-menu-link {
    padding: 4px 0;
  }

  /* SECȚIUNI GENERALE */

  .beneficii-grid {
    grid-template-columns: 1fr;
  }

  .type-cards-container {
    flex-direction: column;
  }

  .type-card {
    min-width: 0;
    width: 100%;
  }

  .system-header {
    align-items: flex-start;
  }

  /* TABEL */

  .table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .comparison-table {
    min-width: 560px;
  }

  /* PRODUSE */

  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .product-image {
    height: 165px;
  }

  /* PAGINĂ PRODUS */

  .product-detail-layout {
    flex-direction: column;
    margin: 28px auto;
    gap: 28px;
  }

  .product-image-container,
  .product-info-container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .product-image-container {
    margin: 0 auto;
  }

  .product-info-container h1 {
    font-size: 1.75rem;
  }

  .product-detail-price {
    font-size: 1.55rem;
  }

  /* ARTICOL */

  .blog-post-full h1 {
    font-size: 2rem !important;
    line-height: 1.25;
  }

  .blog-post-full img {
    height: auto;
    max-height: none !important;
  }

  /* FOOTER */

  .site-footer {
    margin-top: 60px;
  }

  .footer-container {
    width: min(100%, calc(100% - 30px));
    padding-top: 45px;
  }

  .footer-intro {
    gap: 32px;
    padding-bottom: 38px;
  }

  .footer-columns {
    gap: 32px;
    padding: 42px 0;
  }

  /* BARA SOCIALĂ */

  #sticky-social-sidebar {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    flex-direction: row;
    width: 100%;
    gap: 0;
    transform: none;
  }

  .sticky-btn {
    flex: 1;
    width: auto;
    height: 50px;
    border-radius: 0;
    box-shadow: none;
  }

  .sticky-btn:hover {
    transform: none;
  }

  /*
   * Lasă spațiu jos dacă bara socială este prezentă,
   * ca să nu acopere conținutul.
   */

  body:has(#sticky-social-sidebar) {
    padding-bottom: 50px;
  }
}

/* =====================================================
   TELEFON
   Maximum 600px
===================================================== */

@media (max-width: 600px) {
  /* ELEMENTE GENERALE */

  body {
    overflow-x: hidden;
  }

  .container {
    width: 100%;
    padding: 15px;
  }

  .section-title {
    font-size: 1.55rem;
    margin-bottom: 22px;
  }

  /* HEADER */

  .site-header {
    padding: 20px 0;
  }

  .header-container {
    width: min(100%, calc(100% - 22px));
    gap: 20px;
  }

  .site-logo {
    align-items: center;
    gap: 13px;
  }

  .logo-icon {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
    font-size: 24px;
  }

  .logo-title {
    font-size: 1.75rem;
  }

  .logo-subtitle {
    margin-top: 4px;
    margin-left: 28px;
    font-size: 1.55rem;
  }

  .logo-description {
    font-size: 0.82rem;
    line-height: 1.35;
  }

  /* CĂUTARE */

  .header-search {
    flex-direction: column;
    gap: 10px;
    overflow: visible;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
  }

  .header-search-input,
  .header-search-button {
    width: 100%;
    min-height: 50px;
    border-radius: 9px;
  }

  .header-search-input {
    padding: 14px 16px;
    border: 1px solid #d8dce3;
    font-size: 1rem;
  }

  .header-search-button {
    padding: 13px 18px;
  }

  /* MENIU */

  .menu-container {
    width: calc(100% - 20px);
  }

  .menu-link {
    padding: 13px 4px;
    font-size: 0.97rem;
  }

  .mega-menu-container {
    padding: 20px 12px;
  }

  /* BUTOANE ȘI FILTRE */

  .categories-container {
    gap: 8px;
  }

  .category-btn,
  .view-toggle-btn,
  .cta-scroll-btn {
    padding: 9px 16px;
    font-size: 0.9rem;
  }

  /* CONȚINUT */

  .beneficii-section {
    padding: 22px 0;
  }

  .beneficiu-card {
    padding: 24px 16px;
  }

  .landing-text-section {
    margin: 20px 0;
    padding: 20px 15px;
    border-radius: 12px;
  }

  .main-landing-title {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  .article-heading {
    font-size: 1.3rem;
  }

  .info-highlight-box,
  .system-body {
    padding: 15px;
  }

  .system-header {
    padding: 14px 15px;
  }

  /* PRODUSE */

  .products-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 22px 0;
  }

  .product-card {
    width: 100%;
  }

  .product-image {
    height: 210px;
  }

  .product-info {
    padding: 16px;
  }

  .product-title {
    font-size: 1.05rem;
  }

  .affiliate-btn {
    padding: 12px;
  }

  /* PAGINĂ PRODUS */

  .custom-product-header {
    padding: 18px 12px;
  }

  .custom-product-header a {
    font-size: 1rem;
  }

  .product-detail-layout {
    padding: 0 15px;
  }

  .product-image-container img {
    max-height: 340px;
  }

  .product-info-container h1 {
    font-size: 1.55rem;
  }

  .product-detail-desc {
    font-size: 0.96rem;
  }

  /* PRODUSE RECOMANDATE */

  .recommended-products-section {
    margin: 45px auto;
    padding: 0 15px;
  }

  .recommended-products-title {
    font-size: 1.55rem;
  }

  .recommended-products-section .products-grid {
    grid-template-columns: 1fr;
  }

  /* ARTICOL */

  .blog-post-full h1 {
    font-size: 1.7rem !important;
  }

  .blog-post-full {
    overflow-wrap: anywhere;
  }

  /* FOOTER */

  .footer-container {
    width: calc(100% - 24px);
    padding: 38px 0 25px;
  }

  .footer-brand {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-brand-title {
    font-size: 1.7rem;
  }

  .footer-brand-description {
    font-size: 0.95rem;
  }

  .footer-cta {
    width: 100%;
    text-align: center;
  }

  .footer-cta-title {
    font-size: 1.25rem;
  }

  .footer-cta-actions {
    flex-direction: column;
  }

  .footer-cta-button {
    width: 100%;
    text-align: center;
  }

  .footer-columns {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .footer-column {
    text-align: center;
  }

  .footer-legal-links {
    flex-direction: column;
    gap: 10px;
  }

  .footer-seo-text {
    font-size: 0.87rem;
  }
}

/* =====================================================
   TELEFON FOARTE MIC
   Maximum 380px
===================================================== */

@media (max-width: 380px) {
  .site-logo {
    gap: 10px;
  }

  .logo-icon {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    font-size: 21px;
  }

  .logo-title {
    font-size: 1.48rem;
  }

  .logo-subtitle {
    margin-left: 20px;
    font-size: 1.3rem;
  }

  .logo-description {
    font-size: 0.75rem;
  }

  .header-search-input {
    font-size: 0.92rem;
  }

  .main-landing-title {
    font-size: 1.35rem;
  }

  .comparison-table {
    min-width: 520px;
  }
}

/* =====================================================
   UTILIZATORI CARE PREFERĂ MIȘCARE REDUSĂ
===================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* =====================================================
   BUTON AFILIAT STICKY - MOBILE
===================================================== */

@media (max-width: 768px) {
  #sticky-social-sidebar {
    position: fixed;

    top: auto;
    right: 0;
    bottom: 86px;
    left: 0;

    display: flex;
    flex-direction: row;

    width: 100%;
    gap: 0;

    transform: none;

    z-index: 9000;
  }

  body:has(#sticky-social-sidebar) {
    padding-bottom: 140px;
  }
}

body {
  padding-bottom: 85px;
}

/* =====================================================
   PRODUS - CTA STICKY + SOCIAL MEDIA - MOBILE
===================================================== */

@media (max-width: 768px) {
  /* -----------------------------------------------
     CTA AFILIAT - RĂMÂNE FIX JOS
  ------------------------------------------------ */

  #productAffiliateBtn {
    position: fixed !important;

    left: 16px !important;
    right: 16px !important;
    bottom: 16px !important;

    width: auto !important;

    z-index: 10000 !important;

    display: flex !important;
    align-items: center;
    justify-content: center;

    padding: 15px 20px;

    text-align: center;
    font-size: 16px;
    font-weight: 700;

    border-radius: 10px;

    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.22);
  }

  /* -----------------------------------------------
     SOCIAL MEDIA - DEASUPRA CTA-ULUI
  ------------------------------------------------ */

  body:has(#productAffiliateBtn) #sticky-social-sidebar {
    position: fixed !important;

    top: auto !important;
    right: 0 !important;
    bottom: 82px !important;
    left: 0 !important;

    width: 100% !important;

    display: flex !important;
    flex-direction: row !important;

    gap: 0;

    transform: none !important;

    z-index: 9000 !important;
  }

  /* -----------------------------------------------
     SPAȚIU PENTRU CELE DOUĂ BARE FIXE
  ------------------------------------------------ */

  body:has(#productAffiliateBtn) {
    padding-bottom: 140px !important;
  }
}
/* =====================================================
   MEGA MENU - MOBILE / TABLET
===================================================== */

@media (max-width: 1024px) {
  .has-dropdown .mega-menu {
    display: none;
  }

  .has-dropdown.is-open .mega-menu {
    display: block;
  }

  .has-dropdown.is-open .dropdown-arrow {
    transform: rotate(180deg);
  }
}
