/* --- Product Page Only CSS --- */

body {
  overflow-x: hidden;
}

.section {
  width: 100%;
  overflow-x: hidden;
}

h2 .subline {
  display: block;
  size: 5rem;
}

.product-layout {
  display: flex;
  gap: 2rem;
  margin: 0 auto;
  padding-inline: 2rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.filter-panel {
  flex: 1 1 100%;
  background: #222;
  padding: 1rem;
  border-radius: 8px;
  color: white;
  font-size: 0.85rem;
  min-height: 100px;
  box-sizing: border-box;
  max-width: 100%;
}

.filter-group input[type="text"] {
  width: 100%;
  padding: 0.75rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  border: 2px solid #ccc;
  font-size: 1rem;
}

#tagFilters label {
  display: block;
  margin-bottom: 0.5rem;
  cursor: pointer;
}

#tagFilters input[type="checkbox"] {
  margin-right: 0.5rem;
}

#tagFilters {
  margin-top: 1rem;
  font-size: 0.95rem;
}

.tag-node {
  margin-bottom: 0.5rem;
}

.tag-line {
  display: flex;
  align-items: center;
}

.toggle-btn {
  background: none;
  border: none;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  width: 1.25rem;
  color: var(--accent, #c59d5f);
  padding: 0;
}

.tag-children {
  margin-left: 1rem;
  padding-left: 0.5rem;
  border-left: 2px dashed rgba(255, 255, 255, 0.2);
}

.tag-children.collapsed {
  display: none;
}


.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  flex-grow: 1;
  box-sizing: border-box;
  width: 100%;
}

.product-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: #629fe4;
  border-radius: 0.5rem;
  border: 5px solid transparent;
  background:
  linear-gradient(#d81010, #b30d0d) padding-box,
  linear-gradient(135deg, #352828, #242322 40%, #969693) border-box;
  box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.15);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-0.5rem);
  box-shadow: 0 0.8rem 2rem rgba(255, 72, 0, 0.3);
}

.product-image-container {
  height: 220px;
  background-image: linear-gradient(rgba(0, 0, 0, 0.356), rgba(8, 8, 8, 0.61)), var(--barbed); 
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image-container img {
  height: 100%;
  width: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.product-card:hover img {
  transform: scale(1.05);
}

.product-info {
  padding: .75rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  background: #fff;
  color: black;
  border: black solid .3rem;
}

.product-info h3 {
  padding: .35rem;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
  border: black solid 3px;
}

.product-info .desc {
  margin: 0;
  color: #444;
  font-size: .95rem;
  line-height: 1.35;
  display: -webkit-box;          
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.35em * 2); 
}

.product-info .price {
  margin-top: .25rem;
  font-weight: 600;
  font-size: 1rem;
}


/* --- Popup Styling --- */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  box-sizing: border-box;
}

.popup.hidden {
  display: none;
}

.popup-content {
  background: #222;
  color: white;
  border-radius: 10px;
  padding: 2rem;
  max-width: 900px;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  position: relative;
  border: 4px ridge var(--metal);
  box-sizing: border-box;
  overflow-y: auto;
  max-height: 90vh;
}

.popup-content img {
  width: 48%;
  border-radius: 6px;
  object-fit: cover;
  border: 3px solid #fff;
}

.popup-info {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}

.popup-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.popup-buttons button {
  padding: 0.75rem 1.5rem;
  border: none;
  background-color: var(--accent);
  color: white;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.popup-buttons button:hover {
  background-color: #a97a40;
}

.popup-images {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  scroll-snap-type: x mandatory;
  padding-bottom: 1rem;
}

.popup-images img {
  flex: 0 0 auto;
  width: 200px;
  height: auto;
  border-radius: 6px;
  border: 3px solid #fff;
  scroll-snap-align: center;
}
.image-dots {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  gap: 0.5rem;
}

.image-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #ccc;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.image-dot.active,
.image-dot:hover {
  background-color: var(--accent, #c59d5f);
}



.close-popup {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: #fff;
}

/* --- Cart Styling --- */

.empty-cart-message {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 100%; /* take full cart height */
  padding: 2rem;
}

.empty-cart-message p {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #666;
}

.shop-now-btn {
  display: inline-block;
  background: linear-gradient(135deg, #ff8a00, #e52e2e);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shop-now-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}


.cart {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 400px;
  height: 100%;
  background-color: #1e1e1e;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.5);
  color: white;
  padding: 1rem;
  z-index: 9998;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-sizing: border-box;
}

.cart:not(.hidden) {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#cart-items {
  flex-grow: 1;
  overflow-y: auto;
}

.cart-item {
  border-bottom: 1px solid #444;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.cart-count {
  background-color: red;
  color: white;
  font-size: 0.75rem;
  padding: 0.2em 0.5em;
  border-radius: 1em;
  margin-left: 0.5em;
  font-weight: bold;
  vertical-align: top;
}

.cart-count.hidden {
  display: none;
}

.cart-footer {
  border-top: 2px solid var(--accent);
  padding-top: 1rem;
  text-align: right;
}

#checkout-btn {
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  border: none;
  background-color: var(--accent);
  color: white;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#checkout-btn:hover {
  background-color: #a97a40;
}

/* --- Confirmation Popup --- */
#confirmation-popup .popup-content {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

#confirmation-items {
  max-height: 200px;
  overflow-y: auto;
  margin: 1rem 0;
}

#keep-shopping {
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  border: none;
  background-color: var(--accent);
  color: white;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#keep-shopping:hover {
  background-color: #a97a40;
}

.custom-cta {
  text-align: center;
  margin: 5rem 0 -6em;   /* room above the video footer */
  font-weight: 600;
}
.custom-cta a {
  text-decoration: underline;
  /* pick a color that contrasts your background */
  color: #fff;           /* or var(--accent) if you have one */
}


@media (max-width: 768px) {
  .product-layout {
    flex-direction: column;
    align-items: center;
  }

  .filter-panel {
    width: 100%;
    margin-bottom: 2rem;
    background: transparent;
    padding: 0;
  }

  .filter-group {
    background: #222;
    padding: 1rem;
    border-radius: 8px;
  }

  #tagFilters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  #tagFilters label {
    background: #444;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
  }

  #tagFilters input[type="checkbox"] {
    margin: 0 0.5rem 0 0;
  }

  .popup-content {
    display: block;
    max-width: 100%;
    padding: 1rem;
    overflow-y: auto;
  }

  .popup-images {
    width: 100% !important;
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
  }

  .popup-content img {
    width: 100% !important;
    max-width: 50vw;
    height: auto;
  }

  .popup-info {
    width: 100% !important;
    text-align: center;
  }

  .popup-buttons {
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
}
