/* ============================================================
   Dubuz Alibaba/Temu Mobile Layout System
   Primary: #FF4B33 | Neutral 90% | 8px grid
   Mobile-first (375px base) | Tailwind utility classes
   ============================================================ */

/* ---- CSS Custom Properties ---- */
:root {
  --al-primary: #FF4B33;
  --al-primary-hover: #e03a24;
  --al-primary-light: rgba(255, 75, 51, 0.1);
  --al-bg: #f5f5f7;
  --al-card: #ffffff;
  --al-text: #111827;
  --al-text-secondary: #6B7280;
  --al-text-muted: #9CA3AF;
  --al-border: #E5E7EB;
  --al-border-light: #F3F4F6;
  --al-nav-height: 56px;
  --al-topbar-height: 48px;
  --al-safe-bottom: env(safe-area-inset-bottom, 0px);
  --al-safe-top: env(safe-area-inset-top, 0px);
  --al-radius-sm: 8px;
  --al-radius-md: 12px;
  --al-radius-lg: 16px;
  --al-radius-xl: 20px;
  --al-shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --al-shadow-md: 0 2px 12px rgba(85,95,105,0.12);
  --al-shadow-lg: 0 4px 20px rgba(0,0,0,0.08);
  --al-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
}

/* ---- Mobile-first base ---- */
html {
  height: 100%;
  height: 100dvh;
  overscroll-behavior-y: none;
}

body {
  font-family: var(--al-font);
  background: var(--al-bg);
  color: var(--al-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
  min-height: 100dvh;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

/* ---- Top Navigation Bar (Alibaba-style minimal) ---- */
.al-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: calc(var(--al-topbar-height) + var(--al-safe-top));
  padding-top: var(--al-safe-top);
  background: var(--al-card);
  border-bottom: 1px solid var(--al-border-light);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
}

.al-topbar-inner {
  display: flex;
  align-items: center;
  height: var(--al-topbar-height);
  padding: 0 12px;
  gap: 8px;
}

.al-topbar-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  font-size: 18px;
  font-weight: 800;
  color: var(--al-text);
  letter-spacing: -0.03em;
}

.al-topbar-logo span {
  color: var(--al-primary);
}

.al-topbar-location {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--al-border-light);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--al-text-secondary);
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  flex-shrink: 0;
}

.al-topbar-spacer {
  flex: 1;
  min-width: 0;
}

.al-topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.al-topbar-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--al-text-secondary);
  border-radius: 50%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease;
  position: relative;
}

.al-topbar-btn:active {
  background: var(--al-border-light);
}

.al-topbar-btn svg {
  width: 22px;
  height: 22px;
}

.al-topbar-btn--create {
  background: var(--al-primary, #FF4B33);
  color: #fff;
}

.al-topbar-btn--create:active {
  background: #ea580c;
}

.al-topbar-btn--create svg {
  stroke: #fff;
}

.al-topbar-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--al-primary);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 16px;
  border-radius: 8px;
  text-align: center;
  border: 2px solid var(--al-card);
}

/* Topbar spacer (to offset fixed topbar) */
.al-topbar-spacer-block {
  height: calc(var(--al-topbar-height) + var(--al-safe-top));
}

/* ---- Bottom Navigation (Alibaba/Temu style) ---- */
.al-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--al-card);
  border-top: 1px solid var(--al-border-light);
  padding-bottom: var(--al-safe-bottom);
  box-shadow: 0 -1px 0 rgba(0,0,0,0.02);
}

.al-bottom-nav-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  height: var(--al-nav-height);
  max-width: 500px;
  margin: 0 auto;
}

.al-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  flex: 1;
  height: 100%;
  text-decoration: none;
  color: var(--al-text-muted);
  border: none;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  padding: 0;
  min-height: 44px;
}

.al-nav-item svg {
  width: 22px;
  height: 22px;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.al-nav-item:active svg {
  transform: scale(0.9);
}

.al-nav-label {
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  margin-top: 1px;
  transition: color 0.15s ease;
}

.al-nav-item.active {
  color: var(--al-primary);
}

.al-nav-badge {
  position: absolute;
  top: 2px;
  right: 50%;
  margin-right: -16px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--al-primary);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 16px;
  border-radius: 8px;
  text-align: center;
  border: 2px solid var(--al-card);
}

/* ---- Floating Sell Button (center FAB) ---- */
.al-sell-fab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--al-primary);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(255, 75, 51, 0.38);
  cursor: pointer;
  margin-top: -14px;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.al-sell-fab:active {
  transform: scale(0.92);
  box-shadow: 0 2px 8px rgba(255, 75, 51, 0.3);
}

.al-sell-fab svg {
  width: 22px;
  height: 22px;
}

/* ---- Category Strip (horizontal scroll) ---- */
.al-category-strip {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
  padding: 8px 12px;
  background: var(--al-card);
  border-bottom: 1px solid var(--al-border-light);
}

.al-category-strip::-webkit-scrollbar {
  display: none;
}

.al-category-inner {
  display: flex;
  gap: 12px;
  min-width: max-content;
}

.al-category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 60px;
  scroll-snap-align: start;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  border: none;
  background: transparent;
  padding: 0;
}

.al-category-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #f0f2f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.al-category-item:active .al-category-icon {
  transform: scale(0.92);
}

.al-category-item.active .al-category-icon {
  background: var(--al-primary-light);
  color: var(--al-primary);
}

.al-category-item.active .al-category-label {
  color: var(--al-primary);
  font-weight: 700;
}

.al-category-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--al-text-muted);
  white-space: nowrap;
  max-width: 56px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  transition: color 0.15s ease;
}

/* ---- Banner Carousel ---- */
.al-banner-carousel {
  position: relative;
  margin: 8px 12px;
  border-radius: var(--al-radius-md);
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--al-border-light);
}

.al-banner-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  height: 100%;
}

.al-banner-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

.al-banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.al-banner-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  padding: 4px 8px;
  background: rgba(0,0,0,0.3);
  border-radius: 20px;
}

.al-banner-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.al-banner-dot.active {
  width: 18px;
  border-radius: 3px;
  background: #fff;
}

/* ---- Product Card (2-column grid) ---- */
.al-product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 12px 80px;
}

@media (min-width: 640px) {
  .al-product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .al-product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.al-product-card {
  background: var(--al-card);
  border-radius: var(--al-radius-md);
  overflow: hidden;
  box-shadow: var(--al-shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
}

.al-product-card:active {
  box-shadow: var(--al-shadow-md);
}

.al-product-image-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--al-border-light);
}

.al-product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.al-product-card:active .al-product-image {
  transform: scale(1.05);
}

.al-product-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 6px;
  background: var(--al-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  line-height: 1.3;
}

.al-product-body {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.al-product-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--al-primary);
  line-height: 1.2;
}

.al-product-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--al-text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.al-product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 4px;
}

.al-product-location {
  font-size: 11px;
  color: var(--al-text-muted);
  display: flex;
  align-items: center;
  gap: 3px;
}

.al-product-location svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.al-product-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--al-text-muted);
}

.al-product-stats svg {
  width: 12px;
  height: 12px;
}

/* ---- Listing Detail (redesigned) ---- */
.al-detail-page {
  padding-bottom: calc(80px + var(--al-safe-bottom));
}

.al-detail-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  height: var(--al-topbar-height);
  padding: 0 8px;
  background: var(--al-card);
  border-bottom: 1px solid var(--al-border-light);
  gap: 4px;
  padding-top: var(--al-safe-top);
  min-height: calc(var(--al-topbar-height) + var(--al-safe-top));
}

.al-detail-back {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--al-text);
  border-radius: 50%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.al-detail-back:active {
  background: var(--al-border-light);
}

.al-detail-back svg {
  width: 22px;
  height: 22px;
}

.al-detail-title {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 4px;
}

.al-detail-gallery {
  position: relative;
  background: var(--al-card);
  overflow: hidden;
}

.al-detail-gallery-main {
  aspect-ratio: 4/3;
  position: relative;
  background: #000;
  cursor: pointer;
}

.al-detail-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.al-detail-gallery-count {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 3px 8px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 10px;
}

.al-detail-info {
  padding: 12px;
  background: var(--al-card);
  margin-top: 6px;
}

.al-detail-price {
  font-size: 24px;
  font-weight: 800;
  color: var(--al-primary);
  line-height: 1.2;
}

.al-detail-negotiable {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #22C55E;
  background: rgba(34, 197, 94, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

.al-detail-heading {
  font-size: 18px;
  font-weight: 700;
  color: var(--al-text);
  margin: 6px 0 4px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.al-detail-location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--al-text-secondary);
}

.al-detail-location svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.al-detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--al-border-light);
}

.al-detail-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 36px;
  padding: 0 12px;
  border: none;
  background: var(--al-border-light);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--al-text-secondary);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease;
}

.al-detail-action-btn:active {
  background: #e0e2e5;
}

.al-detail-action-btn.active {
  color: var(--al-primary);
  background: var(--al-primary-light);
}

.al-detail-action-btn svg {
  width: 16px;
  height: 16px;
}

.al-detail-action-btn--share {
  margin-left: auto;
}

.al-detail-section {
  background: var(--al-card);
  margin-top: 6px;
  padding: 12px;
}

.al-detail-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--al-text);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.al-detail-section-title svg {
  width: 16px;
  height: 16px;
  color: var(--al-primary);
}

.al-detail-description {
  font-size: 14px;
  line-height: 1.7;
  color: var(--al-text-secondary);
}

.al-detail-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.al-detail-spec {
  display: flex;
  padding: 8px 0;
  border-bottom: 1px solid var(--al-border-light);
  font-size: 13px;
}

.al-detail-spec-label {
  color: var(--al-text-muted);
  font-weight: 500;
  flex: 0 0 100px;
}

.al-detail-spec-value {
  color: var(--al-text);
  font-weight: 600;
}

.al-detail-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.al-detail-feature {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--al-border-light);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--al-text-secondary);
}

.al-detail-feature svg {
  width: 14px;
  height: 14px;
  color: #22C55E;
}

/* ---- Seller Card ---- */
.al-seller-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: var(--al-radius-md);
  margin-top: 6px;
  text-decoration: none;
  color: inherit;
}

.al-seller-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--al-border-light);
}

.al-seller-info {
  flex: 1;
  min-width: 0;
}

.al-seller-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--al-text);
}

.al-seller-type {
  font-size: 12px;
  color: var(--al-text-muted);
}

.al-seller-chevron {
  width: 16px;
  height: 16px;
  color: var(--al-text-muted);
  flex-shrink: 0;
}

/* ---- Sticky Action Bar (detail page) ---- */
.al-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px calc(8px + var(--al-safe-bottom));
  background: var(--al-card);
  border-top: 1px solid var(--al-border-light);
  box-shadow: 0 -2px 12px rgba(85,95,105,0.1);
}

.al-sticky-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease;
  text-decoration: none;
}

.al-sticky-btn:active {
  transform: scale(0.97);
}

.al-sticky-btn svg {
  width: 18px;
  height: 18px;
}

.al-sticky-btn--primary {
  background: var(--al-primary);
  color: #fff;
}

.al-sticky-btn--whatsapp {
  background: #25D366;
  color: #fff;
}

.al-sticky-btn--outline {
  background: var(--al-border-light);
  color: var(--al-text-secondary);
}

/* ---- Auth Page (redesigned) ---- */
.al-auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--al-card);
  display: flex;
  flex-direction: column;
}

.al-auth-header {
  display: flex;
  align-items: center;
  height: var(--al-topbar-height);
  padding: 0 12px;
  padding-top: var(--al-safe-top);
  min-height: calc(var(--al-topbar-height) + var(--al-safe-top));
}

.al-auth-back {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--al-text);
  border-radius: 50%;
  cursor: pointer;
  text-decoration: none;
}

.al-auth-back svg {
  width: 22px;
  height: 22px;
}

.al-auth-body {
  flex: 1;
  padding: 24px 24px 40px;
  display: flex;
  flex-direction: column;
}

.al-auth-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 4px;
  color: var(--al-text);
}

.al-auth-subtitle {
  font-size: 14px;
  color: var(--al-text-muted);
  margin: 0 0 24px;
}

.al-auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.al-auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.al-auth-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--al-text-secondary);
}

.al-auth-input {
  height: 48px;
  padding: 0 14px;
  border: 1.5px solid var(--al-border);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--al-text);
  background: var(--al-card);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}

.al-auth-input:focus {
  border-color: var(--al-primary);
  box-shadow: 0 0 0 3px var(--al-primary-light);
}

.al-auth-input::placeholder {
  color: var(--al-text-muted);
  font-weight: 400;
}

.al-auth-submit {
  height: 48px;
  border: none;
  border-radius: 12px;
  background: var(--al-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
  margin-top: 8px;
  font-family: inherit;
}

.al-auth-submit:active {
  transform: scale(0.98);
  background: var(--al-primary-hover);
}

.al-auth-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  font-size: 13px;
  color: var(--al-text-muted);
}

.al-auth-separator::before,
.al-auth-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--al-border);
}

.al-auth-social {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.al-auth-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  border: 1.5px solid var(--al-border);
  border-radius: 12px;
  background: var(--al-card);
  font-size: 14px;
  font-weight: 600;
  color: var(--al-text);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
  font-family: inherit;
}

.al-auth-social-btn:active {
  background: var(--al-border-light);
}

.al-auth-social-btn svg {
  width: 20px;
  height: 20px;
}

.al-auth-links {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  font-size: 13px;
}

.al-auth-link {
  color: var(--al-primary);
  text-decoration: none;
  font-weight: 600;
}

.al-auth-link:active {
  text-decoration: underline;
}

.al-auth-error {
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 10px;
  font-size: 13px;
  color: #EF4444;
  margin-bottom: 16px;
}

.al-auth-success {
  padding: 10px 14px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 10px;
  font-size: 13px;
  color: #22C55E;
  margin-bottom: 16px;
}

/* ---- Skeleton Loading Shimmer ---- */
.al-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: al-shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes al-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.al-skeleton-card {
  background: var(--al-card);
  border-radius: var(--al-radius-md);
  overflow: hidden;
  box-shadow: var(--al-shadow-sm);
}

.al-skeleton-image {
  aspect-ratio: 4/3;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: al-shimmer 1.5s ease-in-out infinite;
}

.al-skeleton-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.al-skeleton-line {
  height: 14px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: al-shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}

.al-skeleton-line--short { width: 60%; }
.al-skeleton-line--medium { width: 80%; }

/* ---- View Transitions API support ---- */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: 0.25s ease-out both al-fade-out;
}

::view-transition-new(root) {
  animation: 0.3s ease-out both al-fade-in;
}

@keyframes al-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes al-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---- Utility: hide desktop elements on mobile ---- */
@media (min-width: 768px) {
  .al-mobile-only { display: none !important; }
}

@media (max-width: 767px) {
  .al-desktop-only { display: none !important; }
}

/* ---- Content padding to clear fixed nav bars ---- */
.al-page-content {
  padding-bottom: calc(var(--al-nav-height) + var(--al-safe-bottom) + 12px);
}

/* ---- Tap highlight removal ---- */
.tap-highlight {
  -webkit-tap-highlight-color: transparent;
}
