* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans JP", sans-serif;
  background: radial-gradient(
    circle at top,
    #eef2ff 0%,
    #f8fafc 35%,
    #f9fafb 100%
  );
  color: #111827;
}

html,
body {
  min-height: 100%;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 64px;
  background: rgba(255, 255, 255, 0.96);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  box-shadow: 0 16px 50px rgba(15, 23, 42, 0.08);
  z-index: 100;
  backdrop-filter: blur(10px);
}

.title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.cart {
  position: relative;
  font-size: 24px;
  cursor: pointer;
}

.badge {
  position: absolute;
  top: -6px;
  right: -10px;
  min-width: 22px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #f97316;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  text-align: center;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 88px 18px 24px;
}

h1 {
  font-size: 26px;
  margin: 0;
  text-align: center;
}

h3,
h2 {
  margin: 8px 0 0;
  color: #4b5563;
  font-size: 14px;
  text-align: center;
}

p {
  margin: 10px auto 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.tabs {
  display: flex;
  gap: 10px;
  margin: 24px 0 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.tabs::-webkit-scrollbar {
  height: 6px;
}

.tabs::-webkit-scrollbar-thumb {
  background: rgba(107, 114, 128, 0.3);
  border-radius: 999px;
}

.tab {
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.tab:hover {
  background: #dbeafe;
}

.tab.active {
  background: #1d4ed8;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 16px 35px rgba(59, 130, 246, 0.18);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.card {
  background: #ffffff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
}

.card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: #f8fafc;
}

.card-body {
  padding: 16px;
}

.name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.price {
  color: #1d4ed8;
  font-size: 15px;
  font-weight: 700;
}

.desc {
  font-size: 13px;
  color: #4b5563;
  margin-top: 10px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.form-control,
.form-select {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #fff;
  font-size: 14px;
  color: #111827;
}

.form-text {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
}

.section-group {
  margin-top: 14px;
}

.info-block {
  margin-top: 16px;
  font-size: 14px;
  color: #334155;
}

.info-block p {
  margin: 8px 0;
}

.form-select {
  appearance: none;
}

.form-select[multiple] {
  min-height: 110px;
}

.simple-btn,
.add-btn,
.button-secondary {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.simple-btn,
.add-btn {
  background: #1d4ed8;
  color: #fff;
}

.button-secondary {
  background: #eef2ff;
  color: #1d4ed8;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal.active {
  display: flex;
}

.modal-content {
  width: min(100%, 560px);
  background: #ffffff;
  border-radius: 30px;
  overflow: hidden;
  max-height: 92vh;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.modal img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: #f8fafc;
}

.modal-body {
  padding: 22px;
}

.modal-body h3 {
  margin: 0;
  font-size: 20px;
}

.modal-body p {
  margin: 10px 0 0;
}

.quantity {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 20px auto;
  min-width: 140px;
}

.quantity button {
  width: 42px;
  height: 42px;
  border: none;
  background: #eef2ff;
  color: #1d4ed8;
  border-radius: 12px;
  font-size: 18px;
  cursor: pointer;
}

.quantity span {
  min-width: 32px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
}

.disabled {
  background: #cbd5e1 !important;
  cursor: not-allowed;
}

#modalPrice,
#totalPrice,
#confirmTotal {
  color: #1d4ed8;
  font-size: 18px;
  font-weight: 700;
  margin-top: 14px;
}

.cartItem {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #e2e8f0;
}

.cartItem:last-child {
  border-bottom: none;
}

.itemName {
  flex: 1;
  font-size: 14px;
  color: #111827;
  line-height: 1.4;
}

.itemQty {
  min-width: 42px;
  text-align: right;
  color: #4b5563;
}

.deleteBtn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: #f1f5f9;
  cursor: pointer;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
}

.deleteBtn:hover {
  background: #f97316;
  color: #fff;
}

#cartItems {
  max-height: 340px;
  overflow-y: auto;
}

#cartItems::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
  width: 6px;
}

#cartItems::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}

hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 20px 0;
}

@media (max-width: 700px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .header {
    padding: 0 14px;
  }

  .container {
    padding: 88px 14px 18px;
  }
}
