/* =============================================
   CAT WORLD COMICS - Main Stylesheet
   A whimsical, hand-drawn aesthetic
   ============================================= */

:root {
  /* Colors from the design */
  --bg-cream: #faf8f4;
  --bg-speckle: #f5f0e8;
  --text-dark: #6b6b63;
  --text-muted: #9a9a8a;

  /* Logo colors - matched to design */
  --logo-c: #8ec5e2;  /* soft blue */
  --logo-a: #f7b8c2;  /* pink */
  --logo-t: #f5d98a;  /* yellow */
  --logo-w: #b5d9a0;  /* soft green */
  --logo-o: #f5c9a8;  /* peach/orange */
  --logo-r: #d4b8e0;  /* lavender */
  --logo-l: #f7b8c2;  /* pink */
  --logo-d: #b8d8e8;  /* light blue */

  /* Button colors - matched to design */
  --btn-yellow: #f7e8c0;
  --btn-yellow-border: #c8b078;
  --btn-blue: #c5d8e5;
  --btn-blue-border: #8aa8b8;
  --btn-merch-bg: #fdfbf8;
  --btn-merch-border: #b8b0a0;

  /* Accents */
  --heart-pink: #f5c0c8;
  --sparkle-gold: #d8c8a0;
  --paw-tan: #d4c4a0;

  /* Fonts */
  --font-display: 'Caveat', cursive;
  --font-body: 'Quicksand', sans-serif;
}

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

html {
  font-size: 18px;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  /* Cream speckled background - subtle dots like the design */
  background-color: var(--bg-cream);
  background-image:
    radial-gradient(circle, rgba(180, 170, 150, 0.25) 1px, transparent 1px),
    radial-gradient(circle, rgba(180, 170, 150, 0.2) 1px, transparent 1px),
    radial-gradient(circle, rgba(180, 170, 150, 0.15) 1px, transparent 1px);
  background-size: 50px 50px, 80px 80px, 120px 120px;
  background-position: 0 0, 25px 25px, 10px 40px;
}

/* SVG filter for hand-drawn effect */
svg.hand-drawn-filters {
  position: absolute;
  width: 0;
  height: 0;
}

/* Decorative hearts and stars */
.decorations {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.deco {
  position: absolute;
  width: 80px;
  height: auto;
  opacity: 0.7;
}

/* Scatter decorations around the page - tastefully, not too many */
.deco-heart-1 {
  top: 12%;
  left: 5%;
  width: 60px;
  transform: rotate(-10deg);
}

.deco-heart-2 {
  top: 8%;
  right: 8%;
  width: 50px;
  transform: rotate(15deg);
}

.deco-star-1 {
  top: 45%;
  right: 5%;
  width: 70px;
  transform: rotate(-5deg);
}

.deco-star-2 {
  bottom: 25%;
  left: 4%;
  width: 55px;
  transform: rotate(10deg);
}

.deco-heart-3 {
  bottom: 15%;
  right: 10%;
  width: 45px;
  transform: rotate(-8deg);
}

.deco-star-3 {
  top: 70%;
  left: 8%;
  width: 50px;
  transform: rotate(5deg);
}

/* Navigation */
.main-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 3rem 0.5rem;
  position: relative;
  z-index: 10;
}

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

.nav-links a {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-dark);
}

.cart-btn {
  position: absolute;
  right: 3rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.5rem;
  transition: color 0.2s ease;
}

.cart-btn:hover {
  color: var(--text-dark);
}

.cart-btn svg {
  width: 28px;
  height: 28px;
}

/* Hamburger menu button - hidden by default */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 101;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-muted);
  transition: all 0.3s ease;
}

.hamburger:hover span {
  background: var(--text-dark);
}

/* Hamburger animation when menu is open */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Main content */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 2rem 3rem;
  position: relative;
  z-index: 1;
}

/* Homepage styles */
.homepage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 2rem;
}

/* Logo - CAT WORLD (image-based) */
.logo {
  margin: 0;
  margin-top: 1rem;
  padding: 0;
  line-height: 0;
}

.logo-img {
  max-width: 100%;
  width: 900px;
  height: auto;
  display: block;
}

/* Merch button - image-based */
.merch-btn {
  display: inline-block;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.merch-btn:hover {
  transform: translateY(-4px);
}

.merch-btn:active {
  transform: translateY(-1px);
}

.merch-img {
  max-width: 100%;
  width: 380px;
  height: auto;
}

/* All buttons container */
.all-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* Main action buttons - 3 in a row */
.main-buttons {
  display: flex;
  flex-direction: row;
  gap: 1.25rem;
  justify-content: center;
  align-items: center;
}

/* Image-based buttons */
.btn {
  display: inline-block;
  text-decoration: none;
  transition: transform 0.2s ease;
  padding: 0;
  background: none;
  border: none;
}

.btn:hover {
  transform: translateY(-5px);
}

.btn:active {
  transform: translateY(-2px);
}

.btn-img {
  max-width: 100%;
  width: 300px;
  height: auto;
}

.btn-comics, .btn-ideas, .btn-documents {
  /* Reset any previous styles */
  background: none;
  border: none;
  box-shadow: none;
}

/* Footer credits */
.credits {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  padding: 2rem;
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

.paw-icon {
  color: var(--paw-tan);
  display: flex;
  align-items: center;
}

.paw-icon svg {
  width: 24px;
  height: 24px;
}

.credits-text span {
  font-weight: 500;
}

/* =============================================
   Comics Page
   ============================================= */

.comics-page {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.page-title {
  font-family: var(--font-display);
  font-size: 3.5rem;
  color: var(--logo-c);
  text-align: center;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.05);
}

.comics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 280px));
  gap: 1.5rem;
  padding: 1rem 0;
  justify-content: center;
}

.comic-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  max-width: 280px;
}

.comic-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* Comic image container for toggling */
.comic-image-container {
  position: relative;
  width: 100%;
}

.comic-image {
  width: 100%;
  height: auto;
  display: none;
}

.comic-image.active {
  display: block;
}

/* Comic buttons row */
.comic-buttons {
  display: flex;
  gap: 0.3rem;
  padding: 0.5rem;
  background: #faf8f4;
  justify-content: center;
  flex-wrap: wrap;
}

.comic-btn {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.3rem 0.5rem;
  border: 1.5px solid var(--btn-merch-border);
  border-radius: 12px;
  background: white;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

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

.comic-btn:active {
  transform: translateY(1px);
  background: var(--btn-yellow);
}

.comic-btn.active {
  background: var(--btn-blue);
  border-color: var(--btn-blue-border);
}

.btn-icon {
  font-size: 0.85rem;
}

.btn-text {
  font-size: 0.7rem;
}

/* Modal styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: var(--text-dark);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--logo-c);
  margin-bottom: 1rem;
}

.modal-body {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--text-dark);
  line-height: 1.6;
}

/* Image modal */
.image-modal-content {
  position: relative;
  background: white;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.image-modal-content .modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: white;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  z-index: 10;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-modal-content .modal-close:hover {
  color: var(--text-dark);
  background: #f0f0f0;
}

#image-modal-img {
  display: block;
  max-width: 90vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  border-radius: 8px;
}

/* Make image container clickable */
.comic-image-container {
  cursor: pointer;
}

.no-comics {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.no-comics p {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.add-comics-hint code {
  background: rgba(0, 0, 0, 0.05);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
}

/* =============================================
   Ideas Page
   ============================================= */

.ideas-page {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  padding: 1rem;
}

.ideas-page .page-title {
  margin-bottom: 0.5rem;
}

/* Heart below title */
.ideas-heart {
  color: var(--heart-pink);
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

/* Intro text */
.ideas-intro {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--text-dark);
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Form container */
.ideas-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* Textarea wrapper with cat decorations */
.textarea-wrapper {
  position: relative;
  width: 100%;
  max-width: 500px;
  overflow: visible;
}

.textarea-cat {
  position: absolute;
  width: 240px;
  height: auto;
  pointer-events: none;
  z-index: 10;
  top: -70px;
  left: -120px;
  transform: rotate(-10deg);
}

.ideas-form textarea {
  width: 100%;
  padding: 1.25rem;
  border: 2px solid var(--btn-blue-border);
  border-radius: 20px;
  background: white;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-dark);
  resize: vertical;
  min-height: 150px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ideas-form textarea::placeholder {
  color: var(--text-muted);
}

.ideas-form textarea:focus {
  border-color: var(--logo-c);
  box-shadow: 0 0 0 3px rgba(142, 197, 226, 0.2);
}

/* Submit button */
.submit-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.submit-btn:hover {
  transform: translateY(-3px);
}

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

.submit-btn img {
  width: 280px;
  height: auto;
}

/* =============================================
   Documents Page
   ============================================= */

.documents-page {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.documents-intro {
  margin-bottom: 2.5rem;
}

.documents-intro p {
  font-size: 1.4rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.documents-intro .subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-style: italic;
}

.documents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  padding: 1rem 0;
}

.document-placeholder {
  background: rgba(255, 255, 255, 0.5);
  border: 2px dashed var(--btn-merch-border);
  border-radius: 12px;
  padding: 3rem 2rem;
  color: var(--text-muted);
}

/* =============================================
   Shop Page
   ============================================= */

.shop-page {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 280px));
  gap: 1.5rem;
  padding: 1rem 0;
  justify-content: center;
}

.shop-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  max-width: 280px;
  display: flex;
  flex-direction: column;
}

.shop-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.shop-card-image {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-cream);
}

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

.shop-card-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.shop-card-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-dark);
  margin: 0;
}

.shop-price {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--logo-a);
  margin: 0;
}

.shop-card-desc {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
  line-height: 1.4;
}

.add-to-cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 20px;
  background: var(--heart-pink);
  color: white;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: auto;
}

.add-to-cart-btn:hover {
  background: var(--logo-a);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 192, 200, 0.4);
}

.add-to-cart-btn:active {
  transform: translateY(0);
}

.cart-icon {
  font-size: 1rem;
}

/* Inventory & Stock Badges */
.shop-card-image {
  position: relative;
}

.stock-badge {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.stock-badge.low-stock {
  background: #fff3e0;
  color: #e65100;
}

.stock-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--text-muted);
}

.shop-card.out-of-stock {
  opacity: 0.7;
}

.shop-card.out-of-stock:hover {
  transform: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.sold-out-btn {
  background: #ddd !important;
  color: var(--text-muted) !important;
  cursor: not-allowed !important;
}

.sold-out-btn:hover {
  transform: none !important;
  box-shadow: none !important;
}

.maxed-out-btn {
  background: var(--btn-yellow) !important;
  color: var(--text-dark) !important;
  cursor: not-allowed !important;
}

.maxed-out-btn:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* Cart reservation timer */
.cart-item-reserved {
  font-family: var(--font-body);
  font-size: 0.65rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 0;
}

/* Disabled + button in cart */
.qty-btn-disabled {
  opacity: 0.4;
  cursor: not-allowed !important;
}

.qty-btn-disabled:hover {
  background: white !important;
  border-color: var(--btn-merch-border) !important;
}

/* =============================================
   Cart Panel
   ============================================= */

.cart-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--heart-pink);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  line-height: 1;
}

.cart-badge.visible {
  display: flex;
}

.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 999;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  max-width: 90vw;
  height: 100%;
  background: white;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.cart-panel.active {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f0ece4;
}

.cart-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--text-dark);
  margin: 0;
}

.cart-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.25rem;
  transition: color 0.2s ease;
}

.cart-close:hover {
  color: var(--text-dark);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
}

.cart-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-family: var(--font-body);
}

.cart-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0ece4;
}

.cart-item-image {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-cream);
  flex-shrink: 0;
}

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

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

.cart-item-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-dark);
  margin: 0;
}

.cart-item-price {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--btn-merch-border);
  background: white;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
}

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

.cart-item-qty span {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  min-width: 1.2rem;
  text-align: center;
}

.cart-footer {
  border-top: 2px solid #f0ece4;
  padding: 1.25rem 1.5rem;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--text-dark);
}

.cart-total-amount {
  color: var(--logo-a);
  font-weight: 700;
  font-size: 1.6rem;
}

.cart-checkout-btn {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 20px;
  background: var(--btn-blue);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  text-decoration: none;
}

.cart-checkout-btn:hover {
  background: var(--btn-blue-border);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(138, 168, 184, 0.4);
}

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

/* =============================================
   Responsive Design
   ============================================= */

@media (max-width: 1000px) {
  .main-buttons {
    flex-wrap: wrap;
  }

  .btn-img {
    width: 260px;
  }

  .logo-img {
    width: 550px;
  }

  .merch-img {
    width: 360px;
  }
}

@media (max-width: 800px) {
  .main-buttons {
    flex-direction: column;
    gap: 1.25rem;
  }

  .btn-img {
    width: 280px;
  }

  .logo-img {
    width: 450px;
  }

  .merch-img {
    width: 320px;
  }
}

@media (max-width: 600px) {
  html {
    font-size: 16px;
  }

  /* Hamburger menu button */
  .hamburger {
    display: flex;
  }

  .main-nav {
    padding: 0.75rem 1rem;
    justify-content: space-between;
  }

  /* Hide nav links by default, show when menu is open */
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-cream);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 100;
  }

  .nav-links.active {
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    font-size: 1.5rem;
  }

  .cart-btn {
    position: relative;
    right: auto;
    z-index: 101;
  }

  .cart-btn svg {
    width: 24px;
    height: 24px;
  }

  /* Homepage - tighter spacing */
  .homepage {
    gap: 0;
    padding: 0.5rem 1rem 1rem;
  }

  .logo {
    margin-top: 0;
  }

  .logo-img {
    width: 280px;
  }

  .merch-btn {
    height: 50px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .merch-img {
    width: 220px;
  }

  .btn {
    height: 55px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .btn-img {
    width: 200px;
  }

  /* Comics page */
  .comics-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }

  .comic-buttons {
    flex-wrap: nowrap;
    gap: 0.25rem;
  }

  .comic-btn {
    padding: 0.3rem 0.5rem;
  }

  .btn-icon {
    font-size: 0.85rem;
  }

  .btn-text {
    display: none;
  }

  .page-title {
    font-size: 2.5rem;
  }

  /* Image modal */
  .image-modal-content {
    margin: 0.5rem;
    padding: 0.5rem;
  }

  .image-modal-content .modal-close {
    width: 36px;
    height: 36px;
    font-size: 1.75rem;
  }

  /* Regular modal */
  .modal-content {
    padding: 1.5rem;
    margin: 1rem;
    width: calc(100% - 2rem);
  }

  .modal-close {
    width: 40px;
    height: 40px;
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .credits {
    flex-direction: column;
    gap: 0.4rem;
    padding: 1rem;
  }

  .decorations {
    display: none;
  }

  /* Shop page */
  .shop-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }

  .shop-card {
    max-width: 100%;
  }

  .shop-card-name {
    font-size: 1.2rem;
  }

  .shop-price {
    font-size: 1.3rem;
  }

  .add-to-cart-btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  /* Cart panel - full width on mobile */
  .cart-panel {
    width: 100%;
    max-width: 100vw;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  .logo-img {
    width: 240px;
  }

  .merch-img {
    width: 180px;
  }

  .btn-img {
    width: 170px;
  }

  .page-title {
    font-size: 2rem;
  }

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

  .comic-card {
    max-width: 100%;
  }

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

  .shop-card {
    max-width: 100%;
  }
}
