:root {
  --orange: hsl(26, 100%, 55%);
  --pale-orange: hsl(25, 100%, 94%);
  --very-dark-blue: hsl(220, 13%, 13%);
  --dark-grayish-blue: hsl(219, 9%, 45%);
  --grayish-blue: hsl(220, 14%, 75%);
  --light-grayish-blue: hsl(223, 64%, 98%);
  --white: hsl(0, 0%, 100%);
  --black-lightbox: rgba(0, 0, 0, 0.75);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Kumbh Sans', sans-serif;
}

body {
  background-color: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.navbar {
  width: 100%;
  max-width: 1110px;
  height: 112px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--light-grayish-blue);
  padding: 0 24px;
  position: relative;
}

.nav-left, .nav-right {
  display: flex;
  align-items: center;
}

.menu-btn, .close-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.logo {
  margin-right: 56px;
}

.nav-links ul {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--dark-grayish-blue);
  font-size: 15px;
  position: relative;
  display: inline-block;
  line-height: 112px;
}

.nav-links a:hover {
  color: var(--very-dark-blue);
}

.nav-links a:hover::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--orange);
}

.cart-btn {
  background: none;
  border: none;
  cursor: pointer;
  margin-right: 46px;
  position: relative;
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background-color: var(--orange);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
}

.avatar-btn {
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 50%;
}

.avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  transition: border 0.1s ease;
}

.avatar:hover {
  outline: 2px solid var(--orange);
}

.cart-dropdown {
  position: absolute;
  top: 94px;
  right: 24px;
  width: 360px;
  background-color: var(--white);
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
  z-index: 100;
}

.cart-header {
  padding: 24px;
  font-weight: 700;
  border-bottom: 1px solid var(--light-grayish-blue);
  color: var(--very-dark-blue);
}

.cart-body {
  padding: 24px;
  min-height: 188px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.empty-msg {
  font-weight: 700;
  color: var(--dark-grayish-blue);
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
  margin-bottom: 24px;
}

.cart-item img {
  width: 50px;
  border-radius: 4px;
}

.cart-item-info {
  color: var(--dark-grayish-blue);
  font-size: 16px;
  flex-grow: 1;
}

.cart-item-info .total {
  font-weight: 700;
  color: var(--very-dark-blue);
  margin-left: 8px;
}

.delete-btn {
  background: none;
  border: none;
  cursor: pointer;
}

.checkout-btn {
  width: 100%;
  background-color: var(--orange);
  color: var(--white);
  border: none;
  padding: 16px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

.product-container {
  width: 100%;
  max-width: 1010px;
  margin: 90px auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 125px;
  align-items: center;
  padding: 0 24px;
}

.main-img-container {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 32px;
  cursor: pointer;
}

.main-product-img {
  width: 100%;
  display: block;
}

.nav-arrow {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background-color: var(--white);
  border-radius: 50%;
  border: none;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.thumbnails {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.thumb {
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background-color: var(--white);
  position: relative;
}

.thumb img {
  width: 100%;
  display: block;
}

.thumb:hover img {
  opacity: 0.5;
}

.thumb.active {
  outline: 2px solid var(--orange);
}

.thumb.active img {
  opacity: 0.35;
}

.company-tag {
  color: black;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2px;
  display: block;
  margin-bottom: 20px;
}

.details h1 {
  font-size: 44px;
  line-height: 1.1;
  color: var(--very-dark-blue);
  margin-bottom: 36px;
}

.description {
  color: var(--dark-grayish-blue);
  line-height: 1.6;
  font-size: 16px;
  margin-bottom: 28px;
}

.price-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}

.current-price-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.price {
  font-size: 28px;
  font-weight: 700;
  color: var(--very-dark-blue);
}

.discount {
  background-color: black;
  color: white;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 16px;
}

.old-price {
  color: var(--grayish-blue);
  text-decoration: line-through;
  font-weight: 700;
}

.actions {
  display: flex;
  gap: 16px;
}

.quantity-selector {
  background-color: var(--light-grayish-blue);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-radius: 10px;
  width: 155px;
}

.quantity-selector button {
  background: none;
  border: none;
  cursor: pointer;
}

.quantity-selector button:hover img {
  opacity: 0.6;
}

#qty-val {
  font-weight: 700;
  color: var(--very-dark-blue);
}

.add-to-cart-btn {
  flex-grow: 1;
  background-color: var(--orange);
  color: var(--black);
  border: none;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 20px 40px var(--pale-orange);
}

.add-to-cart-btn:hover {
  opacity: 0.6;
}

.btn-icon {
  filter: brightness(0) invert(0);
}

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--black-lightbox);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.lightbox-content {
  width: 445px;
  position: relative;
}

.lightbox-close {
  background: none;
  border: none;
  cursor: pointer;
  position: absolute;
  top: -36px;
  right: 0;
}

.lightbox-close svg path {
  transition: fill 0.2s ease;
}

.lightbox-close:hover svg path {
  fill: var(--orange);
}

.lightbox-main-img {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 40px;
}

.lightbox-main-img img {
  width: 100%;
}

.lightbox .nav-arrow {
  display: flex;
}

.lightbox .prev { left: -20px; }
.lightbox .next { right: -20px; }

.lightbox-thumbnails {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 0 20px;
}

.lightbox-thumb {
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background-color: var(--white);
}

.lightbox-thumb img {
  width: 100%;
}

.lightbox-thumb:hover img { opacity: 0.5; }
.lightbox-thumb.active { outline: 2px solid var(--orange); }
.lightbox-thumb.active img { opacity: 0.35; }

.hidden { display: none !important; }

@media (max-width: 850px) {
  .navbar { height: 68px; border: none; padding: 0 16px; }
  .menu-btn, .close-btn { display: block; }
  .logo { margin-right: 0; margin-left: 16px; }
  
  .nav-links {
    position: fixed;
    top: 0;
    left: -100%;
    width: 250px;
    height: 100vh;
    background-color: var(--white);
    z-index: 200;
    padding: 24px;
    transition: left 0.3s ease;
  }
  
  .nav-links.open { left: 0; }
  .menu-overlay.open { display: block; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgb(0, 0, 0); z-index: 150; }

  .nav-links ul { flex-direction: column; gap: 20px; margin-top: 50px; }
  .nav-links a { line-height: normal; font-weight: 700; color: var(--very-dark-blue); }
  .nav-links a:hover::after { display: none; }
  
  .cart-btn { margin-right: 20px; }
  .avatar { width: 24px; height: 24px; }
  .cart-dropdown { width: calc(100% - 16px); top: 76px; right: 8px; left: 8px; z-index: 180; }

  .product-container { grid-template-columns: 1fr; gap: 24px; margin: 0 auto 40px; padding: 0; }
  .main-img-container { border-radius: 0; margin-bottom: 0; }
  .nav-arrow { display: flex; }
  .prev { left: 16px; }
  .next { right: 16px; }
  .thumbnails, .lightbox { display: none !important; }

  .details { padding: 0 24px; }
  .details h1 { font-size: 28px; margin-bottom: 16px; }
  .price-container { flex-direction: row; justify-content: space-between; align-items: center; }
  .actions { flex-direction: column; }
  .quantity-selector { width: 100%; }
}