/* ─── Tablet: mobile nav only — page layout keeps scaling ─── */
/* Desktop 992px+ keeps horizontal nav — grid layout in style.css prevents overlap. */

@media (max-width: 1350px) and (min-width: 992px) {
  :root {
    --nav-gap: clamp(10px, 1vw, 18px);
  }

  .header__nav a,
  .header__quiz {
    font-size: 11px;
    letter-spacing: 1px;
  }

  .header__actions {
    gap: 16px;
  }

  .header__icons {
    gap: 12px;
  }

  .header__login-btn {
    padding: 0 11px;
    font-size: 10px;
  }
}

@media (max-width: 1100px) and (min-width: 992px) {
  :root {
    --nav-gap: 8px;
  }

  .header__nav a,
  .header__quiz {
    font-size: 10px;
    letter-spacing: 0.85px;
  }

  .header__actions {
    gap: 12px;
  }

  .header__icons {
    gap: 8px;
  }

  .header__icon-btn {
    width: 40px;
    height: 40px;
  }

  .header__login-btn {
    padding: 0 10px;
    font-size: 9px;
  }
}

@media (max-width: 1200px) {
  .testimonials {
    padding: 64px var(--section-padding-x);
    gap: 40px;
  }

  .testimonials__title {
    font-size: 36px;
    line-height: 1.15;
  }

  .testimonials__carousel {
    gap: 0;
    max-width: none;
  }

  .testimonials__content {
    width: 100%;
    min-height: 0;
  }

  .testimonials__stars {
    font-size: 20px;
    letter-spacing: 4px;
    margin-bottom: 12px;
  }

  .testimonials__quote {
    font-size: 24px;
    line-height: 1.35;
    max-width: none;
  }

  .testimonials__arrow {
    display: none;
  }

  .testimonials__author {
    margin-top: 24px;
  }

  .testimonials__avatar {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 991px) {
  :root {
    --logo-width: clamp(80px, 24vw, 96px);
    --logo-height: clamp(58px, 17vw, 70px);
    --nav-gap: 14px;
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 98;
    animation: nav-overlay-in 0.3s ease;
  }

  @keyframes nav-overlay-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  .header__nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    grid-column: auto;
    grid-row: auto;
    transform: translateX(100%);
    width: min(320px, 88vw);
    max-width: 100%;
    height: 100%;
    height: 100dvh;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    justify-self: auto;
    gap: 0;
    padding: calc(var(--header-height) + 4px) 0 32px;
    background: #ffffff;
    border-left: 1px solid rgba(58, 36, 24, 0.08);
    box-shadow: -12px 0 32px rgba(17, 17, 15, 0.1);
    opacity: 1;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.3s ease, visibility 0s linear 0.3s;
    z-index: 99;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.nav-open .header__nav {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.3s ease, visibility 0s linear 0s;
  }

  .header__nav::before {
    content: 'Menu';
    display: block;
    padding: 16px 28px 14px;
    font-family: var(--font-playfair);
    font-size: 22px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #4a3728;
    border-bottom: 1px solid rgba(58, 36, 24, 0.08);
    margin-bottom: 4px;
  }

  .header__nav a {
    justify-content: flex-start;
    height: auto;
    min-height: 48px;
    padding: 14px 28px;
    border-bottom: 1px solid rgba(58, 36, 24, 0.06);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 1.3px;
    color: #3a2418;
  }

  .header__nav a:last-child {
    border-bottom: none;
  }

  /* Undo the rule above for the last injected category link — it isn't
     really the last item in the menu, just the last child of its wrapper. */
  .header__nav [data-nav-categories] a:last-child {
    border-bottom: 1px solid rgba(58, 36, 24, 0.06);
  }

  .header__nav a:hover,
  .header__nav a:focus-visible {
    background: rgba(58, 36, 24, 0.04);
    color: #3a2418;
  }

  .header__menu-btn {
    display: flex;
    position: relative;
    z-index: 101;
  }

  .header__login-btn {
    height: 34px;
    padding: 0 12px;
    font-size: 10px;
    letter-spacing: 1px;
  }

  .header__inner {
    grid-template-columns: 1fr auto;
    padding: 0 var(--section-padding-x);
  }

  .header__logo img {
    width: var(--logo-width);
    height: var(--logo-height);
    max-height: calc(var(--header-height) - 12px);
    object-fit: contain;
  }

  .header__actions {
    grid-column: 2;
  }

  /* Footer — tablet / mobile nav breakpoint */
  .footer {
    padding-top: 48px;
  }

  .footer__inner {
    flex-wrap: wrap;
    padding: 0 var(--section-padding-x);
    gap: 28px 24px;
    min-height: 0;
  }

  .footer__brand {
    flex: 1 1 100%;
    max-width: none;
  }

  .footer__logo {
    height: 56px;
    margin-bottom: 16px;
  }

  .footer__brand p {
    font-size: 14px;
    line-height: 23px;
    width: max-content;
    max-width: min(300px, 100%);
  }

  .footer__col {
    flex: 1 1 calc(50% - 12px);
    min-width: calc(50% - 12px);
    gap: 10px;
  }

  .footer__col h4 {
    font-size: 11px;
    line-height: 1.3;
    letter-spacing: 1.2px;
    margin-bottom: 6px;
  }

  .footer__col a {
    font-size: 14px;
    line-height: 1.4;
  }

  .footer__bottom {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    padding: 20px var(--section-padding-x) 28px;
    margin-top: 20px;
    gap: 14px;
  }

  .footer__copyright,
  .footer__payments {
    font-size: 12px;
    line-height: 1.4;
    white-space: normal;
    width: 100%;
  }

  .footer__social {
    order: 2;
    width: 100%;
    gap: 20px;
  }

  .footer__copyright {
    order: 1;
  }

  .footer__payments {
    order: 3;
  }

  .footer__social a {
    font-size: 12px;
  }
}

/* ─── Mobile: stack sections ─── */
@media (max-width: 768px) {
  :root {
    --header-height: 64px;
    --section-padding-x: 16px;
    --section-padding-lg: 24px;
  }

  .header__inner {
    height: 64px;
    padding: 0 var(--section-padding-x);
  }

  .products__header {
    padding: var(--section-padding-x);
    min-height: auto;
    background: #ffffff;
  }

  .products__body {
    padding: 10px var(--section-padding-x) 10px;
  }

  .products__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 100%;
    margin: 0;
    gap: 10px;
  }

  .products__link {
    font-size: 14px;
  }

  .categories {
    grid-template-columns: 1fr;
    height: auto;
    gap: 0;
  }

  .category-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 1fr;
    align-items: center;
    min-height: 0;
    height: clamp(128px, 34vw, 152px);
    overflow: hidden;
  }

  .category-card__title {
    position: relative;
    grid-column: 1;
    grid-row: 1;
    z-index: 3;
    left: auto;
    top: auto;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 14px 8px 14px var(--section-padding-x);
    font-size: 17px;
    line-height: 1.22;
    letter-spacing: -0.01em;
  }

  .category-card__bg-text {
    position: absolute;
    grid-column: 1 / -1;
    grid-row: 1;
    left: auto;
    right: clamp(72px, 22vw, 100px);
    top: 50%;
    transform: translateY(-50%);
    font-size: clamp(52px, 16vw, 72px) !important;
    line-height: 0.9;
    letter-spacing: 0.02em;
    white-space: nowrap;
    z-index: 1;
  }

  .category-card--oils .category-card__bg-text {
    opacity: 0.28;
  }

  .category-card--crystals .category-card__bg-text {
    opacity: 0.14;
  }

  .category-card--gemstones .category-card__bg-text {
    opacity: 0.14;
  }

  .category-card__image {
    position: relative;
    grid-column: 2;
    grid-row: 1;
    z-index: 2;
    left: auto;
    right: auto;
    bottom: auto;
    width: clamp(96px, 28vw, 124px);
    height: auto;
    max-height: 88%;
    margin-right: var(--section-padding-x);
    object-fit: contain;
    object-position: center bottom;
    align-self: flex-end;
    pointer-events: none;
  }

  .category-card__image--oils {
    width: clamp(96px, 28vw, 124px);
    height: auto;
    max-height: 112px;
    right: auto;
    bottom: auto;
    transform: none;
  }

  .category-card__image--crystals {
    width: clamp(88px, 26vw, 112px);
    height: auto;
    max-height: 100px;
    right: auto;
    bottom: auto;
    transform: rotate(-24deg);
    transform-origin: 100% 100%;
    align-self: center;
  }

  .category-card__image--gemstones {
    width: clamp(96px, 28vw, 120px);
    height: auto;
    max-height: 108px;
    max-width: none;
    right: auto;
    bottom: auto;
    transform: none;
  }

  .featured {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    height: auto;
    min-height: 0;
    overflow: hidden;
  }

  .featured__content {
    flex: 1 1 0;
    min-width: 0;
    padding: 20px 0;
    align-items: stretch;
    justify-content: flex-start;
  }

  .featured__image {
    flex: 0 0 clamp(132px, 34vw, 160px);
    width: clamp(132px, 34vw, 160px);
    min-width: clamp(132px, 34vw, 160px);
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 16px 12px 16px 4px;
    margin-right: var(--section-padding-x);
    background: #ffffff;
  }

  .featured__inner {
    padding: 0 10px 0 var(--section-padding-x);
    gap: 12px;
  }

  .featured__section-title {
    font-size: 20px;
    line-height: 1.25;
  }

  .featured__title {
    font-size: 18px;
    line-height: 1.2;
    padding-top: 0;
  }

  .featured__label {
    font-size: 10px;
    letter-spacing: 1.4px;
  }

  .featured__list-item {
    font-size: 12px;
    line-height: 1.35;
    padding: 8px 0;
  }

  .featured__desc {
    font-size: 12px;
    line-height: 1.45;
  }

  .featured__product-photo {
    width: 100%;
    height: auto;
    max-height: min(200px, 46vw);
    object-fit: contain;
  }

  .featured__actions {
    flex-direction: column;
    gap: 8px;
  }

  .featured__btn {
    width: 100%;
    height: 40px;
    font-size: 10px;
    letter-spacing: 1px;
  }

  .intention {
    padding: 36px 0 32px;
  }

  .intention__header {
    width: 100%;
    max-width: none;
    padding: 0 var(--section-padding-x);
    margin-bottom: 24px;
    gap: 16px;
    box-sizing: border-box;
  }

  .intention__title {
    font-size: 26px;
    line-height: 1.15;
    letter-spacing: -0.02em;
  }

  .intention__desc {
    display: none;
  }

  .intention__tabs {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 24px;
    max-width: none;
    width: 100%;
  }

  .intention__tabs::-webkit-scrollbar {
    display: none;
  }

  .intention__tab {
    flex-shrink: 0;
    font-size: 11px;
    line-height: 1.2;
    letter-spacing: 1.2px;
    padding-bottom: 10px;
  }

  .intention__featured {
    flex-direction: column;
    height: auto;
  }

  .intention__featured-content {
    flex: none;
    width: 100%;
    height: auto;
    padding: 0 var(--section-padding-x) 20px;
    gap: 12px;
    box-sizing: border-box;
  }

  .intention__featured-label,
  .intention__featured-stones {
    white-space: normal;
    font-size: 10px;
    line-height: 1.45;
    letter-spacing: 1.2px;
    max-width: none;
  }

  .intention__featured-stones {
    font-size: 13px;
  }

  .intention__featured-title {
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    max-width: none;
  }

  .intention__featured-text {
    font-size: 13px;
    line-height: 1.5;
    max-width: none;
  }

  .intention__featured-image {
    flex: none;
    width: 100%;
    height: 52vw;
    min-height: 200px;
    max-height: 280px;
  }

  .intention__featured-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    max-width: none;
  }

  .intention__btn {
    width: 100%;
    height: 44px;
    font-size: 10px;
    letter-spacing: 1.2px;
  }

  .intention__dots {
    width: min(140px, 36vw);
    right: -6px;
    top: 4px;
  }

  .ritual__text {
    text-align: left;
    font-size: 14px;
    line-height: 1.55;
  }

  .ritual__intro {
    padding: 32px var(--section-padding-x) 36px;
    gap: 16px;
  }

  .ritual__label {
    font-size: 12px;
    letter-spacing: 1.4px;
  }

  .ritual__row {
    flex-direction: column;
    gap: 16px;
  }

  .ritual__title {
    font-size: 28px;
    line-height: 1.12;
    letter-spacing: -0.03em;
    max-width: none;
  }

  .ritual__title em {
    font-size: 28px;
    line-height: 1.12;
  }

  .ritual__side {
    flex: none;
    width: 100%;
    max-width: none;
    padding-top: 0;
    gap: 16px;
  }

  .ritual__btn {
    height: 44px;
    font-size: 11px;
    letter-spacing: 1.2px;
  }

  .stats__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats__item {
    min-height: 0;
    padding: 20px 14px;
    border-right: 1px solid rgba(58, 36, 24, 0.12);
    border-bottom: 1px solid rgba(58, 36, 24, 0.12);
  }

  .stats__item:nth-child(2n) {
    border-right: none;
  }

  .stats__item:nth-child(n + 3) {
    border-bottom: none;
  }

  .stats__number {
    font-size: 36px;
    line-height: 0.95;
    letter-spacing: -1.5px;
  }

  .stats__label {
    font-size: 10px;
    line-height: 1.25;
    letter-spacing: 1.2px;
    margin-top: 8px;
  }

  .stats__desc {
    font-size: 11px;
    line-height: 1.4;
    margin-top: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hero__buttons {
    flex-wrap: wrap;
  }

  .hero__subtitle-line {
    white-space: normal;
  }

  .footer__inner {
    padding: 0 var(--section-padding-x);
    gap: 24px 16px;
  }

  .footer {
    padding-top: 40px;
  }

  .footer__brand p {
    width: max-content;
    max-width: min(300px, 100%);
    line-height: 23px;
  }

  /* Keep link columns in 2-up grid on mobile to shorten footer height */
  .footer__col {
    flex: 1 1 calc(50% - 8px);
    min-width: calc(50% - 8px);
    max-width: calc(50% - 8px);
    gap: 8px;
  }

  .footer__col h4 {
    margin-bottom: 4px;
  }

  .footer__bottom {
    padding: 18px var(--section-padding-x) 24px;
    gap: 12px;
  }

  .footer__social {
    gap: 16px 20px;
  }

  .cta-quiz__media {
    height: clamp(180px, 45vw, 220px);
  }

  .cta-quiz__content {
    height: auto;
    min-height: 0;
    padding: 28px var(--section-padding-x) 32px;
    gap: 12px;
  }

  .cta-quiz__label {
    font-size: 10px;
    letter-spacing: 1.4px;
  }

  .cta-quiz__title {
    font-size: 26px;
    line-height: 1.12;
    max-width: none;
  }

  .cta-quiz__subtitle {
    font-size: 14px;
    line-height: 1.5;
  }

  .cta-quiz__btn {
    min-width: 0;
    width: 100%;
    max-width: 280px;
    height: 44px;
    font-size: 11px;
    padding: 0 20px;
  }

  .cta-quiz__question {
    font-size: 22px;
    line-height: 1.2;
    max-width: none;
  }

  .cta-quiz__options {
    max-width: none;
    width: 100%;
  }

  .cta-quiz__option {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    font-size: 11px;
  }

  .cta-quiz__back {
    font-size: 13px;
  }

  .testimonials {
    padding: 40px var(--section-padding-x);
    gap: 24px;
  }

  .testimonials__title {
    font-size: 26px;
    line-height: 1.2;
  }

  .testimonials__label {
    font-size: 11px;
  }

  .testimonials__carousel {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    gap: 8px;
    max-width: none;
  }

  .testimonials__content {
    grid-column: 2;
    width: 100%;
    min-height: 0;
  }

  .testimonials__arrow {
    display: flex;
    width: 36px;
    height: 36px;
  }

  .testimonials__quote {
    font-size: 18px;
    line-height: 1.45;
    max-width: none;
  }

  .testimonials__name,
  .testimonials__role {
    font-size: 11px;
  }
}

/* ─── Small mobile ─── */
@media (max-width: 480px) {
  .header__icons {
    gap: 8px;
  }

  .header__icon-btn {
    width: 40px;
    height: 40px;
  }

  .hero__buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__buttons .btn {
    width: 100%;
  }

  .product-card__add-btn {
    font-size: 14px;
    height: 48px;
  }
}
