/* ==========================================================================
   SONG ART — Interactive Audio Player & Dynamic Catalog Styles
   Supports:
   - 17 Category Filter Bar with scroll & active state
   - Mode 1: Responsive Collage Grid (All Tracks)
   - Mode 2: Full-Width Stretched Rows (Selected Category)
   - Interactive HTML5 Audio Engine & Waveform Scrubber
   - Fixed Bottom Docked Sticky Player
   - Shopping Cart Modal & Personal Cabinet Modal
   ========================================================================== */

/* Catalog Wrapper Section */
.section-catalog {
  padding: 60px 0 100px;
  background-color: #000000;
  position: relative;
  z-index: 10;
}

.catalog-header {
  text-align: center;
  margin-bottom: 40px;
}

.catalog-dynamic-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #ffffff;
  margin-bottom: 12px;
}

.catalog-dynamic-subtitle {
  font-size: 16px;
  color: #888888;
  font-weight: 300;
  max-width: 600px;
  margin: 0 auto;
}

/* 17 Category Filter Bar */
.category-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 10px 0 30px;
  margin-bottom: 20px;
}

.category-filter-bar::-webkit-scrollbar {
  display: none;
}

.category-pill-btn {
  white-space: nowrap;
  padding: 10px 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  color: #b0b0b0;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.5px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.category-pill-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  transform: translateY(-2px);
}

.category-pill-btn.active {
  background: #ffffff;
  color: #000000;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* ==========================================================================
   MODE 1: COLLAGE GRID (When 'All' is selected)
   ========================================================================== */
.catalog-dynamic-container.catalog-collage-mode {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.track-card {
  background: rgba(20, 20, 24, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.track-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.75);
}

.track-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  background: #111;
  overflow: hidden;
}

.track-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.track-card:hover .track-cover-img {
  transform: scale(1.04);
}

.track-genre-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 14px;
  font-size: 11px;
  font-weight: 500;
  color: #e0e0e0;
  letter-spacing: 0.5px;
}

.track-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.track-card-title {
  font-size: 17px;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 4px;
  line-height: 1.35;
}

.track-card-author {
  font-size: 13px;
  color: #888888;
  margin-bottom: 16px;
}

/* Audio Player Inside Card */
.track-card-player {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 14px;
  border-radius: 8px;
}

.track-play-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffffff;
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease, background 0.2s ease;
}

.track-play-btn:hover {
  transform: scale(1.08);
  background: #f0f0f0;
}

.track-play-btn svg {
  width: 16px;
  height: 16px;
  fill: #000000;
}

.track-waveform-bar {
  flex: 1;
  height: 24px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.track-waveform-progress {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  background: rgba(255, 255, 255, 0.35);
  transition: width 0.1s linear;
}

.track-time-label {
  font-size: 12px;
  color: #999999;
  font-variant-numeric: tabular-nums;
  min-width: 32px;
  text-align: right;
  flex-shrink: 0;
}

/* Price & Buy Button Bar */
.track-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.track-card-price {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.track-btn-cart {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.track-btn-cart:hover {
  background: #ffffff;
  color: #000000;
  transform: translateY(-2px);
}

.track-btn-cart svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
}

/* ==========================================================================
   MODE 2: FULL-WIDTH STRETCHED ROWS (When Genre is selected)
   ========================================================================== */
.catalog-dynamic-container.catalog-fullwidth-mode {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.track-row {
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(20, 20, 24, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 12px;
  padding: 16px 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s ease, background 0.25s ease;
}

.track-row:hover {
  transform: translateY(-3px);
  background: rgba(30, 30, 36, 0.85);
}

.track-row-cover {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #111;
}

.track-row-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.track-row-play {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.track-row-play:hover {
  transform: scale(1.08);
}

.track-row-play svg {
  width: 18px;
  height: 18px;
  fill: #000000;
}

.track-row-info {
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.track-row-title {
  font-size: 16px;
  font-weight: 500;
  color: #ffffff;
}

.track-row-meta {
  font-size: 13px;
  color: #888888;
}

.track-row-waveform {
  flex: 1;
  height: 32px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.track-row-waveform-progress {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  background: rgba(255, 255, 255, 0.3);
  transition: width 0.1s linear;
}

.track-row-time {
  font-size: 13px;
  color: #888888;
  font-variant-numeric: tabular-nums;
  min-width: 44px;
  text-align: right;
  flex-shrink: 0;
}

.track-row-price {
  font-size: 17px;
  font-weight: 600;
  color: #ffffff;
  min-width: 80px;
  text-align: right;
  flex-shrink: 0;
}

.track-row-cart {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.track-row-cart:hover {
  background: #ffffff;
  color: #000000;
}

/* ==========================================================================
   FIXED BOTTOM DOCKED STICKY PLAYER
   ========================================================================== */
.sticky-player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 84px;
  background: rgba(12, 12, 14, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: transform 0.3s ease;
}

.sticky-player-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}

.sticky-track-info {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 280px;
}

.sticky-track-cover {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  background: #222;
  flex-shrink: 0;
}

.sticky-track-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sticky-track-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.sticky-track-title {
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sticky-track-author {
  font-size: 12px;
  color: #888888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sticky-controls-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  max-width: 600px;
}

.sticky-playback-buttons {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sticky-btn-playback {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaaaaa;
  transition: color 0.2s ease, transform 0.2s ease;
}

.sticky-btn-playback:hover {
  color: #ffffff;
  transform: scale(1.1);
}

.sticky-btn-playback svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.sticky-btn-play-pause {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffffff;
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.sticky-btn-play-pause:hover {
  transform: scale(1.08);
}

.sticky-btn-play-pause svg {
  width: 18px;
  height: 18px;
  fill: #000000;
}

.sticky-scrubber-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.sticky-time-label {
  font-size: 11px;
  color: #888888;
  font-variant-numeric: tabular-nums;
  min-width: 32px;
}

.sticky-scrubber-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  position: relative;
  cursor: pointer;
}

.sticky-scrubber-progress {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  background: #ffffff;
  border-radius: 3px;
}

.sticky-actions-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 0 0 240px;
  justify-content: flex-end;
}

.sticky-volume-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sticky-volume-wrap svg {
  width: 18px;
  height: 18px;
  stroke: #888888;
}

.sticky-volume-slider {
  width: 70px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
}

.sticky-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
}

.sticky-btn-buy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  background: #ffffff;
  color: #000000;
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.2s ease;
}

.sticky-btn-buy:hover {
  transform: scale(1.04);
}

/* ==========================================================================
   SHOPPING CART & AUTH MODALS
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: #141418;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
  padding: 32px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active .modal-dialog {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-close-btn svg {
  width: 18px;
  height: 18px;
  stroke: #ffffff;
}

.modal-title {
  font-size: 24px;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 24px;
}

/* Cart Items in Modal */
.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
  max-height: 280px;
  overflow-y: auto;
}

.cart-item-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.04);
  padding: 12px;
  border-radius: 8px;
}

.cart-item-cover {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  background: #222;
  flex-shrink: 0;
}

.cart-item-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info {
  flex: 1;
}

.cart-item-title {
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
}

.cart-item-author {
  font-size: 12px;
  color: #888888;
}

.cart-item-price {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
}

.cart-item-remove {
  color: #888888;
  padding: 6px;
  transition: color 0.2s ease;
}

.cart-item-remove:hover {
  color: #ff5555;
}

.cart-item-remove svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.cart-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 600;
}

.cart-input-field {
  width: 100%;
  height: 48px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0 16px;
  color: #ffffff;
  font-size: 15px;
  margin-bottom: 16px;
  outline: none;
  transition: border-color 0.2s ease;
}

.cart-input-field:focus {
  border-color: #ffffff;
}

.modal-submit-btn {
  width: 100%;
  height: 50px;
  background: #ffffff;
  color: #000000;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.modal-submit-btn:hover {
  background: #e8e8e8;
  transform: translateY(-2px);
}

.modal-tabs-header {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 12px;
}

.modal-tab-btn {
  font-size: 15px;
  color: #888888;
  padding-bottom: 8px;
  position: relative;
  transition: color 0.2s ease;
}

.modal-tab-btn.active {
  color: #ffffff;
  font-weight: 500;
}

.modal-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -13px;
  left: 0;
  right: 0;
  height: 2px;
  background: #ffffff;
}

/* Toast Notifications */
.songart-toast {
  position: fixed;
  bottom: 100px;
  right: 24px;
  background: #ffffff;
  color: #000000;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  z-index: 2000;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}

.songart-toast.active {
  transform: translateY(0);
  opacity: 1;
}

/* Responsive adjustments for Player */
@media screen and (max-width: 860px) {
  .sticky-player-bar {
    height: 74px;
  }
  .sticky-track-info {
    flex: 0 0 180px;
  }
  .sticky-actions-right {
    flex: 0 0 auto;
  }
  .sticky-volume-wrap {
    display: none;
  }
  .track-row {
    flex-wrap: wrap;
    padding: 14px;
  }
  .track-row-info {
    flex: 1;
  }
  .track-row-waveform {
    width: 100%;
    order: 4;
    flex: 0 0 100%;
  }
}

/* ==========================================================================
   FLOATING ACTION DOCK (CART & PERSONAL CABINET)
   ========================================================================== */
.floating-action-dock {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), bottom 0.3s ease;
}

body.has-sticky-player .floating-action-dock {
  bottom: 96px;
}

.floating-dock-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(18, 18, 22, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #00ff8b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 255, 139, 0.12);
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-dock-btn:hover {
  transform: scale(1.08) translateY(-2px);
  background: rgba(28, 28, 34, 0.95);
  border-color: #00ff8b;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6), 0 4px 16px rgba(0, 255, 139, 0.28);
}

.floating-dock-btn svg {
  width: 22px;
  height: 22px;
  stroke: #00ff8b;
  transition: transform 0.2s ease;
}

.floating-dock-btn:hover svg {
  transform: scale(1.1);
}

.floating-dock-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #ff3366;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(255, 51, 102, 0.4);
}

.sticky-btn-cart {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #00ff8b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.sticky-btn-cart:hover {
  background: rgba(0, 255, 139, 0.2);
  border-color: #00ff8b;
  transform: scale(1.06);
}

.sticky-cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: #ff3366;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

