/* 
 * Cake Couture - Premium Shop Styles
 * A modern, elegant design system for the shop
 */

:root {
  /* Color Palette */
  --color-pink-50: #fdf2f8;
  --color-pink-100: #fce7f3;
  --color-pink-200: #fbcfe8;
  --color-pink-300: #f9a8d4;
  --color-pink-400: #f472b6;
  --color-pink-500: #ec4899;
  --color-pink-600: #db2777;
  --color-pink-700: #be185d;
  --color-pink-800: #9d174d;
  --color-pink-900: #831843;
  
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  --transition: all 0.2s ease-in-out;
  --transition-transform: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
body {
  font-family: 'Poppins', sans-serif;
  color: var(--color-gray-800);
  background-color: var(--color-pink-50);
  line-height: 1.6;
  padding-top: 5rem;
}

html {
  scroll-behavior: smooth;
}

/* Background Elements */
.shop-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.bg-gradient {
  background: linear-gradient(135deg, var(--color-pink-lightest), var(--color-pink-light));
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.bg-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.15;
  z-index: 0;
}

.bg-shape-1 {
  width: 600px;
  height: 600px;
  background: var(--color-pink-deep);
  top: -200px;
  left: -150px;
}

.bg-shape-2 {
  width: 800px;
  height: 800px;
  background: var(--color-pink);
  bottom: -400px;
  right: -200px;
}

/* Shop Container */
.shop-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  position: relative;
  z-index: 1;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* Product Card */
.product-card {
  background: rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-base);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
}

/* Neutralize hover so product cards do not visually move */
.product-card:hover {
  transform: none;
  box-shadow: var(--shadow-lg);
}

/* Product Image */
.product-image-container {
  position: relative;
  padding-top: 100%;
  overflow: hidden;
  background: var(--color-pink-lightest);
}

.product-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-transform);
}

/* Neutralize hover zoom for product images */
.product-card:hover .product-image {
  transform: none;
}

/* Stock Badge */
.stock-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 2;
}

.stock-in {
  background-color: #10B981;
  color: white;
}

.stock-low {
  background-color: #F59E0B;
  color: white;
}

.stock-out {
  background-color: #6B7280;
  color: white;
}

/* Wishlist Button */
.wishlist-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  z-index: 2;
  transition: var(--transition-base);
}

.wishlist-btn:hover {
  background: var(--color-pink);
  color: white;
  transform: scale(1.1);
}

.wishlist-btn.active {
  background: var(--color-pink-deep);
  color: white;
}

/* Product Info */
.product-info {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-category {
  font-size: 0.75rem;
  color: var(--color-pink-deep);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.product-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--color-text);
  line-height: 1.4;
}

/* Legacy description style (kept for safety, but hidden on live cards) */
.product-description {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-bottom: 0.5rem;
  flex-grow: 1;
  display: none !important; /* hide descriptions on product cards */
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Price Section */
.product-price-section {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.price-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.price-current {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-pink-deep);
}

.price-original {
  font-size: 1rem;
  color: var(--color-text-light);
  text-decoration: line-through;
  margin-right: 0.5rem;
}

.sale-badge {
  background: var(--color-gold);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  margin-left: 0.5rem;
}

/* Add to Cart Button */
.add-to-cart-btn {
  width: 100%;
  padding: 0.6rem 1.25rem;
  background: linear-gradient(135deg, var(--color-pink), var(--color-pink-deep));
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}
/* Shorter image wrapper for a balanced card height */
.product-image-wrapper {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: var(--color-pink-lightest);
}
@media (max-width: 768px) {
  .product-image-wrapper { height: 140px; }
  .product-info { padding: 0.75rem; }
  .product-title { font-size: 1rem; }
  .price-current { font-size: 1rem; }
  .add-to-cart-btn { padding: 0.4rem 1rem; font-size: 0.875rem; }
}

.add-to-cart-btn:hover {
  transform: translateY(-2px);
}

.add-to-cart-btn:disabled {
  background: #E5E7EB;
  color: #9CA3AF;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Category Filter */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.category-btn {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  background: white;
  border: 1px solid var(--color-pink-light);
  color: var(--color-pink-deep);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-base);
}

.category-btn:hover,
.category-btn.active {
  background: var(--color-pink-deep);
  color: white;
}

nav {
  position: relative;
  z-index: 100;
}

body.nav-open {
  overflow: hidden;
}

.hidden {
  display: none !important;
}

.glass {
  background: rgba(255, 255, 255, 0.35);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 32px rgba(255, 172, 236, 0.15);
}

.glass-glow {
  background: rgba(255, 255, 255, 0.3);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 32px rgba(255, 172, 236, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -1px 0 rgba(255, 255, 255, 0.2);
}

.nav-glow-bg {
  position: relative;
}

.nav-glow-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 182, 193, 0.4), rgba(255, 172, 236, 0.3));
  z-index: -1;
  filter: blur(20px);
}

.hero-section {
  background: rgba(255, 182, 193, 0.4);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

/* Hero search layout */
.hero-search-wrapper {
  max-width: 720px;
  margin: 0 auto;
}

.hero-search {
  position: relative;
}

.hero-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #f472b6;
}

/* Large pill search input under the hero */
.shop-search-bar {
  width: 100%;
  height: 56px;
  border-radius: 9999px;
  padding: 0 16px 0 44px;
  border: 1px solid rgba(255, 182, 193, 0.5);
  font-size: 16px;
  color: #374151;
  background: rgba(255, 255, 255, 0.4);
}

.shop-search-bar {
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.4);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.shop-search-bar:focus {
  outline: none;
  box-shadow: 0 0 20px rgba(255, 172, 236, 0.6);
  border-color: rgba(255, 172, 236, 0.8);
}

.animated-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 182, 193, 0.4), rgba(255, 172, 236, 0.3));
  z-index: -1;
  filter: blur(20px);
}

.bg-shape-1,
.bg-shape-2,
.bg-shape-3,
.bg-shape-4 {
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle at top left, rgba(255, 182, 193, 0.35), transparent 70%);
  filter: blur(60px);
  opacity: 0.4;
  z-index: 0;
}

.bg-shape-1 { top: -4rem; right: -2rem; }
.bg-shape-2 { bottom: -6rem; left: -2rem; }
.bg-shape-3 { top: 40%; left: 10%; }
.bg-shape-4 { bottom: -8rem; right: 5%; }

.footer-gradient {
  background: linear-gradient(135deg, #ffb6c1 0%, #e91e63 100%);
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

.glass-loading {
  background: rgba(255, 255, 255, 0.35);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 32px rgba(255, 172, 236, 0.15);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.cart-dropdown-container {
  position: relative;
}

.cart-icon {
  display: inline-block;
  font-size: 1.5rem;
  color: #db2777;
  cursor: pointer;
  visibility: visible;
}

.cart-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.5rem;
  width: 20rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 182, 193, 0.3);
  border-radius: 1rem;
  box-shadow: 0 20px 50px rgba(255, 172, 236, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.cart-dropdown.show,
.cart-dropdown-container:hover .cart-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.cart-item:hover {
  background: rgba(255, 182, 193, 0.1);
  border-color: rgba(255, 182, 193, 0.3);
}

.cart-item-image {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  object-fit: cover;
  background: rgba(255, 182, 193, 0.1);
}

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

.cart-item-title {
  font-weight: 600;
  color: #e91e63;
  font-size: 0.875rem;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

.cart-item-price {
  color: #6b7280;
  font-size: 0.813rem;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 0.5rem;
  padding: 0.25rem;
  border: 1px solid rgba(255, 182, 193, 0.3);
}

.quantity-btn {
  width: 1.5rem;
  height: 1.5rem;
  border: none;
  background: rgba(255, 182, 193, 0.2);
  color: #e91e63;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-btn:hover {
  background: rgba(233, 30, 99, 0.1);
  transform: scale(1.1);
}

.quantity-display {
  min-width: 1.5rem;
  text-align: center;
  font-weight: 600;
  color: #e91e63;
  font-size: 0.875rem;
}

.remove-item-btn {
  width: 2rem;
  height: 2rem;
  border: none;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-item-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  transform: scale(1.1);
}

.empty-cart-message {
  text-align: center;
  padding: 2rem 1rem;
  color: #6b7280;
}

.empty-cart-message i {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}

@media (max-width: 768px) {
  .cart-dropdown {
    width: 18rem;
    right: -1rem;
  }

  .shop-search-bar {
    width: 100% !important;
  }
}
.hero-section {
  background: rgba(255, 182, 193, 0.4);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  body {
    padding-top: 4.5rem;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
  }
  
  .shop-container {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
  
  .category-filter {
    flex-direction: column;
    align-items: stretch;
  }
  
  .category-btn {
    width: 100%;
    text-align: center;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.product-card.animation-enabled {
  animation: fadeIn 0.5s ease-out forwards;
  opacity: 0;
}
.product-card.animation-enabled:nth-child(1) { animation-delay: 0.1s; }
.product-card.animation-enabled:nth-child(2) { animation-delay: 0.2s; }
.product-card.animation-enabled:nth-child(3) { animation-delay: 0.3s; }
.product-card.animation-enabled:nth-child(4) { animation-delay: 0.4s; }
.product-card.animation-enabled:nth-child(5) { animation-delay: 0.5s; }
.product-card.animation-enabled:nth-child(6) { animation-delay: 0.6s; }

/* Loading Skeleton */
.skeleton {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus styles */
*:focus-visible {
  outline: 2px solid var(--color-pink-deep);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* --- Mobile safety net overrides for shop layout --- */
@media (max-width: 768px) {
  /* Collapse layout into a single column on phones */
  .cc-shop-layout {
    display: block !important;
  }

  /* Push category sidebar off-canvas on the left by default */
  .cc-category-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    right: auto !important;
    width: 80% !important;
    max-width: 320px !important;
    transform: translateX(-100%) !important;
    z-index: 40 !important;
  }

  body.filter-drawer-open .cc-category-sidebar {
    transform: translateX(0) !important;
  }

  /* Ensure product grid is a single column on mobile */
  #productGrid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
}
