@import url(./base.css);

header {
  width: 100vw;
  background-position: center;
  background-size: cover;
  display: grid;
  max-width: 90vw;
  margin: auto;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  grid-template-columns: repeat(4, 1fr);
  padding-top: 6rem;
  padding-bottom: 4rem;
  overflow: hidden;
  height: 100vh;
}

.image-1 {
  background-color: rebeccapurple;
  grid-column: 1/3;
}

.img {
  height: 100%;
}

.img:nth-of-type(1) {
  max-height: 50vh;
}

.description {
  grid-column: 3/5;
}

.image-gallery {
  display: grid;
  gap: 1rem;
  grid-template-columns: 3;
  grid-template-rows: 3;
  grid-column: 1/2;
  grid-row: 1/3;
}

.img {
  overflow: hidden;
  border-radius: 10px;
}

.img img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.image-gallery div {
  border-radius: 10px;
}

.image-gallery div:nth-of-type(1) {
  grid-column: 1/3;
  height: 40vh;
}

.image-gallery div img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  overflow: hidden;
}

.product-metrics {
  display: flex;
  grid-column: 3/5;
  grid-row: 1/1;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.product-metrics > p:nth-of-type(2) {
  opacity: 0.4;
  margin-top: 2rem;
}

.product-metrics h2 {
  font-size: 2rem;
}

.product-metrics .sizes {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.size {
  display: flex;
  padding: 5px 2rem 5px 5px;
  border-radius: 5px;
  cursor: pointer;
  border: 1px solid rgba(128, 128, 128, 0.135);
  align-items: center;
  gap: 1rem;
}

.size > div {
  background-color: var(--pale);
  padding: 5px 20px;
}

u {
  font-size: 1.5rem;
}

.product-description {
  height: 100%;
  background-color: blue;
  grid-column: 2/3;
  grid-row: 2/3;
}

.purchase {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 2rem;
  justify-content: space-around;
}

.focused-size {
  border-color: var(--primary);
  color: var(--primary);
}

.purchase button {
  background-color: var(--primary);
  width: 40%;
  border-radius: 100px;
  border: none;
  padding: 0.8rem;
  color: var(--pale);
}

.tabs-container {
  position: relative;
  background-color: #fff;
  border-bottom: 1px solid #e9ecef;
}

.tabs {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.tabs::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.tabs-gradient {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 60px;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.9),
    rgba(255, 255, 255, 1)
  );
  pointer-events: none;
  z-index: 2;
}

.scroll-btn {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: all 0.2s ease;
}

.scroll-btn:hover {
  background-color: #f8f9fa;
  border-color: #adb5bd;
}

.scroll-btn svg {
  width: 16px;
  height: 16px;
  fill: #6c757d;
}

.tab {
  flex: none;
  min-width: 120px;
  padding: 16px 24px;
  text-align: center;
  cursor: pointer;
  font-weight: 500;
  color: #6c757d;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  position: relative;
  white-space: nowrap;
}

.tab:hover {
  color: #495057;
  background-color: #f8f9fa;
}

.tab.active {
  color: #212529;
  border-bottom-color: #212529;
  background-color: #fff;
}

.tab-content {
  padding: 32px;
  max-height: 30vh;
  overflow-y: auto;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab-panel h3 {
  margin-bottom: 16px;
  color: #212529;
  font-size: 1.25rem;
}

.tab-panel p {
  line-height: 1.6;
  color: #495057;
  margin-bottom: 16px;
}

.ingredient-list {
  list-style: none;
  padding: 0;
}

.ingredient-list li {
  padding: 8px 0;
  border-bottom: 1px solid #e9ecef;
  color: #495057;
}

.ingredient-list li:last-child {
  border-bottom: none;
}

.shipping-info {
  background-color: #f8f9fa;
  padding: 16px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.shipping-info h4 {
  margin-bottom: 8px;
  color: #212529;
}

.shipping-info p {
  margin-bottom: 8px;
  font-size: 0.9rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .image-1 {
    grid-column: 1/5;
    grid-row: 1/2;
  }

  .image-2 {
    grid-row: 2/3;
    grid-column: 1/5;
  }
  .image-3 {
    grid-row: 3/4;
    grid-column: 1/5;
  }

  .product-metrics {
    grid-row: 4/5;
    grid-column: 1/5;
  }
  .description {
    grid-row: 5/6;
    grid-column: 1/5;
  }

  .tabs {
    flex-wrap: wrap;
  }

  header {
    height: auto;
  }

  .tab {
    flex: 1 1 50%;
    min-width: 120px;
  }

  .tab-content {
    padding: 20px;
  }
}

/* hero section  */
