* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #f8fafc;
  color: #1e293b;
  padding-bottom: 70px;
}

/* Шапка (Header / Hero) */
.header {
  position: relative;
  width: 100%;
  min-height: 35vh;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.75)),
    url('./image/bg1.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  /* justify-content: space-between; */
  padding: 1.5rem 2rem 4rem;
  color: #fff;
}
/* Контейнер логотипа */
.header-top {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Сам логотип */
.logo-img {
  /* На телефоні: ~75px, на ноуті: ~115px, на великому моніторі: до 135px */
  height: 12em;
  width: auto;
  display: block;
  object-fit: contain;

  /* Делікатне свічення, щоб темні деталі дельфіна виділялися на темних хмарах */
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.6))
          drop-shadow(0 0 12px rgba(255, 255, 255, 0.25));
  
  transition: transform 0.25s ease;
}

.logo-link:hover .logo-img {
  transform: scale(1.05);
}

.hero-content {
  text-align: center;
  max-width: 720px;
  margin: auto;
}

.hero-content h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.9rem;
}

.hero-content p {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  opacity: 0.9;
  margin-bottom: 1.8rem;
}

.hero-cta {
  display: inline-block;
  background: #0284c7;
  color: #fff;
  padding: 0.85rem 2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.hero-cta:hover {
  background-color: #0369a1;
  transform: translateY(-2px);
}

/* Каталог */
.container {
  max-width: 1100px;
  margin: 3rem auto;
  padding: 0 1.25rem;
}

h1 {
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 6px;
}

.card h3 {
  margin: 0.9rem 0 0.4rem;
  font-size: 1.15rem;
}

.card .price {
  font-weight: 700;
  color: #0284c7;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.card button {
  margin-top: auto;
  padding: 0.7rem;
  border: none;
  background: #0f172a;
  color: #fff;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.card button:hover {
  background: #1e293b;
}

/* Плаваюча кнопка кошика */
.cart-floating-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #0284c7;
  color: #ffffff;
  border: none;
  cursor: pointer;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(2, 132, 199, 0.4);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.cart-floating-btn:hover {
  transform: scale(1.08);
  background-color: #0369a1;
}

.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background-color: #ef4444;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
}

/* Модальне вікно кошика */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #fff;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.8rem;
  border-radius: 10px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.close-btn {
  position: absolute;
  right: 1.2rem;
  top: 1rem;
  font-size: 1.6rem;
  cursor: pointer;
  color: #64748b;
  line-height: 1;
}

.close-btn:hover {
  color: #0f172a;
}

.cart-total {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1.2rem 0;
  border-top: 1px solid #e2e8f0;
  padding-top: 1rem;
}

/* Форма оформлення */
form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

form h3 {
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

form input,
form textarea {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
}

form input:focus,
form textarea:focus {
  border-color: #0284c7;
}

form textarea {
  resize: vertical;
  min-height: 70px;
}

.submit-btn {
  background: #16a34a;
  color: white;
  border: none;
  padding: 0.85rem;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  margin-top: 0.4rem;
  transition: background-color 0.2s ease;
}

.submit-btn:hover {
  background: #15803d;
}

.cart-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}

.cart-row button {
  background: #ef4444;
  border: none;
  color: #fff;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  margin-left: 0.5rem;
}

.cart-row button:hover {
  background: #dc2626;
}