/* Reset & base */
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background-color: #f9fafb;
  color: #1f2937;
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Containers */
.container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* Typography */
h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.5rem;
  color: #8da8e2;
}
h1 {
  font-size: 2.75rem;
}
h2 {
  font-size: 2rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}
h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}
p {
  margin-bottom: 1.25rem;
  font-size: 1rem;
  color: #374151;
}

/* Links */
a {
  color: #4f46e5;
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover,
a:focus {
  color: #4338ca;
  outline: none;
  text-decoration: underline;
}

/* Header & Navigation */
header {
  background: #ffffffcc;
  backdrop-filter: saturate(180%) blur(15px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid #e5e7eb;
}
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}
.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #4f46e5;
  cursor: default;
  user-select: none;
}
.logo:focus {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

/* Navigation menu */
.nav-main {
  display: flex;
}
.nav-list {
  display: flex;
  list-style: none;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
}
.nav-link {
  color: #374151;
  font-weight: 600;
  font-size: 1rem;
  position: relative;
}
.nav-link:focus,
.nav-link:hover {
  color: #4f46e5;
  outline: none;
}
.nav-link::after {
  content: "";
  position: absolute;
  height: 2px;
  width: 0;
  background-color: #4f46e5;
  bottom: -4px;
  left: 0;
  transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link:focus::after {
  width: 100%;
}

/* Mobile menu toggle button */
.mobile-menu-toggle {
  background: none;
  border: none;
  color: #4f46e5;
  cursor: pointer;
  display: none;
  padding: 0.25rem;
  font-size: 2rem;
  line-height: 1;
  transition: color 0.3s ease;
}
.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus {
  color: #4338ca;
  outline: none;
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 5rem 1rem 6rem;
  background: linear-gradient(135deg, #6366f1 0%, #a78bfa 100%);
  color: white;
  border-radius: 16px;
  box-shadow: 0 16px 32px rgba(99, 102, 241, 0.25);
  margin-bottom: 3rem;
}
.hero-section h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  font-weight: 800;
  line-height: 1.1;
}
.hero-section p {
  font-size: 1.25rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
  color: #e0d7fc;
}

/* Buttons */
.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, #4f46e5, #8b5cf6);
  color: white;
  font-weight: 700;
  border: none;
  padding: 0.75rem 2rem;
  font-size: 1.125rem;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgb(127 90 255 / 0.5);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  text-align: center;
  text-decoration: none;
}
.btn-primary:hover,
.btn-primary:focus {
  box-shadow: 0 12px 30px rgb(127 90 255 / 0.75);
  transform: translateY(-3px);
  outline: none;
}

/* Content Sections */
.content-section {
  margin-bottom: 4rem;
}

/* Items Section */
.items-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.control {
  display: flex;
  align-items: center;
  gap: 8px;
}
.control-search {
  background: #fff;
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
}
.control-search input[type="search"] {
  border: none;
  outline: none;
  font-size: 1rem;
  width: 220px;
}
.control-sort select {
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
  background: #fff;
}
.items-count {
  color: #6b7280;
  font-size: 0.95rem;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 1.75rem;
}
.category-button {
  padding: 0.5rem 1rem;
  font-weight: 600;
  border: 2px solid #8b5cf6;
  border-radius: 12px;
  background-color: transparent;
  color: #8b5cf6;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
  user-select: none;
}
.category-button.active,
.category-button:hover,
.category-button:focus {
  background-color: #7c3aed;
  color: #fafafa;
  border-color: #7c3aed;
  outline: none;
}

/* Items grid */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}
.item-card {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.item-card:hover,
.item-card:focus-within {
  box-shadow: 0 10px 30px rgba(127, 90, 255, 0.3);
  transform: translateY(-5px);
  outline: none;
}
.item-image {
  width: 100%;
  height: 180px;
  background-color: #e0e7ff;
  border-radius: 10px;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}
.item-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
}
.item-content h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0.25rem 0 0.5rem;
  color: #4c1d95;
}
.item-content p {
  flex-grow: 1;
  font-size: 0.95rem;
  color: #4b5563;
  margin: 0 0 1rem;
}
.item-price {
  font-weight: 700;
  font-size: 1.125rem;
  color: #4f46e5;
  margin-top: auto;
}

.load-more-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

/* Services Section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.service-card {
  background: #f3f4f6;
  border-radius: 14px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 6px 15px rgb(0 0 0 / 0.04);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  cursor: default;
}
.service-card:hover,
.service-card:focus-within {
  box-shadow: 0 10px 25px rgb(127 90 255 / 0.25);
  transform: translateY(-6px);
  outline: none;
}
.service-icon {
  font-size: 3.5rem;
  color: #7c3aed;
  margin-bottom: 1rem;
}

/* Lists */
ul {
  padding-left: 1.5rem;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  color: #4b5563;
  font-size: 1rem;
  line-height: 1.5;
}
ul li {
  margin-bottom: 0.5rem;
}

/* Location Section */
address {
  font-style: normal;
  color: #374151;
  line-height: 1.5;
  margin-bottom: 1rem;
  font-size: 1rem;
}
.map-container {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgb(127 90 255 / 0.2);
}

/* Contact Form */
form {
  max-width: 520px;
  margin-top: 1rem;
}
.form-group {
  margin-bottom: 1.25rem;
}
label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #4b5563;
}
input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  transition: border-color 0.3s ease;
  font-family: inherit;
  resize: vertical;
}
input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  border-color: #7c3aed;
  outline: none;
  box-shadow: 0 0 10px rgb(124 58 237 / 0.3);
}

button[type="submit"] {
  margin-top: 0.5rem;
}

/* Form status alert */
#form-status {
  margin-top: 1rem;
  font-weight: 600;
  color: #4f46e5;
}

/* Footer */
.footer {
  text-align: center;
  color: #6b7280;
  padding: 2rem 1rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.9rem;
}

/* Responsive Layout */

/* Mobile first */
@media screen and (max-width: 767px) {
  .nav-main {
    position: fixed;
    top: 60px;
    right: 0;
    width: 240px;
    height: calc(100vh - 60px);
    background-color: #fafafa;
    border-left: 1px solid #e5e7eb;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    flex-direction: column;
    padding-top: 2rem;
    box-shadow: -4px 0 12px rgb(0 0 0 / 0.1);
    z-index: 1100;
  }
  .nav-main.open {
    transform: translateX(0);
  }
  .nav-list {
    flex-direction: column;
    gap: 1rem;
    padding-left: 1.5rem;
  }
  .mobile-menu-toggle {
    display: block;
  }
  /* Reduce hero font size */
  .hero-section h1 {
    font-size: 2.25rem;
  }
  /* Items grid with single column */
  .items-grid {
    grid-template-columns: 1fr;
  }
  /* Services grid single column */
  .services-grid {
    grid-template-columns: 1fr;
  }
  .control-search input[type="search"] {
    width: 160px;
  }
}

/* Tablet and up */
@media screen and (min-width: 768px) and (max-width: 1023px) {
  .nav-main {
    position: static;
    width: auto;
    height: auto;
    transform: none !important;
    flex-direction: row;
    background-color: transparent;
    box-shadow: none;
    border-left: none;
    padding-top: 0;
  }
  .nav-list {
    gap: 1.5rem;
  }
  .mobile-menu-toggle {
    display: none;
  }
  /* Items grid 2 columns */
  .items-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  /* Services grid 2 columns */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  /* Hero font size medium */
  .hero-section h1 {
    font-size: 2.75rem;
  }
}

/* Desktop and larger */
@media screen and (min-width: 1024px) {
  .nav-main {
    position: static;
    transform: none !important;
    background-color: transparent;
    box-shadow: none;
    border-left: none;
    flex-direction: row;
    height: auto;
    padding-top: 0;
  }
  .nav-list {
    gap: 2rem;
  }
  .mobile-menu-toggle {
    display: none;
  }
  /* Items grid 3 columns */
  .items-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  /* Services grid 3 columns */
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .hero-section h1 {
    font-size: 3.5rem;
  }
}

/* Dark theme overrides */
body {
  background-color: #0b1220;
  color: #e5e7eb;
}
header {
  background: #0b1220cc;
  border-bottom: 1px solid #1f2937;
}
.logo {
  color: #a78bfa;
}
.nav-link {
  color: #cbd5e1;
}
.nav-link:hover,
.nav-link:focus {
  color: #a78bfa;
}
.nav-link::after {
  background-color: #a78bfa;
}
.mobile-menu-toggle {
  color: #a78bfa;
}

.hero-section {
  background: radial-gradient(
    1200px 600px at 50% -10%,
    #3b236b 0%,
    #111827 70%,
    #0b1220 100%
  );
  box-shadow: 0 20px 40px rgba(124, 58, 237, 0.2);
}
.hero-section p {
  color: #c7d2fe;
}

.btn-primary {
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  box-shadow: 0 10px 24px rgba(167, 139, 250, 0.35);
}
.btn-primary:hover,
.btn-primary:focus {
  box-shadow: 0 16px 36px rgba(167, 139, 250, 0.55);
}

.items-controls {
  color: #cbd5e1;
}
.control-search {
  background: #0f172a;
  border-color: #27324a;
}
.control-search input[type="search"] {
  background: transparent;
  color: #e5e7eb;
}
.control-sort select {
  background: #0f172a;
  border-color: #27324a;
  color: #e5e7eb;
}
.items-count {
  color: #94a3b8;
}

.category-button {
  border-color: #7c3aed;
  color: #c4b5fd;
}
.category-button.active,
.category-button:hover,
.category-button:focus {
  background-color: #7c3aed;
  color: #fafafa;
  border-color: #7c3aed;
}

.item-card {
  background: #111827;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}
.item-card:hover,
.item-card:focus-within {
  box-shadow: 0 18px 36px rgba(124, 58, 237, 0.35);
}
.item-image {
  background-color: #141b2d;
}
.item-content h3 {
  color: #c7d2fe;
}
.item-content p {
  color: #a3a3b2;
}
.item-price {
  color: #a78bfa;
}

.service-card {
  background: #0f172a;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}
.service-icon {
  color: #a78bfa;
}

ul {
  color: #cbd5e1;
}
address {
  color: #cbd5e1;
}
.map-container {
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.2);
}

input[type="text"],
input[type="email"],
textarea {
  background: #0f172a;
  border-color: #27324a;
  color: #e5e7eb;
}
input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  border-color: #a78bfa;
  box-shadow: 0 0 10px rgba(167, 139, 250, 0.35);
}

.footer {
  color: #94a3b8;
  border-top: 1px solid #1f2937;
}

/* Dark theme: mobile menu panel */
@media screen and (max-width: 767px) {
  .nav-main {
    background-color: #0b1220;
    border-left: 1px solid #1f2937;
    box-shadow: -4px 0 14px rgba(0, 0, 0, 0.45);
  }
}
