:root { --mobile-dock-height: 64px; --developer-toolbar-height: 0px; --mobile-edge: 12px; --mobile-dock-offset: calc(var(--mobile-edge) + env(safe-area-inset-bottom, 0px)); }
.cart-drawer { transition: transform .26s cubic-bezier(.22,1,.36,1), visibility .26s; }
.category { transition: color .16s ease, background-color .16s ease, border-color .16s ease; }
.favorite-button .icon { transition: transform .16s ease; }
.favorite-button:active .icon { transform: scale(.9); }
.category-navigation .category-tabs { scroll-padding-inline: .5rem; }
body:is(.cart-open,.dialog-open,.checkout-open,.photo-viewer-open,.discovery-open,.store-panel-open) :is(.mobile-actions,.floating-cart,.back-to-top,.store-panel-trigger) { opacity: 0; visibility: hidden; pointer-events: none; }

@media (prefers-reduced-motion: no-preference) {
  :is(.product-detail,.checkout-dialog,.saved-products-dialog,.filter-dialog,.sort-dialog,.install-help,.editor-dialog)[open] { animation: shop-dialog-enter .2s cubic-bezier(.22,1,.36,1); }
  :is(.product-detail,.checkout-dialog,.saved-products-dialog,.filter-dialog,.sort-dialog,.install-help,.editor-dialog)::backdrop { animation: shop-backdrop-enter .2s ease-out; }
}
@keyframes shop-dialog-enter { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
@keyframes shop-backdrop-enter { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 820px) {
  html { scroll-padding-top: calc(68px + env(safe-area-inset-top, 0px)); }
  .developer-mode { --mobile-dock-offset: calc(var(--mobile-edge) + env(safe-area-inset-bottom, 0px) + var(--developer-toolbar-height) + 12px); }
  .mobile-actions, .developer-mode .mobile-actions {
    inset-inline: var(--mobile-edge);
    bottom: var(--mobile-dock-offset);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 6px;
    border-radius: 18px;
    background: #171712f5;
    backdrop-filter: none;
    box-shadow: 0 6px 20px #1112;
    transition: opacity .18s ease, visibility .18s ease;
  }
  .mobile-actions a, .mobile-actions button { min-width: 0; min-height: 48px; padding: .6rem .35rem; border-radius: 12px; font-size: .84rem; line-height: 1.3; text-align: center; overflow-wrap: anywhere; }
  .mobile-actions [hidden] { display: none; }
  .mobile-actions:has(.directions-link[hidden]), .mobile-actions:has(.whatsapp-link[hidden]) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-actions:has(.directions-link[hidden]):has(.whatsapp-link[hidden]) { grid-template-columns: minmax(0, 1fr); }
  .floating-cart, .developer-mode .floating-cart, .back-to-top {
    bottom: calc(var(--mobile-dock-offset) + var(--mobile-dock-height) + 12px);
  }
  .floating-cart { min-height: 48px; gap: 8px; padding: 8px 10px; border-radius: 999px; box-shadow: 0 5px 18px #1112; backdrop-filter: none; }
  .floating-cart .cart-symbol { width: 22px; height: 22px; }
  .floating-cart .cart-count { min-width: 28px; height: 28px; padding-inline: 5px; font-size: .8rem; }
  .back-to-top { width: 48px; height: 48px; box-shadow: 0 4px 14px #071c2415; }
  .developer-toolbar { bottom: calc(var(--mobile-edge) + env(safe-area-inset-bottom, 0px)); }
  footer, .developer-mode footer { padding-bottom: calc(var(--mobile-dock-offset) + var(--mobile-dock-height) + 80px); }
  .category-navigation { margin-bottom: 1.2rem; box-shadow: 0 4px 10px #00000006; }
  .category-navigation .category-tabs { gap: .45rem; padding-block: .6rem; }
  .category-navigation .category { padding: .6rem .9rem; font-size: .86rem; }
  .collection-section .section-heading { margin-bottom: 1.5rem; }
  .collection-tools { gap: .6rem; }
  .product-grid { gap: .8rem; }
  .product-copy { padding: .8rem; gap: .8rem; }
  .product-options { gap: .6rem; }
  .product-card .size-select { font-size: 1rem; min-height: 44px; }
  .product-card .add-to-cart { min-height: 48px; font-size: .85rem; padding-block: .6rem; }
  .cart-item { grid-template-columns: 60px minmax(0, 1fr) 44px; gap: .65rem; }
  .cart-item > img, .cart-photo-placeholder { width: 60px; height: 75px; }
  .quantity button, .cart-remove { width: 44px; height: 44px; }
  .quantity b { min-width: 28px; font-size: .875rem; }
  .detail-photos { scroll-snap-type: x proximity; scroll-padding-inline: .65rem; }
  .detail-thumbnail { min-width: 48px; min-height: 48px; scroll-snap-align: center; }
}
@media (max-width: 380px) {
  :root { --mobile-edge: 10px; }
  .mobile-actions a, .mobile-actions button { font-size: .8rem; }
  .category-navigation .category { padding-inline: .8rem; }
  .product-card h4 { font-size: .875rem; }
  .cart-item { gap: .5rem; }
}
@media (hover: none) {
  .product-card:hover, .button:hover, .add-to-cart:hover, .floating-cart:hover { transform: none; }
  .product-card:hover { box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  :is(.cart-drawer,.cart-backdrop,.mobile-actions,.floating-cart,.back-to-top,.category,.favorite-button .icon,.toast,.button,.add-to-cart,.product-card) { transition: none; }
  :is(.product-detail,.checkout-dialog,.saved-products-dialog,.filter-dialog,.sort-dialog,.install-help,.editor-dialog)[open] { animation: none; }
  .favorite-button:active .icon { transform: none; }
}
@media (forced-colors: active) { .mobile-actions { border-color: ButtonText; background: Canvas; } }
