/* ========================================
   COLLECTION PAGE
   ======================================== */
.collection {
  padding: 8rem 0 4rem;
  min-height: 100vh;
}

.collection__header {
  text-align: center;
  margin-bottom: 3rem;
}

.collection__back {
  display: inline-block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 2rem;
  transition: color var(--transition);
}

.collection__back:hover {
  color: var(--accent);
}

/* Filters */
.collection__filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.collection__filter {
  padding: 0.6rem 1.8rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  transition: all var(--transition);
}

.collection__filter:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.collection__filter.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg-primary);
}

/* Grid */
.collection__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* Product actions */
.product-card__actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  align-items: center;
}

/* Product Gallery */
.product-card__gallery {
  position: relative;
  overflow: hidden;
}

.product-card__main-img {
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: scale(1.5);
  transform-origin: center center;
}

[data-name="NVS-001"] .product-card__main-img,
[data-name="NVS-002"] .product-card__main-img,
[data-name="NVS-003"] .product-card__main-img {
  transform: none;
  transition: opacity 0.3s ease;
  object-fit: contain;
  padding: 1rem;
}

.product-card__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 3;
}

.product-card:hover .product-card__arrow {
  opacity: 1;
}

.product-card__arrow:hover {
  background: rgba(201, 169, 110, 0.9);
}

.product-card__arrow--left {
  left: 0.5rem;
}

.product-card__arrow--right {
  right: 0.5rem;
}

.product-card__thumbs {
  display: flex;
  gap: 0.4rem;
  padding: 0.5rem;
  background: var(--bg-card);
}

.product-card__thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 3px;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.5;
  transition: all 0.2s ease;
}

.product-card__thumb:hover {
  opacity: 0.8;
}

.product-card__thumb.active {
  border-color: var(--accent);
  opacity: 1;
}

.product-card__color-select,
.product-card__gender-select,
.product-card__size-select {
  padding: 0.5rem 0.75rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.8rem;
  border-radius: 2px;
  cursor: pointer;
  transition: border-color var(--transition);
}

.product-card__color-select:focus,
.product-card__gender-select:focus,
.product-card__size-select:focus {
  outline: none;
  border-color: var(--accent);
}

.product-card__actions .btn-add-cart {
  flex: 1;
}

/* ========================================
   APPAREL CTA (main page)
   ======================================== */
.apparel__cta {
  text-align: center;
  margin-top: 3rem;
}

/* ========================================
   CART FLOAT BUTTON
   ======================================== */
.cart-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background: var(--accent);
  color: var(--bg-primary);
  border: 2px solid var(--accent);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(201, 169, 110, 0.4), 0 0 0 0 rgba(201, 169, 110, 0);
  z-index: 1000;
  transition: all 0.3s ease;
  animation: cartPulse 2s ease-in-out infinite;
}

@keyframes cartPulse {
  0%, 100% { box-shadow: 0 4px 24px rgba(201, 169, 110, 0.4), 0 0 0 0 rgba(201, 169, 110, 0.3); }
  50% { box-shadow: 0 4px 24px rgba(201, 169, 110, 0.4), 0 0 0 8px rgba(201, 169, 110, 0); }
}

.cart-float:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 32px rgba(201, 169, 110, 0.6);
  animation: none;
}

.cart-float svg {
  width: 26px;
  height: 26px;
}

.cart-float__count {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 24px;
  height: 24px;
  background: #e74c3c;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid var(--bg-primary);
}

.cart-float--has-items .cart-float__count {
  opacity: 1;
  transform: scale(1);
}

/* ========================================
   CART SIDEBAR
   ======================================== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  max-width: 92vw;
  height: 100vh;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
  z-index: 1002;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.4);
}

.cart-sidebar.open {
  transform: translateX(0);
}

.cart-sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-tertiary);
}

.cart-sidebar__header h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.cart-sidebar__close {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  transition: all var(--transition);
}

.cart-sidebar__close:hover {
  color: var(--text-primary);
  border-color: var(--accent);
  background: rgba(201, 169, 110, 0.1);
}

.cart-sidebar__items {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.75rem;
}

.cart-sidebar__empty {
  color: var(--text-secondary);
  text-align: center;
  padding: 4rem 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Cart Item */
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.cart-item__info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  min-width: 0;
}

.cart-item__info strong {
  font-size: 0.9rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item__info span {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.cart-item__controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.cart-item__qty-btn {
  width: 30px;
  height: 30px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all var(--transition);
}

.cart-item__qty-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cart-item__qty {
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

.cart-item__remove {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.3rem;
  margin-left: 0.3rem;
  transition: all var(--transition);
  border-radius: 4px;
}

.cart-item__remove:hover {
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.1);
}

/* Cart Footer */
.cart-sidebar__footer {
  padding: 1.5rem 1.75rem;
  border-top: 2px solid var(--accent);
  background: var(--bg-tertiary);
}

.cart-sidebar__total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  font-size: 1rem;
}

.cart-sidebar__total strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.cart-sidebar__checkout {
  width: 100%;
  justify-content: center;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .collection__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .collection {
    padding: 6rem 0 3rem;
  }

  .product-card__actions {
    flex-direction: column;
  }

  .product-card__color-select,
  .product-card__gender-select,
  .product-card__size-select {
    width: 100%;
  }

  .cart-float {
    bottom: 1.5rem;
    right: 1.5rem;
  }
}

@media (max-width: 480px) {
  .collection__grid {
    grid-template-columns: 1fr;
  }

  .collection__filters {
    gap: 0.5rem;
  }

  .collection__filter {
    padding: 0.5rem 1.2rem;
    font-size: 0.75rem;
  }
}
