/* Reset and basic styling */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Montserrat", sans-serif;
  background-color: #fafafa;
  color: #333;
}

/* Navbar styling */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #fff;
  padding: 12px 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 10;
}

.navbar-logo img {
  width: 150px;
  height: auto;
  object-fit: contain;
  cursor: pointer;
}

@media (max-width: 600px) {
  .navbar-logo img {
    width: 90px;
  }
}

.navbar-extra {
  position: static;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.navbar-nav {
  display: flex;
  gap: 20px;
}

.navbar-nav a {
  text-decoration: none;
  color: #444;
  font-weight: 600;
  transition: color 0.3s ease;
}

.navbar-nav a:hover {
  color: #444;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: fit-content;
}

.search-box input {
  padding: 8px 35px 8px 12px;
  border: 1px solid #ccc;
  border-radius: 25px;
  display: none;
  transition: all 0.3s ease;
}

.search-box input.show {
  display: block;
  width: 160px;
}

.search-box i {
  font-size: 22px;
  cursor: pointer;
  margin-left: 8px;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #444;
  z-index: 20;
}

.nav-cart {
  position: relative;
}

.nav-cart a {
  color: #444;
  position: relative;
  font-size: 1.6rem;
}

#cart-count {
  position: absolute;
  top: -6px;
  right: -10px;
  background: #e74c3c;
  color: white;
  font-size: 0.6rem;
  padding: 2px 7px;
  border-radius: 50%;
  font-weight: 700;
}

.hamburger-menu {
  font-size: 1.5rem;
  /* margin-right: 0.2rem; */
  color: #444;
}

/* --- Default: Desktop (hamburger tidak muncul) --- */
.hamburger-menu {
  display: none;
}

/* --- Mobile / Tablet (hamburger muncul) --- */
@media (max-width: 768px) {
  .hamburger-menu {
    display: block;
  }

  /* Nav utama hilang di mobile */
  .navbar-nav {
    display: none;
  }
}



/* Hero Section */
.hero {
  background-image: url("../img/product/headerbg.jpeg");
  background-size: cover;
  background-position: center;
  min-height: 70vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  position: relative;
  padding-bottom: 20px;
}

.hero .content h1 {
  position: absolute;
  top: 10px;
  left: 10px;
  text-align: left;
  font-size: 2.3rem;
  font-weight: 700;
  color: #fff;
  font-style: italic;
}

.hero .content h2 {
  position: absolute;
  top: 62px;
  left: 15px;
  text-align: left;
  font-style: italic;
}

.hero .content span {
  color: #666;
}

.hero .content p {
  margin: 20px 0;
  font-size: 1.1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 3rem;
  color: #fff;
  font-style: oblique;
}

.hero .cta {
  background: #444;
  color: white;
  padding: 15px 30px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s ease;
}

.hero .cta:hover {
  background: #ccc;
}

/* slider section */

.product-slider {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: auto;
  overflow: hidden;
  padding: 8px 0;
}

.slider-wrapper {
  display: flex;
  transition: transform 0.6s ease;
}

.slide {
  min-width: 100%;
  text-align: center;
}

.slide img {
  width: 280px;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.slide img:hover {
  transform: scale(1.04);
}

.slide h3 {
  margin: 12px 0 5px;
  font-size: 1.2rem;
  font-weight: 700;
}

.slide p {
  font-size: 1rem;
  color: #666;
}

.product-slider-running {
  width: 100%;
  overflow-y: hidden;
  overflow-x: auto;
  cursor: grab;
  padding: 5px 0;
  scroll-behavior: smooth;
}

.running-track {
  display: flex;
  gap: 2px;
  /* white-space: nowrap; */
  will-change: transform;
}

.running-track img {
  height: 170px;
  max-height: auto;
  /* border-radius: 14px; */
  box-shadow: 0 3px 12px rgba(0,0,0,0.1);
  pointer-events: none;
  transition: .3s;
}

.running-track .item img:hover {
  transform: scale(1.08);
  transition: 0.3s;
}

.product-slider-running::-webkit-scrollbar {
  display: none;
}


/* about section */

#about {
  padding: 80px 20px;
  background: #ffffff;
  color: #111;
  font-family: "Poppins", sans-serif;
}

#about h2 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 50px;
  letter-spacing: 1px;
}

#about h2 span {
  color: #000;
  position: relative;
}

/* Grid Layout */
#about .row .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: auto;
  align-items: center;
}

/* Image */
.about-img img {
  width: 80%;
  height: 10%;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0px 8px 30px rgba(0,0,0,0.1);
  transition: transform .4s ease;
}

.about-img img:hover {
  transform: scale(1.03);
}

/* Content */
#about .content h3 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 15px;
}

#about .content p {
  font-size: 1rem;
  color: #444;
  line-height: 1.7;
  margin-bottom: 15px;
}

/* Product Section */
#product {
  padding: 60px 20px;
  text-align: center;
}

#product h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
}

#product p {
  color: #555;
  margin-bottom: 40px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
}

/* CARD */
.product-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: 0.3s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px);
}

/* SLIDER */
.product-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.slider-images {
  display: flex;
  transition: transform 0.4s ease;
}

.slider-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Slider buttons */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  border: none;
  color: #111;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: background 0.3s;
}

.slider-btn:hover {
  background: rgba(0,0,0,0.7);
}

.slider-btn.prev { left: 10px; }
.slider-btn.next { right: 10px; }

/* Dots */
.dots {
  text-align: center;
  padding: 10px 0 15px;
}

.dots span {
  height: 10px;
  width: 10px;
  background: #bbb;
  display: inline-block;
  margin: 0 5px;
  border-radius: 50%;
  transition: 0.3s;
}

.dots .active {
  background: #222;
}

/* INFO */
.product-info {
  padding: 15px 18px;
  flex-grow: 1;
}

.product-card-title {
  font-size: 1.1rem;
  font-weight: 200;
}

.product-card-price {
  color: #222;
  font-weight: 600;
  margin: 8px 0 12px;
}

.product-description {
  font-size: 0.65rem;
  color: #555;
}

/* Card actions */
.product-actions {
  padding: 10px 18px 18px;
  display: flex;
  justify-content: flex-end;
}

.add-to-cart {
  background: #222;
  color: white;
  border: none;
  padding: 10px 14px;
  font-size: 1.1rem;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s;
}

.add-to-cart:hover {
  background: #444;
}

/* POPUP OVERLAY */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.popup-overlay.active {
  display: flex;
}

/* POPUP CONTENT */
.popup-content {
  background: #fff;
  width: 90%;
  max-width: 900px;
  display: flex;
  gap: 20px;
  border-radius: 16px;
  padding: 20px;
  position: relative;
  animation: popupFade 0.25s ease;
}

@keyframes popupFade {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Close button */
.popup-close {
  position: absolute;
  top: 15px;
  right: 12px;
  background: #eee;
  border: none;
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
}

/* Popup slider */
.popup-slider {
  width: 50%;
  position: relative;
}

.popup-slider img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: 12px;
}

.popup-prev, .popup-next {
  background: rgba(0,0,0,0.5);
  border: none;
  color: white;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.popup-prev { left: 10px; }
.popup-next { right: 10px; }

/* Popup info */
.popup-info {
  width: 50%;
}

.popup-info h2 {
  font-size: 1.7rem;
  margin-bottom: 5px;
}

.popup-info p {
  margin-bottom: 10px;
}

.size-chart {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 14px;
}

.size-chart th,
.size-chart td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: center;
}

.size-chart th {
  background-color: #111;
  color: #fff;
}

.size-chart tr:nth-child(even) {
  background-color: #f9f9f9;
}

.sizechart-wrapper {
  display: none;
  margin-top: 5px;
}

.toggle-sizechart {
  margin-top: 10px;
  padding: 8px 12px;
  border: none;
  background: #111;
  color: #fff;
  cursor: pointer;
}


.size-selector {
  margin-top: 15px;
}

.size-options {
  display: flex;
  gap: 10px;
}

.size-btn {
  padding: 8px 16px;
  border: 1px solid #333;
  border-radius: 8px;
  cursor: pointer;
  background: #fff;
  transition: 0.2s;
}

.size-btn:hover {
  background: #f3f3f3;
}

.size-btn.active {
  background: #333;
  color: #fff;
}

.size-warning {
  color: red;
  font-size: 14px;
  margin-top: 6px;
}

.size-btn.active {
  background: #000;
  color: #fff;
}


.popup-cart-btn {
  background: black;
  color: white;
  border: none;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 1.1rem;
  cursor: pointer;
  margin-top: 20px;
}

.popup-cart-btn:hover {
  background: #444;
}

/* Responsive */
@media (max-width: 768px) {
  .popup-content {
    flex-direction: column;
  }

  .popup-info, .popup-slider {
    width: 100%;
  }
}


/* Responsive */
@media (max-width: 900px) {
  #about .row .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-img img {
    max-width: 90%;
    margin: auto;
  }
}

@media (max-width: 600px) {
  #about h2 {
    font-size: 2rem;
  }

  #about .content h3 {
    font-size: 1.5rem;
  }

  #about {
    padding: 60px 15px;
  }
}



/* Marketplace Section */
/* .marketplace {
  padding: 50px 20px;
  background-color: #fff;
  text-align: center;
} */

/* .marketplace .container {
  max-width: 900px;
  margin: 0 auto;
} */

/* .marketplace h2 {
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 15px;
} */

/* .marketplace-subtitle {
  color: #666;
  margin-bottom: 40px;
  font-size: 1.1rem;
} */

/* .marketplace-wrapper {
  display: flex;
  justify-content: center;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap;
} */

/* .market-card {
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
  width: 180px;
  transition: box-shadow 0.3s ease;
}

.market-card:hover {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.market-logo img {
  width: 100%;
  height: 80px;
  object-fit: contain;
  margin-bottom: 10px;
}

.market-card h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
} */

/* .btn-visit {
  background-color: #111;
  color: white;
  font-weight: 700;
  padding: 10px 15px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-visit:hover {
  background-color: #ccc;
} */

/* Contact Section */
.contact {
  background: #f5f7fa;
  padding: 40px 20px;
}

.contact h2 {
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 15px;
  text-align: center;
}

.contact-subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 40px;
  font-size: 1.1rem;
}

.contact-wrapper {
  display: flex;
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.contact-form {
  flex: 1 1 400px;
}

.contact-form .form-group {
  margin-bottom: 15px;
}

.contact-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #222;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="message"] {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 10px 15px;
  font-size: 1rem;
}

.contact-form input[type="message"] {
  height: 120px;
  resize: vertical;
}

.btn-send {
  background-color: #444;
  border: none;
  color: white;
  font-weight: 700;
  padding: 14px 24px;
  border-radius: 30px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: inline-block;
}

.btn-send:hover {
  background-color: #ccc;
}

/* Contact Info */
.contact-info {
  flex: 1 1 350px;
}

.contact-info h3 {
  font-weight: 700;
  margin-bottom: 15px;
}

.contact-info p {
  color: #666;
  margin-bottom: 10px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-links a {
  color: #444;
  font-size: 1.8rem;
  display: inline-block;
  margin-right: 12px;
  transition: color 0.3s ease;
}

.social-links a:hover {
  color: #ccc;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (min-width: 1200px) {
  .product-grid {
    max-width: 1400px;
    margin: 0 auto;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 50px;
  }

  .hero .content h1,
  .hero .content h2 {
    font-size: 4.5rem;
  }

  .hero .content p {
    font-size: 1.3rem;
    max-width: 800px;
  }

  .hero {
    height: 90vh;
  }

  .navbar {
    padding: 20px 40px;
  }

  .about,
  #product,
  .marketplace,
  .contact {
    padding-left: 80px;
    padding-right: 80px;
  }

  /* About Us section layout fix for large screens */
  .about .row {
    flex-direction: row;
  }
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: 1fr;
    max-width: 90vw;
    margin: 0 auto;
  }

  .product-card {
    max-width: 100%;
  }

  .product-slider,
  .slider-images {
    width: 100% !important;
  }

  .slider-images img {
    width: 100%;
    height: auto !important;
    max-height: none !important;
    object-fit: contain;
  }

  .popup-content {
    flex-direction: column;
    max-width: 95vw;
    padding: 20px;
  }

  .popup-slider {
    max-width: 100%;
    justify-content: center;
  }

  .popup-images {
    height: auto;
    max-height: 300px;
    width: 100%;
  }

  .popup-images img {
    height: auto;
    max-height: 300px;
    width: 100%;
    object-fit: contain;
  }

  .popup-info {
    margin-top: 15px;
  }

  .slider-images img,
  .popup-images img {
    height: auto;
    max-height: 250px;
    width: 100%;
    object-fit: contain;
  }
}

/* Responsive Design */
@media (max-width: 992px) {
  .navbar-nav {
    display: none;
  }

  .navbar-nav.active {
    display: flex;
    flex-direction: column;
    background: #fff;
    position: absolute;
    top: 60px;
    right: 20px;
    width: 230px;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  }

  .hero {
    height: 60vh;
  }

  .about .row {
    flex-direction: column;
  }

  .marketplace-wrapper {
    flex-direction: column;
  }

  .contact-wrapper {
    flex-direction: column;
  }
}

/* Cart Styles */
.cart-container {
  max-width: 900px;
  margin: 20px auto;
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 25px;
}

.cart-table th,
.cart-table td {
  text-align: left;
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}

.cart-table th {
  font-weight: 600;
  background: #f9f9f9;
}

.cart-table img {
  max-width: 80px;
  border-radius: 8px;
}

.qty-input {
  width: 48px;
  padding: 6px;
  font-size: 1rem;
}

.btn-remove {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-remove:hover {
  background: #c0392b;
}

.cart-total {
  text-align: right;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 30px;
  color: #222;
}

.checkout-btn {
  display: block;
  width: 100%;
  background: #444;
  color: white;
  font-weight: 700;
  padding: 16px 0;
  border: none;
  border-radius: 12px;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-align: center;
  text-decoration: none;
  user-select: none;
}

.checkout-btn:hover {
  background: #ccc;
}

.empty-msg {
  text-align: center;
  font-size: 1.1rem;
  color: #666;
  margin: 40px 0;
}

/* Responsive Cart Styles */
@media (max-width: 600px) {
  .cart-table,
  .cart-table tbody,
  .cart-table tr,
  .cart-table th,
  .cart-table td {
    display: block;
  }
  .cart-table tr {
    margin-bottom: 20px;
  }
  .cart-table th {
    display: none;
  }
  .cart-table td {
    border: none;
    position: relative;
    padding-left: 50%;
  }
  .cart-table td::before {
    position: absolute;
    top: 12px;
    left: 15px;
    width: 45%;
    white-space: nowrap;
    font-weight: 600;
    color: #555;
  }
  .cart-table td:nth-of-type(1)::before {
    content: "Product :";
  }
  .cart-table td:nth-of-type(2)::before {
    content: "Price :";
  }
  .cart-table td:nth-of-type(3)::before {
    content: "Amount :";
  }
  .cart-table td:nth-of-type(4)::before {
    content: "Subtotal :";
  }
  .cart-table td:nth-of-type(5)::before {
    content: "Action :";
  }
  .cart-table img {
    max-width: 100%;
    margin-bottom: 10px;
  }
}


.product-card {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.product-slider {
  position: relative;
  z-index: 3;
  pointer-events: none; /* slider tidak menangkap klik */
}

.product-slider button {
  pointer-events: auto; /* tapi tombolnya tetap bisa diklik */
  z-index: 5;
  width: 38px;
  height: 38px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  padding: 0;
}

.slider-images {
  position: relative;
  z-index: 2;
}

.product-slider button {
  position: absolute;
  top: 45%;
}

.product-slider .prev,
.product-slider .popup-prev {
  left: 10px;
}

.product-slider .next,
.product-slider .popup-next {
  right: 10px;
}

/* footer section */
.footer {
  background: #222;
  color: #fff;
  padding: 10px;
  margin-top: 10px;
  font-family: 'Poppins', sans-serif;
}

.footer-container {
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
}

.social{
  display: flex;
  margin: auto;
  margin-top: 1.8rem;
  margin-bottom: 0rem;
}

.social h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
  font-weight: 600;
}

.social a {
  /* display: flex; */
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  opacity: 0.8;
  font-size: 1.2rem;
  color: #ccc;
  font-size: 1.8rem;
  display: inline-block;
  margin-right: 12px;
  transition: color 0.3s ease;
}

.footer-section h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
  font-weight: 600;
}

.footer-section a {
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  opacity: 0.8;
  font-size: 1.2rem;
  color: #ccc;
  margin: 0 0.09rem;
  display: inline-block;
  margin-right: 12px;
  transition: color 0.3s ease;
}

.kredit {
  text-align: center;
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 20px;
  font-size: 0.9rem;
  opacity: 0.7;
}

@media (max-width: 600px) {
  .footer {
    padding: 50px 20px;
  }
  .footer-logo {
    font-size: 1.4rem;
  }
}