/* Base Variables */
:root {
  --color-primary: #3bcce3;
  --color-primary-hover: #2bb3c9;
  --color-text: #1a1a1a;
  --color-text-light: #666;
  --color-background: #f7f3d5;
  --color-background-light: #faf7e3;
  --color-background-dark: #f4efc7;
  --color-navbar: #1a1a1a;
  --color-border: #e5e7eb;
}

/* Global Styles */
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--color-text);
  line-height: 1.5;
  background-color: var(--color-background);
  overflow-x: hidden;
  position: relative;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  box-sizing: border-box;
}

.min-h-screen {
  background-color: var(--color-background);
  min-height: 100vh;
}

/* Header Styles */
header {
  background: var(--color-navbar);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo h1,
.main-nav a {
  color: white;
}

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

.header-content {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  position: relative;
}

.logo {
  position: absolute;
  left: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo i {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
  flex-shrink: 0;
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

.main-nav {
  display: flex;
  gap: 2rem;
}

.main-nav .mobile-cart {
  display: none;
}

.main-nav a {
  color: #9ca3af;
  text-decoration: none;
  font-weight: 500;
}

.main-nav a:hover {
  color: white;
}

.header-right {
  position: absolute;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mobile-menu-button,
.cart-button {
  background: none;
  border: none;
  padding: 0.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  color: #9ca3af;
  touch-action: manipulation;
  transition: color 0.2s;
}

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

.mobile-menu-button:hover,
.cart-button:hover {
  color: var(--color-primary);
}

.cart-count {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--color-primary);
  color: white;
  font-size: 0.75rem;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.25rem;
  border-radius: 9999px;
  transform: translate(50%, -50%);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 480px;
  background: linear-gradient(135deg, #3bcce3 0%, #2bb3c9 100%);
  color: white;
  text-align: center;
  display: flex;
  align-items: center;
  padding: 2rem 0;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero-logo {
  width: 320px;
  height: auto;
  position: relative;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.hero-logo img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.hero-content h2 {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  opacity: 0.9;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.1;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 150px;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));
}

/* Treats Section */
.treats-section {
  padding: 4rem 1rem;
  background: url('../Media/Background.jpg') center/cover fixed;
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
}

.section-header {
  background: rgba(255, 255, 255, 0.9);
  padding: 2rem;
  border-radius: 1rem;
  text-align: center;
  width: 100%;
  max-width: 800px;
  margin: 0 auto 3rem;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.section-header h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.section-header p {
  color: var(--color-text-light);
  font-size: 1.125rem;
}

.treats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  width: 100%;
  max-width: 1200px;
  position: relative;
  z-index: 1;
  margin: 0 auto;
  box-sizing: border-box;
}

.treat-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
  position: relative;
}

.treat-card:hover {
  transform: translateY(-4px);
}

.treat-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
}

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

.bestseller-badge,
.featured-badge {
  position: absolute;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 1;
}

.bestseller-badge {
  top: 1rem;
  right: 1rem;
  background: var(--color-primary);
  color: white;
}

.featured-badge {
  top: 1rem;
  left: 1rem;
  background: #f59e0b;
  color: white;
}

.treat-content {
  padding: 1.25rem;
}

.treat-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.treat-header h3 {
  font-size: 1.25rem;
  margin: 0;
  line-height: 1.3;
}

.price {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 1.125rem;
}

.treat-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.rating {
  display: flex;
  gap: 0.375rem;
}

.rating i {
  width: 20px;
  height: 20px;
}

.star-filled {
  color: #fbbf24;
  fill: #fbbf24;
}

.star-empty {
  color: #d1d5db;
}

.btn-add-cart {
  background: var(--color-primary);
  color: white;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-add-cart:hover {
  background: var(--color-primary-hover);
}

/* About Section */
.about-section {
  padding: 4rem 1rem;
  background: var(--color-background-dark);
  overflow: hidden;
  box-sizing: border-box;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

.about-image {
  border-radius: 0.75rem;
  overflow: hidden;
  aspect-ratio: 4/3;
  max-height: 500px;
  max-width: 100%;
}

.about-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.about-text h2 {
  font-size: 2rem;
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

.about-feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.about-feature i {
  color: var(--color-primary);
}

/* Cart Modal */
.cart-modal {
  position: fixed;
  top: 0;
  right: -110%;
  bottom: 0;
  width: 100%;
  max-width: 400px;
  background: white;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
  z-index: 1100;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overscroll-behavior: contain;
}

.cart-modal.active {
  right: 0;
  touch-action: pan-y;
}

.cart-modal-content {
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.cart-header h3 {
  font-size: 1.25rem;
  margin: 0;
}

.close-cart {
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  padding: 0.75rem;
  color: var(--color-text-light);
  touch-action: manipulation;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1.25rem;
  overscroll-behavior: contain;
}

.cart-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
}

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

.cart-item-image {
  width: 100%;
  max-width: 120px;
  min-width: 80px;
  aspect-ratio: 1;
  border-radius: 0.75rem;
  overflow: hidden;
}

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

.cart-item-details {
  flex: 1;
}

.cart-item-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.cart-item-price {
  color: var(--color-primary);
  font-weight: 500;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.cart-item-quantity button {
  background: #f3f4f6;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.cart-item-total {
  text-align: right;
}

.remove-item {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 0.5rem;
  margin-top: 0.5rem;
  touch-action: manipulation;
}

.cart-footer {
  padding: 1.25rem;
  border-top: 1px solid var(--color-border);
  background: white;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 1rem;
}

.checkout-btn {
  width: 100%;
}

/* Footer */
footer {
  background: var(--color-navbar);
  color: white;
  padding: 3rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2.5rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.footer-section a {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-section a:hover {
  color: white;
}

.social-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
}

.social-links a {
  color: white;
  transition: color 0.2s;
  color: var(--color-primary);
  transform: scale(1.1);
}

.footer-bottom {
  text-align: center;
  padding-top: 2.5rem;
  border-top: 1px solid #374151;
  color: #9ca3af;
}

/* Add to Cart Message */
.add-to-cart-message {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  animation: fadeOut 2s forwards;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 1000;
}

@keyframes fadeOut {
  0% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
  .mobile-menu-button {
    display: block;
  }

  .header-right {
    gap: 0;
  }

  .cart-button {
    display: none;
  }

  .container {
    padding: 0 1rem;
  }

  .hero-logo {
    width: 240px;
  }

  .hero-content h2 {
    font-size: 1.5rem;
    line-height: 1.3;
  }
  
  .hero {
    min-height: 400px;
    padding: 2rem 1rem;
  }

  .hero-content {
    gap: 1.25rem;
  }

  .treats-section {
    padding: 2rem 1rem;
  }

  .section-header {
    padding: 1.5rem;
    margin: 0 auto 1.5rem;
  }

  .treats-grid {
    gap: 1rem;
  }

  .treat-card {
    margin: 0;
    width: 100%;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .about-image {
    max-height: 400px;
    width: 100%;
    border-radius: 0.5rem;
  }

  .about-text {
    text-align: center;
  }
  
  .main-nav {
    display: none;
  }
  
  .main-nav.active {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-navbar);
    padding: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  }

  .main-nav.active .mobile-cart {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #9ca3af;
    padding: 0.5rem 0;
    border-top: 1px solid rgba(156, 163, 175, 0.1);
    margin-top: 0.5rem;
  }

  .main-nav.active .mobile-cart i {
    width: 20px;
    height: 20px;
  }

  .main-nav.active .mobile-cart .cart-count {
    position: static;
    transform: none;
    margin-left: 0.5rem;
  }
  
  .mobile-menu-button {
    display: block;
    position: relative;
  }

  .mobile-menu-button.has-items::after {
    content: '';
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    border: 2px solid var(--color-navbar);
  }

  .treats-section,
  .about-section {
    padding: 3rem 0;
  }

  .footer-section {
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-logo {
    width: 220px;
  }

  .hero-content h2 {
    font-size: 1.25rem;
    line-height: 1.3;
  }

  .hero-content p {
    font-size: 0.875rem;
    line-height: 1.5;
  }

  .treats-section {
    padding: 1.5rem 0.75rem;
  }

  .section-header {
    padding: 1rem;
    margin: 0 auto 1.5rem;
    border-radius: 0.75rem;
  }

  .treat-card {
    border-radius: 0.75rem;
    width: 100%;
  }

  .about-section {
    padding: 2rem 0.75rem;
  }

  .about-content {
    gap: 1.5rem;
  }

  .about-image {
    border-radius: 0.5rem;
  }

}

/* Utility Classes */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.font-semibold {
  font-weight: 600;
}

.text-sm {
  font-size: 0.875rem;
}

.text-lg {
  font-size: 1.125rem;
}

.text-xl {
  font-size: 1.25rem;
}

.text-2xl {
  font-size: 1.5rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.w-full {
  width: 100%;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.border-t {
  border-top: 1px solid var(--color-border);
}

.rounded-full {
  border-radius: 9999px;
}

/* Button Styles */
.btn-primary {
  display: inline-block;
  background: var(--color-primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 1.125rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  max-width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

/* Checkout Page Styles */
.checkout-container {
  width: 100%;
  max-width: 1000px;
  margin: 2rem auto;
  padding: 1.5rem;
  box-sizing: border-box;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  position: relative;
}

@media (min-width: 768px) {
  .checkout-grid {
    grid-template-columns: 2fr 1fr;
    align-items: start;
  }
}

.cart-section,
.cart-summary {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cart-summary {
  position: sticky;
  top: 2rem;
}

.cart-items {
  margin: 1.5rem 0;
  border-top: 1px solid var(--color-border);
}

.cart-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.cart-item-image {
  width: 120px;
  height: 120px;
  border-radius: 0.75rem;
  overflow: hidden;
}

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

.cart-item-details {
  flex: 1;
}

.cart-item-name {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.cart-item-price {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}

.cart-item-quantity {
  color: var(--color-text-light);
  font-size: 0.875rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  color: var(--color-text-light);
}

.summary-total {
  border-top: 2px solid var(--color-border);
  margin-top: 0.5rem;
  padding-top: 1rem;
  color: var(--color-text);
  font-size: 1.25rem;
  font-weight: 600;
}

#paypal-button-container {
  margin-top: 2rem;
}

.back-to-shopping {
  display: inline-flex;
  align-items: center;
  color: var(--color-primary);
  text-decoration: none;
  margin-top: 2rem;
  font-weight: 500;
  transition: color 0.2s;
}

.back-to-shopping:hover {
  color: var(--color-primary-hover);
}

.back-to-shopping i {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.5rem;
}

.shipping-form {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
}

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

.form-group {
  margin-bottom: 1rem;
  width: 100%;
}

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

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.875rem;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: all 0.2s;
  -webkit-appearance: none;
  appearance: none;
  background-color: white;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(59, 204, 227, 0.1);
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
}

.form-group.col-span-2 {
  grid-column: span 2;
}

.shipping-notice {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-top: 0.5rem;
  font-style: italic;
}

.form-group input[readonly] {
  background-color: #f3f4f6;
}

@media (max-width: 768px) {
  .header-content {
    justify-content: center;
    position: relative;
  }

  .logo {
    position: absolute;
    left: 1rem;
  }

  .header-right {
    position: absolute;
    right: 1rem;
  }

  .checkout-container {
    margin: 1rem auto;
    padding: 1rem;
  }

  .checkout-container h1 {
    font-size: 1.5rem;
  }

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

  .cart-section,
  .cart-summary {
    padding: 1.5rem;
    margin: 0 -1rem;
    border-radius: 0.75rem;
  }

  .cart-summary {
    position: static;
  }

  .cart-item {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
  }

  .cart-item-image {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }

  .shipping-form {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
  }

  .form-group.col-span-2 {
    grid-column: span 1;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    width: 100%;
  }

  .form-group {
    margin-bottom: 1rem;
    width: 100%;
  }

  .form-group input,
  .form-group select {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    box-sizing: border-box;
    min-height: 3rem;
  }

  .form-group label {
    margin-bottom: 0.375rem;
  }

  #paypal-button-container {
    margin-top: 1.5rem;
    position: sticky;
    bottom: 1rem;
  }
}