/* =========================================
   PRODUCT PAGE LAYOUT
========================================= */

.product-page-container {
  display: grid;
  grid-template-columns: 60% 40%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background: #fff;
}

/* =========================================
   IMAGE GALLERY (LEFT SIDE)
========================================= */
.product-gallery {
  display: flex;
  flex-direction: column;
  background-color: #f9f9f9;
  padding: 20px;
}

.main-image {
  width: 100%;
  margin-bottom: 16px;
}

.main-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.thumbnail-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  /* Firefox */
}

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

.thumbnail {
  width: 80px;
  height: 100px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease, border-color 0.2s ease;
  border: 1px solid transparent;
}

.thumbnail:hover {
  opacity: 1;
}

.thumbnail.active {
  opacity: 1;
  border-color: #000;
}

/* =========================================
   PRODUCT INFO (RIGHT SIDE STICKY)
========================================= */
.product-info-wrapper {
  padding: 60px 40px;
  background: #fff;
}

.product-info {
  position: sticky;
  top: 100px;
  /* Offset for topbar */
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 500px;
  margin: 0 auto;
}

.product-breadcrumbs {
  font-size: 0.75rem;
  color: #888;
  text-transform: none;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.product-breadcrumbs a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.product-breadcrumbs a:hover {
  color: #000;
}

.product-page-title {
  font-size: 1.8rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 1px;
  margin: 0;
  line-height: 1.1;
  color: #000;
}

.product-page-price {
  font-size: 1.25rem;
  font-weight: 500;
  color: #000;
  margin-top: -8px;
}

.product-description {
  font-size: 0.9rem;
  color: #444;
  line-height: 1.6;
  font-weight: 400;
  margin-bottom: 12px;
}

/* =========================================
   SIZE SELECTOR
========================================= */
.size-selector-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 12px;
}

.size-label {
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: none;
  color: #666;
}

.size-guide-btn {
  font-size: 0.75rem;
  text-decoration: underline;
  color: #666;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: color 0.2s;
}

.size-guide-btn:hover {
  color: #000;
}

.size-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.size-box {
  border: 1px solid #e0e0e0;
  padding: 10px 0;
  text-align: center;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: #000;
  transition: all 0.2s ease;
  user-select: none;
}

.size-box input {
  display: none;
}

.size-box:hover {
  border-color: #999;
}

.size-box:has(input:checked) {
  border-color: #000;
  background-color: #000;
  color: #fff;
}

/* =========================================
   QUANTITY SELECTOR
========================================= */
.quantity-selector {
  display: flex;
  align-items: center;
  border: none;
  background-color: #f5f5f5;
  height: 52px;
  width: 90px;
  flex-shrink: 0;
}

.qty-btn {
  background: none;
  border: none;
  width: 30px;
  height: 100%;
  cursor: pointer;
  font-size: 1.2rem;
  color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background 0.2s ease;
}

.qty-btn:hover {
  background: #e0e0e0;
}

.qty-input {
  width: 30px;
  height: 100%;
  border: none;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #000;
  background: transparent;
}

.qty-input:focus {
  outline: none;
}

/* =========================================
   PRODUCT ACTIONS (BUTTONS)
========================================= */
.product-actions {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-top: 24px;
}

.btn-add-to-cart,
.btn-buy-now {
  flex: 1;
  height: 52px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  text-transform: none;
  font-weight: 700;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
  white-space: nowrap;
}

.btn-add-to-cart {
  background-color: #fff;
  color: #000;
  border: 1px solid #000;
}

.btn-add-to-cart:hover {
  background-color: #f5f5f5;
}

.btn-buy-now {
  background-color: #000;
  color: #fff;
  border: 1px solid #000;
}

.btn-buy-now:hover {
  opacity: 0.9;
  background-color: #222;
}

/* =========================================
   ACCORDIONS (PRODUCT DETAILS)
========================================= */
.product-accordion {
  border-top: 1px solid #eaeaea;
  margin-top: 24px;
}

.product-accordion details {
  border-bottom: 1px solid #eaeaea;
}

.product-accordion summary {
  padding: 20px 0;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 1px;
  color: #000;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  /* Removes default arrow in most browsers */
}

.product-accordion summary::-webkit-details-marker {
  display: none;
  /* Removes default arrow in Safari/Chrome */
}

.product-accordion summary::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 400;
  color: #000;
}

.product-accordion details[open] summary::after {
  content: '−';
}

.accordion-content {
  padding-bottom: 20px;
  font-size: 0.85rem;
  color: #555;
  line-height: 1.6;
}

.accordion-content ul {
  padding-left: 20px;
  margin-top: 10px;
}

.accordion-content li {
  margin-bottom: 6px;
}

/* =========================================
   RESPONSIVE DESIGN (MOBILE)
========================================= */
@media (max-width: 992px) {
  .product-page-container {
    grid-template-columns: 1fr;
    padding-top: 50px;
    /* Account for topbar */
  }

  .product-info-wrapper {
    padding: 32px 20px 80px 20px;
    /* Bottom padding for sticky cart btn if needed */
  }

  .product-info {
    position: static;
    max-width: 100%;
  }

  .product-page-title {
    font-size: 1.5rem;
  }

  /* Adjust gallery for mobile */
  .product-gallery {
    padding: 0;
    /* Edge to edge on mobile */
  }

  .main-image {
    margin-bottom: 8px;
  }

  .main-image img {
    height: 60vh;
    /* Controlled height on mobile */
  }

  .thumbnail-list {
    padding: 0 16px 16px 16px;
    /* Add padding to sides and bottom so thumbnails aren't edge-to-edge */
  }

  /* Fix for cramped product actions on mobile */
  .product-actions {
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .quantity-selector {
    width: 100%;
    justify-content: center;
    background-color: #f9f9f9;
  }
  
  .btn-add-to-cart,
  .btn-buy-now {
    flex: 1;
    min-width: 45%;
    padding: 0 10px;
  }
}

/* =========================================
   YOU MAY ALSO LIKE (RECOMMENDATIONS)
========================================= */
.recommendations-section {
  width: 100%;
  padding: 60px 0;
  background: #fff;
  border-top: 1px solid #eaeaea;
}

.recommendations-title {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 30px;
}

.recommendations-tabs {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 40px;
}

.recommendation-tab {
  background: none;
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: #888;
  padding-bottom: 5px;
  cursor: pointer;
  transition: color 0.2s;
}

.recommendation-tab.active {
  color: #000;
  border-bottom: 2px solid #000;
}

.tab-content {
  display: none;
}

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

.recommendations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2px;
  background: #fff;
  /* If you want gap lines, set bg here and card bg to white */
}

@media (max-width: 768px) {
  .recommendations-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Scoped Product Card for Recommendations */
.rec-product-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  background: #fff;
  text-decoration: none;
  color: inherit;
}

.rec-product-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  overflow: hidden;
  background-color: #e5e5e5;
}

.rec-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease;
}

.rec-product-image .img-hover {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}

@media (hover: hover) {
  .rec-product-card:hover .img-default {
    opacity: 0;
  }

  .rec-product-card:hover .img-hover {
    opacity: 1;
  }
}

.rec-product-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 15px 12px 25px 12px;
}

.rec-product-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #000;
  margin-bottom: 6px;
  line-height: 1.4;
}

.rec-product-price {
  font-size: 0.9rem;
  font-weight: 500;
  color: #000;
  margin-bottom: 15px;
}