﻿:root {
  --bg: #f6f7f8;
  --ink: #1c252b;
  --line: #e6eaee;
  --accent: #198754;
  --card-shadow: 0 16px 30px rgba(20, 36, 48, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 15px;
}

body {
  margin: 0;
  font-family: "Sora", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, #f0faf5 0%, transparent 40%),
    radial-gradient(circle at 85% 0%, #eef7ff 0%, transparent 35%),
    var(--bg);
  overflow-x: hidden;
}

.topbar {
  background: #ffffff;
  backdrop-filter: none;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.logo-img {
  width: 220px;
  max-width: 48vw;
  height: auto;
  display: block;
  border-radius: 3px;
  filter: none;
}

.hero {
  background: linear-gradient(135deg, #ffffff, #f9fcff);
  border: 1px solid var(--line);
  box-shadow: var(--card-shadow);
}

.search-input {
  border-radius: 4px;
  border: 1px solid #d8e0e7;
}

.search-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.15);
  border-color: #80c7a4;
}

.product-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--card-shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 36px rgba(20, 36, 48, 0.12);
}

.product-price {
  font-size: 1rem;
  font-weight: 700;
}

.cart-item {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px;
  background: #fff;
}

.qty-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #d9e1e7;
  border-radius: 3px;
  background: #f6f9fb;
  font-weight: 700;
}

.btn {
  border-radius: 4px !important;
}

.offcanvas,
.hero,
.alert {
  border-radius: 6px !important;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cart-item-controls .remove {
  margin-left: auto;
}

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 130px;
  z-index: 1050;
  width: 44px;
  height: 44px;
  border: 1px solid #c8d3dd;
  border-radius: 4px;
  background: #ffffff;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(20, 36, 48, 0.16);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: #f3f7fb;
}

@media (max-width: 768px) {
  .topbar .container {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
    align-items: flex-start;
  }

  .topbar .container > .d-flex {
    flex: 1;
    min-width: 0;
    gap: 0.75rem;
  }

  .logo-img {
    width: 150px;
    max-width: 52vw;
  }

  #open-cart {
    flex-shrink: 0;
    white-space: nowrap;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero {
    padding: 1.25rem !important;
  }

  .hero .display-6 {
    font-size: 1.4rem;
  }

  .product-card .card-body {
    padding: 1rem;
  }
}

@media (max-width: 575.98px) {
  .topbar .container {
    flex-direction: column;
    align-items: stretch !important;
    gap: 0.75rem !important;
  }

  .topbar .container > .d-flex {
    width: 100%;
  }

  .logo-img {
    width: 135px;
    max-width: 46vw;
  }

  #open-cart {
    width: 100%;
  }

  .offcanvas {
    width: 100% !important;
  }

  .cart-item-controls .remove {
    margin-left: 0;
    width: 100%;
  }

  .back-to-top {
    right: 14px;
    bottom: 108px;
    width: 42px;
    height: 42px;
  }
}
