/* Smart Trash Cans - Mobile-First CSS */
/* Critical: Core Web Vitals Optimized */

:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary-color: #64748b;
  --success-color: #10b981;
  --text-dark: #1e293b;
  --text-light: #64748b;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --border-radius: 0.5rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  color: var(--text-dark);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--spacing-md);
}

/* Container */
.container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* Header */
.site-header {
  background-color: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.logo:hover {
  opacity: 0.8;
}

.logo h1 {
  font-size: 1.1rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  line-height: 1;
}

.logo::before {
  content: "🗑️";
  font-size: 1.5rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* Tablet and Desktop */
@media (min-width: 768px) {
  .header-content {
    padding: 1rem 0;
  }

  .logo h1 {
    font-size: 1.5rem;
  }

  .logo::before {
    font-size: 2rem;
  }
}

/* Navigation - Responsive */
.main-nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  align-items: center;
}

.main-nav a {
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--text-dark);
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.main-nav a:hover {
  color: var(--primary-color);
  background: rgba(102, 126, 234, 0.1);
}

/* Desktop Navigation */
@media (min-width: 768px) {
  .main-nav {
    gap: 0.5rem;
  }

  .main-nav a {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
  }
}

.mobile-menu-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-dark);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile Menu */
.mobile-nav {
  display: none;
  position: fixed;
  top: 65px;
  left: 0;
  right: 0;
  background: var(--bg-white);
  box-shadow: var(--shadow-lg);
  padding: var(--spacing-md);
  border-top: 1px solid var(--border-color);
}

.mobile-nav.active {
  display: block;
}

.mobile-nav-list {
  list-style: none;
}

.mobile-nav-item {
  border-bottom: 1px solid var(--border-color);
}

.mobile-nav-item:last-child {
  border-bottom: none;
}

.mobile-nav-link {
  display: block;
  padding: var(--spacing-md);
  color: var(--text-dark);
  font-weight: 500;
  transition: var(--transition);
}

.mobile-nav-link:hover {
  background-color: var(--bg-light);
  color: var(--primary-color);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 3rem var(--spacing-md);
  text-align: center;
}

.hero h1 {
  color: white;
  font-size: 2rem;
  margin-bottom: var(--spacing-md);
}

.hero-description {
  font-size: 1.125rem;
  margin-bottom: var(--spacing-xl);
  opacity: 0.95;
}

.hero-cta {
  display: inline-block;
  background-color: white;
  color: var(--primary-color);
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  font-weight: 700;
  font-size: 1.125rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Products Section */
.products-section {
  padding: var(--spacing-xl) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: var(--spacing-xl);
}

/* Product Grid */
.product-grid,
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: var(--spacing-xl);
}

/* Product Card */
.product-card {
  background: var(--bg-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--border-color);
  position: relative;
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--primary-color);
}

.product-link {
  display: block;
  padding: 1rem;
  background: var(--bg-light);
}

.product-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 100%;
  overflow: hidden;
  background-color: var(--bg-light);
}

.product-image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
}

.product-image {
  width: 100%;
  height: auto;
  max-height: 250px;
  object-fit: contain;
  object-position: center;
  transition: var(--transition);
  display: block;
  margin: 0 auto;
}

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

.savings-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--success-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 10;
}

.product-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background-color: var(--success-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.product-content,
.product-info {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.product-brand {
  font-size: 0.875rem;
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.product-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: var(--spacing-sm);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: var(--spacing-sm);
  font-size: 0.875rem;
}

.stars {
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 0.125rem;
}

.star {
  font-size: 1rem;
}

.star.filled {
  color: #fbbf24;
}

.star.half {
  color: #fbbf24;
}

.rating-count,
.review-count {
  color: var(--text-light);
  font-size: 0.875rem;
}

.no-rating {
  color: var(--text-light);
  font-size: 0.875rem;
  font-style: italic;
}

.product-price-wrapper,
.product-pricing {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.product-price,
.current-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
}

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

.product-savings {
  font-size: 0.875rem;
  color: var(--success-color);
  font-weight: 600;
}

.product-specs {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: var(--spacing-md);
}

.btn,
.buy-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-align: center;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  width: 100%;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  margin-top: auto;
}

.btn-primary,
.buy-button {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover,
.buy-button:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: white;
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Features Section */
.features-section {
  background-color: var(--bg-white);
  padding: var(--spacing-xl) 0;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
}

.feature-card {
  text-align: center;
  padding: var(--spacing-lg);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
}

.feature-title {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
}

.feature-description {
  color: var(--text-light);
}

/* Footer */
.footer {
  background-color: var(--text-dark);
  color: white;
  padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.footer-section h3 {
  color: white;
  margin-bottom: var(--spacing-md);
  font-size: 1.125rem;
}

.footer-links {
  list-style: none;
}

.footer-link {
  display: block;
  color: rgba(255, 255, 255, 0.8);
  padding: 0.5rem 0;
  transition: var(--transition);
}

.footer-link:hover {
  color: white;
  padding-left: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--spacing-md);
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

/* Breadcrumb */
.breadcrumb {
  padding: var(--spacing-md) 0;
  background-color: var(--bg-white);
}

.breadcrumb-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
}

.breadcrumb-item::after {
  content: '›';
  margin-left: 0.5rem;
  color: var(--text-light);
}

.breadcrumb-item:last-child::after {
  content: '';
}

.breadcrumb-link {
  color: var(--text-light);
}

.breadcrumb-link:hover {
  color: var(--primary-color);
}

/* Product Detail Page */
.product-detail {
  padding: var(--spacing-xl) 0;
  background-color: var(--bg-light);
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.product-image-section {
  background: var(--bg-white);
  padding: 2rem;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
}

.product-gallery {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.product-main-image,
.product-detail-image {
  width: 100%;
  max-width: 500px;
  max-height: 500px;
  object-fit: contain;
  object-position: center;
  display: block;
  margin: 0 auto;
}

.product-info,
.product-info-section {
  background-color: var(--bg-white);
  padding: 2rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.product-detail-brand,
.product-brand-large {
  font-size: 1rem;
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.product-detail-title,
.product-title-large {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.3;
  color: var(--text-dark);
}

.product-detail-rating,
.product-rating-large {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.product-detail-price-wrapper,
.product-pricing-large {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.product-detail-price,
.current-price-large {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.price-comparison {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.original-price-large {
  font-size: 1.25rem;
  color: var(--text-light);
  text-decoration: line-through;
}

.savings-text {
  font-size: 1rem;
  color: var(--success-color);
  font-weight: 600;
}

.product-detail-description {
  margin-bottom: var(--spacing-lg);
  line-height: 1.8;
}

/* Product Actions - BIG CTA */
.product-actions {
  margin: 2rem 0;
}

.buy-button-large {
  display: block;
  width: 100%;
  padding: 1.25rem 2rem;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: var(--border-radius);
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 4px 6px rgba(245, 158, 11, 0.3);
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.buy-button-large:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(245, 158, 11, 0.4);
  color: white;
}

.buy-button-large::before {
  content: '🛒 ';
  margin-right: 0.5rem;
  font-size: 1.5rem;
}

.specifications,
.product-features {
  margin: 2rem 0;
}

.specifications h3,
.product-features h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.specs-table,
.product-specs-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--spacing-lg);
}

.specs-table tr,
.product-specs-table tr {
  border-bottom: 1px solid var(--border-color);
}

.specs-table td,
.product-specs-table td {
  padding: 0.75rem 0;
}

.specs-table td:first-child,
.product-specs-table td:first-child {
  font-weight: 600;
  color: var(--text-light);
  width: 40%;
}

.product-features ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.product-features li,
.product-features-list li {
  padding: 0.75rem 0;
  padding-left: 2rem;
  position: relative;
  border-bottom: 1px solid var(--border-color);
}

.product-features li:before,
.product-features-list li:before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success-color);
  font-weight: 700;
  font-size: 1.25rem;
}

.product-features li:last-child,
.product-features-list li:last-child {
  border-bottom: none;
}

/* Related Products */
.related-products {
  padding: 3rem 0;
  background-color: var(--bg-white);
}

.related-products .section-title {
  margin-bottom: 2rem;
}

/* Legal Pages */
.legal-page {
  padding: var(--spacing-xl) 0;
  background-color: var(--bg-white);
}

.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--spacing-xl);
}

.legal-content h2 {
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
}

.legal-content ul, .legal-content ol {
  margin-left: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

.legal-content li {
  margin-bottom: 0.5rem;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }

/* Loading Skeleton */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

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

/* Tablet Styles */
@media (min-width: 768px) {
  .container {
    max-width: 720px;
    padding: 0 var(--spacing-lg);
  }

  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.75rem; }

  .hero {
    padding: 4rem var(--spacing-lg);
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero-description {
    font-size: 1.25rem;
  }

  .mobile-menu-toggle {
    display: none;
  }

  .nav {
    display: block;
  }

  .product-grid,
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-detail-grid {
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
  }

  .product-title-large {
    font-size: 2rem;
  }

  .current-price-large {
    font-size: 3rem;
  }
}

/* Desktop Styles */
@media (min-width: 1024px) {
  .container {
    max-width: 1200px;
    padding: 0 var(--spacing-xl);
  }

  .hero {
    padding: 5rem var(--spacing-xl);
  }

  .product-grid,
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-content {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1280px) {
  .product-grid,
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Sticky CTA Button (Product Pages) - Mobile Only */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.85) 100%);
  backdrop-filter: blur(10px);
  padding: 0.75rem 1rem;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
  z-index: 999;
  transform: translateY(0);
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sticky-cta.hidden {
  transform: translateY(100%);
}

.sticky-cta-info {
  flex: 0 0 auto;
  color: white;
}

.sticky-cta-price {
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.sticky-cta-rating {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.sticky-cta-rating .stars {
  display: inline-flex;
  margin: 0;
}

.sticky-cta-button {
  flex: 1;
  background: linear-gradient(135deg, #ff6b00, #ff0000);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(255,0,0,0.4);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.sticky-cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,0,0,0.5);
}

.sticky-cta-button::after {
  content: '→';
  font-size: 1.2rem;
}

/* Hide sticky CTA on tablet and desktop */
@media (min-width: 768px) {
  .sticky-cta {
    display: none;
  }
}

/* Add padding to body to prevent content being hidden behind sticky CTA */
body.has-sticky-cta {
  padding-bottom: 80px;
}

@media (min-width: 768px) {
  body.has-sticky-cta {
    padding-bottom: 0;
  }
}
