/**
 * CARTELL reference mobile homepage.
 * Everything is scoped below 899px; desktop remains exactly as before.
 */

.home-mobile-layout { display: none; }
.home-desktop-layout { display: block; }

@media (max-width: 899px) {
  .home-mobile-layout { display: block; }
  .home-desktop-layout { display: none !important; }

  .mobile-reference-home {
    --mrh-pink: #ff2878;
    --mrh-ink: #101318;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 10px 12px 88px;
    color: var(--mrh-ink);
    background: #fff;
    font-family: Inter, Arial, sans-serif;
    overflow: hidden;
  }

  .mobile-reference-home *,
  .mobile-reference-home *::before,
  .mobile-reference-home *::after { box-sizing: border-box; }

  .mrh-hero {
    position: relative;
    margin-bottom: 16px;
  }

  .mrh-hero-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid #ffd3e1;
    border-radius: 15px;
    background: #fff0f5;
    box-shadow: 0 10px 24px rgba(239, 54, 113, .11);
  }

  .mrh-hero-link > img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
  }

  .mrh-hero-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255,255,255,.93) 0%, rgba(255,255,255,.72) 43%, rgba(255,255,255,.05) 72%);
  }

  .mrh-hero-overlay {
    position: absolute;
    z-index: 1;
    left: 7%;
    top: 50%;
    width: 54%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    color: #161616;
  }

  .mrh-hero-kicker {
    margin-bottom: 3px;
    font-size: clamp(9px, 2.7vw, 13px);
    font-weight: 600;
    font-style: italic;
  }

  .mrh-hero-title {
    font-size: clamp(27px, 10vw, 49px);
    line-height: .95;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #e83142, #ff7b00 25%, #42a832 48%, #7b51d7 72%, #d91d67);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  .mrh-hero-subtitle {
    margin-top: 6px;
    font-size: clamp(8px, 2.25vw, 11px);
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
  }

  .mrh-hero-cta {
    display: inline-flex;
    align-items: center;
    min-height: 29px;
    margin-top: 10px;
    padding: 0 16px;
    color: #fff;
    background: linear-gradient(90deg, #ff3a83, #f60067);
    border-radius: 99px;
    font-size: 10px;
    font-weight: 800;
    box-shadow: 0 6px 14px rgba(255,40,120,.23);
  }

  .mrh-dots {
    display: flex;
    justify-content: center;
    gap: 5px;
    padding-top: 7px;
  }

  .mrh-dots i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d9d9de;
  }

  .mrh-dots i:first-child { background: var(--mrh-pink); }

  .mrh-category-circles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin: 0 0 18px;
  }

  .mrh-circle {
    min-width: 0;
    color: #111;
    text-align: center;
    text-decoration: none;
  }

  .mrh-circle-image {
    display: block;
    width: min(19vw, 88px);
    aspect-ratio: 1;
    margin: 0 auto 6px;
    overflow: hidden;
    border: 4px solid #ff9dc0;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 12px rgba(27,35,54,.08);
  }

  .mrh-circle-2 .mrh-circle-image { border-color: #6bd2d8; }
  .mrh-circle-3 .mrh-circle-image { border-color: #c18cff; }
  .mrh-circle-4 .mrh-circle-image { border-color: #ffd165; }

  .mrh-circle-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
  }

  .mrh-circle strong {
    display: block;
    min-height: 2.4em;
    font-size: clamp(10px, 2.7vw, 14px);
    line-height: 1.2;
    font-weight: 800;
  }

  .mrh-trust {
    margin: 0 0 18px;
    padding: 17px 8px 14px;
    border-radius: 18px;
    text-align: center;
    background: linear-gradient(110deg, #fff7fa, #fff0f5 55%, #fff8fb);
    box-shadow: 0 8px 24px rgba(239,54,113,.07);
  }

  .mrh-eyebrow {
    margin: 0 0 3px;
    color: var(--mrh-pink);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
  }

  .mrh-trust h2,
  .mrh-shop-categories h2,
  .mrh-products h2 {
    margin: 0;
    color: #0f1115;
    font-size: clamp(20px, 6vw, 30px);
    line-height: 1.12;
    font-weight: 800;
  }

  .mrh-intro {
    max-width: 400px;
    margin: 6px auto 13px;
    color: #55515b;
    font-size: 11px;
    line-height: 1.35;
  }

  .mrh-benefits {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .mrh-benefit {
    min-width: 0;
    padding: 0 5px;
    border-right: 1px solid rgba(0,0,0,.07);
  }

  .mrh-benefit:last-child { border-right: 0; }

  .mrh-benefit-icon {
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    margin: 0 auto 7px;
    color: #fff;
    border-radius: 50%;
    background: #ffb200;
    font-size: 18px;
    font-weight: 900;
  }

  .mrh-benefit-2 .mrh-benefit-icon { background: #168ee3; }
  .mrh-benefit-3 .mrh-benefit-icon { background: #25b777; }
  .mrh-benefit-4 .mrh-benefit-icon { background: #9670e7; }

  .mrh-benefit strong {
    display: block;
    font-size: clamp(9px, 2.6vw, 13px);
    line-height: 1.12;
  }

  .mrh-benefit p {
    margin: 5px 0 0;
    color: #55515b;
    font-size: clamp(7px, 2.1vw, 10px);
    line-height: 1.25;
  }

  .mrh-shop-categories {
    margin: 0 0 20px;
  }

  .mrh-shop-categories > h2 {
    margin-bottom: 12px;
    text-align: center;
  }

  .mrh-shop-categories > h2 span { color: var(--mrh-pink); }

  .mrh-category-panels {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .mrh-category-panel {
    position: relative;
    min-width: 0;
    aspect-ratio: .92;
    overflow: hidden;
    border-radius: 13px;
    background: #ffe4db;
  }

  .mrh-category-panel:nth-child(2) { background: #d6f5f6; }
  .mrh-category-panel:nth-child(3) { background: #eee0ff; }

  .mrh-category-panel > img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    opacity: .78;
  }

  .mrh-category-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(255,255,255,.93), rgba(255,255,255,.04) 67%);
  }

  .mrh-category-panel-copy {
    position: absolute;
    z-index: 1;
    inset: auto 5px 8px;
    text-align: center;
  }

  .mrh-category-panel h3 {
    margin: 0 0 5px;
    font-size: clamp(9px, 2.7vw, 14px);
    line-height: 1.15;
    font-weight: 800;
  }

  .mrh-category-panel a {
    display: inline-flex;
    padding: 4px 9px;
    color: #111;
    background: #fff;
    border-radius: 99px;
    font-size: clamp(8px, 2.2vw, 11px);
    font-weight: 700;
    text-decoration: none;
  }

  .mrh-products { margin: 0; }

  .mrh-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
  }

  .mrh-section-heading > a {
    flex: 0 0 auto;
    color: var(--mrh-pink);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
  }

  .mrh-product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .mrh-product-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #f1edf0;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(30,33,45,.06);
  }

  .mrh-product-image {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #faf9fb;
  }

  .mrh-product-image img {
    width: 100% !important;
    height: 100% !important;
    display: block;
    object-fit: contain;
    object-position: center;
  }

  .mrh-product-copy {
    min-height: 86px;
    padding: 9px 9px 11px;
    text-align: left;
  }

  .mrh-product-copy h3 {
    display: -webkit-box;
    min-height: 2.5em;
    margin: 0 0 7px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: clamp(11px, 3vw, 14px);
    line-height: 1.25;
    font-weight: 700;
  }

  .mrh-product-copy h3 a { color: #15151a; text-decoration: none; }

  .mrh-product-price {
    color: #111;
    font-size: clamp(13px, 3.5vw, 17px);
    font-weight: 800;
  }

  .mrh-product-price del {
    margin-left: 3px;
    color: #8a8a92;
    font-size: .72em;
    font-weight: 500;
  }

  .mrh-product-price ins { color: var(--mrh-pink); text-decoration: none; }
}

@media (max-width: 359px) {
  .mobile-reference-home { padding-inline: 8px; }
  .mrh-category-circles { gap: 4px; }
  .mrh-category-panels { gap: 5px; }
  .mrh-benefit { padding-inline: 3px; }
}

@media (min-width: 900px) {
  .home-mobile-layout { display: none !important; }
  .home-desktop-layout { display: block !important; }
}
