:root {
  --primary: #0077b6;
  --primary-hover: #0096c7;
  --title: #000000;
  --text: #000000;
  --price-after: #6dc012;
  --price-before: #d0021b;
  --danger: #f44336;
  --success: #00c853;
  --border: #e3e3e3;
  --muted-bg: #f0f0f0;
  --radius: 4px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #ffffff;
  color: var(--text);
  font-family: "Titillium Web", Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.notice-bar {
  background: var(--primary);
  padding: 15px;
  text-align: center;
}

.notice-bar p {
  margin: 0;
  color: #000000;
  font-weight: 700;
  font-size: 16px;
}

.app-header {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 64px;
  background: #ffffff;
  border-bottom: 1px solid var(--muted-bg);
}

.header-brand {
  display: flex;
  align-items: center;
  height: 40px;
  color: #000000;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.header-brand img {
  max-height: 100%;
}

.single-product {
  padding: 30px 0;
}

.product-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.preview-main {
  border: 1px solid var(--muted-bg);
  border-radius: var(--radius);
  overflow: hidden;
}

.preview-main img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.preview-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.preview-thumbs::-webkit-scrollbar {
  display: none;
}

.thumb {
  flex: 0 0 calc((100% - 24px) / 4);
  padding: 0;
  background: none;
  border: 1px solid var(--muted-bg);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  opacity: 0.7;
}

.thumb.is-active {
  border-color: var(--primary);
  opacity: 1;
}

.thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.product-name {
  margin: 0 0 8px;
  color: var(--title);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 16px;
}

.price-after {
  color: var(--price-after);
  font-size: 26px;
  font-weight: 700;
}

.price-before {
  color: var(--price-before);
  font-size: 18px;
}

.form-title {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 16px;
}

.form-field {
  margin-bottom: 12px;
}

.form-field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #000000;
  font: inherit;
  font-size: 16px;
  outline: none;
}

.form-field input::placeholder {
  color: #9a9a9a;
}

.form-field input:focus {
  border-color: var(--primary);
}

.form-field.has-error input {
  border-color: var(--danger);
}

.field-error {
  margin: 4px 0 0;
  color: var(--danger);
  font-size: 14px;
}

.add-to-cart {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.quantity {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.quantity button {
  width: 40px;
  height: 40px;
  padding: 0;
  background: var(--muted-bg);
  border: 1px solid var(--muted-bg);
  border-radius: var(--radius);
  color: #333333;
  font: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.quantity input {
  width: 44px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 0;
  color: #333333;
  font: inherit;
  font-weight: 600;
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
  appearance: textfield;
}

.quantity input::-webkit-outer-spin-button,
.quantity input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.btn-order {
  flex: 1 1 auto;
  min-height: 48px;
  padding: 0 20px;
  background: var(--primary);
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-order:hover {
  background: var(--primary-hover);
}

.btn-order:disabled {
  opacity: 0.6;
  cursor: wait;
}

.form-status {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-weight: 600;
  text-align: center;
}

.form-status.is-success {
  background: #e6f9ee;
  color: #00893a;
}

.form-status.is-error {
  background: #fdecea;
  color: var(--danger);
}

.product-description {
  margin-top: 30px;
  text-align: center;
}

.product-description p {
  margin: 0 0 10px;
}

.product-description h2 {
  margin: 16px 0 6px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
}

.product-description h3 {
  margin: 10px 0 2px;
  font-size: 18px;
  font-weight: 700;
}

.product-description img {
  width: 100%;
  max-width: 500px;
  margin: 12px auto;
}

.footer {
  min-height: 90px;
}

.sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 10px 0;
  background: #ffffff;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.sticky-bar[hidden] {
  display: none;
}

@media (min-width: 768px) {
  .notice-bar p {
    font-size: 24px;
  }

  .app-header {
    height: 80px;
  }

  .product-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: start;
  }

  .product-preview {
    position: sticky;
    top: 20px;
  }

  .thumb {
    flex-basis: calc((100% - 32px) / 5);
  }

  .product-name {
    font-size: 30px;
  }

  .price-after {
    font-size: 30px;
  }
}
