/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

main {
  width: 100%;
  padding: 25px 15px;
  margin-top: 120px;
}

/* ---------------- HERO ---------------- */
.hero_section {
  max-width: 1350px;
  margin: auto;
  background: url('/assets/img/hero.jpg') center / cover no-repeat;
  min-height: 500px;
  color: white;
  padding: 60px;
  display: flex;
  align-items: flex-end;
}

.hero_text {
  max-width: 600px;
}

.hero_text h1 {
  margin-bottom: 10px;
  letter-spacing: 0.12em;
  font-size: 32px;
}

.hero_text h3 {
  line-height: 1.6;
  letter-spacing: 0.08em;
}

.hero_text button {
  margin-top: 20px;
  padding: 12px 25px;
  font-weight: 700;
  background: #fff;
  border: none;
  cursor: pointer;
}

/* ---------------- SAMPLE PRODUCTS ---------------- */
.sample_products {
  max-width: 1350px;
  margin: 30px auto 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.sample_product_left { background: url('/assets/img/yangin.png') center / cover no-repeat; }
.sample_product_right { background: url('/assets/img/cabinet.jpg') center / cover no-repeat; }
.sample_product_left,
.sample_product_right {
  height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  padding: 20px;
}

.sample_product_left .btn,
.sample_product_right .btn {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  font-weight: 700;
  background: #fff;
  border: none;
  color: #000;
  text-decoration: none;
}

/* ---------------- HOME SHOPPING ---------------- */
.home_shopping {
  max-width: 1350px;
  margin: 70px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.home_shop {
  background: #f8f8f8;
  transition: 0.3s;
}

.home_shop:hover {
  transform: translateY(-5px);
}

.home_shop img {
  width: 100%;
  height: 200px;
  object-fit: fit;
}

.home_shop h2 {
  margin: 15px 0 10px;
}

.home_shop p {
  font-size: 14px;
  color: #555;
}

.home_shop .btn {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  font-weight: 700;
  background: #fff;
  border: 1px solid black;
  text-decoration: none;
  color: #000;
}

/* ---------------- TOPSELLERS ---------------- */
.topsellers {
  width: 100%;
}

/* HEADER ROW */
.topsellers_header {
  max-width: 1350px;
  margin: 70px auto 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topsellers_header h2 {
  font-size: 24px;
}

.view_all {
  text-decoration: none;
  font-weight: 600;
  color: black;
  position: relative;
  transition: 0.3s;
}

/* nice hover underline animation */
.view_all::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: black;
  transition: 0.3s;
}

.view_all:hover::after {
  width: 100%;
}

/* GRID */
.topsellers_grid {
  max-width: 1350px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
}

.topseller {
  background: #f0f2f2;
  padding: 15px;
  transition: 0.3s;
}

.topseller:hover {
  transform: translateY(-5px);
}

.topseller img {
  width: 100%;
  height: 200px;
  object-fit: contain;
}

.topseller a {
  color: black;
  text-decoration: none;
}

.topseller p {
  margin-top: 8px;
  font-size: 14px;
}

.topseller button {
  margin-top: 10px;
  padding: 10px;
  width: 100%;
  font-weight: 700;
  background: #fff;
  border: 1px solid black;
  cursor: pointer;
}

/* ---------------- RESPONSIVE ---------------- */

/* TABLET */
@media (max-width: 1024px) {
  .hero_section {
    padding: 40px;
  }

  .hero_text h1 {
    font-size: 26px;
  }

  .sample_products {
    grid-template-columns: 1fr;
  }

  .home_shopping {
    grid-template-columns: repeat(2, 1fr);
  }

  .topsellers_grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* MOBILE */
@media (max-width: 600px) {
  main {
    margin-top: 80px;
  }

  .hero_section {
    padding: 20px;
    min-height: 350px;
  }

  .hero_text h1 {
    font-size: 20px;
  }

  .hero_text h3 {
    font-size: 14px;
  }

  .home_shopping {
    grid-template-columns: 1fr;
  }

  .topsellers_header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .topsellers_grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* OVERLAY */
.variant_overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  z-index: 1003;
}

/* MODAL */
.variant_modal {
  position: fixed;
  top: 250px;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 95%;
  max-width: 900px; /* wider = better */
  max-height: 90vh;
  background: white;
  z-index: 1004;
  display: none;
  border-radius: 12px;
  overflow: auto;
  transition: 0.25s ease;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* GALLERY */
.variant_gallery {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.variant_thumbs {
  display: flex;
  gap: 10px;
}

.variant_thumbs img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  cursor: pointer;
  border: 1px solid #ddd;
  border-radius: 6px;
}

/* VARIANT SELECT */
.variant_select, .variant_select_size {
  margin: 10px 0;
  padding: 10px;
}

/* QUANTITY */
.qty_box {
  display: flex;
  align-items: center;
  margin: 15px 0;
}

.plusMinus {
  width: 35px;
  height: 35px;
  border: 1px solid #ccc;
  background: white;
  cursor: pointer;
}

.qty_input {
  width: 50px;
  text-align: center;
  border: 1px solid #ccc;
  height: 35px;
}

/* ACTIVE */
.variant_active .variant_overlay {
  display: block;
}

.variant_active .variant_modal {
  display: block;
  transform: translate(-50%, -50%) scale(1);
}

/* CONTENT */
.variant_content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* CLOSE */
.close_variant {
  position: absolute;
  top: 12px;
  right: 15px;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  z-index: 2;
}

/* BODY */
.variant_body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  padding: 30px;
  overflow-y: auto;
}

/* IMAGE SIDE */
.variant_body img {
  width: 100%;
  max-height: 350px;
  object-fit: contain;
  background: #f8f8f8;
  border-radius: 10px;
  padding: 10px;
}

/* INFO SIDE */
.variant_info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.variant_info h2 {
  margin-bottom: 10px;
  font-size: 22px;
}

.variant_info p {
  color: #555;
}

/* COLOR */
.variant_info button[type="button"] {
  margin: 0 5px 0 0;
  padding: 10px;
}

/* PRICE */
.variant_info p:nth-of-type(1) {
  font-size: 18px;
  font-weight: 700;
  color: black;
}

/* BUTTON */
.variant_info button[type="submit"] {
  margin-top: 15px;
  padding: 12px;
  background: #ff6b35;
  border: none;
  color: white;
  cursor: pointer;
  font-weight: 700;
  border-radius: 6px;
  transition: 0.2s;
}

.variant_info button:hover {
  opacity: 0.9;
}

@media (max-width: 768px) {
  .variant_modal {
    margin-top: 100px;
  }
  .variant_body {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .variant_body img {
    max-height: 250px;
  }

  .variant_info h2 {
    font-size: 18px;
  }
}

.color_picker, .size_picker {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.color_btn, .size_btn {
  padding: 8px 12px;
  border: 1px solid #ddd;
  background: white;
  cursor: pointer;
  border-radius: 6px;
}

.color_btn.active, .size_btn.active {
  background: #ff6b35;
  color: white;
  border-color: #ff6b35;
}