/*
 * responsive.css — TCB Elementor Theme
 * All breakpoint overrides, from widest to narrowest.
 * No base styles here — only media-query blocks.
 */

/* ══════════════════════════════════════════════════════════════════════════
   WIDE DESKTOP  ≥ 1600px
   ══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 1600px) {
  .hero {
    margin-inline: auto;
    width: min(95.2%, var(--content-width));
  }

  .section {
    padding-inline: max(4.5%, calc((100% - var(--content-width)) / 2));
  }

  .contact-strip {
    padding-inline: max(4.5%, calc((100% - var(--content-width)) / 2));
  }

  .product-grid,
  .shop-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   TABLET RANGE — header tightening  761px – 1100px
   ══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 761px) and (max-width: 1100px) {
  header.site-header,
  .site-header {
    gap: 16px;
  }

  header.site-header nav,
  .site-header nav,
  .tcb-nav {
    gap: 18px;
  }

  .header-actions {
    gap: 14px;
  }

  .hero {
    grid-template-columns: 1fr 1fr 28px;
  }

  .hero-copy {
    padding: 48px 6% 28px 5%;
  }

  .story-copy {
    padding: 40px 8%;
  }

  .story-copy h2 {
    font-size: 36px;
  }

  .footer-top {
    grid-template-columns: 1.5fr 1fr 1fr;
  }

  .footer-top > div:last-child {
    display: none;
  }
}

@media (min-width: 761px) and (max-width: 900px) {
  .action-label,
  .bag-label {
    display: none;
  }

  .header-actions #wishlist-toggle,
  .header-actions #bag-toggle,
  .header-actions #account-toggle {
    position: relative;
    padding: 0 !important;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .header-actions #wishlist-count,
  .header-actions #bag-count,
  .header-actions .wishlist-count,
  .header-actions .cart-count {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    margin-left: 0 !important;
    margin: 0 !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    font-size: 9px !important;
    line-height: 16px !important;
    pointer-events: none !important;
    border-radius: 50% !important;
    z-index: 2 !important;
  }

  .brand {
    gap: 8px;
  }

  header.site-header nav,
  .site-header nav,
  .tcb-nav {
    gap: 14px;
    font-size: 11px;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   MID-RANGE  ≤ 1050px  (products, story, footer column adjustments)
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1050px) {
  .product-grid,
  .shop-grid,
  #product-grid,
  .woocommerce ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 18px;
  }

  .story {
    grid-template-columns: 1fr;
  }

  .story-photo {
    max-height: 380px;
  }

  .story-copy h2 {
    font-size: 38px;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 24px 30px;
  }

  .cart-page {
    grid-template-columns: 1fr 320px;
  }

  .checkout-page {
    grid-template-columns: 1fr 340px;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   TABLET  ≤ 900px  (shop 2-col, cart/checkout single col)
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .cart-page {
    grid-template-columns: 1fr;
  }

  .checkout-page {
    grid-template-columns: 1fr;
  }

  .order-summary {
    position: static;
  }

  .product-page {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .product-gallery {
    position: static;
  }

  .hero {
    grid-template-columns: 1fr 1fr;
  }

  .vertical-note {
    display: none;
  }

  .section-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   MOBILE  ≤ 760px
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 760px) {
  /* ── Logo crop override (framing.css mobile) ────────────────────────── */
  .logo-crop {
    width: 60px;
    height: 42px;
  }

  .logo-crop img {
    width: 80px;
    height: 80px;
    left: -10px;
    top: -19px;
  }

  .hero-image > img {
    object-position: 52% top;
  }

  /* ── Header ──────────────────────────────────────────────────────────── */
  header.site-header,
  .site-header {
    height: 68px;
    gap: 12px;
  }

  /* ── Show hamburger, hide desktop nav ────────────────────────────────── */
  #menu-toggle {
    display: flex;
  }

  header.site-header nav,
  .site-header nav,
  .tcb-nav {
    display: none !important;
  }

  /* ── Action labels hidden on mobile ──────────────────────────────────── */
  .action-label,
  .bag-label {
    display: none;
  }

  .header-actions {
    gap: 4px;
    align-items: center;
    flex-shrink: 0;
  }

  .header-actions #account-toggle,
  .header-actions .account-toggle {
    display: none !important;
  }

  .header-actions button,
  .header-actions a,
  .header-actions .bag-toggle {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0 !important;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-sizing: border-box;
  }

  /* ── Badge absolute positioning on mobile for header icons ───────────── */
  .header-actions #wishlist-toggle,
  .header-actions #bag-toggle,
  .header-actions #search-toggle,
  .header-actions #menu-toggle {
    position: relative;
    width: 36px;
    height: 36px;
  }

  .header-actions #wishlist-count,
  .header-actions #bag-count,
  .header-actions .wishlist-count,
  .header-actions .cart-count {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    margin-left: 0 !important;
    margin: 0 !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    font-size: 9px !important;
    line-height: 16px !important;
    pointer-events: none !important;
    border-radius: 50% !important;
    background: var(--green, #344536) !important;
    color: #ffffff !important;
    z-index: 2 !important;
  }

  .header-actions #wishlist-count[data-count]:not([data-count=""]):not([data-count="0"]):not(:empty),
  .header-actions #bag-count[data-count]:not([data-count=""]):not([data-count="0"]):not(:empty),
  .header-actions .wishlist-count[data-count]:not([data-count=""]):not([data-count="0"]):not(:empty),
  .header-actions .cart-count[data-count]:not([data-count=""]):not([data-count="0"]):not(:empty) {
    display: grid !important;
    place-items: center !important;
  }

  .header-actions #wishlist-count[data-count="0"],
  .header-actions #bag-count[data-count="0"],
  .header-actions #wishlist-count:empty,
  .header-actions #bag-count:empty {
    display: none !important;
  }

  /* ── Announcement (Mobile: only show middle text) ────────────────────── */
  .announcement {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    padding-inline: 16px !important;
    height: 34px !important;
  }

  /* Hide left and right side text, keep only middle link text */
  .announcement > span:not(.announcement-arrow),
  .announcement .announcement-side-text,
  .announcement .announcement-left,
  .announcement .announcement-right {
    display: none !important;
  }

  .announcement a,
  .announcement .announcement-middle-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    letter-spacing: 0.3px !important;
    margin: 0 auto !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }

  .announcement a span,
  .announcement a .announcement-arrow {
    display: inline-block !important;
    margin-left: 6px !important;
  }

  /* ── Hero ────────────────────────────────────────────────────────────── */
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    margin: 12px 0 0;
    min-height: unset;
  }

  .hero-image {
    min-height: 320px;
  }

  .hero-copy {
    padding: 40px 5% 28px;
  }

  .hero-copy > .button {
    width: 100%;
  }

  .vertical-note {
    display: none;
  }

  /* ── Benefits ────────────────────────────────────────────────────────── */
  .benefits {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 22px 4.5%;
    width: 100%;
    margin: 0;
  }

  /* ── Section ─────────────────────────────────────────────────────────── */
  .section {
    padding: 48px 4.5% 40px;
  }

  .section-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 24px;
  }

  .section-heading h2 {
    font-size: 28px;
  }

  /* ── Product Grid (2 columns on mobile) ───────────────────────────────── */
  #product-grid,
  .product-grid,
  .shop-grid,
  .woocommerce ul.products,
  .products.shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 20px 12px !important;
  }

  /* Hide collection badge overlay on mobile to keep photos clean & unobstructed */
  .product-tag {
    display: none !important;
  }


  /* ── Story ───────────────────────────────────────────────────────────── */
  .story {
    margin: 0 0 40px;
    width: 100%;
  }

  .story-photo {
    max-height: 280px;
  }

  .story-copy {
    padding: 36px 5%;
  }

  .story-copy h2 {
    font-size: 32px;
    margin: 16px 0;
  }

  /* ── Contact Strip ───────────────────────────────────────────────────── */
  .contact-strip {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 4.5% 48px;
    gap: 16px;
  }

  .contact-strip h2 {
    font-size: 24px;
  }

  /* ── Footer ──────────────────────────────────────────────────────────── */
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 28px 20px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }

  /* ── Collection Toolbar ──────────────────────────────────────────────── */
  .collection-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-tabs {
    width: 100%;
  }

  /* ── Search Row ──────────────────────────────────────────────────────── */
  .search-row {
    flex-direction: column;
  }

  /* ── Page Shell ──────────────────────────────────────────────────────── */
  .page-shell {
    padding: 24px 16px 48px;
    max-width: 100%;
    overflow-x: clip;
    box-sizing: border-box;
  }

  .page-heading h1 {
    font-size: clamp(24px, 7vw, 36px);
  }

  /* ── Cart ────────────────────────────────────────────────────────────── */
  .cart-line {
    grid-template-columns: 80px 1fr;
    gap: 14px;
  }

  .cart-line-price {
    grid-column: 2;
  }

  .cart-line img {
    width: 80px;
    height: 100px;
  }

  /* ── Checkout Fields ─────────────────────────────────────────────────── */
  .checkout-fields {
    grid-template-columns: 1fr;
  }

  .checkout-fields .full-width {
    grid-column: 1;
  }

  /* ── Bag Dialog ──────────────────────────────────────────────────────── */
  .bag-dialog {
    width: 100vw;
    inset: auto 0 0 0;
    height: 80dvh;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
  }

  /* ── Menu Dialog ─────────────────────────────────────────────────────── */
  .menu-dialog {
    width: 100vw;
    height: 100vh;
    padding: 16px;
  }

  .menu-dialog-card {
    width: min(420px, calc(100% - 16px));
    padding: 32px 24px;
    max-height: 90vh;
  }

  /* ── Product Page ────────────────────────────────────────────────────── */
  .product-page {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   SMALL PHONE  ≤ 480px
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .checkout-fields {
    grid-template-columns: 1fr;
  }

  .cart-line {
    grid-template-columns: 70px 1fr;
    gap: 12px;
  }

  .cart-line img {
    width: 70px;
    height: 88px;
  }

  .bag-item {
    grid-template-columns: 72px 1fr;
    gap: 12px;
  }

  .bag-item img {
    width: 72px;
    height: 90px;
  }

  .hero-copy {
    padding: 32px 4.5% 22px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   NARROW PHONE — hide brand wordmark  ≤ 440px
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 440px) {
  .brand-sub,
  .brand-wordmark {
    display: none;
  }

  .brand {
    gap: 8px;
    font-size: 11px;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   XS PHONE  ≤ 360px  (single column product grid, micro adjustments)
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 360px) {
  #product-grid,
  .product-grid,
  .shop-grid,
  .woocommerce ul.products,
  .products.shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px 8px !important;
  }

  header.site-header,
  .site-header {
    height: 60px;
  }

  .announcement {
    height: 30px !important;
    justify-content: center !important;
  }

  .announcement a,
  .announcement .announcement-middle-link {
    font-size: 10px !important;
  }

  .hero-copy {
    padding: 28px 4% 20px;
  }

  .section {
    padding: 36px 4% 32px;
  }

  .story-copy {
    padding: 28px 4%;
  }

  .story-copy h2 {
    font-size: 26px;
  }

  .section-heading h2 {
    font-size: 24px;
  }

  .contact-strip h2 {
    font-size: 20px;
  }

  .page-shell {
    padding: 20px 14px 40px;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: clip;
  }
}

/* ─── Returns & Refunds Mobile Optimization ──────────────────────────────── */
@media (max-width: 768px) {
  .tcb-return-form-card,
  .tcb-return-tracker-card {
    padding: 18px 14px !important;
    margin-top: 20px !important;
    border-radius: 8px !important;
  }

  .tcb-return-form-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .tcb-toggle-return-btn {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    box-sizing: border-box !important;
    padding: 10px 16px !important;
  }

  .tcb-tracker-steps {
    grid-template-columns: 1fr 1fr !important;
    gap: 14px 10px !important;
    margin-bottom: 20px !important;
  }

  .tcb-step {
    gap: 6px !important;
  }

  .tcb-step-indicator {
    width: 26px !important;
    height: 26px !important;
    font-size: 11px !important;
  }

  .tcb-step-name {
    font-size: 12px !important;
    line-height: 1.3 !important;
  }

  .tcb-step-desc {
    font-size: 10.5px !important;
    line-height: 1.35 !important;
  }

  .tcb-tracker-summary-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 14px 12px !important;
  }

  .tcb-form-actions {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
  }

  .tcb-submit-return-btn.button,
  .tcb-submit-return-btn,
  .tcb-cancel-return-btn.button,
  .tcb-cancel-return-btn {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 13px 16px !important;
    min-height: 46px !important;
    white-space: nowrap !important;
  }

  .tcb-submit-return-btn span,
  .tcb-cancel-return-btn span {
    font-size: 13px !important;
    line-height: 1 !important;
  }

  .tcb-radio-label {
    padding: 12px !important;
    gap: 10px !important;
  }

  .tcb-item-checkbox-label {
    padding: 10px 12px !important;
    gap: 10px !important;
  }

  .tcb-grid-2 {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .tcb-returns-guarantee-card {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 16px 14px !important;
    gap: 12px !important;
  }

  .tcb-return-eligible-card {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 14px 12px !important;
    gap: 12px !important;
  }

  .tcb-eligible-action {
    width: 100% !important;
  }

  .tcb-btn-request-return {
    width: 100% !important;
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    padding: 10px 14px !important;
  }

  .tcb-return-help-box {
    padding: 16px 14px !important;
  }

  .tcb-help-actions {
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
  }

  .tcb-help-btn {
    width: 100% !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    text-align: center !important;
  }
}

