.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 30;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 1rem;
  width: min(420px, 100vw);
  height: 100vh;
  padding: 1.2rem;
  background: #0c0a08;
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateX(100%);
  transition: transform 180ms ease;
}

.cart-panel.open {
  transform: translateX(0);
}

.cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 29;
  border: 0;
  background: rgba(0, 0, 0, 0.52);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.cart-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-head button {
  min-height: 36px;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

.cart-items {
  display: grid;
  align-content: start;
  gap: 0.8rem;
  overflow: auto;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.9rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.cart-line {
  display: grid;
  justify-items: end;
  gap: 0.5rem;
}

.cart-item small {
  display: block;
  margin-top: 0.3rem;
}

.cart-total {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

@media (max-width: 1120px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 100%;
  }

  .hero-visual {
    min-height: 460px;
    padding-bottom: 130px;
  }

  .hero-visual::after {
    bottom: 135px;
  }

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

  .scent-family-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scent-family-grid article:nth-child(2n) {
    border-right: 0;
  }

  .scent-family-grid article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .counter-services {
    grid-template-columns: 1fr;
  }

  .counter-services a {
    min-height: 92px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .counter-services a:last-child {
    border-bottom: 0;
  }

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

  .brand-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .brand-feature-card,
  .brand-feature-card:nth-child(3n),
  .brand-feature-card:nth-last-child(-n + 3) {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .brand-feature-card:nth-child(2n) {
    border-right: 0;
  }

  .brand-feature-card:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .brand-directory {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .brand-directory-card:nth-child(4n) {
    border-right: 0;
  }

  .brand-directory-card:nth-child(3n) {
    border-right: 1px solid var(--line);
  }

  .catalog-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-discovery-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .catalog-discovery-bar .blotter:nth-child(3n) {
    border-right: 0;
  }

  .catalog-discovery-bar .blotter:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .category-grid,
  .brand-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-grid a,
  .brand-grid a,
  .category-grid a:nth-child(4n),
  .brand-grid a:nth-child(4n) {
    border-right: 1px solid var(--line);
  }

  .category-grid a:nth-child(2n),
  .brand-grid a:nth-child(2n) {
    border-right: 0;
  }

  .category-grid a:nth-last-child(-n + 4),
  .brand-grid a:nth-last-child(-n + 4) {
    border-bottom: 1px solid var(--line);
  }

  .category-grid a:nth-last-child(-n + 2),
  .brand-grid a:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .catalog-hero,
  .collection-preview,
  .product-detail-hero {
    grid-template-columns: 1fr;
  }

  .catalog-hero-panel {
    max-width: 520px;
  }

  .product-detail-art {
    min-height: 520px;
  }

  .collection-preview .button {
    justify-self: start;
  }

  .product-card {
    min-height: 560px;
  }

  .product-art {
    min-height: 310px;
  }

  .ritual,
  .consultation {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .announcement-bar {
    font-size: 0.68rem;
    padding: 0.58rem 0.75rem;
  }

  .site-header {
    padding-inline: 1rem;
  }

  .nav-links {
    display: none;
  }

  .header-search {
    display: none;
  }

  .mobile-quick-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: 1px solid var(--line);
    background: rgba(10, 8, 7, 0.9);
  }

  /* Stronger tap targets for mobile nav */
  .mobile-quick-nav a {
    min-height: 54px;
    font-size: 0.74rem;
  }

  .mobile-quick-nav a:hover {
    background: rgba(214, 174, 103, 0.08);
  }

  .mobile-quick-nav a {
    display: grid;
    min-height: 46px;
    place-items: center;
    padding: 0.5rem 0.35rem;
    border-right: 1px solid var(--line);
    color: var(--accent-soft);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .mobile-quick-nav a:last-child {
    border-right: 0;
  }

  .mobile-action-bar {
    position: fixed;
    left: 0.7rem;
    right: 0.7rem;
    bottom: calc(0.65rem + env(safe-area-inset-bottom));
    z-index: 24;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    padding: 0.5rem;
    border: 1px solid var(--line);
    background: rgba(9, 7, 6, 0.96);
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.44);
  }

  /* Stronger tap targets for primary mobile actions */
  .mobile-action-bar .mobile-action {
    min-height: 48px;
    font-size: 0.78rem;
    border-radius: 2px;
  }

  .mobile-action-bar .mobile-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 42px;
    border: 1px solid var(--line);
    color: var(--accent-soft);
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
  }

  .mobile-action-bar .mobile-action strong {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding-inline: 0.25rem;
    color: #0f0b07;
    background: linear-gradient(132deg, var(--accent-soft), var(--accent));
    font-size: 0.74rem;
    font-weight: 800;
  }

  .mobile-action-bar .mobile-action.primary {
    color: #0f0b07;
    background: linear-gradient(132deg, var(--accent-soft), var(--accent));
    border-color: transparent;
  }

  .mobile-action-bar .mobile-action.primary strong {
    color: var(--accent-soft);
    background: rgba(10, 8, 7, 0.78);
  }

  .hero-rotation {
    min-height: auto;
    overflow: clip;
  }

  .hero-slide,
  .hero-slide.active {
    position: relative;
    inset: auto;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "art";
    align-content: start;
    justify-items: start;
    gap: 1.35rem;
    width: 100%;
    margin-inline: 0;
    padding: clamp(1.6rem, 6vw, 2.2rem) 1rem calc(2.2rem + 76px + env(safe-area-inset-bottom));
  }

  .hero-copy {
    grid-area: copy;
    position: relative;
    z-index: 2;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding-block: 0;
  }

  .hero-copy h1 {
    max-width: 11ch;
    overflow-wrap: anywhere;
    font-size: clamp(2.05rem, 9vw, 3.2rem);
    line-height: 1.06;
  }

  .hero-copy p {
    max-width: 100%;
    font-size: 1rem;
  }

  .hero-art {
    grid-area: art;
    position: static !important;
    display: block;
    justify-self: center;
    width: min(68vw, 270px);
    max-width: 100%;
    height: clamp(165px, 46vw, 260px);
    margin: 0 auto;
    object-fit: contain;
    object-position: center;
    mask-image: none;
    transform: none !important;
  }

  .hero-art.loaded {
    transform: none !important;
  }

  h1 {
    font-size: 4.2rem;
  }

  h2 {
    font-size: 2.2rem;
  }

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

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

  .brand-finder {
    grid-template-columns: 1fr;
  }

  .brand-feature-grid,
  .brand-directory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .brand-directory-card,
  .brand-directory-card:nth-child(3n),
  .brand-directory-card:nth-child(4n) {
    border-right: 1px solid var(--line);
  }

  .brand-directory-card:nth-child(2n) {
    border-right: 0;
  }

  .product-photo {
    max-width: 230px;
    max-height: 285px;
  }

  .service-pillars {
    grid-template-columns: 1fr;
  }

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

  .trust-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trust-strip span:nth-child(2n) {
    border-right: 0;
  }

  .trust-strip span:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .catalog-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-panel .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .mobile-quick-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-quick-nav a:nth-child(2n) {
    border-right: 0;
  }

  .mobile-quick-nav a:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .brand img {
    width: 72px;
    height: 52px;
  }

  h1 {
    font-size: 3.25rem;
  }

  .hero-copy h1 {
    max-width: 10ch;
    font-size: clamp(1.95rem, 9.5vw, 2.55rem);
    line-height: 1.06;
  }

  .hero-copy p {
    font-size: 0.95rem;
  }

  .hero-art {
    width: min(58vw, 190px);
  }

  h2 {
    font-size: 1.85rem;
  }

  .hero,
  .catalog-hero,
  .product-detail-hero,
  .section-intro,
  .brand-finder,
  .brand-directory-shell,
  .collapsible-shelf,
  .category-shop,
  .scent-guide,
  .brand-showcase,
  .featured-section,
  .exclusive-section,
  .collection-preview,
  .ritual,
  .house-standards,
  .consultation,
  .trust-strip,
  .service-pillars,
  .site-footer {
    padding-inline: 1rem;
  }

  .product-scent-sheet,
  .detail-related-section,
  .product-not-found .section-intro {
    padding-inline: 1rem;
  }

  .hero {
    padding-top: 2.4rem;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .button {
    flex: 1 1 100%;
    min-width: 0;
  }

  .hero-rotation {
    min-height: auto;
  }

  .hero-slide,
  .hero-slide.active {
    position: relative;
    inset: auto;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "art";
    align-content: start;
    justify-items: start;
    gap: 1.25rem;
    width: 100%;
    margin-inline: 0;
    padding: 1.5rem 1rem calc(2rem + 76px + env(safe-area-inset-bottom));
  }

  .hero-copy {
    grid-area: copy;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding-block: 0;
  }

  .hero-copy h1 {
    max-width: 10ch;
    overflow-wrap: anywhere;
    font-size: clamp(2.05rem, 11vw, 2.9rem);
    line-height: 1.06;
  }

  .hero-copy p {
    font-size: 0.95rem;
    max-width: 100%;
  }

  .hero-art {
    grid-area: art;
    grid-row: 2;
    position: static !important;
    right: auto;
    top: auto;
    width: min(58vw, 190px);
    max-width: 100%;
    height: clamp(120px, 42vw, 180px);
    margin-inline: auto;
    margin-top: 0.25rem;
    transform: none !important;
    object-fit: contain;
    object-position: center;
    mask-image: none;
    justify-self: center;
  }

  .hero-art.loaded {
    transform: none !important;
  }

  .catalog-hero {
    padding-top: 2.8rem;
  }

  .brand-page .catalog-hero {
    padding-top: 2.2rem;
    padding-bottom: 2.4rem;
  }

  .catalog-hero h1 {
    font-size: 3.25rem;
  }

  .brand-page .catalog-hero h1 {
    font-size: 3rem;
  }

  .catalog-hero-panel {
    padding: 1rem;
  }

  .product-detail-hero {
    min-height: auto;
    padding-top: 2.8rem;
  }

  .product-detail-copy h1 {
    font-size: 2.75rem;
  }

  .product-detail-art {
    min-height: 390px;
  }

  .hero-visual {
    min-height: 370px;
    padding-bottom: 110px;
  }

  .hero-visual::after {
    bottom: 115px;
  }

  .hero-feature-card h3 {
    font-size: 1rem;
  }

  .featured-grid,
  .ritual-steps {
    grid-template-columns: 1fr;
  }

  .brand-finder {
    gap: 1rem;
  }

  .brand-feature-card {
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: 176px;
  }

  .brand-feature-art img {
    width: min(74px, 76%);
    max-height: 132px;
  }

  .brand-directory-intro {
    display: grid;
    align-items: start;
  }

  .brand-directory-shell summary,
  .collapsible-shelf summary {
    align-items: stretch;
    flex-direction: column;
    min-height: auto;
  }

  .brand-directory-shell summary::after,
  .collapsible-shelf summary::after {
    width: 100%;
  }

  .category-grid a {
    grid-template-rows: 150px auto auto;
    min-height: 270px;
  }

  .category-grid img {
    height: 145px;
  }

  .scent-family-grid {
    grid-template-columns: 1fr;
  }

  .scent-family-grid article,
  .scent-family-grid article:nth-child(2n),
  .scent-family-grid article:last-child {
    min-height: 190px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .scent-family-grid article:last-child {
    border-bottom: 0;
  }

  .featured-card {
    grid-template-rows: minmax(280px, auto) auto auto;
  }

  .featured-art,
  .product-art {
    min-height: 280px;
  }

  .product-card {
    min-height: 520px;
  }

  .product-photo,
  .featured-art .product-photo {
    max-width: 230px;
    max-height: 280px;
  }

  .modal-shell,
  .detail-list,
  .product-detail-list {
    grid-template-columns: 1fr;
  }

  .catalog-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-tools .search-box {
    grid-column: 1 / -1;
  }

  .catalog-tools .sort-box {
    min-width: 0;
  }

  .catalog-mood-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-discovery-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-discovery-bar .blotter,
  .catalog-discovery-bar .blotter:nth-child(3n) {
    min-height: 112px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .catalog-discovery-bar .blotter:nth-child(2n) {
    border-right: 0;
  }

  .catalog-discovery-bar .blotter:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .catalog-mood-links a {
    justify-content: center;
    min-height: 42px;
  }

  .catalog-tools .search-box input,
  .catalog-tools .sort-box select {
    min-height: 48px;
    border-color: var(--line-strong);
    font-size: 0.95rem;
  }

  .filter-panel {
    padding: 0.75rem;
    background: var(--panel);
  }

  /* Filter Drawer transformation for mobile */
  @media (max-width: 700px) {
    .filter-panel {
      position: fixed;
      inset: auto 0 0 0;
      z-index: 30;
      max-height: 85vh;
      padding: 1.5rem 1.25rem 2.5rem;
      border-radius: 12px 12px 0 0;
      border-top: 1px solid var(--line-strong);
      background: #110f0d;
      box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
      transform: translateY(100%);
      transition: transform 320ms cubic-bezier(0.33, 1, 0.68, 1);
      overflow-y: auto;
    }

    body.filters-open .filter-panel {
      transform: translateY(0);
    }

    .filter-panel-head {
      margin-bottom: 1.5rem;
    }

    .filter-panel-head span {
      font-size: 1.1rem;
      font-family: "Playfair Display", serif;
      color: var(--accent-soft);
    }

    .filter-panel .filters {
      display: grid;
      grid-template-columns: 1fr;
      gap: 0.75rem;
    }

    .filter-panel .filter {
      min-height: 60px;
      justify-content: space-between;
      padding-inline: 1.25rem;
      background: rgba(255, 255, 255, 0.03);
    }
  }

  .filter-panel-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.6rem;
  }

  .filter-panel-head .filter-panel-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 0.55rem;
  }

  .filter-panel-actions [data-toggle-filters] {
    display: inline-flex;
  }

  .filter-panel-head .button.compact {
    width: 100%;
    min-height: 42px;
    justify-content: center;
  }

  .filter-panel.collapsed .filters {
    display: none;
  }

  .filter-panel .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-panel .filter {
    min-height: 56px;
  }

  .filter-panel .filter small {
    min-width: 32px;
    height: 28px;
    border-color: rgba(239, 220, 175, 0.42);
    background: rgba(214, 174, 103, 0.12);
  }

  .card-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 0.7rem;
  }

  .card-footer span {
    font-size: 1rem;
  }

  .card-actions {
    width: 100%;
    justify-content: stretch;
    gap: 0.55rem;
  }

  .card-actions a,
  .card-actions button {
    flex: 1 1 0;
    min-height: 44px;
  }

  .modal-art {
    min-height: 280px;
  }

  .modal-copy h2 {
    font-size: 1.7rem;
  }

  .site-footer {
    grid-template-columns: auto 1fr;
    align-items: flex-start;
  }

  .footer-links,
  .footer-contact {
    grid-column: 1 / -1;
    justify-items: start;
  }

  .footer-social {
    justify-content: flex-start;
  }

  .detail-related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .mobile-quick-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-quick-nav a:nth-child(2n) {
    border-right: 0;
  }

  .mobile-quick-nav a:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .mobile-action-bar {
    left: 0.55rem;
    right: 0.55rem;
    gap: 0.4rem;
    padding: 0.4rem;
  }

  .mobile-action-bar .mobile-action {
    min-height: 40px;
    font-size: 0.7rem;
  }

  .hero-actions .button {
    flex: 1 1 100%;
  }

  .catalog-tools {
    grid-template-columns: 1fr;
  }

  .catalog-tools .search-box {
    grid-column: auto;
  }

  .filter-panel .filters {
    grid-template-columns: 1fr;
  }

  .catalog-mood-links,
  .catalog-discovery-bar,
  .category-grid,
  .brand-grid,
  .brand-feature-grid,
  .brand-directory,
  .trust-strip {
    grid-template-columns: 1fr;
  }

  .brand-feature-card,
  .brand-feature-card:nth-child(2n),
  .brand-feature-card:nth-child(3n),
  .brand-feature-card:nth-last-child(-n + 2),
  .brand-feature-card:nth-last-child(-n + 3),
  .brand-directory-card,
  .brand-directory-card:nth-child(2n),
  .brand-directory-card:nth-child(3n),
  .brand-directory-card:nth-child(4n) {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .brand-feature-card:last-child,
  .brand-directory-card:last-child {
    border-bottom: 1px solid var(--line);
  }

  .category-grid a,
  .category-grid a:nth-child(2n),
  .category-grid a:nth-child(4n),
  .category-grid a:nth-last-child(-n + 2),
  .category-grid a:nth-last-child(-n + 4),
  .brand-grid a,
  .brand-grid a:nth-child(2n),
  .brand-grid a:nth-child(4n),
  .brand-grid a:nth-last-child(-n + 2),
  .brand-grid a:nth-last-child(-n + 4) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .category-grid a:last-child,
  .brand-grid a:last-child {
    border-bottom: 0;
  }

  .catalog-discovery-bar .blotter,
  .catalog-discovery-bar .blotter:nth-child(2n),
  .catalog-discovery-bar .blotter:nth-child(3n),
  .catalog-discovery-bar .blotter:nth-last-child(-n + 2) {
    min-height: 94px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .catalog-discovery-bar .blotter:last-child {
    border-bottom: 0;
  }

  .trust-strip span {
    min-height: 60px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .trust-strip span:last-child {
    border-bottom: 0;
  }

  .filter-panel-head .filter-panel-actions {
    grid-template-columns: 1fr;
  }

  .featured-art,
  .product-art {
    min-height: 260px;
  }

  .product-detail-art {
    min-height: 330px;
  }
}
