/* ==========================================================================
   STICKERS — LEGENDARY EDITION
   Jony Ive × Josef Müller-Brockmann × Fibonacci
   "Simplicity is the ultimate sophistication" — да Вінчі
   
   Для книжкового магазину BOOKISH
   ========================================================================== */

/* Fibonacci proportions */
:root {
  --fib-3: 3px;
  --fib-5: 5px;
  --fib-8: 8px;
  --fib-13: 13px;
  --fib-21: 21px;
  
  /* Apple timing */
  --ease-apple: cubic-bezier(0.25, 0.1, 0.25, 1);
  --duration: 0.3s;
}

/* ==========================================================================
   STICKERS CONTAINER
   ========================================================================== */

.stickers {
  position: absolute !important;
  left: 0 !important;
  top: var(--fib-8) !important;
  z-index: 10 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: var(--fib-5) !important;
  padding: 0 !important;
  line-height: 1 !important;
}

/* ==========================================================================
   BASE STICKER STYLES
   ========================================================================== */

.stickers .sticker_sale_text,
.stickers .sticker_new,
.stickers .sticker_best,
.stickers .sticker_featured,
.stickers [class*="sticker_"] {
  /* Typography — Brockmann precision */
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif !important;
  font-size: var(--fib-13) !important;
  font-weight: 600 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  
  /* Layout — Fibonacci proportions */
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: var(--fib-5) var(--fib-13) !important;
  min-height: var(--fib-21) !important;
  margin: 0 !important;
  
  /* Shape */
  border-radius: var(--fib-8) !important;
  
  /* Animation */
  transition: 
    transform var(--duration) var(--ease-apple),
    box-shadow var(--duration) var(--ease-apple) !important;
  
  /* Defaults */
  cursor: default !important;
  -webkit-font-smoothing: antialiased !important;
  text-shadow: none !important;
  background-image: none !important;
}

/* ==========================================================================
   SALE / АКЦІЯ — Dark with Red Glow (Apple style)
   Чорний фон, білий текст, червоне світіння позаду
   ========================================================================== */

.stickers .sticker_sale_text {
  background: #1d1d1f !important;
  color: #f5f5f7 !important;
  border: none !important;
  
  /* Subtle depth */
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    /* Red glow behind */
    0 0 20px rgba(255, 59, 48, 0.4),
    0 0 40px rgba(255, 59, 48, 0.2) !important;
  
  position: relative !important;
}

/* Hover effect */
.stickers .sticker_sale_text:hover,
.catalog_item:hover .stickers .sticker_sale_text {
  transform: translateY(-2px) !important;
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    /* Enhanced red glow */
    0 0 30px rgba(255, 59, 48, 0.6),
    0 0 60px rgba(255, 59, 48, 0.3) !important;
}

/* ==========================================================================
   NEW / НОВИНКА — Frosted Glass (Apple style)
   Прозорий скляний фон, темний текст
   ========================================================================== */

.stickers .sticker_new {
  background: rgba(255, 255, 255, 0.92) !important;
  color: #1d1d1f !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  
  /* Glass effect */
  backdrop-filter: blur(var(--fib-13)) saturate(180%) !important;
  -webkit-backdrop-filter: blur(var(--fib-13)) saturate(180%) !important;
  
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 1) !important;
}

.stickers .sticker_new:hover,
.catalog_item:hover .stickers .sticker_new {
  background: rgba(255, 255, 255, 0.9) !important;
  transform: translateY(-2px) !important;
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

/* ==========================================================================
   BEST / ХІТ ПРОДАЖІВ — Gold Gradient
   Золотий градієнт, темний текст
   ========================================================================== */

.stickers .sticker_best,
.stickers .sticker_featured {
  background: linear-gradient(135deg, #ffd60a 0%, #ffb800 100%) !important;
  color: #1d1d1f !important;
  border: none !important;
  
  /* Gold depth */
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1),
    0 2px 10px rgba(255, 182, 0, 0.35) !important;
  
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

.stickers .sticker_best:hover,
.stickers .sticker_featured:hover,
.catalog_item:hover .stickers .sticker_best,
.catalog_item:hover .stickers .sticker_featured {
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1),
    0 6px 20px rgba(255, 182, 0, 0.45) !important;
}

/* ==========================================================================
   PERCENTAGE — Tabular numbers
   ========================================================================== */

.stickers .sticker_sale_text {
  font-feature-settings: 'tnum' 1 !important;
  font-variant-numeric: tabular-nums !important;
}

/* ==========================================================================
   WRAPPER DIV — Remove extra styling
   ========================================================================== */

.stickers > div {
  display: contents !important;
}

/* Fallback for older browsers */
@supports not (display: contents) {
  .stickers > div {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
  .stickers .sticker_sale_text,
  .stickers .sticker_new,
  .stickers .sticker_best,
  .stickers .sticker_featured,
  .stickers [class*="sticker_"] {
    font-size: 11px !important;
    padding: var(--fib-3) var(--fib-8) !important;
    border-radius: var(--fib-5) !important;
  }
  
  .stickers {
    top: var(--fib-5) !important;
    gap: var(--fib-3) !important;
  }
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .stickers .sticker_sale_text,
  .stickers .sticker_new,
  .stickers .sticker_best,
  .stickers .sticker_featured,
  .stickers [class*="sticker_"] {
    transition: none !important;
  }
}

@media (prefers-contrast: high) {
  .stickers .sticker_sale_text {
    background: #000 !important;
    color: #fff !important;
    border: 2px solid #fff !important;
    box-shadow: none !important;
  }
  
  .stickers .sticker_new {
    background: #fff !important;
    color: #000 !important;
    border: 2px solid #000 !important;
    backdrop-filter: none !important;
  }
  
  .stickers .sticker_best,
  .stickers .sticker_featured {
    background: #ffd700 !important;
    color: #000 !important;
    border: 2px solid #000 !important;
  }
}

/* ==========================================================================
   PRODUCT DETAIL PAGE
   ========================================================================== */

.catalog_detail .stickers {
  position: relative !important;
  top: 0 !important;
  margin-bottom: var(--fib-13) !important;
}

.catalog_detail .stickers .sticker_sale_text,
.catalog_detail .stickers .sticker_new,
.catalog_detail .stickers .sticker_best {
  font-size: 14px !important;
  padding: var(--fib-8) var(--fib-21) !important;
}

/* ==========================================================================
   SIGNATURE — φ = 1.618033988749895...
   ========================================================================== */
