/**
 * CARTELL desktop storefront reference.
 * Deliberately absent below 900px so mobile v1.3.5 stays byte-for-byte visual.
 */

@media (min-width: 900px) {
  /* Keep the device switch atomic at the same breakpoint as the homepage. */
  .desktop-only { display: block !important; }
  .mobile-only { display: none !important; }
  .desktop-legacy-search { display: none !important; }

  .site-header .desktop-storefront-header {
    display: block !important;
    background: #fff;
  }

  .desktop-storefront-header-inner {
    display: grid;
    grid-template-columns: minmax(190px, 250px) minmax(360px, 1fr) auto;
    align-items: center;
    gap: 34px;
    min-height: 112px;
  }

  .desktop-storefront-brand .brand-logo-stack { align-items: flex-start; }
  .desktop-storefront-brand .cartell-wordmark { font-size: clamp(36px, 3.4vw, 50px); letter-spacing: 1px; }
  .desktop-storefront-brand .cartell-tagline { display: none; }
  .desktop-storefront-brand .custom-logo { width: auto; max-width: 245px; max-height: 75px; }

  .desktop-storefront-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px 52px;
    height: 50px;
    overflow: hidden;
    border: 1px solid #e7e8ed;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 7px 22px rgba(32,43,63,.07);
  }

  .desktop-storefront-search input {
    min-width: 0;
    padding: 0 20px;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 14px;
  }

  .desktop-storefront-search-category {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #313847;
    border-left: 1px solid #ececf0;
    font-size: 13px;
    white-space: nowrap;
  }

  .desktop-storefront-search button {
    display: grid;
    place-items: center;
    color: #fff;
    border: 0;
    background: #e71960;
    cursor: pointer;
  }

  .desktop-storefront-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;
  }

  .desktop-storefront-action {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #101927;
    text-decoration: none;
    white-space: nowrap;
  }

  .desktop-storefront-action-icon { position: relative; display: inline-flex; }
  .desktop-storefront-action-icon b {
    position: absolute;
    top: -10px;
    right: -10px;
    display: grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    color: #fff;
    border-radius: 9px;
    background: #ec1c64;
    font-size: 10px;
  }

  .desktop-storefront-action > span:last-child { display: flex; flex-direction: column; }
  .desktop-storefront-action strong { font-size: 12px; line-height: 1.2; }
  .desktop-storefront-action small { color: #59606d; font-size: 10px; }

  .reference-promo-shell { width: 100%; max-width: none; }
  .reference-promo-bar {
    width: 100%;
    max-width: none;
    min-height: 37px;
    padding-inline: max(28px, calc((100vw - 1440px) / 2));
    border-radius: 0;
    background: linear-gradient(90deg, #ef2a6d, #d91659);
    font-size: 12px;
  }

  .reference-desktop-nav {
    border-top: 1px solid #f0f0f2;
    border-bottom: 1px solid #ececf0;
  }

  .reference-desktop-nav .desktop-nav-inner {
    display: grid;
    grid-template-columns: 235px minmax(0, 1fr);
    gap: 20px;
    height: 55px;
  }

  .desktop-all-categories {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 44px;
    align-self: end;
    padding: 0 20px;
    color: #fff;
    border-radius: 4px 4px 0 0;
    background: #0f2947;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
  }

  .reference-desktop-nav .desktop-nav-list {
    justify-content: flex-start;
    gap: clamp(20px, 2.2vw, 38px);
  }

  .reference-desktop-nav .desktop-nav-link {
    position: relative;
    padding: 20px 0 17px;
    color: #111927;
    font-size: 12px;
    font-weight: 800;
  }

  .reference-desktop-nav .desktop-nav-link.active::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    background: #ed1b62;
  }

  /* Older storefront CSS used a 2/3 + 1/3 dashboard grid here. The new
     desktop homepage is one full-width composition, so remove that inherited
     empty right column without touching phone styles. */
  body.home .site-main.main-content,
  body.home .homepage-wrapper {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .desktop-reference-home {
    width: calc(100% - 48px);
    max-width: 1680px;
    margin: 0 auto;
    padding: 30px 0 38px;
    color: #101927;
  }

  .drh-hero {
    position: relative;
    aspect-ratio: 2.34 / 1;
    min-height: 420px;
    max-height: 600px;
    overflow: hidden;
    border-radius: 6px;
    background: #fff0f4;
  }

  .drh-hero > img { width: 100%; height: 100%; display: block; object-fit: cover; }
  .drh-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255,251,252,.97) 0%, rgba(255,251,252,.82) 32%, rgba(255,255,255,.02) 58%);
  }

  .drh-hero-copy {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 6%;
    width: 39%;
    transform: translateY(-50%);
  }

  .drh-hero-copy p { margin: 0 0 20px; color: #183352; font-size: 15px; font-weight: 800; letter-spacing: .06em; }
  .drh-hero-copy h1 { margin: 0; font-size: clamp(31px, 3.25vw, 53px); line-height: 1.19; font-weight: 500; }
  .drh-hero-copy h1 strong { color: #e91d62; font-weight: 800; }
  .drh-hero-copy > span { display: block; margin-top: 20px; font-size: 17px; line-height: 1.55; }
  .drh-hero-copy > a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    margin-top: 27px;
    padding: 0 26px;
    color: #fff;
    border-radius: 4px;
    background: #e91d62;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
  }

  .drh-slider-dots { position: absolute; z-index: 2; bottom: 18px; left: 50%; display: flex; gap: 7px; transform: translateX(-50%); }
  .drh-slider-dots i { width: 8px; height: 8px; border-radius: 50%; background: #fff; }
  .drh-slider-dots i:first-child { width: 25px; border-radius: 5px; background: #ef2167; }

  .drh-service-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: 28px 0 34px;
    padding: 22px 26px;
    border: 1px solid #f2f2f4;
    border-radius: 5px;
    box-shadow: 0 9px 28px rgba(41,45,60,.05);
  }

  .drh-service-strip > div { display: flex; align-items: center; justify-content: center; gap: 15px; border-right: 1px solid #ededf1; }
  .drh-service-strip > div:last-child { border-right: 0; }
  .drh-service-strip b { color: #ed1c62; font-size: 28px; }
  .drh-service-strip span, .drh-bottom-trust span { display: flex; flex-direction: column; gap: 4px; }
  .drh-service-strip strong, .drh-bottom-trust strong { font-size: 13px; }
  .drh-service-strip small, .drh-bottom-trust small { color: #707887; font-size: 11px; }

  .drh-categories, .drh-product-section { margin: 0 0 38px; text-align: center; }
  .drh-categories > h2, .drh-product-section > h2 { margin: 0; font-size: 20px; line-height: 1.2; font-weight: 800; }
  .drh-heading-ornament { display: block; margin: 6px auto 24px; color: #e91d62; font-size: 24px; line-height: 1; }

  .drh-category-row { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 15px; }
  .drh-category-row > a { min-width: 0; color: #101927; text-decoration: none; }
  .drh-category-row > a > span {
    display: block;
    width: min(100%, 132px);
    aspect-ratio: 1;
    margin: 0 auto 10px;
    overflow: hidden;
    border-radius: 50%;
    background: #f8f4f5;
  }
  .drh-category-row img { width: 100%; height: 100%; display: block; object-fit: cover; }
  .drh-category-row strong { display: block; font-size: 12px; line-height: 1.25; }

  .drh-category-promos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 0 0 42px; }
  .drh-category-promos article { position: relative; min-height: 315px; overflow: hidden; border-radius: 6px; background: #f4dcf6; }
  .drh-category-promos article:nth-child(2) { background: #ccf0ed; }
  .drh-category-promos article:nth-child(3) { background: #ffe0b6; }
  .drh-category-promos article > img { position: absolute; inset: 0 0 0 auto; width: 58%; height: 100%; object-fit: cover; opacity: .94; }
  .drh-category-promos article::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.93), rgba(255,255,255,.1) 72%); }
  .drh-category-promos article > div { position: relative; z-index: 1; width: 56%; padding: 34px 0 25px 28px; }
  .drh-category-promos h2 { margin: 0 0 19px; color: #8a2ca6; font-size: 25px; line-height: 1.1; }
  .drh-category-promos article:nth-child(2) h2 { color: #068e82; }
  .drh-category-promos article:nth-child(3) h2 { color: #ef531a; }
  .drh-category-promos p { min-height: 60px; margin: 0 0 20px; font-size: 13px; line-height: 1.45; }
  .drh-category-promos a { display: inline-flex; padding: 10px 15px; color: #fff; border-radius: 3px; background: #a85ac1; font-size: 10px; font-weight: 800; text-decoration: none; }
  .drh-category-promos article:nth-child(2) a { background: #078f84; }
  .drh-category-promos article:nth-child(3) a { background: #f0641c; }

  .drh-product-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; text-align: left; }
  .drh-product-card { min-width: 0; }
  .drh-product-image { position: relative; display: block; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 5px; background: #f8f8f9; }
  .drh-product-image img { width: 100% !important; height: 100% !important; display: block; object-fit: contain; }
  .drh-product-badge { position: absolute; z-index: 1; top: 8px; left: 8px; padding: 5px 7px; color: #fff; border-radius: 3px; background: #e91d62; font-size: 9px; font-weight: 800; }
  .drh-product-section:nth-of-type(6) .drh-product-badge { background: #078f58; }
  .drh-product-copy { padding: 13px 2px 0; }
  .drh-product-copy h3 { min-height: 2.6em; margin: 0 0 8px; font-size: 13px; line-height: 1.3; font-weight: 500; }
  .drh-product-copy h3 a { color: #222936; text-decoration: none; }
  .drh-product-price { min-height: 23px; font-size: 15px; font-weight: 800; }
  .drh-product-price ins { color: #111927; text-decoration: none; }
  .drh-product-price del { margin-left: 4px; color: #9a9da5; font-size: 10px; font-weight: 400; }
  .drh-rating { margin: 5px 0 8px; color: #f6a400; font-size: 11px; letter-spacing: 1px; }
  .drh-product-actions { display: flex; gap: 7px; margin-top: 9px; }
  .drh-cart-button, .drh-icon-button { display: grid; place-items: center; width: 42px; height: 34px; color: #e91d62; border: 1px solid #f2b2ca; border-radius: 4px; background: #fff; text-decoration: none; cursor: pointer; }
  .drh-cart-button { width: 54px; background: #fff4f8; }

  .drh-bottom-trust {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 58px;
    padding: 28px 32px;
    border-radius: 7px;
    background: #fff1f6;
  }
  .drh-bottom-trust > div { display: flex; align-items: center; justify-content: center; gap: 15px; color: #ed1c62; border-right: 1px solid #f2cdd9; }
  .drh-bottom-trust > div:last-child { border-right: 0; }
  .drh-bottom-trust strong { color: #111927; }

  .desktop-newsletter-strip {
    display: block !important;
    padding: 28px max(32px, calc((100vw - 1380px) / 2));
    color: #fff;
    background: linear-gradient(90deg, #dc1557, #c9084d);
  }
  .desktop-newsletter-inner { display: grid; grid-template-columns: 310px minmax(430px, 690px); align-items: center; justify-content: space-between; gap: 45px; }
  .desktop-newsletter-copy { display: flex; align-items: center; gap: 18px; }
  .desktop-newsletter-copy strong { display: block; font-size: 14px; }
  .desktop-newsletter-copy span { font-size: 11px; }
  .desktop-newsletter-form { display: grid; grid-template-columns: 1fr 150px; height: 48px; overflow: hidden; border-radius: 9px; }
  .desktop-newsletter-form input { min-width: 0; padding: 0 20px; border: 0; outline: 0; }
  .desktop-newsletter-form button { color: #fff; border: 0; background: #09090d; font-size: 11px; font-weight: 800; }

  /* Desktop shop: compact catalog grid. This intentionally overrides the
     mobile-first two-column rule only on desktop. */
  .shop-archive-main .cartell-container {
    width: calc(100% - 48px) !important;
    max-width: 1440px !important;
    margin-inline: auto !important;
    padding-inline: 0 !important;
  }

  .shop-archive-main .shop-grid,
  .shop-archive-main .cartell-product-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 20px !important;
  }

  .shop-archive-main .product-card {
    min-width: 0 !important;
    border-radius: 12px !important;
  }

  .shop-archive-main .product-card-media {
    width: 100% !important;
    height: auto !important;
    max-height: 285px !important;
    aspect-ratio: 1.12 / 1 !important;
    padding: 12px !important;
    overflow: hidden !important;
  }

  .shop-archive-main .product-card-media img,
  .shop-archive-main .product-card-img {
    width: 100% !important;
    height: 100% !important;
    max-height: 260px !important;
    object-fit: contain !important;
    object-position: center !important;
  }

  .shop-archive-main .product-card-body { padding: 10px 13px 13px !important; }
  .shop-archive-main .product-card-title { min-height: 36px !important; font-size: 13px !important; }
}

@media (min-width: 900px) and (max-width: 1120px) {
  .desktop-storefront-header-inner { grid-template-columns: 180px minmax(300px, 1fr) auto; gap: 18px; }
  .desktop-storefront-actions { gap: 12px; }
  .desktop-storefront-account { display: none; }
  .reference-desktop-nav .desktop-nav-list { gap: 16px; }
  .reference-desktop-nav .desktop-nav-link { font-size: 10px; }
  .drh-category-promos article { min-height: 270px; }
}
