/* ==========================================================================
   CHIC CHARMS — APPROVED MOBILE COMMERCE UI
   Replaces the mobile homepage view with the approved code.html design.
   Desktop is fully protected and untouched.
   Mobile breakpoint: max-width 767px
   ========================================================================== */

.cc-mobile-ui { display: none; }

@media (max-width: 767px) {

/* Hide legacy desktop & old mobile storefront chrome on mobile only */
body > header.navbar,
body > main,
body > footer.footer,
body > footer.d6-footer,
.shop-announcement, .shop-header, main.shop-shell,
nav.mobile-bottom-nav,
.p3-sheet, .p3-sheet-backdrop,
.mobile-promo-slider, .mobile-commerce-search,
.mobile-category-strip, .mobile-commerce-actions, .mobile-commerce-menu,
#shopControls, #products-container, .collection-footer-note,
#adminReturnBanner {
  display: none !important;
}

/* --- Approved Design Tokens (from code.html tailwind.config) --- */
.cc-mobile-ui {
  --cc-bg: #FFF9F7;
  --cc-primary: #B5657A;
  --cc-deep-rose: #9F4C67;
  --cc-charcoal: #2F2A2A;
  --cc-menu-text: #6B4A58;
  --cc-accordion-title: #4A3A42;
  --cc-soft-blush: #FDF2F5;
  --cc-surface: #F6F1EF;
  --cc-outline: rgba(181, 101, 122, 0.15);
  --cc-header-border: rgba(181, 101, 122, 0.12);
  --cc-white: #ffffff;
  --cc-shadow: 0 8px 30px rgba(181, 101, 122, 0.08);
  --cc-mx: 24px;
  --cc-gap-x: 28px;
  --cc-gap-y: 48px;
  --cc-stack-sm: 8px;
  --cc-stack-md: 16px;
  --cc-stack-lg: 32px;
  --cc-touch: 44px;
  display: block !important;
  background: var(--cc-bg);
  color: var(--cc-charcoal);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 22px;
  font-weight: 400;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
.cc-mobile-ui * { box-sizing: border-box; margin: 0; padding: 0; }
.cc-mobile-ui img { display: block; max-width: 100%; }
.cc-mobile-ui button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
.cc-mobile-ui a { color: inherit; text-decoration: none; }

/* Material Symbols — exact as code.html */
.cc-mobile-ui .material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal; font-style: normal;
  font-size: 24px; line-height: 1;
  letter-spacing: normal; text-transform: none;
  display: inline-block; white-space: nowrap; word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  visibility: hidden;
}
.fonts-loaded .cc-mobile-ui .material-symbols-outlined {
  visibility: visible;
}

/* --- Announcement Bar --- */
.cc-announce {
  position: sticky; top: 0; z-index: 60;
  background: var(--cc-primary); color: var(--cc-white);
  height: 40px; display: flex; align-items: center; justify-content: center;
  font-family: 'Inter', sans-serif;
  font-size: 11px; line-height: 14px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
}

/* --- Header --- */
.cc-header {
  position: sticky; top: 40px; z-index: 50;
  background: var(--cc-bg);
  border-bottom: 1px solid var(--cc-header-border);
  height: 80px; padding: 0 var(--cc-mx);
  display: flex; align-items: center; justify-content: space-between;
}
.cc-header-btn {
  width: var(--cc-touch); height: var(--cc-touch);
  display: flex; align-items: center; color: var(--cc-deep-rose);
}
.cc-header-btn:first-child { justify-content: flex-start; }
.cc-header-btn:last-child { justify-content: flex-end; }
.cc-logo {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-family: 'Playfair Display', serif;
  font-size: 28px; line-height: 1; font-weight: 500;
  letter-spacing: -0.01em;
  color: #8e4559;
  white-space: nowrap;
  text-transform: none;
}
@media (max-width: 380px){ .cc-logo { font-size: 24px; } }
.cc-header-cart { position: relative; display: inline-flex; }
.cc-cart-count {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 4px;
  background: #8e4559; color: #fff;
  border-radius: 999px; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.cc-cart-count:empty, .cc-cart-count.hidden { display: none; }

/* --- Drawer --- */
.cc-drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 70;
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.cc-drawer-overlay.open { opacity: 1; pointer-events: auto; }
.cc-drawer {
  position: fixed; inset: 0 auto 0 0; width: 85%; max-width: 400px;
  background: var(--cc-bg); z-index: 80;
  transform: translateX(-100%);
  transition: transform .5s cubic-bezier(0.16,1,0.3,1);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.cc-drawer.open { transform: translateX(0); }
.cc-drawer-inner { padding: 48px var(--cc-mx) 96px; }
.cc-drawer-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 48px; }
.cc-drawer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 32px; line-height: 1; font-weight: 500; letter-spacing: -0.01em;
  color: #8e4559;
  text-transform: none;
}
.cc-drawer-close { color: var(--cc-menu-text); }
.cc-drawer-nav { display: flex; flex-direction: column; }
.cc-drawer-nav a {
  height: 64px; display: flex; align-items: center; padding: 0 16px;
  border-bottom: 1px solid var(--cc-outline);
  font-family: 'Inter', sans-serif;
  font-size: 12px; line-height: 16px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--cc-menu-text);
  transition: background .18s;
}
.cc-drawer-nav a:hover { background: var(--cc-soft-blush); }
.cc-drawer-nav a.is-active { color: var(--cc-deep-rose); background: var(--cc-soft-blush); }
.cc-drawer-nav a.is-accent { color: var(--cc-primary); font-weight: 700; }

/* --- Main --- */
.cc-main { padding: 0 var(--cc-mx) 70px; }

/* Breadcrumb */
.cc-crumb { margin-top: var(--cc-mx); display: flex; flex-direction: column; gap: var(--cc-stack-sm); }
.cc-crumb-nav {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 11px; line-height: 14px; font-weight: 500;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--cc-menu-text);
}
.cc-crumb-nav .sep { color: rgba(181,101,122,.25); }
.cc-crumb-nav strong { color: var(--cc-deep-rose); font-weight: 600; }
.cc-crumb-count {
  font-family: 'Inter', sans-serif;
  font-size: 11px; line-height: 14px; font-weight: 500;
  color: var(--cc-menu-text); opacity: .6;
}

/* --- Product Grid --- */
.cc-grid {
  margin-top: var(--cc-stack-lg);
  display: grid; grid-template-columns: 1fr 1fr;
  column-gap: var(--cc-gap-x); row-gap: var(--cc-gap-y);
}
.cc-product { position: relative; }
.cc-product-img {
  position: relative; aspect-ratio: 1/1;
  background: var(--cc-surface); overflow: hidden;
}
.cc-product-img img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  transition: transform .45s cubic-bezier(.22,.61,.36,1);
}
.cc-product:hover .cc-product-img img { transform: scale(1.03); }

/* Wishlist */
.cc-wish {
  position: absolute; top: 16px; right: 16px;
  width: 40px; height: 40px;
  background: rgba(255,255,255,.95);
  border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--cc-shadow);
  border: 1px solid var(--cc-outline);
  color: var(--cc-primary);
  z-index: 2;
  transition: transform .15s;
}
.cc-wish:active { transform: scale(.92); }
.cc-wish .material-symbols-outlined { font-size: 20px; transition: all .2s ease; }
.cc-wish.is-saved .material-symbols-outlined { font-variation-settings: 'FILL' 1; }

/* Product info */
.cc-product-info { margin-top: var(--cc-stack-md); text-align: center; padding: 0 8px; }
.cc-product-name {
  font-family: 'Inter', sans-serif;
  font-size: 14px; line-height: 22px; font-weight: 400;
  color: var(--cc-charcoal);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 44px;
}
.cc-product-name a:hover { color: var(--cc-deep-rose); }
.cc-product-price {
  font-family: 'Inter', sans-serif;
  font-size: 12px; line-height: 16px; font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--cc-deep-rose);
  margin-top: 4px;
}

/* --- Editorial Insertion --- */
.cc-editorial {
  margin-top: var(--cc-gap-y);
  margin-left: calc(var(--cc-mx) * -1);
  margin-right: calc(var(--cc-mx) * -1);
  position: relative; height: 450px; overflow: hidden;
  background: #e8ccd5;
}
.cc-editorial-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.cc-editorial-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.10); }
.cc-editorial-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding-bottom: 48px; gap: 24px; text-align: center;
}
.cc-editorial h2 {
  font-family: 'Playfair Display', serif;
  font-size: 30px; line-height: 36px; font-weight: 400;
  color: #fff; padding: 0 48px;
}
.cc-editorial-btn {
  background: #fff; color: var(--cc-primary);
  padding: 16px 40px;
  font-family: 'Inter', sans-serif;
  font-size: 12px; line-height: 16px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  box-shadow: var(--cc-shadow);
  transition: opacity .2s;
}
.cc-editorial-btn:hover { opacity: .9; }

/* --- Bottom Action Bar --- */
.cc-bottom-bar { display: none !important; }
.cc-bottom-bar-hidden {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 60px; background: var(--cc-bg);
  border-top: 1px solid var(--cc-outline);
  display: flex; z-index: 50;
  box-shadow: 0 -8px 30px rgba(181,101,122,.08);
  padding-bottom: env(safe-area-inset-bottom);
}
.cc-bottom-bar button {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 12px; line-height: 16px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--cc-menu-text);
  transition: background .15s;
}
.cc-bottom-bar button:hover { background: var(--cc-soft-blush); }
.cc-bottom-bar button:first-child { border-right: 1px solid var(--cc-outline); }
.cc-bottom-bar .material-symbols-outlined { color: var(--cc-primary); font-size: 20px; }

/* --- Filter / Sort Modals --- */
.cc-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 100;
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.cc-modal-overlay.open { opacity: 1; pointer-events: auto; }
.cc-modal {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--cc-bg); z-index: 110;
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(0.16,1,0.3,1);
  display: flex; flex-direction: column;
  max-height: 88dvh;
}
.cc-modal.open { transform: translateY(0); }
.cc-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--cc-mx); height: 64px;
  border-bottom: 1px solid var(--cc-outline); flex-shrink: 0;
}
.cc-modal-head h2 {
  font-family: 'Inter', sans-serif;
  font-size: 12px; line-height: 16px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--cc-deep-rose);
}
.cc-modal-close { color: var(--cc-menu-text); }
.cc-modal-body { flex: 1; overflow-y: auto; padding: 8px var(--cc-mx); }
.cc-accordion { border-bottom: 1px solid var(--cc-outline); padding: 16px 0; }
.cc-accordion summary {
  list-style: none; display: flex; justify-content: space-between; align-items: center; cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 12px; line-height: 16px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--cc-accordion-title);
}
.cc-accordion summary::-webkit-details-marker { display: none; }
.cc-accordion .acc-arrow { color: var(--cc-primary); transition: transform .25s; }
.cc-accordion[open] .acc-arrow { transform: rotate(180deg); }
.cc-accordion-content { margin-top: 16px; }
.cc-filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cc-check { display: flex; align-items: center; gap: 12px;
  font-family: 'Inter', sans-serif; font-size: 14px; color: var(--cc-charcoal);
}
.cc-check input { width: 20px; height: 20px; accent-color: var(--cc-primary); }
.cc-modal-footer {
  padding: 24px var(--cc-mx);
  border-top: 1px solid var(--cc-outline);
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}
.cc-btn-primary {
  width: 100%; height: var(--cc-touch);
  background: var(--cc-primary); color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 12px; line-height: 16px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  box-shadow: var(--cc-shadow);
}

/* Sort list */
.cc-sort-list { padding: 8px var(--cc-mx); display: flex; flex-direction: column; }
.cc-sort-list button {
  height: 48px;
  font-family: 'Inter', sans-serif; font-size: 16px; line-height: 26px;
  color: var(--cc-charcoal);
  border-bottom: 1px solid var(--cc-outline);
  transition: background .15s;
}
.cc-sort-list button:hover { background: var(--cc-soft-blush); }
.cc-sort-list button:last-child { border-bottom: none; }
.cc-sort-list button.is-active { color: var(--cc-deep-rose); font-weight: 600; }

/* States */
.cc-state {
  grid-column: 1 / -1; text-align: center;
  padding: 48px 24px;
  font-family: 'Inter', sans-serif; color: var(--cc-menu-text);
  background: var(--cc-soft-blush);
}
.cc-state.error { color: #c0392b; background: #fff5f5; }

/* Toast */
.cc-toast {
  position: fixed; bottom: 78px; left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--cc-charcoal); color: #fff;
  padding: 12px 18px; border-radius: 8px;
  font-family: 'Inter', sans-serif; font-size: 13px;
  z-index: 200; opacity: 0; pointer-events: none;
  transition: all .25s ease; white-space: nowrap;
  max-width: calc(100vw - 32px);
}
.cc-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

} /* end @media */
