/* ===== BarkHaus Store Styles ===== */

:root {
  --ink: #1a1a1a;
  --cream: #faf8f4;
  --warm: #e8dfd3;
  --accent: #c4703f;
  --accent-light: #f0d9c4;
  --sage: #7a8c6e;
  --muted: #8a8279;
  --white: #ffffff;
  --border: rgba(0,0,0,0.06);
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ===== NAVIGATION ===== */
.store-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 48px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.store-nav .logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.5px;
  color: var(--ink);
  text-decoration: none;
}

.store-nav .logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: 0.2px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--ink);
}

.cart-nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  padding: 0 5px;
}

.cart-badge:empty {
  display: none;
}

/* ===== SHOP HERO ===== */
.shop-hero {
  padding: 160px 48px 48px;
  max-width: 1200px;
  margin: 0 auto;
}

.shop-hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -1.5px;
  margin-bottom: 12px;
}

.shop-hero p {
  font-size: 18px;
  color: var(--muted);
  font-weight: 300;
  max-width: 480px;
}

/* ===== PET TYPE TOGGLE ===== */
.shop-pet-toggle {
  padding: 0 48px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.pet-toggle {
  display: inline-flex;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px;
  gap: 4px;
}

.pet-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--muted);
  text-decoration: none;
  border-radius: 100px;
  transition: all 0.25s;
  letter-spacing: -0.2px;
}

.pet-toggle-btn:hover {
  color: var(--ink);
  background: var(--cream);
}

.pet-toggle-btn.active {
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* ===== CATEGORY FILTERS ===== */
.shop-filters {
  padding: 12px 48px 48px;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--white);
  transition: all 0.2s;
  cursor: pointer;
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-btn.active {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

/* ===== PRODUCT GRID ===== */
.product-grid {
  padding: 0 48px 100px;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.product-grid-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
  font-size: 18px;
}

.product-card {
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 64px rgba(0,0,0,0.08);
}

.product-image {
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-img {
  transform: scale(1.06);
}

.product-emoji {
  font-size: 72px;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.12));
  transition: transform 0.3s ease;
}

.product-card:hover .product-emoji {
  transform: scale(1.1);
}

.product-info {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-category {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
}

.product-info h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin: 8px 0;
  letter-spacing: -0.3px;
  line-height: 1.3;
}

.product-info p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
}

.product-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}

.product-featured-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--ink);
  color: var(--white);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 100px;
}

.product-pet-icon {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  z-index: 2;
}

/* ===== PRODUCT DETAIL ===== */
.product-detail {
  padding: 140px 48px 100px;
  max-width: 1100px;
  margin: 0 auto;
}

.product-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 32px;
  transition: color 0.2s;
}

.product-detail-back:hover {
  color: var(--accent);
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.product-detail-image {
  height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  position: sticky;
  top: 120px;
  overflow: hidden;
}

.product-detail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
}

.product-detail-emoji {
  font-size: 120px;
  filter: drop-shadow(0 8px 32px rgba(0,0,0,0.15));
}

.product-detail-info {
  padding: 10px 0;
}

.product-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.product-category-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  padding: 8px 16px;
  border: 1px solid var(--accent-light);
  border-radius: 100px;
}

.product-pet-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--sage);
  padding: 8px 16px;
  border: 1px solid rgba(122, 140, 110, 0.25);
  border-radius: 100px;
}

.product-detail-info h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 20px;
}

.product-detail-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 28px;
}

.product-detail-description {
  font-size: 16px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 36px;
}

.product-detail-stock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--sage);
  margin-bottom: 28px;
}

.stock-dot {
  width: 8px;
  height: 8px;
  background: var(--sage);
  border-radius: 50%;
}

.btn-add-to-cart {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: var(--white);
  border: none;
  padding: 18px 40px;
  font-size: 16px;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.3px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s;
}

.btn-add-to-cart:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(196, 112, 63, 0.25);
}

.btn-added {
  background: var(--sage) !important;
  box-shadow: none !important;
  transform: none !important;
}

.btn-buy-now {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: var(--white);
  border: none;
  padding: 18px 40px;
  font-size: 16px;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.3px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  text-align: center;
  margin-left: 12px;
}

.btn-buy-now:hover {
  background: #b5632f;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(196, 112, 63, 0.25);
}

/* ===== CART PAGE ===== */
.cart-page {
  padding: 140px 48px 100px;
  max-width: 800px;
  margin: 0 auto;
}

.cart-page h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.cart-count-text {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 40px;
}

.cart-empty {
  text-align: center;
  padding: 80px 20px;
}

.cart-empty-icon {
  font-size: 56px;
  margin-bottom: 20px;
  opacity: 0.6;
}

.cart-empty p {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 28px;
}

.cart-items {
  border-top: 1px solid var(--border);
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-image {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  flex-shrink: 0;
}

.cart-item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.cart-item-emoji {
  font-size: 36px;
}

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

.cart-item-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
}

.cart-item-unit-price {
  color: var(--muted);
  font-size: 14px;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qty-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-family: inherit;
  transition: all 0.2s;
  color: var(--ink);
}

.qty-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.qty-num {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 16px;
  min-width: 24px;
  text-align: center;
}

.cart-item-total {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 17px;
  min-width: 80px;
  text-align: right;
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 8px;
  font-size: 16px;
  transition: color 0.2s;
  line-height: 1;
}

.cart-item-remove:hover {
  color: #c0392b;
}

.cart-summary {
  margin-top: 40px;
  padding: 32px;
  background: var(--white);
  border-radius: 16px;
  border: 1px solid var(--border);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.cart-total-label {
  font-size: 18px;
  color: var(--muted);
}

.cart-total-amount {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 700;
}

.btn-checkout {
  width: 100%;
  background: var(--accent);
  color: var(--white);
  border: none;
  padding: 18px;
  font-size: 17px;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.3px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s;
}

.btn-checkout:hover {
  background: #b5632f;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(196, 112, 63, 0.25);
}

.btn-checkout:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.cart-continue {
  display: block;
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.cart-continue:hover {
  color: var(--accent);
}

/* ===== SUCCESS PAGE ===== */
.success-page {
  padding: 200px 48px 100px;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.success-icon {
  font-size: 72px;
  margin-bottom: 24px;
}

.success-page h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.success-page p {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 36px;
}

/* ===== SHARED BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
  padding: 16px 32px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.25s;
}

.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(196, 112, 63, 0.2);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  padding: 15px 31px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  border-radius: 12px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.25s;
}

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

/* ===== FOOTER ===== */
.store-footer {
  padding: 32px 48px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.store-footer .footer-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--muted);
}

.store-footer .footer-right {
  font-size: 13px;
  color: var(--muted);
}

/* ===== TOAST NOTIFICATION ===== */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: var(--ink);
  color: var(--white);
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 12px 32px rgba(0,0,0,0.15);
  transform: translateY(120%);
  transition: transform 0.3s ease;
  z-index: 200;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .store-nav {
    padding: 16px 24px;
  }

  .nav-links {
    gap: 20px;
  }

  .shop-hero {
    padding: 120px 24px 32px;
  }

  .shop-pet-toggle {
    padding: 0 24px 16px;
  }

  .shop-filters {
    padding: 8px 24px 32px;
  }

  .product-grid {
    grid-template-columns: 1fr;
    padding: 0 24px 60px;
    gap: 20px;
  }

  .product-image {
    height: 200px;
  }

  .product-emoji {
    font-size: 56px;
  }

  .product-detail {
    padding: 100px 24px 60px;
  }

  .product-detail-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .product-detail-image {
    height: 280px;
    position: static;
  }

  .product-detail-emoji {
    font-size: 80px;
  }

  .product-detail-info h1 {
    font-size: 30px;
  }

  .product-detail-price {
    font-size: 26px;
  }

  .cart-page {
    padding: 100px 24px 60px;
  }

  .cart-page h1 {
    font-size: 30px;
  }

  .cart-item {
    flex-wrap: wrap;
    gap: 16px;
  }

  .cart-item-total {
    min-width: auto;
  }

  .cart-summary {
    padding: 24px;
  }

  .success-page {
    padding: 140px 24px 60px;
  }

  .success-page h1 {
    font-size: 32px;
  }

  .store-footer {
    padding: 24px;
    flex-direction: column;
    gap: 12px;
  }

  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
}

@media (max-width: 480px) {
  .store-nav {
    padding: 14px 16px;
  }

  .store-nav .logo {
    font-size: 20px;
  }

  .nav-links {
    gap: 16px;
  }

  .nav-link {
    font-size: 14px;
  }

  .shop-hero h1 {
    font-size: 32px;
  }

  .pet-toggle-btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  .filter-btn {
    padding: 8px 14px;
    font-size: 13px;
  }

  .btn-add-to-cart {
    width: 100%;
    justify-content: center;
    padding: 16px;
  }

  .btn-buy-now {
    width: 100%;
    justify-content: center;
    padding: 16px;
    margin-left: 0;
    margin-top: 10px;
  }

  .btn-checkout {
    padding: 16px;
    font-size: 16px;
  }
}
