/* ALICE visual refresh: responsive presentation layer only */
:root{
  --alice-wine:#762747;
  --alice-rose:#b84470;
  --alice-pink:#e985a8;
  --alice-peach:#f4b081;
  --alice-cream:#fff8f5;
  --alice-blush:#fbe9ee;
  --alice-ink:#302126;
  --alice-muted:#765e67;
  --alice-line:rgba(118,39,71,.14);
  --alice-shadow:0 14px 38px rgba(91,35,58,.11);
}
html{max-width:100%;overflow-x:hidden;background:#f7e8eb}
body{max-width:100%;overflow-x:hidden;color:var(--alice-ink);background:linear-gradient(180deg,#fff9f7 0%,#fcedf1 52%,#fff7f3 100%)!important}
body,button,input,select,textarea{font-family:"Tajawal","Cairo",Arial,sans-serif!important}
img,video,svg{max-width:100%}
main,.container,section,article,aside{min-width:0}
.announcement-bar{background:linear-gradient(90deg,var(--alice-wine),var(--alice-rose),#d66e89)!important;color:#fff!important}
.site-header{background:rgba(255,250,248,.92)!important;border-bottom:1px solid var(--alice-line)!important;box-shadow:0 8px 25px rgba(80,28,48,.06)!important;backdrop-filter:blur(14px)}
.button,.btn-primary,.primary-button,.checkout-button,.add-to-cart,.submit-button,button[type="submit"]{border-radius:999px!important}
.btn-primary,.primary-button,.checkout-button,.add-to-cart,.submit-button,button[type="submit"]{background:linear-gradient(135deg,var(--alice-wine),var(--alice-rose) 58%,#d87591)!important;color:#fff!important;border:0!important;box-shadow:0 10px 25px rgba(118,39,71,.22)!important}
.card,.product-card,.category-card,.review-card,.gallery-card,.article-card,.faq-item,.content-card,.cart-item,.summary-card,.checkout-card,.account-content-card,.routine-card,.gift-card{background:rgba(255,252,250,.96)!important;border:1px solid var(--alice-line)!important;box-shadow:var(--alice-shadow)!important}
input,select,textarea{background:#fffdfc!important;border:1px solid rgba(118,39,71,.18)!important;color:var(--alice-ink)!important;border-radius:14px!important}
input:focus,select:focus,textarea:focus{outline:0!important;border-color:var(--alice-rose)!important;box-shadow:0 0 0 4px rgba(184,68,112,.11)!important}
h1,h2,.section-title,.page-title{letter-spacing:-.02em}
.section-title,.section-heading h2,.page-hero h1,.hero h1,.hero-copy h1{color:var(--alice-wine)!important}

/* subtle page continuity; no blocking overlay */
html.alice-view-ready body{animation:aliceViewIn .28s ease both}
@keyframes aliceViewIn{from{opacity:.15;transform:translateY(5px)}to{opacity:1;transform:none}}

@media(max-width:768px){
  html,body{width:100%;max-width:100%;overflow-x:hidden!important}
  body{font-size:14px}
  .container,.page-container,.header-inner,.footer-inner,.account-main,.account-stage{width:calc(100% - 20px)!important;max-width:none!important;margin-inline:auto!important;padding-inline:0!important}
  .announcement-bar{min-height:29px!important;padding:6px 10px!important;font-size:11px!important;line-height:1.45!important}
  .header-inner{min-height:62px!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;align-items:center!important;gap:5px!important}
  .brand-logo,.header-centered-logo,.brand-logo img,.header-centered-logo img{width:44px!important;height:44px!important;min-width:44px!important;object-fit:cover!important}
  .header-actions{gap:3px!important;min-width:0!important;flex-wrap:nowrap!important}
  .icon-button,.cart-button,.mobile-menu-button,.account-button{width:37px!important;height:37px!important;min-width:37px!important;padding:0!important}
  .hero-section,.hero,.page-hero{min-height:0!important;padding:28px 0 32px!important}
  section,.section,.page-section{padding:34px 0!important}
  h1,.hero h1,.hero-copy h1,.page-hero h1{font-size:clamp(28px,8vw,38px)!important;line-height:1.2!important}
  h2,.section-title,.section-heading h2,.section-head h2{font-size:clamp(22px,6.5vw,29px)!important;line-height:1.28!important}
  p{line-height:1.75}
  .hero-grid,.story-grid,.gift-layout,.review-layout,.product-detail-grid,.product-detail,.checkout-layout,.cart-layout,.routine-layout,.contact-layout,.content-grid,.account-grid{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:16px!important;width:100%!important}
  .hero-actions,.form-actions{display:grid!important;grid-template-columns:1fr!important;gap:9px!important}
  .hero-actions .button,.form-actions .button{width:100%!important;justify-content:center!important}
  .hero-image-card,.story-visual,.story-placeholder{width:100%!important;max-width:100%!important;min-height:0!important}
  .hero-image-card img,.story-visual img,.story-placeholder img{width:100%!important;height:auto!important;max-height:390px!important;object-fit:cover!important;border-radius:20px!important}
  .product-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;width:100%!important}
  .product-card{width:100%!important;min-width:0!important;overflow:hidden!important;border-radius:17px!important;display:flex!important;flex-direction:column!important}
  .product-card img,.product-image img{width:100%!important;height:auto!important;aspect-ratio:1/1!important;object-fit:cover!important}
  .product-card .product-info,.product-card .product-content,.product-card-content,.card-content{padding:10px!important;min-width:0!important}
  .product-card h3,.product-title{font-size:13px!important;line-height:1.45!important;min-height:38px!important;overflow-wrap:anywhere}
  .product-actions{display:grid!important;grid-template-columns:1fr!important;gap:6px!important;margin-top:auto!important}
  .product-actions button,.product-actions a,.product-actions .button{width:100%!important;min-width:0!important;padding:9px 5px!important;font-size:10.5px!important;justify-content:center!important}
  .category-grid,.gallery-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
  .reviews-grid,.reviews-horizontal-track,.public-reviews,#homeReviews{display:flex!important;flex-wrap:nowrap!important;gap:10px!important;overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x proximity!important;-webkit-overflow-scrolling:touch!important;padding-bottom:10px!important;scrollbar-width:none!important}
  .reviews-grid::-webkit-scrollbar,.reviews-horizontal-track::-webkit-scrollbar,.public-reviews::-webkit-scrollbar,#homeReviews::-webkit-scrollbar{display:none}
  .reviews-grid>*,.reviews-horizontal-track>*,.public-reviews>*,#homeReviews>*{flex:0 0 min(84vw,310px)!important;max-width:310px!important;scroll-snap-align:start!important}
  .form-grid,.checkout-form-grid{display:grid!important;grid-template-columns:1fr!important;gap:11px!important}
  .field,.field.full{grid-column:auto!important;min-width:0!important}
  input,select,textarea{width:100%!important;min-width:0!important;max-width:100%!important;font-size:16px!important}
  .cart-item{display:grid!important;grid-template-columns:76px minmax(0,1fr)!important;gap:10px!important;padding:10px!important;width:100%!important}
  .cart-item img{width:76px!important;height:88px!important;object-fit:cover!important;border-radius:12px!important}
  .summary-card,.checkout-card,.content-card,.account-content-card,.routine-card,.gift-card{width:100%!important;min-width:0!important;padding:16px!important;border-radius:19px!important}
  .account-stats{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .footer-grid{display:grid!important;grid-template-columns:1fr!important;gap:16px!important;text-align:right!important}
  .footer-bottom{display:flex!important;flex-direction:column!important;gap:7px!important;text-align:center!important}
  .modal,.dialog,.search-panel,.drawer,.side-menu,.mobile-menu,.account-search-card{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important;margin:auto!important}
  table{display:block!important;width:100%!important;max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch}
}

/* Admin mobile safety */
@media(max-width:768px){
  .admin-body{overflow-x:hidden!important}
  .admin-topbar{padding:10px!important;gap:8px!important;flex-wrap:wrap!important}
  .admin-layout,.admin-main,.admin-content{width:100%!important;max-width:100%!important;min-width:0!important}
  .admin-sidebar{width:min(86vw,300px)!important;max-width:86vw!important}
  .dashboard-grid,.stats-grid,.admin-grid,.form-grid{grid-template-columns:1fr!important}
  .admin-card,.stat-card,.panel{min-width:0!important;width:100%!important}
  .admin-modal{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important;overflow:auto!important}
}
@media(max-width:420px){
  .container,.page-container,.header-inner,.footer-inner,.account-main,.account-stage{width:calc(100% - 16px)!important}
  .product-grid,.category-grid,.gallery-grid{gap:7px!important}
  .product-card .product-info,.product-card .product-content,.product-card-content{padding:8px!important}
}
@media(prefers-reduced-motion:reduce){html.alice-view-ready body{animation:none!important}}
