/* =========================
   Global + Claymorphism Base
   ========================= */

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

:root {
  --clay-bg: #fef3c7;
  --clay-surface: #fefce8;
  --clay-surface-strong: #fed7aa;
  --clay-accent: #fb923c;
  --clay-accent-dark: #f97316;
  --clay-accent-text: #451a03;
  --clay-text-main: #7c2d12;
  --clay-text-muted: #9a3412;
  --shadow-strong: 8px 8px 0 rgba(248, 113, 113, 0.5),
                   0 18px 35px rgba(248, 113, 113, 0.35);
  --shadow-soft: 6px 6px 0 rgba(248, 113, 113, 0.35),
                 0 14px 25px rgba(248, 113, 113, 0.25);
}

html, body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #fef3c7 0, #fee2e2 45%, #fecaca 100%);
  color: var(--clay-text-main);
  line-height: 1.6;
}

/* Container */

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Utility: Clay Card Wrapper */

.clay-card {
  border-radius: 24px;
  background: linear-gradient(145deg, var(--clay-surface), var(--clay-surface-strong));
  box-shadow: var(--shadow-strong);
  padding: 1rem 1.2rem;
  font-size: 0.9rem;
  color: var(--clay-text-main);
}

/* Generic Buttons */

button,
.btn-primary,
.btn-load-more {
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.btn-primary,
.btn-load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.7rem 1.4rem;
  border: none;
  background: var(--clay-accent);
  color: var(--clay-accent-text);
  box-shadow:
    0 7px 0 var(--clay-accent-dark),
    0 14px 18px rgba(249, 115, 22, 0.45);
  text-decoration: none;
  font-size: 0.9rem;
}

.btn-primary:hover,
.btn-load-more:hover {
  transform: translateY(2px);
  box-shadow:
    0 4px 0 var(--clay-accent-dark),
    0 10px 15px rgba(249, 115, 22, 0.4);
  filter: brightness(1.03);
}

.btn-primary:active,
.btn-load-more:active {
  transform: translateY(4px);
  box-shadow:
    0 2px 0 var(--clay-accent-dark),
    0 6px 10px rgba(249, 115, 22, 0.35);
}

/* =========================
   Navbar
   ========================= */

.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(254, 243, 199, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 18px rgba(248, 113, 113, 0.25);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
}

.logo h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--clay-accent-text);
  text-shadow: 0 2px 0 rgba(248, 113, 113, 0.7);
}

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

.nav-links a {
  position: relative;
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--clay-text-main);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(254, 250, 195, 0.9), rgba(254, 215, 170, 0.9));
  box-shadow:
    0 4px 0 rgba(248, 113, 113, 0.45),
    0 8px 12px rgba(248, 113, 113, 0.35);
}

.nav-links a:hover {
  transform: translateY(2px);
  box-shadow:
    0 2px 0 rgba(248, 113, 113, 0.45),
    0 6px 10px rgba(248, 113, 113, 0.3);
}

/* =========================
   Slider / Hero
   ========================= */

.slider {
  padding: 2.5rem 0 2rem;
}

.slider-container {
  position: relative;
  overflow: hidden;
}

.slide {
  display: none;
  animation: slideIn 0.45s ease;
}

.slide.active {
  display: block;
}

.slide-content {
  /* Clay hero card */
  border-radius: 32px;
  background: radial-gradient(circle at top left, #fef9c3, #fed7aa);
  box-shadow: var(--shadow-soft);
  padding: 2.2rem 2rem;
  text-align: left;
}

.slide-content h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 0.7rem;
  color: var(--clay-accent-text);
}

.slide-content p {
  font-size: 0.98rem;
  color: var(--clay-text-muted);
  margin-bottom: 1.2rem;
}

/* Slider Navigation Arrows */

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 999px;
  border: none;
  background: #fed7aa;
  box-shadow:
    0 7px 0 rgba(248, 113, 113, 0.7),
    0 14px 18px rgba(248, 113, 113, 0.45);
  width: 38px;
  height: 38px;
  font-size: 1.2rem;
  color: var(--clay-accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-btn.prev {
  left: 0.5rem;
}

.slider-btn.next {
  right: 0.5rem;
}

.slider-btn:hover {
  transform: translateY(-48%);
  box-shadow:
    0 4px 0 rgba(248, 113, 113, 0.7),
    0 10px 14px rgba(248, 113, 113, 0.4);
}

.slider-btn:active {
  transform: translateY(-46%);
  box-shadow:
    0 2px 0 rgba(248, 113, 113, 0.7),
    0 6px 10px rgba(248, 113, 113, 0.35);
}

/* Slider Dots */

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.slider-dots .dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.7);
  box-shadow:
    0 3px 0 rgba(248, 113, 113, 0.55),
    0 7px 10px rgba(248, 113, 113, 0.3);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.slider-dots .dot.active {
  background: var(--clay-accent);
  transform: translateY(1px);
}

/* =========================
   Sections Heading Style
   ========================= */

section {
  padding: 2.5rem 0;
}

section h2 {
  font-size: 1.4rem;
  margin-bottom: 1.2rem;
  color: var(--clay-accent-text);
  text-shadow: 0 2px 0 rgba(248, 113, 113, 0.5);
}

/* =========================
   Categories Filter
   ========================= */

.categories-section {
  padding-top: 1.5rem;
}

.categories-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.category-btn {
  border-radius: 999px;
  padding: 0.5rem 1rem;
  border: none;
  background: linear-gradient(135deg, #fef9c3, #fed7aa);
  box-shadow:
    0 6px 0 rgba(248, 113, 113, 0.7),
    0 10px 16px rgba(248, 113, 113, 0.35);
  color: var(--clay-text-main);
  font-size: 0.85rem;
}

.category-btn.active {
  background: var(--clay-accent);
  color: var(--clay-accent-text);
}

/* =========================
   Products Grid
   ========================= */

.products-section {
  padding-top: 1rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.3rem;
  margin-bottom: 1.5rem;
}

/* Assuming your JS will create elements with class 'product-card' */
.product-card {
  border-radius: 24px;
  background: linear-gradient(145deg, var(--clay-surface), var(--clay-surface-strong));
  box-shadow: var(--shadow-soft);
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: relative;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-strong);
}

.product-card img {
  width: 100%;
  border-radius: 20px;
  margin-bottom: 0.6rem;
  box-shadow:
    0 6px 0 rgba(248, 113, 113, 0.5),
    0 14px 20px rgba(248, 113, 113, 0.35);
}

.product-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--clay-accent-text);
}

.product-tech {
  font-size: 0.78rem;
  color: var(--clay-text-muted);
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.4rem;
  font-size: 0.8rem;
}

.product-price {
  font-weight: 800;
  color: var(--clay-accent-text);
}

.product-cta {
  margin-top: 0.7rem;
}

.load-more-container {
  display: flex;
  justify-content: center;
}

/* =========================
   Contact Section
   ========================= */

.contact-section {
  padding-bottom: 3rem;
}

.contact-content {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.5fr);
  gap: 1.5rem;
}

.contact-info,
.contact-form {
  border-radius: 24px;
  background: linear-gradient(145deg, var(--clay-surface), var(--clay-surface-strong));
  box-shadow: var(--shadow-soft);
  padding: 1.2rem 1.3rem;
}

.contact-info h3 {
  margin-bottom: 0.6rem;
  color: var(--clay-accent-text);
}

.contact-info p {
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

/* Form */

.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.contact-form input,
.contact-form textarea {
  border-radius: 18px;
  border: none;
  padding: 0.75rem 0.9rem;
  font-family: inherit;
  font-size: 0.9rem;
  background: #fefce8;
  color: var(--clay-text-main);
  box-shadow:
    inset 3px 3px 0 rgba(248, 113, 113, 0.2),
    0 8px 14px rgba(248, 113, 113, 0.25);
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  box-shadow:
    inset 2px 2px 0 rgba(248, 113, 113, 0.3),
    0 10px 18px rgba(248, 113, 113, 0.35);
}

/* =========================
   Footer
   ========================= */

.footer {
  padding: 1.2rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--clay-text-muted);
}

/* =========================
   Responsiveness
   ========================= */

@media (max-width: 768px) {
  .navbar .container {
    flex-direction: column;
    gap: 0.4rem;
  }

  .nav-links {
    gap: 0.6rem;
  }

  .slide-content {
    padding: 1.6rem 1.2rem;
  }

  .slider-btn.prev {
    left: 0.2rem;
  }

  .slider-btn.next {
    right: 0.2rem;
  }

  .contact-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .nav-links a {
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
  }

  section {
    padding: 2rem 0;
  }

  .slide-content h1 {
    font-size: 1.5rem;
  }
}

/* =========================
   Animations
   ========================= */

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   Product Detail Page (Claymorphism)
   ========================= */

.product-detail-section {
  padding: 2.5rem 0 3rem;
}

/* Back link */

.back-link {
  margin-bottom: 1.2rem;
}

.back-link a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--clay-text-main, #7c2d12);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #fef9c3, #fed7aa);
  box-shadow:
    0 6px 0 rgba(248, 113, 113, 0.7),
    0 10px 16px rgba(248, 113, 113, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.back-link a:hover {
  transform: translateY(2px);
  box-shadow:
    0 3px 0 rgba(248, 113, 113, 0.7),
    0 8px 13px rgba(248, 113, 113, 0.3);
  filter: brightness(1.03);
}

.back-link a:active {
  transform: translateY(4px);
  box-shadow:
    0 2px 0 rgba(248, 113, 113, 0.7),
    0 6px 10px rgba(248, 113, 113, 0.3);
}

/* Wrapper (JS will replace loading content with actual layout) */

.product-detail {
  margin-top: 0.5rem;
}

/* Loading state (before JS injects content) */

.product-detail-loading {
  border-radius: 24px;
  background: linear-gradient(145deg, #fefce8, #fed7aa);
  box-shadow:
    8px 8px 0 rgba(248, 113, 113, 0.5),
    0 18px 35px rgba(248, 113, 113, 0.35);
  padding: 1.2rem 1.4rem;
  text-align: center;
}

.product-detail-loading p {
  font-size: 0.95rem;
  color: var(--clay-text-main, #7c2d12);
}

/* Main clay card (use this class in your JS when you render details) */

.product-detail-card {
  border-radius: 28px;
  background: radial-gradient(circle at top left, #fef9c3, #fed7aa);
  box-shadow:
    8px 8px 0 rgba(248, 113, 113, 0.5),
    0 20px 36px rgba(248, 113, 113, 0.35);
  padding: 1.6rem 1.7rem;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
  gap: 1.6rem;
  align-items: flex-start;
}

/* Left side: gallery or thumbnail */

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.product-main-image {
  border-radius: 24px;
  overflow: hidden;
  background: #fefce8;
  box-shadow:
    0 8px 0 rgba(248, 113, 113, 0.5),
    0 18px 30px rgba(248, 113, 113, 0.35);
}

.product-main-image img {
  width: 100%;
  display: block;
}

.product-thumbs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.product-thumb {
  width: 62px;
  height: 48px;
  border-radius: 16px;
  overflow: hidden;
  background: #fefce8;
  box-shadow:
    0 5px 0 rgba(248, 113, 113, 0.5),
    0 12px 18px rgba(248, 113, 113, 0.3);
  cursor: pointer;
  opacity: 0.9;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-thumb:hover {
  transform: translateY(2px);
  box-shadow:
    0 3px 0 rgba(248, 113, 113, 0.5),
    0 9px 14px rgba(248, 113, 113, 0.3);
  opacity: 1;
}

/* Right side: info */

.product-info {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.product-info h1 {
  font-size: 1.6rem;
  color: var(--clay-accent-text, #451a03);
  text-shadow: 0 2px 0 rgba(248, 113, 113, 0.4);
}

.product-subtitle {
  font-size: 0.9rem;
  color: var(--clay-text-muted, #9a3412);
}

.product-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.3rem;
}

/* Chips / tags */

.badge-pill,
.tech-tag,
.level-tag {
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.78rem;
  background: #fefce8;
  color: var(--clay-text-main, #7c2d12);
  box-shadow:
    0 4px 0 rgba(248, 113, 113, 0.6),
    0 9px 14px rgba(248, 113, 113, 0.3);
}

/* Price + CTA */

.product-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  margin-top: 0.5rem;
}

.product-price-pill {
  border-radius: 999px;
  padding: 0.45rem 1rem;
  background: var(--clay-accent, #fb923c);
  color: var(--clay-accent-text, #451a03);
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow:
    0 7px 0 var(--clay-accent-dark, #f97316),
    0 14px 18px rgba(249, 115, 22, 0.45);
}

.product-price-note {
  font-size: 0.8rem;
  color: var(--clay-text-muted, #9a3412);
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.btn-secondary {
  border-radius: 999px;
  border: none;
  padding: 0.65rem 1.2rem;
  background: #fee2e2;
  color: var(--clay-text-main, #7c2d12);
  font-size: 0.85rem;
  box-shadow:
    0 6px 0 rgba(248, 113, 113, 0.7),
    0 12px 18px rgba(248, 113, 113, 0.35);
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-secondary:hover {
  transform: translateY(2px);
  box-shadow:
    0 4px 0 rgba(248, 113, 113, 0.7),
    0 10px 16px rgba(248, 113, 113, 0.3);
}

.btn-secondary:active {
  transform: translateY(4px);
  box-shadow:
    0 2px 0 rgba(248, 113, 113, 0.7),
    0 6px 10px rgba(248, 113, 113, 0.25);
}

/* Description + sections */

.product-description {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  color: var(--clay-text-main, #7c2d12);
}

.product-description p + p {
  margin-top: 0.4rem;
}

.product-section-title {
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--clay-accent-text, #451a03);
}

.feature-list,
.requirements-list {
  margin-top: 0.4rem;
  padding-left: 1rem;
  font-size: 0.88rem;
}

.feature-list li,
.requirements-list li {
  margin-bottom: 0.2rem;
}

/* Code preview / tech stack box */

.code-preview,
.stack-box {
  margin-top: 0.9rem;
  border-radius: 20px;
  padding: 0.8rem 0.9rem;
  background: #fefce8;
  box-shadow:
    inset 3px 3px 0 rgba(248, 113, 113, 0.25),
    0 10px 18px rgba(248, 113, 113, 0.4);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.8rem;
  overflow-x: auto;
}

/* Small info badges area (e.g. delivery, support, docs) */

.product-info-grid {
  margin-top: 1.1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.7rem;
}

.info-pill {
  border-radius: 18px;
  padding: 0.6rem 0.7rem;
  background: #fefce8;
  box-shadow:
    0 6px 0 rgba(248, 113, 113, 0.6),
    0 12px 18px rgba(248, 113, 113, 0.3);
  font-size: 0.8rem;
}

/* =========================
   Responsive adjustments
   ========================= */

@media (max-width: 900px) {
  .product-detail-card {
    grid-template-columns: 1fr;
    padding: 1.4rem 1.3rem;
  }
}

@media (max-width: 600px) {
  .product-detail-section {
    padding: 2rem 0 2.5rem;
  }

  .product-detail-card {
    border-radius: 24px;
  }

  .product-info h1 {
    font-size: 1.3rem;
  }

  .product-price-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
