/**
 * Qadsia New — Tablet & Mobile only
 * Desktop styles live in style.css and are never overridden above 1100px.
 */

/* =========================================================
   TABLET — max 1100px
   ========================================================= */

@media (max-width: 1100px) {
  .news-banner__content {
    width: min(54%, 480px);
  }
  .shop-grid,
  .roster-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .achievements-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .achieve-card {
    max-width: 300px;
  }
  .site-footer__grid {
    grid-template-columns: repeat(min(var(--footer-cols, 3), 3), minmax(0, 1fr));
  }
  .site-footer__grid[data-cols="1"],
  .site-footer__grid[data-cols="2"] {
    grid-template-columns: repeat(var(--footer-cols), minmax(0, 1fr));
  }
}

/* =========================================================
   TABLET — max 960px
   ========================================================= */

@media (max-width: 960px) {
  :root {
    --notch-w: 180px;
    --logo-w: 110px;
    --nav-center-pad: calc(var(--logo-w) / 2 + 28px);
    --header-h-top: 72px;
  }

  .site-header {
    z-index: 100;
  }

  .site-header.is-fixed .top-bar {
    height: 64px;
    padding-top: 8px;
  }

  .site-header.is-fixed .logo-link {
    top: 4px;
  }

  .site-header.is-fixed .logo-img {
    max-height: 72px;
  }

  .site-header.is-nav-open .top-bar {
    position: relative;
    z-index: 50;
  }

  .top-bar {
    height: var(--header-h-top);
    align-items: center;
    padding: 12px 16px 0;
  }

  .site-header > .notch-outline,
  .site-header .notch-outline {
    display: none !important;
  }

  .logo-link {
    top: 8px;
  }
  .logo-img {
    max-height: 88px;
    margin-top: 0;
  }
  .logo-tagline {
    font-size: 11px;
    margin-top: 2px;
  }

  .top-bar__group {
    gap: 10px;
  }

  .socials {
    gap: 8px;
  }
  .social-btn {
    width: 34px;
    height: 34px;
  }

  .lang-switch {
    display: none;
  }

  /* Hamburger */
  .nav-toggle {
    display: inline-flex;
  }

  /* Desktop split nav → mobile drawer */
  .main-nav {
    position: fixed;
    inset: 0;
    z-index: 30;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    padding: calc(var(--header-h-top) + 72px) 24px 40px;
    background: rgba(10, 8, 5, 0.98);
    border: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  }

  .site-header.is-nav-open .main-nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .main-nav__list,
  .main-nav__list--left,
  .main-nav__list--right {
    flex: 0 0 auto;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 0 !important;
  }

  .main-nav__list > li {
    width: 100%;
    border-bottom: 1px solid rgba(201, 146, 42, 0.18);
  }

  .main-nav__list a {
    display: flex;
    width: 100%;
    justify-content: center;
    padding: 16px 8px;
    font-size: 17px;
    border-bottom: none !important;
  }

  .main-nav__list a:hover,
  .main-nav__list a:focus-visible,
  .main-nav__list a.is-active {
    border-bottom: none !important;
    color: var(--gold-light) !important;
  }

  .main-nav__list .sub-menu {
    position: static;
    transform: none;
    left: auto;
    top: auto;
    display: none;
    min-width: 0;
    width: 100%;
    margin: 0 0 8px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .main-nav__list .menu-item-has-children.is-open > .sub-menu,
  .main-nav__list .has-dropdown.is-open > .sub-menu {
    display: flex;
  }

  .main-nav__list .menu-item-has-children:hover > .sub-menu,
  .main-nav__list .has-dropdown:hover > .sub-menu {
    display: none; /* hover off on touch; use .is-open */
  }

  .main-nav__list .menu-item-has-children.is-open:hover > .sub-menu,
  .main-nav__list .has-dropdown.is-open:hover > .sub-menu {
    display: flex;
  }

  .main-nav__list .sub-menu a {
    justify-content: center;
    padding: 12px 8px;
    font-size: 15px;
    color: var(--text-muted);
  }

  body.is-nav-open {
    overflow: hidden;
  }

  .hero {
    aspect-ratio: auto;
    min-height: 0;
    height: auto;
  }
  .hero__stage {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
  }
  .hero__stage:not(:has(.hero__banner-img)) {
    aspect-ratio: 1712 / 704;
  }
  .hero__banner-img {
    width: 100%;
    height: auto;
  }
  .match-card-wrap {
    --mc-cut: 18px;
    --mc-pad-x: 20px;
    --mc-pad-y: 22px;
    position: relative;
    left: auto;
    bottom: auto;
    width: calc(100% - 32px);
    margin: -36px auto 48px;
    transform: none;
  }
  .match-card__body {
    flex-direction: column;
    min-height: 0;
  }
  .match-card__top {
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 22px;
  }
  .match-card__top .teams {
    gap: 28px;
    width: 100%;
    justify-content: center;
  }
  .countdown {
    margin-inline: auto;
    padding-inline-end: 0;
    width: 100%;
  }
  .countdown__boxes {
    justify-content: center;
    flex-wrap: wrap;
  }
  .match-card__side {
    flex-basis: auto;
    width: 100%;
    border-inline-start: none;
    border-top: none;
    padding: 22px var(--mc-pad-x) var(--mc-pad-y);
    margin-inline-end: 0;
  }
  .match-card__side::before {
    inset-inline-start: 12%;
    inset-inline-end: 12%;
    top: 0;
    bottom: auto;
    width: auto;
    height: 1px;
  }
  .match-card__cta {
    align-items: center;
    width: 100%;
  }
  .match-card__side .btn-gold {
    width: 100%;
    justify-content: center;
  }
  .match-card__meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 14px;
    padding-bottom: 18px;
  }
  .meta-item {
    justify-content: center;
    width: 100%;
    padding: 12px 8px;
  }
  .meta-item:not(:first-child)::before {
    inset-inline-start: 18%;
    inset-inline-end: 18%;
    top: 0;
    bottom: auto;
    width: auto;
    height: 1px;
  }
  .meta-item__text,
  .meta-item__rows {
    align-items: center;
    text-align: center;
  }
  .meta-item__row {
    justify-content: center;
  }
  .meta-item__text strong,
  .meta-item__text small {
    white-space: normal;
  }

  .matches-row {
    grid-template-columns: 1fr;
  }
  .fans .sponsors-stats {
    flex-wrap: wrap;
  }
  .fans .sponsors-stats__item {
    flex: 1 1 45%;
    padding: 18px 16px;
  }
  .fans .sponsors-stats__item:nth-child(2) {
    border-inline-end: none;
  }
  .fans .sponsors-stats__item:nth-child(1),
  .fans .sponsors-stats__item:nth-child(2) {
    border-bottom: 1px solid rgba(201, 146, 42, 0.45);
  }
  .fans-banner {
    aspect-ratio: 1432 / 653;
  }
  .fans-banner__media {
    height: auto;
  }
  .fans-banner__content {
    padding: 8px 10px;
  }
  .fans-banner__content h2 {
    font-size: 16px;
  }
  .fans-banner__content h3 {
    font-size: 12px;
    margin-top: 4px;
  }
  .fans-banner__content p {
    font-size: 10px;
    margin-top: 6px;
    -webkit-line-clamp: 2;
  }
  .fans-perks {
    width: 100%;
    margin-top: 10px;
  }
  .fans-perks__item {
    padding: 0 4px;
    gap: 4px;
  }
  .fans-perks__item img {
    width: 18px;
    height: 18px;
  }
  .fans-perks__item span {
    font-size: 8px;
    min-height: 2.4em;
  }
  .fans-banner__cta.btn-outline {
    margin-top: 10px;
    padding: 7px 12px;
    font-size: 11px;
    min-width: 0;
  }
  .fans-banner__note {
    margin-top: 8px;
  }
  .fans-banner__note span {
    font-size: 9px;
  }
  .discover-card,
  .discover-card--flip {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .discover-card__marker,
  .discover-card--flip .discover-card__marker {
    order: 0;
    width: auto;
    height: auto;
    align-self: auto;
    margin-inline-end: 0;
    margin-inline-start: 0;
    justify-content: flex-start;
    gap: 12px;
  }
  .discover-card__label {
    position: static;
    transform: none;
    top: auto;
    left: auto;
  }
  .discover-card--flip .discover-card__frame {
    order: 0;
  }
  .discover-card__frame {
    aspect-ratio: 800 / 300;
  }
  .discover-card__body,
  .discover-card--flip .discover-card__body {
    position: absolute;
    top: 12%;
    bottom: 8%;
    min-height: 0;
  }
  .discover-card__body {
    left: 9.5%;
    right: 2%;
    grid-template-columns: minmax(0, 45%) minmax(0, 55%);
  }
  .discover-card--flip .discover-card__body {
    left: 2%;
    right: 9.5%;
    grid-template-columns: minmax(0, 55%) minmax(0, 45%);
  }
  .discover-card__content {
    padding: 6px 8px;
  }
  .discover-card__content h3 {
    font-size: 13px;
    -webkit-line-clamp: 2;
  }
  .discover-card__content p {
    font-size: 11px;
    -webkit-line-clamp: 2;
  }
  .discover-card__link {
    margin-top: 8px;
    padding: 6px 10px;
    font-size: 11px;
  }

  /* Footer contact stack cleaner on tablet */
  .site-footer__contact {
    gap: 14px;
  }
}

/* =========================================================
   PRODUCT DETAIL — max 900px
   ========================================================= */

@media (max-width: 900px) {
  .qadsia-single-product .qadsia-product-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .qadsia-single-product .woocommerce-product-gallery {
    max-width: 420px;
    margin-inline: auto !important;
  }
  .qadsia-single-product .woocommerce-product-gallery .flex-viewport {
    min-height: 420px;
    max-height: 420px;
    height: 420px;
  }
  .qadsia-single-product .woocommerce-product-gallery:not(.flexslider) .woocommerce-product-gallery__wrapper,
  .qadsia-single-product .woocommerce-product-gallery:not(.flexslider) .woocommerce-product-gallery__image {
    height: 420px !important;
  }
  .qadsia-single-product .woocommerce-product-gallery__image img,
  .qadsia-single-product .woocommerce-product-gallery .wp-post-image {
    max-height: 86% !important;
  }
  .qadsia-single-product .flex-control-thumbs li {
    width: calc(33.333% - 8px);
  }
  .qadsia-single-product form.cart .woocommerce-variation-add-to-cart,
  .qadsia-single-product form.cart:not(.variations_form) {
    flex-wrap: wrap;
  }
  .qadsia-single-product form.cart .single_add_to_cart_button,
  .qadsia-single-product form.cart button.button {
    flex: 1 1 auto;
    min-width: 160px;
    height: 48px !important;
  }
  .qadsia-single-product .woocommerce-tabs ul.tabs {
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* =========================================================
   MOBILE — max 640px
   ========================================================= */

@media (max-width: 640px) {
  .container { width: calc(100% - 32px); }
  .section { padding: 48px 0; }

  .qadsia-carousel-row {
    gap: 8px;
  }
  .qadsia-carousel__arrow {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }
  .qadsia-carousel__arrow svg {
    width: 14px;
    height: 14px;
  }
  .qadsia-carousel__dots.swiper-pagination {
    margin-top: 20px;
  }

  .news-banner {
    aspect-ratio: 4 / 5;
    min-height: 420px;
  }
  /* Full-bleed photo inside gold frame (no side black bars) */
  .news-banner__media {
    inset: 3.2% 2% 3.2% 2%;
    border-radius: 14px;
  }
  .news-banner__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
  }
  .news-banner__shade {
    inset: 2.4% 1.8% 2.6% 1.8%;
    background:
      linear-gradient(
        180deg,
        rgba(5, 4, 3, 0.2) 0%,
        rgba(5, 4, 3, 0.55) 45%,
        rgba(5, 4, 3, 0.92) 100%
      );
  }
  .news-banner__content {
    top: auto;
    bottom: 16%;
    left: 5%;
    right: 5%;
    width: auto;
    gap: 12px;
  }
  .news-slider__dots.swiper-pagination {
    left: 5%;
    right: 5%;
    bottom: 6%;
    justify-content: center;
  }
  .news-banner__title {
    max-width: none;
    font-size: clamp(16px, 4.6vw, 22px);
  }
  /* Hide thumbnail strip on mobile */
  .news-strip-frame,
  .news-strip {
    display: none !important;
  }
  .shop-grid,
  .roster-grid,
  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));;
  }
  .achievements-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
  .achieve-card {
    max-width: none;
  }
  .matches-head { flex-direction: column; align-items: flex-start; }
  .shop-head { flex-direction: column; align-items: flex-start; }
  .team-head { flex-direction: column; align-items: flex-start; }
  .highlight-bar { flex-direction: column; }
  .highlight-bar__item {
    width: 100%;
    padding: 18px 20px;
    justify-content: center;
    text-align: center;
  }
  .highlight-bar__item:not(:last-child) {
    border-inline-end: none;
    border-bottom: 1px solid rgba(201, 146, 42, 0.22);
  }
  .highlight-bar__text {
    align-items: center;
    text-align: center;
    width: auto;
  }
  .highlight-bar__item--date .highlight-bar__text,
  .highlight-bar__item--stat .highlight-bar__text,
  .highlight-bar__item--main .highlight-bar__text {
    text-align: center;
    align-items: center;
  }

  /* Product detail — phone */
  .qadsia-single-shop {
    padding-top: 28px;
    padding-bottom: 48px;
  }
  .qadsia-single-product .woocommerce-breadcrumb {
    margin-bottom: 18px;
    font-size: 12px;
  }
  .qadsia-single-product .product_title.entry-title {
    font-size: clamp(20px, 5.5vw, 26px);
  }
  .qadsia-single-product .woocommerce-product-gallery {
    max-width: 100%;
  }
  .qadsia-single-product .woocommerce-product-gallery .flex-viewport {
    min-height: 360px;
    max-height: 360px;
    height: 360px;
  }
  .qadsia-single-product .woocommerce-product-gallery:not(.flexslider) .woocommerce-product-gallery__wrapper,
  .qadsia-single-product .woocommerce-product-gallery:not(.flexslider) .woocommerce-product-gallery__image {
    height: 360px !important;
  }
  .qadsia-single-product .woocommerce-product-gallery__image img,
  .qadsia-single-product .woocommerce-product-gallery .wp-post-image {
    max-height: 86% !important;
  }
  .qadsia-single-product .flex-control-thumbs {
    gap: 8px;
  }
  .qadsia-single-product .flex-control-thumbs li {
    width: calc(33.333% - 6px);
  }
  .qadsia-single-product table.variations th,
  .qadsia-single-product table.variations td {
    display: block;
    width: 100%;
    padding: 6px 0;
  }
  .qadsia-single-product table.variations select,
  .qadsia-single-product .summary select {
    width: 100%;
  }
  .qadsia-single-product form.cart .quantity .qty {
    width: 64px;
    height: 48px !important;
  }
  .qadsia-single-product form.cart .single_add_to_cart_button,
  .qadsia-single-product form.cart button.button {
    width: 100%;
    min-width: 0;
    height: 48px !important;
  }

  /* Footer */
  .site-footer__sponsors {
    padding-inline: 8px;
  }
  .site-footer__sponsor {
    padding: 10px 16px;
  }
  .site-footer__sponsor img {
    max-height: 32px;
    max-width: 96px;
  }
  .site-footer__col {
    text-align: center;
  }
  .site-footer__contact {
    align-items: center;
  }
}

/* =========================================================
   SMALL PHONE — max 560px
   ========================================================= */

@media (max-width: 560px) {
  .match-card-wrap { --mc-cut: 14px; }
  .countdown__box {
    width: 52px;
    height: 50px;
  }
  .countdown__box span { font-size: 20px; }
  .team__badge { width: 56px; height: 56px; }
  .teams { gap: 18px; }
  .meta-item__text strong,
  .meta-item__row strong { white-space: normal; }

  .fans .sponsors-stats__item {
    flex: 1 1 100%;
  }
  .fans .sponsors-stats__item:nth-child(1),
  .fans .sponsors-stats__item:nth-child(2),
  .fans .sponsors-stats__item:nth-child(3) {
    border-inline-end: none;
    border-bottom: 1px solid rgba(201, 146, 42, 0.45);
  }
  .fans .sponsors-stats__item:last-child {
    border-bottom: none;
  }

  .achievements-row {
    grid-template-columns: 1fr;
  }

  .qadsia-single-product .flex-control-thumbs li {
    width: calc(50% - 6px);
  }
}

/* =========================================================
   MATCHES — 2 cards / row between 600px and 720px
   ========================================================= */

@media (min-width: 600px) and (max-width: 720px) {
  #matches .fixture-card__body {
    padding: 28px 16px 22px;
    gap: 16px;
  }
  #matches .fixture-card__teams {
    gap: 10px;
  }
  #matches .fixture-team__badge {
    width: 48px;
    height: 48px;
  }
  #matches .fixture-team__ar {
    font-size: 12px;
  }
  #matches .fixture-vs {
    width: 22px;
    height: 22px;
  }
  #matches .fixture-card__info {
    padding: 0 8px;
    gap: 8px;
  }
  #matches .fixture-card__info p {
    font-size: 11px;
  }
  #matches .fixture-card__info svg,
  #matches .fixture-card__icon {
    width: 18px;
    height: 18px;
  }
  #matches .fixture-card__actions {
    flex-direction: column;
    gap: 8px;
  }
  #matches .btn-gold--fixture {
    width: 100%;
    justify-content: center;
    font-size: 12px;
    padding: 10px 12px;
  }
}
