/* ================= RESET + BASE ================= */

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

html, body {
    font-family: IBM Plex Sans;
    color: white;
    background: #171717;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* HEADER */


header {

    top: 0;
    left: 0;
    width: 100%;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
}

.logo {
    width: 150px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 35px;
}

.cart-icon {
    position: relative;
    margin-left: 15px;
    cursor: pointer;
}

.cart-icon img {
    width: 32px;
    height: 32px;
    transform: translateY(1.2px);
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -8px;
    background: red;
    color: white;
    font-size: 11px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#menu-toggle {
    display: none;
}

.hamburger-menu {
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    transition: opacity 0.2s;
    margin-right: 10px;
}

.hamburger-menu:hover {
    opacity: 60%;
}

.hamburger-menu img {
    width: 100%;
    height: auto;
}

.mobile-menu {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.96);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s ease, opacity 0.35s ease;
    z-index: 12000;
}

#menu-toggle:checked ~ .mobile-menu {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.close-menu {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
    background: none;
    border: none;
}

.mobile-menu .logo {
    width: 260px;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

.mobile-menu-links a{
    color: white;
    text-decoration: none;
    font-size: 1.6rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 400;
}

.mobile-menu-links a:hover {
    opacity: 0.6;
}

.social-media-mobile-menu {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 60px;
}

.social-media-mobile-menu img {
    width: 35px;
    height: 35px;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.social-media-mobile-menu img:hover {
    opacity: 1;
}

/* ================= LAYOUT ================= */

.checkout-page {
  padding: 60px 80px 120px;
}

.checkout-layout {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 4rem;
  align-items: start;
}

/* ================= FORM (LEFT) ================= */

.checkout-form {
  background: transparent;
}

.checkout-section {
  margin-bottom: 3rem;
}

.checkout-section h2 {
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 1.2rem;
  color: white;
}

/* INPUTS */

.input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 6px;
  border: none;
  background: #ffffff;
  color: #171717;
  font-size: 0.95rem;
}

.input::placeholder {
  color: #8a8a8a;
}

.input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(132, 31, 255, 0.6);
}

.form-group {
  margin-bottom: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.error-message {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
  color: #e74c3c;
}

/* ================= ACTION ================= */

.checkout-actions {
  margin-top: 2rem;
}

.checkout-btn {
  width: 100%;
  padding: 16px;
  background: rgb(132, 31, 255);
  color: white;
  border: none;
  font-size: 0.95rem;
  letter-spacing: 1.5px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  transition: transform 0.2s, opacity 0.2s;
}

.checkout-btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.checkout-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ================= SUMMARY (RIGHT) ================= */

.checkout-summary {
  background: #1e1e1e;
  padding: 2rem;
  border-radius: 8px;
}

.checkout-summary h2 {
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

/* PRODUCTS */

.summary-products {
  margin-bottom: 2rem;
}

.summary-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.2rem;
}

.summary-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}

.summary-item-title {
  font-size: 0.95rem;
}

.summary-item-meta {
  font-size: 0.8rem;
  color: #b5b5b5;
  margin-top: 2px;
}

.summary-item-price {
  font-size: 0.95rem;
  white-space: nowrap;
}

/* TOTALS */

.summary-line {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  font-size: 0.95rem;
}

.summary-total {
  margin-top: 1.6rem;
  font-size: 1.3rem;
  font-weight: 600;
  color: rgb(132, 31, 255);
}

/* ========= FOOTER ========== */
footer {
    text-align: center;
    margin-top: 70px;

}

footer .footer-logo {
    margin-bottom: 25px;
    height: 85px;
}

footer .social {
    text-align: center;
    margin-bottom: 10px;
}

.social a {
    text-decoration: none;
}

.social img {
    width: 30px;
    height: 30px;
    margin-left: 15px;
    margin-right: 15px;
    display: inline-block;
    transition: opacity 0.3s;
}

.social img:hover {
    opacity: 60%;
}

footer ul {
    margin-top: 0;
    padding: 0;
    list-style: none;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 0;
    text-align: center;
}

footer ul > li {
    display: inline-block;
    padding: 0 15px;
}

footer ul li a {
    text-decoration: none;
    color: white;
    transition: opacity 0.3s;
}

footer ul li a:hover {
    opacity: 60%;
}

footer .copyright {
    margin-top: 15px;
    text-align: center;
    font-size: 13px;
    margin-bottom: 30px;
    color: #ccc;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 900px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .checkout-page {
    padding: 40px 24px 100px;
  }

  .checkout-summary {
    margin-top: 2rem;
  }
}

@media (max-width: 600px) {
  .nav {
    padding: calc(env(safe-area-inset-top, 0px) + 1.2rem) 1.15rem 0.6rem;
  }

  .logo {
    width: 128px;
  }

  .hamburger-menu {
    width: 34px;
    height: 34px;
    margin-right: 0;
  }

  .close-menu {
    top: calc(env(safe-area-inset-top, 0px) + 1.1rem);
    right: 1.1rem;
    font-size: 2.8rem;
  }

  .mobile-menu .logo {
    width: 280px;
  }

  .mobile-menu-links {
    gap: 2.8rem;
  }

  .mobile-menu-links a {
    font-size: 1.75rem;
    letter-spacing: 0.16em;
  }

  .social-media-mobile-menu {
    gap: 30px;
    margin-top: 70px;
  }

  .social-media-mobile-menu img {
    width: 40px;
    height: 40px;
  }

  footer .footer-logo {
    height: 72px;
  }

  .social img {
    width: 30px;
    height: 30px;
    margin: 0 11px;
  }

  footer ul li {
    display: block;
    padding: 4px 0;
  }

  footer ul {
    font-size: 15px;
    line-height: 1.75;
  }

  footer .copyright {
    margin-top: 12px;
    margin-bottom: 24px;
  }
}
