/* ============================================
   WowPetStore — Page-Specific Styles
   ============================================ */

/* ---- Homepage ---- */
.hero-floating-badge {
  position: absolute;
  right: var(--space-8);
  bottom: var(--space-10);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--radius-xl);
  padding: var(--space-4) var(--space-5);
  display: none;
  align-items: center;
  gap: var(--space-3);
  box-shadow: var(--shadow-lg);
  z-index: 2;
  animation: float 3s ease-in-out infinite;
}

@media (min-width: 1024px) {
  .hero-floating-badge { display: flex; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-floating-badge .badge-icon {
  font-size: var(--fs-3xl);
}

.hero-floating-badge .badge-text {
  font-family: var(--font-accent);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}

.hero-floating-badge .badge-sub {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

/* ---- Product Detail Page ---- */
.product-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

@media (min-width: 768px) {
  .product-detail {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
  }
}

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.product-gallery-main {
  aspect-ratio: 1;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--color-bg-alt);
  box-shadow: var(--shadow-card);
}

.product-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.product-gallery-main:hover img {
  transform: scale(1.03);
}

.product-gallery-thumbs {
  display: flex;
  gap: var(--space-3);
}

.product-thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--duration-fast);
  background: var(--color-bg-alt);
}

.product-thumb.active,
.product-thumb:hover {
  border-color: var(--color-primary);
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info-section {
  display: flex;
  flex-direction: column;
}

.product-info-section .product-title {
  font-size: var(--fs-3xl);
  margin-bottom: var(--space-3);
}

.product-info-section .product-rating {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.product-info-section .rating-count {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.product-info-section .product-price-block {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.product-info-section .product-price-block .price {
  font-size: var(--fs-3xl);
}

.product-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.product-highlight {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg);
  border-radius: var(--radius-full);
  font-family: var(--font-accent);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--color-text-secondary);
}

.product-highlight .highlight-icon {
  font-size: var(--fs-sm);
}

.product-add-section {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.product-add-section .btn-primary {
  flex: 1;
}

.product-wishlist-btn {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--fs-xl);
  color: var(--color-text-muted);
  transition: all var(--duration-fast);
  flex-shrink: 0;
}

.product-wishlist-btn:hover {
  border-color: var(--color-coral);
  color: var(--color-coral);
}

.product-wishlist-btn.active {
  background: var(--color-coral);
  border-color: var(--color-coral);
  color: white;
}

/* Frequently Bought Together */
.fbt-section {
  margin-top: var(--space-12);
  padding: var(--space-8);
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.fbt-items {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-6) 0;
  overflow-x: auto;
  padding-bottom: var(--space-2);
}

.fbt-item {
  flex-shrink: 0;
  text-align: center;
  width: 140px;
}

.fbt-item-image {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 0 auto var(--space-3);
  background: var(--color-bg-alt);
}

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

.fbt-item-name {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fbt-plus {
  font-size: var(--fs-2xl);
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.fbt-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.fbt-total .bundle-price {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  color: var(--color-secondary);
}

/* ---- Cart Page ---- */
.cart-subscribe-upsell {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: rgba(91, 164, 217, 0.06);
  border: 1.5px solid rgba(91, 164, 217, 0.15);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
}

.cart-subscribe-upsell .upsell-icon {
  font-size: var(--fs-2xl);
  flex-shrink: 0;
}

.cart-subscribe-upsell .upsell-text {
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
}

.cart-subscribe-upsell .upsell-text strong {
  color: var(--color-sky);
}

/* ---- Checkout ---- */
.checkout-success {
  text-align: center;
  padding: var(--space-16) var(--space-6);
}

.checkout-success .success-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  background: var(--color-secondary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin: 0 auto var(--space-6);
  animation: success-pop 0.5s var(--ease-spring);
}

@keyframes success-pop {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.checkout-success h2 {
  margin-bottom: var(--space-3);
}

.checkout-success p {
  color: var(--color-text-muted);
  margin: 0 auto var(--space-8);
}

.order-number {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  font-family: var(--font-accent);
  font-weight: var(--fw-bold);
  font-size: var(--fs-lg);
  color: var(--color-primary-dark);
  margin-bottom: var(--space-6);
}

.loyalty-earned {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.08), rgba(var(--color-primary-rgb), 0.03));
  border: 1px solid rgba(var(--color-primary-rgb), 0.15);
  border-radius: var(--radius-full);
  font-family: var(--font-accent);
  font-weight: var(--fw-semibold);
  color: var(--color-primary-dark);
  margin-bottom: var(--space-8);
}

/* ---- Profile Page ---- */
.pets-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

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

.add-pet-card {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  cursor: pointer;
  transition: all var(--duration-fast);
  min-height: 120px;
}

.add-pet-card:hover {
  border-color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), 0.03);
}

.add-pet-card .add-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-2xl);
  color: var(--color-text-muted);
}

.add-pet-card span {
  font-family: var(--font-accent);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--color-text-muted);
}

/* Loyalty Dashboard */
.loyalty-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

@media (min-width: 768px) {
  .loyalty-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.loyalty-stat-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-align: center;
  box-shadow: var(--shadow-card);
}

.loyalty-stat-value {
  font-family: var(--font-heading);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.loyalty-stat-label {
  font-family: var(--font-accent);
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
}

/* ---- Rewards Grid ---- */
.rewards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

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

.reward-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: all var(--duration-base) var(--ease-out);
}

.reward-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.reward-icon {
  font-size: 36px;
  margin-bottom: var(--space-3);
}

.reward-name {
  font-family: var(--font-accent);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-2);
}

.reward-cost {
  font-size: var(--fs-xs);
  color: var(--color-primary);
  font-weight: var(--fw-bold);
}

/* ---- Order History ---- */
.order-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.order-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
}

.order-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border-light);
  flex-wrap: wrap;
  gap: var(--space-2);
}

.order-id {
  font-family: var(--font-accent);
  font-weight: var(--fw-bold);
}

.order-date {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.order-status {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-family: var(--font-accent);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
}

.order-status.delivered {
  background: rgba(76, 175, 80, 0.1);
  color: var(--color-success);
}

.order-status.shipping {
  background: rgba(91, 164, 217, 0.1);
  color: var(--color-sky);
}

.order-items-preview {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.order-item-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg-alt);
}

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

.order-total {
  font-family: var(--font-accent);
  font-weight: var(--fw-bold);
}
