* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;

  font-family:
    Arial,
    sans-serif;

  background:
    #f5f7fb;

  color:
    #111827;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}


/* =========================
   HEADER
========================= */

.topbar {
  position: sticky;

  top: 0;

  z-index: 1000;

  display: flex;

  align-items: center;

  justify-content:
    space-between;

  padding:
    14px 5%;

  background:
    rgba(17, 24, 39, .97);

  color: white;

  box-shadow:
    0 4px 20px
    rgba(0,0,0,.12);
}

.brand {
  font-size: 26px;

  font-weight: 1000;

  letter-spacing: 1px;
}

.tagline {
  margin-top: 2px;

  color: #9ca3af;

  font-size: 9px;

  font-weight: 800;
}

.cart-button {
  border: 0;

  border-radius: 12px;

  padding:
    10px 15px;

  background: white;

  color: #111827;

  font-weight: 900;
}

#cartCount {
  display: inline-flex;

  align-items: center;

  justify-content: center;

  min-width: 23px;

  height: 23px;

  margin-right: 5px;

  padding: 0 5px;

  border-radius: 20px;

  background: #2563eb;

  color: white;
}


/* =========================
   MAIN
========================= */

main {
  width:
    min(1150px, 92%);

  margin: auto;
}


/* =========================
   HERO
========================= */

.hero {
  position: relative;

  overflow: hidden;

  margin:
    25px 0 35px;

  padding:
    60px 25px;

  border-radius: 25px;

  background:
    linear-gradient(
      135deg,
      #111827,
      #1f2937,
      #2563eb
    );

  color: white;

  text-align: center;

  box-shadow:
    0 15px 40px
    rgba(0,0,0,.12);
}

.hero-badge {
  display: inline-block;

  padding:
    7px 14px;

  border:
    1px solid
    rgba(255,255,255,.25);

  border-radius: 30px;

  background:
    rgba(255,255,255,.1);

  font-size: 12px;

  font-weight: 1000;
}

.hero h1 {
  margin:
    15px 0 8px;

  font-size:
    clamp(
      32px,
      6vw,
      55px
    );

  font-weight: 1000;
}

.hero p {
  margin: 0;

  color: #dbeafe;

  font-size: 16px;
}

.shipping-banner {
  display: inline-block;

  margin-top: 25px;

  padding:
    10px 16px;

  border-radius: 12px;

  background:
    rgba(0,0,0,.22);

  font-size: 12px;

  font-weight: 900;
}


/* =========================
   PRODUCTS
========================= */

.products-section {
  padding-bottom: 60px;
}

.section-title h2 {
  margin: 0;

  font-size: 27px;
}

.section-title p {
  margin-top: 5px;

  color: #6b7280;
}

.products-grid {
  display: grid;

  grid-template-columns:
    repeat(
      auto-fit,
      minmax(220px, 1fr)
    );

  gap: 18px;

  margin-top: 20px;
}

.product-card {
  overflow: hidden;

  border:
    1px solid #e5e7eb;

  border-radius: 18px;

  background: white;

  box-shadow:
    0 6px 25px
    rgba(0,0,0,.07);

  transition:
    transform .2s,
    box-shadow .2s;
}

.product-card:hover {
  transform:
    translateY(-4px);

  box-shadow:
    0 12px 35px
    rgba(0,0,0,.11);
}

.product-image {
  display: block;

  width: 100%;

  height: 210px;

  object-fit: cover;

  background: #e5e7eb;
}

.product-content {
  padding: 15px;
}

.product-name {
  font-size: 18px;

  font-weight: 1000;
}

.product-price {
  margin-top: 6px;

  color: #2563eb;

  font-size: 21px;

  font-weight: 1000;
}

.color-label {
  display: block;

  margin-top: 14px;

  color: #6b7280;

  font-size: 11px;

  font-weight: 900;
}

.product-color {
  width: 100%;

  margin-top: 6px;

  padding: 10px;

  border:
    1px solid #d1d5db;

  border-radius: 10px;

  background: white;
}

.add-button {
  width: 100%;

  margin-top: 12px;

  padding: 12px;

  border: 0;

  border-radius: 11px;

  background: #111827;

  color: white;

  font-weight: 1000;
}

.add-button:hover {
  background: #2563eb;
}


/* =========================
   OVERLAYS
========================= */

.overlay {
  position: fixed;

  inset: 0;

  z-index: 99999;

  display: flex;

  align-items: stretch;

  justify-content:
    flex-start;

  background:
    rgba(0,0,0,.58);
}


/* =========================
   CART
========================= */

.cart-panel,
.checkout-panel {
  width:
    min(450px, 100%);

  height: 100%;

  overflow-y: auto;

  padding: 20px;

  background: white;

  box-shadow:
    10px 0 40px
    rgba(0,0,0,.2);
}

.cart-top {
  display: flex;

  align-items: center;

  justify-content:
    space-between;

  padding-bottom: 15px;

  border-bottom:
    1px solid #e5e7eb;
}

.cart-top h2 {
  margin: 0;
}

.cart-top small {
  color: #9ca3af;
}

.close-button {
  width: 40px;

  height: 40px;

  border: 0;

  border-radius: 10px;

  background: #f3f4f6;

  font-weight: 1000;
}

.empty-cart {
  display: flex;

  flex-direction: column;

  align-items: center;

  gap: 7px;

  padding:
    60px 20px;

  color: #9ca3af;

  text-align: center;

  font-size: 35px;
}

.empty-cart strong {
  color: #374151;

  font-size: 16px;
}

.empty-cart span {
  font-size: 12px;
}

.cart-item {
  display: grid;

  grid-template-columns:
    65px 1fr auto;

  gap: 10px;

  align-items: center;

  margin-top: 12px;

  padding: 10px;

  border:
    1px solid #e5e7eb;

  border-radius: 13px;
}

.cart-item img {
  width: 65px;

  height: 65px;

  border-radius: 10px;

  object-fit: cover;
}

.cart-item-name {
  font-weight: 1000;
}

.cart-item-info {
  margin-top: 4px;

  color: #6b7280;

  font-size: 11px;
}

.remove-button {
  border: 0;

  background: transparent;

  color: #ef4444;

  font-size: 18px;
}

.cart-summary {
  margin-top: 20px;

  padding: 15px;

  border-radius: 14px;

  background: #f3f4f6;
}

.summary-row {
  display: flex;

  justify-content:
    space-between;

  margin: 8px 0;

  font-size: 13px;
}

.summary-total {
  display: flex;

  justify-content:
    space-between;

  margin-top: 14px;

  padding-top: 14px;

  border-top:
    1px solid #d1d5db;

  font-size: 20px;

  font-weight: 1000;
}

.free-shipping-message {
  margin-top: 10px;

  color: #059669;

  font-size: 11px;

  font-weight: 900;
}

.checkout-button {
  width: 100%;

  margin-top: 15px;

  padding: 14px;

  border: 0;

  border-radius: 11px;

  background: #22c55e;

  color: white;

  font-weight: 1000;
}


/* =========================
   CHECKOUT
========================= */

#checkoutForm {
  padding-top: 20px;
}

#checkoutForm label {
  display: block;

  margin-bottom: 14px;

  font-size: 12px;

  font-weight: 900;
}

#checkoutForm input,
#checkoutForm textarea {
  width: 100%;

  margin-top: 6px;

  padding: 12px;

  border:
    1px solid #d1d5db;

  border-radius: 10px;

  outline: none;
}

#checkoutForm textarea {
  min-height: 85px;

  resize: vertical;
}

#checkoutForm input:focus,
#checkoutForm textarea:focus {
  border-color: #2563eb;
}

.payment-title {
  margin-top: 20px;

  font-size: 15px;

  font-weight: 1000;
}

.payment-options {
  display: grid;

  grid-template-columns:
    1fr 1fr;

  gap: 10px;

  margin-top: 10px;
}

.payment-button {
  padding: 14px;

  border:
    2px solid #e5e7eb;

  border-radius: 11px;

  background: white;

  font-weight: 1000;
}

.payment-button.active {
  border-color: #2563eb;

  background: #eff6ff;

  color: #2563eb;
}

.selected-payment {
  margin-top: 10px;

  color: #6b7280;

  font-size: 11px;

  font-weight: 900;
}

.checkout-total {
  margin-top: 25px;

  padding: 15px;

  border-radius: 12px;

  background: #f3f4f6;

  font-size: 18px;

  font-weight: 1000;
}

.place-order-button {
  width: 100%;

  margin-top: 15px;

  padding: 15px;

  border: 0;

  border-radius: 11px;

  background: #111827;

  color: white;

  font-weight: 1000;
}


/* =========================
   SUCCESS
========================= */

#successOverlay {
  align-items: center;

  justify-content: center;
}

.success-box {
  width:
    min(430px, 92%);

  padding: 35px 25px;

  border-radius: 20px;

  background: white;

  text-align: center;
}

.success-icon {
  display: flex;

  align-items: center;

  justify-content: center;

  width: 70px;

  height: 70px;

  margin:
    0 auto 15px;

  border-radius: 50%;

  background: #22c55e;

  color: white;

  font-size: 35px;

  font-weight: 1000;
}

#finishOrderButton {
  width: 100%;

  margin-top: 15px;

  padding: 13px;

  border: 0;

  border-radius: 11px;

  background: #111827;

  color: white;

  font-weight: 1000;
}


/* =========================
   MOBILE
========================= */

@media (
  max-width: 600px
) {

  .hero {
    padding:
      45px 18px;
  }

  .products-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );

    gap: 10px;
  }

  .product-image {
    height: 150px;
  }

  .product-content {
    padding: 10px;
  }

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

  .product-price {
    font-size: 17px;
  }
}
