/* ========================================
   SHOPPING WEBSITE - MAIN STYLES
   ======================================== */

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #ec4899;
  --accent: #06b6d4;
  --dark: #0f172a;
  --darker: #020617;
  --light: #f8fafc;
  --gray: #64748b;
  --gray-light: #e2e8f0;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gradient-1: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
  --gradient-2: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--darker);
  color: var(--light);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Animated Background */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.bg-animation::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(6, 182, 212, 0.08) 0%, transparent 40%);
  animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(2%, 2%) rotate(1deg); }
  66% { transform: translate(-1%, 1%) rotate(-1deg); }
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0.875rem 1rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

.header.scrolled {
  padding: 0.625rem 1rem;
  background: rgba(15, 23, 42, 0.98);
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0.5rem;
}

@media (min-width: 768px) {
  .header-content {
    padding: 0;
  }
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .logo {
    font-size: 1.5rem;
  }
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-1);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-text-fill-color: white;
  font-size: 1.1rem;
}

@media (min-width: 768px) {
  .logo-icon {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--gray);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-1);
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--light);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Main Container */
.main-container {
  padding-top: 100px;
  min-height: 100vh;
}

/* Product Section */
.product-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* Product Card */
.product-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  overflow: hidden;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-xl);
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

/* Product Image */
.product-image-container {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.05) 100%);
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.product-image-container:hover .product-image {
  transform: scale(1.05);
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(15, 23, 42, 0.8) 100%);
  pointer-events: none;
}

.badge {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  background: var(--gradient-1);
  padding: 0.5rem 1rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: var(--shadow-lg);
}

/* Product Info */
.product-info {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.product-sku {
  font-size: 0.75rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.product-name {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.product-short-desc {
  font-size: 1.1rem;
  color: var(--gray);
  line-height: 1.8;
}

.product-price-section {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.price {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary-light);
}

.price-currency {
  font-size: 1.5rem;
  vertical-align: super;
}

.stock-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--success);
}

.stock-status::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

/* Buy Section */
.buy-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.quantity-label {
  font-size: 0.875rem;
  color: var(--gray);
}

.quantity-controls {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.qty-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--light);
  font-size: 1.25rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.qty-input {
  width: 60px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--light);
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--gradient-1);
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--light);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-buy {
  padding: 1.25rem 2rem;
  font-size: 1.1rem;
  width: 100%;
}

.btn-buy::after {
  content: '→';
  transition: var(--transition);
}

.btn-buy:hover::after {
  transform: translateX(4px);
}

/* Long Description Section */
.description-section {
  margin-top: 3rem;
  padding: 3rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--gradient-1);
  border-radius: 2px;
}

.long-description {
  color: var(--gray);
  line-height: 2;
  font-size: 1rem;
}

.long-description b {
  color: var(--light);
  font-weight: 600;
}

.long-description br {
  display: block;
  margin: 0.5rem 0;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.feature-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: var(--shadow-glow);
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
}

.feature-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-desc {
  font-size: 0.875rem;
  color: var(--gray);
}

/* Footer */
.footer {
  margin-top: 4rem;
  padding: 3rem 2rem;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  font-size: 1.25rem;
  font-weight: 700;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--gray);
  text-decoration: none;
  font-size: 0.875rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--light);
}

.copyright {
  color: var(--gray);
  font-size: 0.875rem;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--dark);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-xl);
  transform: translateX(150%);
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 1000;
}

.toast.show {
  transform: translateX(0);
}

.toast-icon {
  width: 40px;
  height: 40px;
  background: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.toast-content h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.toast-content p {
  font-size: 0.875rem;
  color: var(--gray);
}

/* Responsive */
@media (max-width: 968px) {
  .product-layout {
    grid-template-columns: 1fr;
  }
  
  .product-image-container {
    min-height: 300px;
  }
  
  .product-info {
    padding: 1.5rem;
  }
  
  .product-name {
    font-size: 1.5rem;
  }
  
  .price {
    font-size: 2rem;
  }
}

@media (max-width: 640px) {
  .main-container {
    padding-top: 80px;
  }
  
  .nav-links {
    display: none;
  }
  
  .product-section {
    padding: 1rem 0.75rem;
  }
  
  .product-card {
    border-radius: var(--radius);
  }
  
  .product-image-container {
    min-height: 250px;
  }
  
  .product-info {
    padding: 1.25rem;
    gap: 1rem;
  }
  
  .product-name {
    font-size: 1.35rem;
  }
  
  .product-short-desc {
    font-size: 0.95rem;
  }
  
  .price {
    font-size: 1.75rem;
  }
  
  .price-currency {
    font-size: 1.1rem;
  }
  
  .description-section {
    padding: 1.25rem;
    margin-top: 1.5rem;
  }
  
  .section-title {
    font-size: 1.25rem;
  }
  
  .long-description {
    font-size: 0.9rem;
    line-height: 1.8;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
  }
  
  .feature-card {
    padding: 1.25rem;
  }
  
  .feature-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
  
  .footer {
    padding: 2rem 1rem;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  /* Mobile quantity selector */
  .quantity-selector {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .quantity-controls {
    width: 100%;
    justify-content: center;
  }
  
  .btn-buy {
    padding: 1rem;
    font-size: 1rem;
  }
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

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