/* Product page specific styles */
.product-container {
  background-color: var(--background);
  padding-bottom: 60px;
}

/* Fixed Header */
.site-header.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Breadcrumbs */
.breadcrumbs-wrapper {
  background-color: var(--white);
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

@media (max-width: 768px) {
  .breadcrumbs-wrapper {
    margin-top: 65px;
  }
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
  margin-top:5px;
  font-size: 13px;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
}

.breadcrumbs li:not(:last-child)::after {
  content: '›';
  margin: 0 8px;
  color: var(--text-light);
}

.breadcrumbs a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s;
}

.breadcrumbs a:hover {
  color: var(--primary-color);
}

.breadcrumbs .active {
  color: var(--text-color);
  font-weight: 500;
}

/* Main product wrapper */
.product-main-wrapper {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

/* Product Gallery Section */
.product-gallery-section {
  order: 2; /* Shows after info section on mobile */
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  margin-bottom: 20px;
}

.main-image-container {
  position: relative;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--white);
  margin-bottom: 15px;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.main-image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: zoom-in;
}

.image-zoom-trigger {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--box-shadow);
  cursor: pointer;
}

.product-thumbnails {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.thumbnail {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s;
}

.thumbnail.active {
  border-color: var(--primary-color);
}

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

/* Product Info Section */
.product-info-section {
  order: 1; /* Explicitly setting order for mobile first */
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  margin-bottom: 20px;
}

.product-header {
  margin-bottom: 15px;
}

.product-brand {
  margin-bottom: 12px;
}

.product-brand img {
  height: 30px;
  width: auto;
}

.product-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--secondary-color);
  line-height: 1.3;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 15px;
}

.product-sku {
  font-size: 14px;
  color: var(--text-light);
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Value Propositions */
.value-propositions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 15px 0;
  background-color: var(--primary-light);
  padding: 12px;
  border-radius: var(--border-radius);
}

.value-item {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 0 calc(50% - 10px);
}

.value-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}

.available .value-icon {
  background-color: var(--success-light);
  color: var(--success-color);
}

.unavailable .value-icon {
  background-color: var(--danger-light);
  color: var(--danger-color);
}

.price-guarantee .value-icon,
.free-shipping .value-icon {
  background-color: var(--primary-light);
  color: var(--primary-dark);
}

.value-text {
  font-weight: 600;
  font-size: 14px;
}

.unavailable .value-text {
  color: var(--danger-color);
}

/* Product Price Section */
.product-price-section {
  margin-bottom: 20px;
  padding: 12px;
  background-color: #f9f9f9;
  border-radius: var(--border-radius);
}

.price-wrapper {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.current-price {
  font-size: 24px;
  font-weight: 700;
  color: var(--secondary-color);
}

.old-price {
  font-size: 16px;
  color: var(--text-light);
  text-decoration: line-through;
}

.discount-badge {
  padding: 3px 8px;
  background-color: var(--danger-color);
  color: white;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

/* Product Benefits */
.product-benefits {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 20px 0;
  padding: 15px;
  background-color: var(--primary-light);
  border-radius: var(--border-radius);
}

.benefit-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
}

.benefit-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--white);
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.benefit-text {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

/* Product Actions Section */
.product-actions-section {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  margin-bottom: 20px;
}

/* Purchase Options */
.purchase-options {
  margin-bottom: 20px;
}

.quantity-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 15px;
}

.quantity-selector label {
  font-weight: 500;
  font-size: 14px;
}

.quantity-controls {
  display: flex;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  width: fit-content;
}

.quantity-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f5f5f5;
  border: none;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.quantity-btn:hover {
  background-color: #e0e0e0;
}

.quantity-controls input {
  width: 50px;
  height: 36px;
  border: none;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  text-align: center;
  font-size: 16px;
}

.buy-button {
  width: 100%;
  padding: 14px;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  border: none;
  border-radius: var(--border-radius);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background-color 0.3s, transform 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.buy-button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
}

/* Shipping Options */
.shipping-options {
  margin-bottom: 20px;
}

.shipping-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background-color: #f9f9f9;
  border-radius: var(--border-radius);
  margin-bottom: 10px;
}

.shipping-option:last-child {
  margin-bottom: 0;
}

.option-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: var(--white);
  border-radius: 50%;
  color: var(--secondary-color);
  flex-shrink: 0;
}

.option-text {
  font-size: 14px;
  line-height: 1.4;
  margin: auto auto;
}

/* Trust Badges */
.trust-badges {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  background-color: #f9f9f9;
  border-radius: var(--border-radius);
  text-align: center;
}

.trust-badge svg {
  color: var(--primary-color);
  width: 24px;
  height: 24px;
}

.trust-badge span {
  font-size: 12px;
  font-weight: 500;
}

/* Product Description Section */
.product-description-section {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  margin-bottom: 20px;
}

.description-title,
.features-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.short-description {
  line-height: 1.6;
  margin-bottom: 20px;
  font-size: 14px;
}

.product-features {
  margin-top: 20px;
}

.features-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.features-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  line-height: 1.5;
  font-size: 14px;
}

.features-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--success-color);
  font-weight: bold;
}

/* Product Tabs Section */
.product-tabs-section {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  margin-bottom: 30px;
}

.tabs-nav {
  display: flex;
  background-color: #f5f5f5;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}

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

.tab-btn {
  padding: 12px 15px;
  background: none;
  border: none;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.3s;
  font-size: 14px;
}

.tab-btn:hover {
  color: var(--primary-dark);
}

.tab-btn.active {
  background-color: var(--white);
  border-bottom-color: var(--primary-color);
  color: var(--secondary-color);
}

.tab-content {
  display: none;
  padding: 20px;
  line-height: 1.6;
  font-size: 14px;
}

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

/* Specifications Table */
.specifications-table,
.declaration-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--border-color);
}

.specifications-table table,
.declaration-table table {
  width: 100%;
}

.specifications-table th, 
.specifications-table td,
.declaration-table th,
.declaration-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  word-break: break-word;
}

.specifications-table th,
.declaration-table th {
  background-color: #f5f5f5;
  width: 40%;
  font-weight: 600;
}

.specifications-table tr:last-child th,
.specifications-table tr:last-child td,
.declaration-table tr:last-child th,
.declaration-table tr:last-child td {
  border-bottom: none;
}

/* Reviews Section */
.reviews-section {
  padding: 10px 0;
}

.rating-summary {
  display: flex;
  justify-content: center;
  margin-bottom: 25px;
}

.rating-average {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.average-number {
  font-size: 30px;
  font-weight: 700;
  color: var(--secondary-color);
  line-height: 1;
}

.rating-average .stars {
  margin: 5px 0;
}

.rating-average .rating-count {
  font-size: 14px;
  color: var(--text-light);
}

.reviews-list {
  margin-bottom: 25px;
}

.review-item {
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
}

.review-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.reviewer-name {
  font-weight: 600;
  font-size: 14px;
}

.review-date {
  font-size: 12px;
  color: var(--text-light);
}

.review-rating {
  margin-bottom: 8px;
}

.review-content {
  font-size: 14px;
  line-height: 1.5;
}

.no-reviews {
  text-align: center;
  padding: 20px;
  color: var(--text-light);
  font-style: italic;
  font-size: 14px;
}

.write-review {
  text-align: center;
  margin-top: 20px;
}

/* Review Form */
#review-form-container {
  max-width: 100%;
  margin: 20px auto 0;
  background-color: #f5f5f5;
  padding: 20px;
  border-radius: var(--border-radius);
}

#review-form-container h3 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 16px;
  text-align: left;
}

.rating-input {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.rating-input input {
  display: none;
}

.rating-input label {
  font-size: 28px;
  color: #ddd;
  cursor: pointer;
  margin: 0 2px;
}

.rating-input input:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label {
  color: var(--primary-color);
}

.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
}

.btn-cancel {
  padding: 10px 15px;
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 14px;
  flex: 1;
}

.btn-submit {
  padding: 10px 15px;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  flex: 1;
}

.login-prompt {
  text-align: center;
  padding: 15px;
  font-size: 14px;
}

/* Similar Products Section */
.similar-products-section {
  margin-bottom: 40px;
}

.section-title {
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--secondary-color);
  position: relative;
}

.section-title:after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background-color: var(--primary-color);
}

/* Recommended Products Container with Scroll Indicators */
.recommended-products-container {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0 -15px;
  padding: 0 15px;
}

.recommended-products-wrapper {
  width: 100%;
  overflow: hidden;
  padding: 10px 0;
}

.recommended-products-scroll {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  padding: 5px 0;
}

.recommended-products-scroll::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.scroll-hint {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--box-shadow);
  z-index: 2;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: var(--text-color);
}

.scroll-hint.active {
  opacity: 1;
}

.scroll-hint.left {
  left: 0;
}

.scroll-hint.right {
  right: 0;
}

.scroll-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 15px;
}

.scroll-dots .dot {
  width: 8px;
  height: 8px;
  background-color: var(--border-color);
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.scroll-dots .dot.active {
  background-color: var(--primary-color);
}

/* Image Zoom Modal */
#image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
}

#image-modal.active {
  display: block;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90%;
  max-height: 90%;
  z-index: 1;
}

.modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  color: white;
  font-size: 30px;
  cursor: pointer;
}

#zoomed-image {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  background-color: white;
}

/* Sticky Buy Now */
.sticky-cart {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: white;
  padding: 12px 15px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 900;
  transform: translateY(100%);
  transition: transform 0.3s;
}

.sticky-cart.visible {
  transform: translateY(0);
}

.sticky-product-info {
  overflow: hidden;
}

.sticky-product-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60vw;
  font-size: 14px;
  margin-bottom: 3px;
}

.sticky-product-price {
  font-weight: 700;
  color: var(--secondary-color);
  font-size: 16px;
}

.sticky-buy-btn {
  padding: 8px 16px;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  border: none;
  border-radius: var(--border-radius);
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s;
  font-size: 14px;
}

.sticky-buy-btn:hover {
  background-color: var(--primary-dark);
}

/* Desktop Layout (768px and up) */
@media (min-width: 768px) {
  /* Reset fixed header for desktop */
  .site-header.fixed-header {
    position: relative;
    top: auto;
    left: auto;
    width: auto;
    box-shadow: none;
  }
  
  body {
    padding-top: 0 !important;
  }
  
  .breadcrumbs-wrapper {
    margin-bottom: 0;
    margin-top: -15px;
  }
  
  /* Main product wrapper becomes a grid for desktop */
  .product-main-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
  }
  
  /* Gallery section resets and moves to first position for desktop */
  .product-gallery-section {
    order: 1; /* First on desktop */
    box-shadow: none;
    background-color: transparent;
    margin-bottom: 0;
    padding: 25px;
    border-radius: 0;
  }
  
  /* Info section resets and moves to second position for desktop */
  .product-info-section {
    order: 2; /* Second on desktop */
    box-shadow: none;
    margin-bottom: 0;
    padding: 25px;
    border-radius: 0;
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
  }
  
  /* Value propositions in two columns on desktop */
  .value-propositions {
    display: grid;
    /*flex-wrap: wrap;*/
    /*flex-direction: row;*/
    gap: 10px;
  }
  
  /* Product benefits in row on desktop */
  .product-benefits {
    flex-direction: row;
    justify-content: space-between;
  }
  
  /* Adjustments for desktop styling */
  .product-title {
    font-size: 26px;
  }
  
  .main-image-container {
    height: 350px;
  }
  
  .current-price {
    font-size: 28px;
  }
  
  .buy-button {
    padding: 16px;
  }
  
  .quantity-controls input {
    width: 60px;
    height: 40px;
  }
  
  .quantity-btn {
    width: 40px;
    height: 40px;
  }
  
  .tab-btn {
    padding: 15px 20px;
    font-size: 15px;
  }
  
  .tab-content {
    padding: 25px;
    font-size: 15px;
  }
  
  .thumbnail {
    width: 70px;
    height: 70px;
  }
}

/* Larger Desktop Layout (992px and up) */
@media (min-width: 992px) {
  .container {
    padding: 0 20px;
  }
  
  .product-title {
    font-size: 32px;
  }
  
  .main-image-container {
    height: 400px;
  }
  
  .product-gallery-section, 
  .product-info-section {
    padding: 30px;
  }
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
  /* Fixed header adjustments */
  body {
    padding-top: 65px;
  }
  
  /* Product adjustments */
  .main-image-container {
    height: 300px;
  }
  
  .product-title {
    font-size: 22px;
  }
  
  .value-propositions {
    flex-direction: column;
  }
  
  .product-benefits {
    flex-direction: column;
    gap: 15px;
  }
  
  .tab-btn {
    padding: 12px 10px;
    font-size: 14px;
  }
  
  .tab-content {
    padding: 15px;
  }
  
  .option-text{
      margin-left:2px;
  }
  
  .sticky-buy-btn {
      width: 100%;
  }
  .sticky-product-name {
      margin: auto;
      text-align: center!important;
  }
  .sticky-product-price {
      text-align:center;
  }
  .product-info-section {
      margin-bottom:0;
  }
  .product-gallery-section {
      margin-bottom:0;
  }
  .breadcrumbs-wrapper {
      padding-bottom:6px;
  }
}

/* Extra small devices */
@media (max-width: 576px) {
  .main-image-container {
    height: 250px;
  }
  
  .thumbnail {
    width: 50px;
    height: 50px;
  }
  
  .current-price {
    font-size: 22px;
  }
}