/* style.css - Complete with variant selector dropdown */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 20px;
  background: #f4f4f4;
  color: #333;
}

  /* Add this to your style.css */

/* Hero Section Styles */
.hero-section {
  position: relative;
  width: 100%;
  height: 500px; /* Adjust height as needed */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-start; /* Align content to the left for model focus */
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures image covers the section without distortion */
  object-position: center; /* Centers the image */
}

.hero-text {
  position: absolute;
  top: 50%;
  right: 10%; /* Positions text on the right side */
  transform: translateY(-50%);
  text-align: right; /* Align text to the right */
  color: #000; /* Black text for clarity on light background */
  padding: 20px;
  max-width: 40%; /* Limits text width to avoid overlapping the model */
  background: rgba(255, 255, 255, 0.7); /* Semi-transparent white background for better readability */
  border-radius: 10px; /* Optional: Rounded corners */
}

.hero-text h1 {
  font-size: 2.5em; /* Larger title */
  margin-bottom: 10px;
  line-height: 1.2;
}

.hero-text p {
  font-size: 1.2em;
  line-height: 1.5;
}

/* Media Query for Mobile Responsiveness */
@media (max-width: 768px) {
  .hero-section {
    height: 300px; /* Shorter on mobile */
  }
  .hero-text {
    right: 5%;
    max-width: 80%; /* Wider on mobile */
    text-align: center; /* Center text on small screens */
  }
  .hero-text h1 {
    font-size: 2em;
  }
  .hero-text p {
    font-size: 1em;
  }
}

.navbar {
  background: #232f3e;
  color: white;
  padding: 15px 0;
  text-align: center;
  margin-bottom: 30px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.navbar a {
  color: white;
  text-decoration: none;
  padding: 12px 30px;
  font-size: 20px;
  font-weight: bold;
  margin: 0 20px;
  border-radius: 30px;
  transition: 0.3s;
}

.navbar a:hover, .navbar a.active {
  background: #ff9900;
}

h1 {
  text-align: center;
  color: #111;
  margin-bottom: 10px;
  font-size: 30px;
  font-weight: bold;
}

.intro-text {
  text-align: center;
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}

.intro-text p {
  font-size: 19px;
  line-height: 1.7;
  color: #222;
  font-weight: 500;
}

.slideshow-container {
  max-width: 1200px;
  margin: 40px auto;
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.slideshow-wrapper {
  display: flex;
  transition: transform 0.8s ease-in-out;
}

.slideshow-slide {
  min-width: 100%;
  text-align: center;
  background: #fff;
  cursor: pointer;  /* Added cursor pointer to indicate clickability */
}

.slideshow-slide img {
  width: 100%;
  height: 500px;
  object-fit: contain;
  background: #fafafa;
}

.slideshow-info {
  padding: 20px;
  background: #232f3e;
  color: white;
}

.slideshow-title {
  font-size: 30px;
  font-weight: bold;
  margin: 10px 0;
}

.slideshow-category {
  font-size: 20px;
  color: #ff9900;
  margin: 10px 0;
}

.slideshow-price {
  font-size: 34px;
  font-weight: bold;
  color: #B12704;
  margin: 15px 0;
}

.slideshow-rrp {
  font-size: 20px;
  color: #aaa;
  text-decoration: line-through;
  margin: 5px 0;
}

.slideshow-discount {
  font-size: 28px;
  font-weight: bold;
  color: #fff;
  background: #B12704;
  padding: 8px 20px;
  border-radius: 25px;
  display: inline-block;
  margin: 10px 0;
}

.slideshow-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 32px;
  cursor: pointer;
  z-index: 10;
}

.slideshow-prev {
  left: 20px;
}

.slideshow-next {
  right: 20px;
}

.slideshow-container:hover .slideshow-nav {
  opacity: 1;
}

/* Brand Filter - Compact vertical layout */
.brand-filter-container {
  padding: 15px 20px;
  background: #f9f9f9;
  border-bottom: 1px solid #ddd;
  margin-bottom: 30px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.05);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.brand-filter-container strong {
  display: block;
  font-size: 17px;
  color: #232f3e;
  margin-bottom: 10px;
  font-weight: bold;
}

.brand-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px 15px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 8px;
}

.brand-checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background 0.2s;
}

.brand-checkbox-label:hover {
  background-color: #f0f0f0;
}

.brand-checkbox-label input {
  margin-right: 8px;
  cursor: pointer;
  width: 15px;
  height: 15px;
}

/* Slim scrollbar */
.brand-checkboxes::-webkit-scrollbar {
  width: 6px;
}

.brand-checkboxes::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.brand-checkboxes::-webkit-scrollbar-thumb {
  background: #c8c8c8;
  border-radius: 10px;
}

.brand-checkboxes::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* NEW: Brand Links Container */
.brand-links-container {
  text-align: center;
  margin: 20px auto;
  max-width: 1200px;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 8px;
}

#brand-links-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  max-height: 280px;  /* Added max-height for scrollbar */
  overflow-y: auto;  /* Added vertical scrollbar */
  padding-right: 8px;
}

/* Load More Button */
.load-more-container {
  text-align: center;
  margin: 50px 0;
}

.load-more-btn {
  background: #ff9900;
  color: white;
  border: none;
  padding: 15px 40px;
  font-size: 18px;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255,153,0,0.3);
  transition: all 0.3s;
}

.load-more-btn:hover {
  background: #e68a00;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255,153,0,0.4);
}

.load-more-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* Sort Filter */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
}

.sort-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
}

.sort-filter label {
  color: #333;
  font-weight: bold;
}

#sort-select {
  padding: 10px 15px;
  font-size: 16px;
  border-radius: 8px;
  border: 2px solid #232f3e;
  background: white;
  cursor: pointer;
}

#sort-select:focus {
  outline: none;
  border-color: #ff9900;
}

/* Top Rated Section */
.top-rated-section {
  max-width: 1200px;
  margin: 60px auto;
}

.section-title {
  font-size: 34px;
  text-align: center;
  color: #232f3e;
  font-weight: bold;
}

.top-rated-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

/* Product Card */
.product {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.product:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

.product img {
  width: 100%;
  height: 300px;
  object-fit: contain;
  background: #fafafa;
  padding: 20px;
}

.product-info {
  padding: 20px;
  text-align: center;
}

.title {
  font-size: 20px;
  font-weight: bold;
  margin: 10px 0;
  color: #232f3e;
  white-space: normal; /* Allow wrapping */
  overflow-wrap: break-word; /* Break long words */
  hyphens: auto; /* Optional: Auto-hyphenation for better wrapping */
  line-height: 1.2; /* Improve readability */
}

.price {
  font-size: 28px;
  font-weight: bold;
  color: #B12704;
  margin: 10px 0;
}

.rrp {
  text-decoration: line-through;
  color: #999;
  font-size: 18px;
}

.discount {
  background: #B12704;
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 16px;
  margin: 10px 0;
  display: inline-block;
}

.stars {
  margin: 10px 0;
  font-size: 20px;
  color: #ff9900;
  white-space: nowrap; /* Prevent line break between stars and rating */
}

/* Overlay and Modal */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: none;
  z-index: 999;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 1200px;
  max-height: 90vh;
  background: white;
  border-radius: 20px;
  overflow: auto;
  z-index: 1000;
  display: none;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  background: #232f3e;
  color: white;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

.modal-title {
  font-size: 28px;
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 40px;
  cursor: pointer;
}

.image-carousel {
  position: relative;
  overflow: hidden;
  background: #fafafa;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-slide {
  min-width: 100%;
  text-align: center;
}

.carousel-slide img {
  max-width: 100%;
  max-height: 500px;
  object-fit: contain;
  padding: 20px;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  width: 60px;
  height: 60px;
  font-size: 32px;
  cursor: pointer;
  border-radius: 50%;
  z-index: 10;
}

.carousel-prev {
  left: 20px;
}

.carousel-next {
  right: 20px;
}

.carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.dot {
  width: 12px;
  height: 12px;
  background: #666;
  border-radius: 50%;
  cursor: pointer;
}

.dot.active {
  background: #ff9900;
}

.modal-content {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  padding: 30px;
}

.modal-left {
  flex: 1;
  min-width: 280px;
}

.modal-left p {
  margin: 12px 0;
  font-size: 18px;
}

.modal-price-line {
  font-size: 32px;
  font-weight: bold;
  color: #B12704;
  margin: 0 0 15px 0;
}

.modal-rrp-line,
.modal-discount-line {
  font-size: 20px;
  color: #555;
  margin: 8px 0;
}

.modal-right {
  flex: 2;
  min-width: 300px;
}

.modal-description {
  font-size: 16px;
  line-height: 1.7;
  white-space: pre-line;
  background: #f9f9f9;
  padding: 20px;
  border-radius: 10px;
  border-left: 4px solid #ff9900;
  max-height: 400px;
  overflow-y: auto;
}

/* Variant Selector Dropdowns */
.variant-selector {
  margin: 25px 0;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 10px;
  border: 1px solid #ddd;
}

.variant-group {
  margin-bottom: 15px;
}

.variant-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
  color: #333;
}

.variant-group select {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: white;
  cursor: pointer;
}

.variant-group select:focus {
  outline: none;
  border-color: #ff9900;
  box-shadow: 0 0 5px rgba(255,153,0,0.3);
}

/* Variants Dropdown Button */
.variants-toggle-btn {
  background: #f0f0f0;
  color: #333;
  border: 1px solid #ddd;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  margin: 20px 0;
  width: 100%;
  text-align: left;
  transition: all 0.3s;
}

.variants-toggle-btn:hover {
  background: #e0e0e0;
}

.variants-toggle-btn .arrow {
  float: right;
  font-size: 18px;
  transition: transform 0.3s;
}

.variants-toggle-btn.open .arrow {
  transform: rotate(180deg);
}

/* Second Modal for Variants */
#variants-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: none;
  z-index: 1002;
}

#variants-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 900px;
  max-height: 85vh;
  background: white;
  border-radius: 15px;
  overflow: hidden;
  display: none;
  z-index: 1003;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  flex-direction: column;
}

.modal-variants-content {
  padding: 30px;
  overflow-y: auto;
  flex: 1;
}

#modal-variants-table {
  width: 100%;
}

/* Variants Table */
.variants-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 15px;
}

.variants-table th,
.variants-table td {
  border: 1px solid #ccc;
  padding: 12px;
  text-align: left;
}

.variants-table th {
  background-color: #f0f0f0;
  font-weight: bold;
}

.variants-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* Buy Button */
.buy-btn {
  background: #ff9900;
  color: white;
  padding: 20px 50px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 22px;
  font-weight: bold;
  display: inline-block;
  margin: 25px 0;
  transition: 0.3s;
  text-align: center;
}

.buy-btn:hover {
  background: #e68900;
  transform: scale(1.05);
}

/* Footer */
footer {
  text-align: center;
  padding: 50px 20px;
  margin-top: 80px;
  border-top: 1px solid #ddd;
  background: #fafafa;
  color: #666;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 900px) {
  .modal-content {
    flex-direction: column;
  }
  
  .modal-right {
    order: -1;
  }
}

@media (max-width: 768px) {
  .top-rated-grid {
    grid-template-columns: 1fr 1fr;
  }
  .product img {
    height: 200px;
  }
  .title {
    font-size: 17px;
    line-height: 1.2;
  }
  .price {
    font-size: 26px;
  }
  .navbar a {
    display: block;
    margin: 10px auto;
    width: 90%;
    padding: 15px;
    font-size: 18px;
  }
  .slideshow-slide img {
    height: 300px;
  }
  .slideshow-info {
    padding: 15px;
  }
  .slideshow-title {
    font-size: 24px;
  }
  .slideshow-price {
    font-size: 30px;
  }
  .modal {
    width: 98%;
    max-height: 95vh;
  }
  .modal-details {
    padding: 20px;
    font-size: 16px;
  }
  .modal-title {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .top-rated-grid {
    grid-template-columns: 1fr;
  }
  h1 {
    font-size: 26px;
  }
  .navbar a {
    font-size: 16px;
    padding: 12px;
  }
}

/* Gold stars for ratings */
.stars .filled,
.stars .half {
  color: #FFD700; /* Gold color for filled and half stars */
}

.stars .empty {
  color: #CCCCCC; /* Light gray for empty stars */
}

.stars span {
  font-size: 24px; /* Slightly larger stars for better visibility */
}

/* Search Container - Styled to match brand filter */
.search-container {
  padding: 15px 20px;
  background: #f9f9f9;
  border-bottom: 1px solid #ddd;
  margin-bottom: 30px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.05);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

#search-input {
  width: 100%;
  padding: 12px 20px;
  font-size: 16px;
  border-radius: 8px;
  border: 2px solid #232f3e;
  background: white;
  cursor: text;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
  transition: border-color 0.3s;
}

#search-input:focus {
  outline: none;
  border-color: #ff9900;
  box-shadow: 0 0 5px rgba(255,153,0,0.3);
}

#search-input::placeholder {
  color: #aaa;
  font-style: italic;
}