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

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #2a2a2a;
  --accent-purple: #8b5cf6;
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --text-primary: #ffffff;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  --border-color: #374151;
  --hover-overlay: rgba(139, 92, 246, 0.1);
  --glow-purple: rgba(139, 92, 246, 0.3);
  --glow-blue: rgba(59, 130, 246, 0.3);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

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

@keyframes slideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px var(--glow-purple); }
  50% { box-shadow: 0 0 30px var(--glow-blue); }
}

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

@keyframes ripple {
  0% { transform: scale(0); opacity: 1; }
  100% { transform: scale(4); opacity: 0; }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.slide-in {
  animation: slideIn 0.5s ease-out;
}

.float {
  animation: float 3s ease-in-out infinite;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  padding: 1rem 2rem;
}

.nav-container {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  gap: 2rem;
  min-height: 60px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-purple);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-dropdowns {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.nav-menu {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.user-menu,
.auth-buttons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.nav-select {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 2px;
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  min-width: 120px;
  max-width: 150px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  height: 40px;
}

.nav-select:hover {
  border-color: var(--accent-purple);
  background: var(--bg-secondary);
}

.nav-select:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.nav-link,
.nav-btn {
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  padding: 0.6rem 1rem;
  border-radius: 2px;
  font-weight: 500;
  font-size: 0.9rem;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 40px;
}

.nav-link:hover,
.nav-btn:hover {
  color: var(--accent-purple);
  background: var(--hover-overlay);
  transform: translateY(-2px);
  border-color: var(--accent-purple);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}

.nav-link.active,
.nav-btn.active {
  color: var(--accent-purple);
  background: var(--hover-overlay);
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

/* Modern Button Styles */
.modern-btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transform: translateY(0);
}

.modern-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

.modern-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.modern-input {
  border: 2px solid var(--border-color);
  border-radius: 4px;
  transition: all 0.3s ease;
  background: var(--bg-tertiary);
}

.modern-input:focus {
  border-color: var(--accent-purple);
  background: var(--bg-secondary);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

.nav-select {
  width: auto;
  min-width: 120px;
  margin-right: 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 0.5rem;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px var(--glow-purple);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--hover-overlay);
  border-color: var(--accent-purple);
}

.btn:active::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  animation: ripple 0.6s ease-out;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="%238b5cf6" opacity="0.3"><animate attributeName="opacity" values="0.3;0.8;0.3" dur="2s" repeatCount="indefinite"/></circle><circle cx="80" cy="40" r="1.5" fill="%233b82f6" opacity="0.4"><animate attributeName="opacity" values="0.4;0.9;0.4" dur="3s" repeatCount="indefinite"/></circle><circle cx="40" cy="80" r="1" fill="%2310b981" opacity="0.5"><animate attributeName="opacity" values="0.5;1;0.5" dur="1.5s" repeatCount="indefinite"/></circle></svg>') repeat;
  animation: float 6s ease-in-out infinite;
}

.hero-content {
  text-align: center;
  z-index: 1;
  max-width: 800px;
  padding: 2rem;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* Cards */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-purple);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.card:hover::before {
  transform: scaleX(1);
}

/* Grid Layout */
.grid {
  display: grid;
  gap: 2rem;
  padding: 2rem;
}

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

/* Pet Cards */
.pet-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.pet-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--accent-purple);
  box-shadow: 0 20px 40px rgba(139, 92, 246, 0.2);
}

.pet-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.pet-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

/* Mobile image optimizations - PHONE SPECIFIC */
@media (max-width: 768px) {
  .pet-image {
    height: 150px;
    position: relative;
    overflow: hidden;
    background: var(--bg-tertiary);
  }
  
  .pet-image img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    image-rendering: auto;
    image-rendering: crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    border-radius: 0;
    background-color: var(--bg-tertiary);
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* Force show images on mobile */
  .pet-card .pet-image img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

/* Small Mobile (480px and below) - EXTRA PHONE FIXES */
@media (max-width: 480px) {
  .pet-image {
    height: 120px;
    min-height: 120px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .pet-image img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    max-width: none !important;
    max-height: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    image-rendering: -webkit-optimize-contrast;
    background: transparent;
  }
}

/* Extra Small Mobile (320px and below) - TINY PHONE FIXES */
@media (max-width: 320px) {
  .pet-image {
    height: 100px;
    min-height: 100px;
  }
  
  .pet-image img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
}

/* Ensure images load properly on all devices */
.pet-image img,
.card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: var(--bg-tertiary);
}

/* Force image loading on ALL devices */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Mobile-specific image loading fixes */
@media (max-width: 768px) {
  img {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
}

/* High resolution display support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
  .pet-image img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimize-contrast;
  }
}

/* Phone-specific image container fixes */
@media (max-width: 768px) {
  .pet-image {
    position: relative !important;
    overflow: hidden !important;
  }
  
  .pet-image::before {
    content: '';
    display: none !important;
  }
  
  /* Hide paw print fallback on mobile when image exists */
  .pet-image div:not(img) {
    display: none !important;
  }
}

.pet-info {
  padding: 1.5rem;
}

.pet-name {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.pet-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-green);
  margin-bottom: 1rem;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(5px);
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  opacity: 0;
  transition: all 0.3s ease;
}

.modal.open {
  transform: scale(1);
  opacity: 1;
}

.modal-header {
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: var(--hover-overlay);
  color: var(--accent-purple);
}

.modal-body {
  padding: 2rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 2px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
  background: var(--bg-secondary);
}

/* Chatbot */
.chatbot-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
}

.chatbot-bubble {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.chatbot-bubble:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5);
}

.chatbot-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  height: 500px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  transform: scale(0) translateY(20px);
  opacity: 0;
  transition: all 0.3s ease;
  overflow: hidden;
}

.chatbot-window.open {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.chatbot-header {
  padding: 1rem;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: between;
  align-items: center;
}

.chatbot-messages {
  height: 350px;
  overflow-y: auto;
  padding: 1rem;
}

.chatbot-input-area {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.5rem;
}

.chatbot-input {
  flex: 1;
  padding: 0.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 2px;
  color: var(--text-primary);
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 2rem 2rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section h3 {
  color: var(--accent-purple);
  margin-bottom: 1rem;
}

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

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* Loading Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--accent-purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Enhanced Responsive Design for All Devices */

/* Extra Large Screens (4K, Ultra-wide) */
@media (min-width: 1900px) {
  .nav-container {
    max-width: 2000px;
  }
  
  .hero h1 {
    font-size: 5rem;
  }
  
  .grid-4 {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 1600px) {
  .nav-container {
    max-width: 1800px;
  }
  
  .hero h1 {
    font-size: 4.5rem;
  }
}

@media (min-width: 1400px) {
  .nav-container {
    max-width: 1600px;
  }
}

/* Large Desktop (1200px - 1400px) */
@media (max-width: 1400px) and (min-width: 1200px) {
  .nav-container {
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
  }
  
  .nav-menu {
    gap: 0.5rem;
  }
  
  .nav-link,
  .nav-btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
}

/* Medium Desktop (992px - 1200px) */
@media (max-width: 1200px) and (min-width: 992px) {
  .nav-container {
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
  }
  
  .nav-menu {
    gap: 0.4rem;
  }
  
  .nav-link,
  .nav-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
  }
  
  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Small Desktop / Large Tablet (768px - 992px) */
@media (max-width: 992px) and (min-width: 768px) {
  .navbar {
    padding: 0.75rem 1.5rem;
  }
  
  .nav-container {
    grid-template-columns: auto 1fr;
    gap: 1rem;
  }
  
  .nav-dropdowns {
    justify-content: flex-end;
  }
  
  .nav-menu {
    gap: 0.3rem;
    flex-wrap: wrap;
  }
  
  .nav-link,
  .nav-btn {
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
  }
  
  .nav-select {
    min-width: 110px;
    font-size: 0.85rem;
    padding: 0.5rem 0.6rem;
  }
  
  .hero h1 {
    font-size: 3rem;
  }
  
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .cart-grid {
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
  }
  
  .cart-item-grid {
    grid-template-columns: 70px 1fr auto auto;
    gap: 1rem;
  }
  
  .checkout-grid {
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
  }
}

/* Tablet Portrait (600px - 768px) */
@media (max-width: 768px) and (min-width: 600px) {
  .navbar {
    padding: 0.75rem 1rem;
  }
  
  .nav-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1rem;
  }
  
  .nav-links {
    order: 2;
    justify-content: center;
  }
  
  .nav-dropdowns {
    order: 1;
    justify-content: center;
    margin-bottom: 0.5rem;
  }
  
  .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem;
  }
  
  .nav-link,
  .nav-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
  }
  
  .nav-select {
    min-width: 100px;
    font-size: 0.8rem;
    padding: 0.4rem 0.5rem;
  }
  
  .hero h1 {
    font-size: 2.8rem;
  }
  
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .chatbot-window {
    width: 320px;
    height: 450px;
    right: 1rem;
  }

  .cart-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .cart-item-grid {
    grid-template-columns: 60px 1fr auto;
    gap: 1rem;
  }

  .cart-quantity-controls {
    flex-direction: row;
    gap: 0.3rem;
  }

  .checkout-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Large Mobile (480px - 600px) */
@media (max-width: 600px) and (min-width: 480px) {
  .navbar {
    padding: 0.5rem 1rem;
  }
  
  .nav-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 0.8rem;
  }
  
  .nav-links {
    order: 2;
    justify-content: center;
  }
  
  .nav-dropdowns {
    order: 1;
    justify-content: center;
    margin-bottom: 0.5rem;
  }
  
  .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
  }
  
  .nav-link,
  .nav-btn {
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
  }
  
  .nav-select {
    min-width: 95px;
    font-size: 0.75rem;
    padding: 0.35rem 0.4rem;
  }
  
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .grid-4,
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .chatbot-window {
    width: 300px;
    height: 420px;
    right: 0.5rem;
  }

  .cart-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .cart-item-grid {
    grid-template-columns: 50px 1fr auto;
    gap: 0.8rem;
  }

  .cart-quantity-controls {
    flex-direction: column;
    gap: 0.2rem;
  }

  .checkout-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .pet-card {
    margin-bottom: 1rem;
  }

  .pet-image {
    height: 150px;
  }
}

/* Small Mobile (320px - 480px) */
@media (max-width: 480px) {
  .navbar {
    padding: 0.5rem 0.75rem;
  }
  
  .nav-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 0.5rem;
  }
  
  .nav-links {
    order: 2;
    justify-content: center;
  }
  
  .nav-dropdowns {
    order: 1;
    justify-content: center;
    margin-bottom: 0.3rem;
  }
  
  .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.2rem;
  }
  
  .nav-link,
  .nav-btn {
    padding: 0.3rem 0.4rem;
    font-size: 0.7rem;
  }
  
  .nav-select {
    min-width: 85px;
    font-size: 0.7rem;
    padding: 0.3rem 0.3rem;
  }
  
  .hero {
    padding: 1rem;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  
  .chatbot-window {
    width: 280px;
    height: 380px;
    right: 0.25rem;
  }

  .cart-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .cart-item-grid {
    grid-template-columns: 45px 1fr auto;
    gap: 0.5rem;
  }

  .cart-quantity-controls {
    flex-direction: column;
    gap: 0.15rem;
  }

  .checkout-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .pet-card {
    margin-bottom: 0.8rem;
  }

  .pet-image {
    height: 120px;
  }

  .card {
    padding: 1rem;
  }

  .btn {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }

  .form-input {
    padding: 0.6rem;
    font-size: 0.9rem;
  }
}

/* Extra Small Mobile (below 320px) */
@media (max-width: 320px) {
  .navbar {
    padding: 0.4rem 0.5rem;
  }
  
  .nav-link,
  .nav-btn {
    padding: 0.25rem 0.3rem;
    font-size: 0.65rem;
  }
  
  .nav-select {
    min-width: 75px;
    font-size: 0.65rem;
    padding: 0.25rem 0.2rem;
  }
  
  .hero h1 {
    font-size: 1.5rem;
  }
  
  .hero p {
    font-size: 0.9rem;
  }
  
  .chatbot-window {
    width: 250px;
    height: 350px;
    right: 0.1rem;
  }

  .cart-item-grid {
    grid-template-columns: 40px 1fr;
    gap: 0.4rem;
  }

  .pet-image {
    height: 100px;
  }

  .card {
    padding: 0.8rem;
  }

  .btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
  }

  .form-input {
    padding: 0.5rem;
    font-size: 0.8rem;
  }
}

/* Landscape Orientation Support */
@media (orientation: landscape) and (max-height: 600px) {
  .hero {
    min-height: 80vh;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .navbar {
    padding: 0.5rem 1rem;
  }
  
  .nav-link,
  .nav-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }
}

/* High DPI / Retina Display Support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .pet-image img,
  .card img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .nav-link,
  .nav-btn,
  .btn {
    min-height: 44px; /* Apple's recommended touch target size */
    min-width: 44px;
  }
  
  .cart-quantity-controls button {
    min-height: 36px;
    min-width: 36px;
  }
  
  .chatbot-bubble {
    width: 70px;
    height: 70px;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .chatbot-container,
  .footer {
    display: none;
  }
  
  .hero {
    min-height: auto;
    padding: 2rem;
  }
  
  .card {
    break-inside: avoid;
  }
}

/* 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: 0;
}

/* Focus states */
*:focus {
  outline: 2px solid var(--accent-purple);
  outline-offset: 2px;
}

/* Trust banner */
.trust-banner {
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1.5rem;
  margin: 2rem auto;
  max-width: 800px;
  text-align: center;
  animation: glow 3s ease-in-out infinite;
}

/* Carousel */
.carousel-container {
  overflow: hidden;
  position: relative;
  margin: 2rem 0;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
  gap: 1rem;
}

.carousel-item {
  min-width: 300px;
  flex-shrink: 0;
}

/* Admin Panel Styles */
.admin-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
}

.admin-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.admin-tab {
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.admin-tab.active {
  color: var(--accent-purple);
  border-bottom-color: var(--accent-purple);
}

/* Status indicators */
.status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.5rem;
}

.status-in-stock {
  background: var(--accent-green);
}

.status-out-of-stock {
  background: #ef4444;
}

.status-pending {
  background: #f59e0b;
}
