/* ==========================================================================
   DISFRACES PAOLA - COMPONENTES: CATÁLOGO, TARJETAS, MODAL DETALLE Y CARRITO
   ========================================================================== */

/* ==========================================================================
   BARRA DE CATEGORÍAS Y FILTROS
   ========================================================================== */
.catalog-controls {
  margin: 2rem 0 1.5rem;
}

.categories-scroll-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  padding: 0.5rem 0;
  margin: 0 -1.25rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.categories-scroll-wrapper::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.categories-pills {
  display: flex;
  gap: 0.65rem;
  width: max-content;
}

.category-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.6rem 1.15rem;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.category-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: var(--border-glow);
}

.category-pill.active {
  background: var(--grad-btn);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.search-mobile-wrapper {
  flex: 1;
  min-width: 240px;
  position: relative;
}

.search-mobile-wrapper input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.65rem 1rem 0.65rem 2.6rem;
  color: var(--text-main);
  font-size: 0.9rem;
}

.search-mobile-wrapper input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
}

.search-mobile-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  opacity: 0.6;
}

.filter-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.costumes-count-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.sort-select-wrapper select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  cursor: pointer;
}

.sort-select-wrapper select option {
  background: #130f24;
  color: #fff;
}

/* ==========================================================================
   GRILLA DE DISFRACES Y TARJETAS
   ========================================================================== */
.costumes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.6rem;
  margin-top: 1.5rem;
}

.costume-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-card);
  position: relative;
}

.costume-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glow);
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.6), var(--shadow-glow);
}

.card-media {
  position: relative;
  width: 100%;
  padding-top: 120%; /* Proporción 5:6 para vista completa del traje */
  background: #181230;
  overflow: hidden;
  cursor: pointer;
}

.card-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.costume-card:hover .card-img {
  transform: scale(1.06);
}

.card-badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  background: rgba(16, 12, 31, 0.85);
  border: 1px solid var(--border-glow);
  backdrop-filter: blur(8px);
  color: #f3e8ff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.btn-quick-tryon {
  position: absolute;
  bottom: 0.85rem;
  right: 0.85rem;
  background: rgba(16, 12, 31, 0.9);
  border: 1px solid var(--primary);
  color: #fff;
  border-radius: var(--radius-full);
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  z-index: 2;
}

.btn-quick-tryon:hover {
  background: var(--grad-btn);
  transform: scale(1.05);
}

.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.card-category {
  font-size: 0.75rem;
  color: var(--accent-pink);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-rating {
  font-size: 0.8rem;
  color: var(--accent-gold);
  font-weight: 600;
}

.card-rating small {
  color: var(--text-muted);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.card-sizes {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.sizes-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sizes-list {
  display: flex;
  gap: 0.35rem;
}

.size-tag {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  color: var(--text-main);
}

.card-prices {
  display: flex;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  margin-bottom: 1.15rem;
  margin-top: auto;
}

.price-box {
  display: flex;
  flex-direction: column;
}

.price-box.right {
  text-align: right;
}

.price-caption {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.price-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  font-family: var(--font-heading);
}

.price-value.alt {
  color: var(--text-main);
  font-size: 1rem;
}

.card-actions {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 0.6rem;
}

.btn-tryon-card {
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  background: var(--grad-btn);
}

.btn-detail-card {
  padding: 0.65rem 0.75rem;
  font-size: 0.85rem;
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-subtle);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   MODAL DE DETALLES RÁPIDOS DEL DISFRAZ
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 3, 10, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

.app-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: var(--bg-surface);
  border: 1px solid var(--border-glow);
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.8);
  border-radius: var(--radius-lg);
  width: 92%;
  max-width: 780px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-modal.active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  visibility: visible;
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 10;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: rotate(90deg);
}

.detail-modal-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 1.75rem;
}

@media (min-width: 768px) {
  .detail-modal-layout {
    grid-template-columns: 1fr 1.2fr;
  }
}

.detail-media-box {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #181230;
  height: 340px;
}

.detail-media-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info-box h2 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.detail-category-badge {
  display: inline-block;
  color: var(--accent-pink);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.detail-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.detail-includes-title, .detail-sizes-title {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.detail-includes-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: #cbd5e1;
}

.detail-sizes-selector {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.size-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.size-btn.selected, .size-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.detail-cta-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ==========================================================================
   CARRITO / DRAWER LATERAL DE PEDIDOS
   ========================================================================== */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 440px;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-glow);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.7);
  z-index: 1002;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.cart-drawer.active {
  transform: translateX(0);
}

.cart-drawer-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-drawer-header h3 {
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-items-container {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.cart-item-img {
  width: 68px;
  height: 68px;
  border-radius: 10px;
  object-fit: cover;
  background: #181230;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-info h4 {
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
}

.cart-item-meta {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.badge-mode {
  background: rgba(168, 85, 247, 0.2);
  color: #e9d5ff;
  border-radius: 4px;
  font-size: 0.68rem;
  padding: 0.1rem 0.4rem;
  font-weight: 600;
}

.badge-size {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  font-size: 0.68rem;
  padding: 0.1rem 0.4rem;
}

.cart-item-price {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.95rem;
}

.cart-item-date {
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.cart-date-input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: #fff;
  border-radius: 4px;
  padding: 0.15rem 0.35rem;
  font-size: 0.75rem;
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.qty-selector {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  padding: 2px;
}

.qty-btn {
  width: 24px;
  height: 24px;
  background: transparent;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.qty-val {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0 6px;
}

.btn-remove-item {
  background: transparent;
  opacity: 0.6;
  font-size: 0.9rem;
  transition: opacity 0.2s;
}

.btn-remove-item:hover {
  opacity: 1;
}

.cart-drawer-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(16, 12, 31, 0.95);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.cart-total-price {
  color: var(--accent-emerald);
  font-size: 1.35rem;
  font-family: var(--font-heading);
}

.btn-whatsapp-checkout {
  width: 100%;
  background: #10b981;
  color: #fff;
  padding: 0.85rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
  transition: all 0.25s ease;
}

.btn-whatsapp-checkout:hover {
  background: #059669;
  transform: translateY(-2px);
}

.btn-whatsapp-checkout.disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* Modal Info Configuración API */
.api-info-content {
  padding: 2rem;
}

.code-box {
  background: #090712;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1rem;
  font-family: monospace;
  font-size: 0.85rem;
  color: #a7f3d0;
  margin: 1rem 0;
  overflow-x: auto;
}

.status-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-tag.demo {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.status-tag.live {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}
