/* DIRA — responsive.css (after style.css) · 1600 · 1200 · 992 · 768 · 560 */
@media (min-width:1600px) {
  :root {
    --wrap: 1360px;
  }
}

@media (max-width:1200px) {
  .header-search-input {
    width: 160px;
  }

  .header-search-input:focus {
    width: 195px;
  }

  .cat-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .cat-grid .cat:nth-child(5) {
    display: none;
  }

  .prod-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .values__row {
    grid-template-columns: repeat(4, 1fr);
    gap: .8rem;
  }

  .reels-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}



@media (max-width:992px) {
  :root {
    --sp: clamp(3rem, 6vw, 4.6rem);
  }

  .nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .header-cta {
    display: none;
  }

  .mega {
    display: none;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.6rem;
  }

  .hero__text {
    max-width: none;
  }

  .hero__media {
    max-width: 400px;
    margin-inline: auto;
    width: 100%;
  }

  .hero__mnd--tr {
    width: 80%;
    height: 60%;
    opacity: .4;
  }

  .hero__mnd--bl {
    display: none;
  }

  .values__row {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem 1rem;
  }

  .cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .cat-grid .cat:nth-child(n+4) {
    display: none;
  }

  .prod-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .festive .wrap {
    grid-template-columns: 1fr;
  }

  .festive__img {
    order: -1;
    aspect-ratio: 16/10;
  }

  .split {
    grid-template-columns: 1fr;
    gap: 2.4rem;
  }

  .sticky-media {
    position: static;
  }

  .author__media,
  .faq-media {
    max-width: 400px;
    margin-inline: auto;
  }

  .process__body {
    order: -1;
  }

  .faq-split {
    grid-template-columns: 1fr;
  }

  .reels-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .gfeature {
    grid-column: 1/3;
    position: static;
  }

  .rev-col {
    height: min(60vh, 480px);
  }

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

  .footer-brand {
    grid-column: 1/3;
  }

  .header-search-input {
    width: 175px;
  }

  .header-search-input:focus {
    width: 205px;
  }
}

@media (max-width:768px) {
  :root {
    --gutter: 1.1rem;
    --sp: clamp(2.6rem, 8vw, 3.6rem);
  }

  .founder-story-page .fs-narrative .fs-heading::before {
    display: none;
  }

  .founder-story-page .fs-narrative {
    max-width: 100%;
  }

  .hero-inner {
    min-height: 400px;
  }

  .value {
    justify-content: start;
  }

  .hero__video-el {
    object-position: 87% center;
  }

  .why {
    padding: 10px;
  }

  #products .tabs {
    width: max-content;
    margin: auto;
  }

  .dira-lookbook__middle .inner-div {
    min-height: 100% !important;
    padding: 0 !important;
    gap: 0 !important;
  }

  .prod-top {
    flex-direction: column;
    align-items: stretch;
  }

  .tabs {
    justify-content: center;
  }

  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product__name {
    font-size: 1.14rem;
  }

  .slide-card {
    width: 220px;
  }

  .reels-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: .6rem;
  }

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

  .gfeature {
    grid-column: auto;
    padding: 15px;
  }

  .page-id-28 .entry-content .col-lg-4.mb-5.mb-lg-0 {
    position: relative;
    top: 0;
  }

  .nxp-product__top {
    display: contents !important;
  }

  .single-product .woocommerce-container .wrap {
    max-width: 100%;
  }

  .product__media {
    aspect-ratio: 5 / 5;
  }

  .prod-grid {
    grid-template-columns: repeat(1, 1fr);
  }

  .woocommerce-container ul.products li.product img {
    aspect-ratio: 5 / 5;
  }

  .woocommerce-container ul.products li.product .woocommerce-loop-product__title {
    padding: 10px 0 !important;
  }

  .woocommerce-container ul.products li.product .woocommerce-loop-product__link::before {
    display: none;
  }

  .woocommerce-container ul.products li.product .price {
    padding: 0;
    font-size: .92rem;
  }

  .woocommerce-container ul.products {
    grid-template-columns: 1fr !important;
  }

  .woocommerce div.product,
  .woocommerce-page div.product {
    padding: 15px !important;
  }

  .rev-col--b {
    display: none;
  }

  .rev-col {
    height: min(66vh, 520px);
  }

  .quickview {
    padding: 1rem;
  }

  .qv-panel {
    /* minmax(0, 1fr) stops the column growing to the image's natural width */
    grid-template-columns: minmax(0, 1fr);
    max-height: 88vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .qv-media {
    height: auto;
    aspect-ratio: 4/3;
    max-height: 45vh;
    width: 100%;
  }

  .qv-body {
    padding: 1.3rem 1.2rem 1.5rem;
    justify-content: flex-start;
  }

  .qv-body h3 {
    font-size: 1.4rem;
    overflow-wrap: anywhere;
  }

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

  .footer-pay {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .hero__title {
    font-size: 40px;
    line-height: 50px;
  }

  .hero__title em {
    font-size: 40px;
    line-height: 0px;
  }

  .hero__archwrap {
    width: min(76%, 300px);
  }

  .hero__trust {
    gap: .8rem 1.1rem;
  }

  .pre__word {
    height: 36px;
  }

  .count .box {
    min-width: 52px;
  }

  .count b {
    font-size: 1.35rem;
  }

  .author__stamp {
    width: 88px;
    height: 88px;
    right: 6px;
    bottom: -12px;
  }

  .header-search-form {
    margin-right: .15rem;
  }

  .header-search-input {
    width: 145px;
    height: 36px;
    font-size: .8rem;
    padding: 0 32px 0 12px;
  }

  .header-search-input:focus {
    width: 165px;
  }
}

@media (max-width:560px) {
  .values__row {
    grid-template-columns: 1fr;
  }

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

  .footer-brand {
    grid-column: auto;
  }

  .hero__seal {
    right: 0;
    bottom: 6%;
    padding: .5rem .75rem;
  }

  .hero__arch--mini {
    left: 0;
    width: 32%;
  }

  .hero__cta .btn {
    flex: 1;
    min-width: 140px;
  }

  .reel__meta i:last-child {
    display: none;
  }

  .author__stats {
    gap: .5rem;
  }

  .statbox b {
    font-size: 1.7rem;
  }

  .statbox {
    padding: 1rem .4rem .8rem;
  }

  .header-search-form {
    margin-right: 0;
  }

  .header-search-input {
    width: 115px;
    height: 34px;
    font-size: .76rem;
    padding: 0 28px 0 10px;
  }

  .header-search-input:focus {
    width: 130px;
  }

  .header-search-btn {
    width: 24px;
    height: 24px;
    right: 3px;
  }

  .header-search-btn svg {
    width: 14px;
    height: 14px;
  }
}

/* ==========================================================
   Instagram feed (Smash Balloon) — tablet & mobile layout
   The plugin's JS sets a pixel height per photo for its own
   column count, so photos are sized by aspect ratio here.
   ========================================================== */

/* Tablet: keep one row of 5 like desktop (plugin default is 2 columns) */
@media (min-width: 641px) and (max-width: 991px) {
  #sb_instagram #sbi_images {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  #sb_instagram #sbi_images .sbi_photo {
    height: auto !important;
    aspect-ratio: 3 / 4;
  }
}

/* Mobile: 2 columns, first post full width (1 + 2 + 2) instead of a 1-column stack */
@media (max-width: 640px) {
  #sb_instagram #sbi_images {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #sb_instagram #sbi_images .sbi_item:first-child {
    grid-column: 1 / -1;
  }

  #sb_instagram #sbi_images .sbi_photo {
    height: auto !important;
    aspect-ratio: 3 / 4;
  }

  #sb_instagram #sbi_images .sbi_item:first-child .sbi_photo {
    aspect-ratio: 4 / 3;
  }

  #sb_instagram .sb_instagram_header .sbi_header_text .sbi_bio {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

@media (max-width: 991px) {
  #sb_instagram #sbi_images .sbi_photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* Home Instagram section: the .ig-head contents are commented out in
   front-page.php, but the empty box still adds a 1.8rem gap above the feed */
.ig-head:not(:has(*)) {
  display: none;
}

/* Size chart in product descriptions (table.dira-size-table, in the product content) */
@media (max-width: 600px) {
  .dira-size-table {
    font-size: 13px;
    line-height: 1.35;
  }

  .dira-size-table th,
  .dira-size-table td {
    padding: 9px 4px !important;
    vertical-align: middle;
  }

  .dira-size-table th {
    font-size: 12px;
  }

  /* keep "0-6M", "6-12M" on one line */
  .dira-size-table th:first-child,
  .dira-size-table td:first-child {
    white-space: nowrap;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}

/* ==========================================================
   Site audit fixes
   ========================================================== */

/* Home Google reviews: avatar initials are white text; the colour classes were never defined */
.grev__ava.av1 { background: var(--green, #104E38); }
.grev__ava.av2 { background: #C0643F; }
.grev__ava.av3 { background: #3F7A8C; }
.grev__ava.av4 { background: #B08A2E; }

/* Product pages: description / specs / size table used the system font instead of the site font */
.single-product .woocommerce-product-details__short-description,
.single-product .woocommerce-product-details__short-description *,
.single-product .nxp-rte,
.single-product .nxp-rte * {
  font-family: var(--util, 'Jost'), 'DM Sans', system-ui, sans-serif !important;
}

/* Product pages: the zoom (magnifier) button is absolutely positioned; on mobile the
   gallery was not a positioned box, so the button jumped onto the breadcrumb/title */
.single-product div.product div.images.woocommerce-product-gallery {
  position: relative !important;
}

/* Blog posts: keep a readable line length (the inline 800px was overridden to 100%) */
.single-post .single-post-container .site-main > article,
.single-post .single-post-container .comments-area {
  max-width: 820px !important;
  margin-inline: auto !important;
}

/* Privacy / Terms / Cookies / Stockists now use the page banner; match its spacing */
.page-id-3 .page-container,
.page-id-30 .page-container,
.page-id-42 .page-container,
.page-id-43 .page-container {
  padding-top: 0;
}

/* Journal images are portrait product photos: crop from the top so faces are kept */
.single-post .post-thumbnail img,
.journal-card__img img {
  object-position: 50% 18%;
}

/* FAQ: theme reset removed the list bullets */
.page-id-334 .entry-content ul {
  list-style: disc;
  padding-left: 1.25rem;
}

/* Our Story (desktop): long text lines */
.page-id-27 .story-text {
  max-width: 760px;
  margin-inline: auto;
}

/* Checkout: page had 86px more top space than Cart */
body.woocommerce-checkout .page-container {
  padding-top: 0;
}

/* Checkout: terms sentence mixed two font sizes */
.wc-block-checkout__terms,
.wc-block-checkout__terms a {
  font-size: .85rem !important;
}

/* Shop cards: push price + button to the bottom so rows line up when one card has stars */
.woocommerce-container ul.products li.product .price {
  margin-top: auto;
}

/* Footer: payment / shipping badges were 9–10px */
.pillrow .lbl { font-size: .68rem; }
.pill { font-size: .72rem; }

@media (max-width: 768px) {
  /* Product grids: 2 columns on phones instead of one very long column */
  .prod-grid,
  .woocommerce-container ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: .75rem !important;
  }

  .woocommerce-container ul.products li.product {
    max-width: none;
  }

  .woocommerce-container ul.products li.product .woocommerce-loop-product__title,
  .prod-grid .product__name {
    font-size: .95rem !important;
    line-height: 1.3 !important;
  }

  /* 3 full lines; bottom padding let half of a clipped line show through */
  .woocommerce-container ul.products li.product .woocommerce-loop-product__title {
    -webkit-line-clamp: 3 !important;
    padding: 12px 0 0 !important;
    margin-bottom: 8px !important;
  }

  .woocommerce-container ul.products li.product .button {
    font-size: .6rem !important;
    letter-spacing: .06em !important;
    padding-inline: .4rem !important;
    white-space: nowrap;
  }

  /* Home cards: price and stars were touching */
  .prod-grid .product__row {
    flex-wrap: wrap;
    gap: .25rem .5rem;
  }

  /* Bigger tap targets: header search button and footer links */
  .header-search-btn::after {
    content: "";
    position: absolute;
    inset: -8px;
  }

  .footer-col a {
    display: inline-block;
    padding-block: 5px;
  }

  /* WhatsApp button: slightly smaller so it covers less content */
  .wa-float {
    width: 52px !important;
    height: 52px !important;
    bottom: 16px !important;
    right: 14px !important;
  }
}

@media (max-width: 560px) {
  /* Journal heading label: "✦" wrapped onto its own line */
  .index-container .eyebrow,
  .error404 .eyebrow {
    letter-spacing: .14em;
    font-size: .64rem;
    gap: .45rem;
  }

  .index-container .eyebrow::before,
  .index-container .eyebrow::after {
    width: 16px;
  }
}

/* 404 page search box */
.dira-404-search {
  display: flex;
  gap: .5rem;
  max-width: 460px;
  margin: 0 auto;
}

.dira-404-search input[type="search"] {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: 1px solid #CFC7B4;
  border-radius: 10px;
  background: #fff;
  font-family: var(--util, 'Jost'), sans-serif;
}

.dira-404-search input[type="search"]:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 75, .22);
}

/* Footer (mobile): label on its own line, badges in a neat wrap,
   copyright and legal links centred instead of ragged */
@media (max-width: 768px) {
  .footer-pay {
    flex-direction: column;
    align-items: stretch;
    gap: 1.1rem;
    padding: 18px 0;
  }

  .pillrow {
    gap: .4rem;
  }

  .pillrow .lbl {
    flex-basis: 100%;
    margin-bottom: .15rem;
  }

  .pill {
    padding: .3rem .6rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: .9rem;
  }

  .footer-legal {
    justify-content: center;
    gap: .35rem 1.1rem;
  }
}

/* My Account › Orders (mobile card layout) */
@media (max-width: 768px) {
  /* Each row's label floats left; contain it so an empty value
     (e.g. no J&T tracking number yet) can't collapse the row */
  .woocommerce-orders-table td {
    display: flow-root !important;
  }

  .woocommerce-orders-table__cell-custom-column:not(:has(a))::after {
    content: "Not assigned yet";
    color: var(--muted, #8A8578);
    font-size: .9em;
  }

  /* Pay / View / Cancel were touching */
  .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions {
    display: flex !important;
    flex-wrap: wrap;
    gap: .5rem;
  }

  .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions::before {
    display: block;
    float: none !important;
    flex-basis: 100%;
    text-align: left;
  }

  .woocommerce-orders-table__cell-order-actions .button {
    flex: 1 1 0;
    margin: 0 !important;
    text-align: center;
    padding-inline: .5rem !important;
  }
}

/* Back-to-top sat underneath the WhatsApp button; stack it above instead */
body:has(.wa-float) .to-top {
  bottom: calc(1.5rem + 68px);
}

@media (max-width: 768px) {
  body:has(.wa-float) .to-top {
    bottom: calc(16px + 62px);
    right: 16px;
    width: 44px;
    height: 44px;
  }
}

/* My Account (desktop): menu and content were split 50/50, squeezing the orders table */
@media (min-width: 769px) {
  .page-id-9.logged-in.woocommerce-account .woocommerce {
    grid-template-columns: 260px minmax(0, 1fr) !important;
    gap: 2rem !important;
  }

  .woocommerce-account .page-container .woocommerce-MyAccount-navigation,
  .woocommerce-account .page-container .woocommerce-MyAccount-content {
    width: auto !important;
    float: none !important;
  }

  .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions {
    min-width: 110px;
  }

  .woocommerce-orders-table__cell-order-actions .button {
    margin: 0 .35rem .35rem 0 !important;
  }
}

@media (min-width: 1200px) {
  .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions {
    white-space: nowrap;
  }
}
