body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  color: #1a1c1c;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 20px;
}

img {
  max-width: 100%;
  display: block;
}

.product-wrapper {
  padding: 90px 0;
}

.product-content {
  display: flex;
  gap: 43px;
}

.product-gallery {
  width: 629px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.main-image {
  border: 1px solid #552329;
  height: 700px;
  width: 100%;
}

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

.thumbnails {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
}

.thumb {
  /* Cap at a quarter of the row so few images don't stretch into huge squares */
  flex: 0 1 calc(25% - 6px);
  aspect-ratio: 1 / 1;
  border: 1px solid #552329;
  background: #eeeeee;
  opacity: 0.8;
  cursor: pointer;
  transition: opacity 0.2s;
}

.thumb:hover,
.thumb.active {
  opacity: 1;
}

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

.product-info {
  flex: 1;
  max-width: 535px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 14px;
  color: #1a1c1c;
  text-transform: uppercase;
}

.title-price {
  display: flex;
  flex-direction: column;
  gap: 21px;
}

.title-price .product-title {
  font-family: 'Gotham', sans-serif;
  font-size: 30px;
  color: #6e000c;
  margin: 0;
  font-weight: 500;
}

.product-title {
  font-family: 'Gotham', sans-serif;
  font-size: 48px;
  color: #6e000c;
  margin: 0;
  font-weight: 500;
}

.price-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.current-price {
  font-family: 'Gotham', sans-serif;
  font-size: 18px;
  color: #6e000c;
  font-weight: 500;
}

.old-price {
  font-family: 'Gotham', sans-serif;
  font-size: 24px;
  color: #1a1c1c;
  opacity: 0.6;
  text-decoration: line-through;
}

.description {
  display: flex;
  flex-direction: column;
  gap: 20px;
  color: #552329;
  font-size: 14px;
  line-height: 1.6;
}

.desc-title {
  font-size: 16px;
  margin: 0;
  font-weight: 500;
}

.description p {
  margin: 0;
}

.size-selector {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.size-title {
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: #333333;
  margin: 0;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.sizes {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.size-btn {
  width: 48px;
  height: 48px;
  box-sizing: border-box;
  border: 1px solid rgba(110, 0, 12, 0.7);
  color: rgba(110, 0, 12, 0.7);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.size-btn.active {
  border: 2px solid #6e000c;
  color: #6e000c;
  font-weight: 500;
}

/* Dynamic Option Selectors */
.option-selector {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.option-title {
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: #333333;
  margin: 0;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.choices {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.choice-btn {
  width: 48px;
  height: 48px;
  box-sizing: border-box;
  border: 1px solid rgba(110, 0, 12, 0.7);
  color: rgba(110, 0, 12, 0.7);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.choice-btn.active {
  border: 2px solid #6e000c;
  color: #6e000c;
  font-weight: 500;
}

/* Color-specific styling */
.color-choices .choice-btn {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 0;
  position: relative;
}

.color-choices .choice-btn::after {
  content: attr(data-value);
  font-size: 12px;
  color: white;
  font-weight: 500;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-transform: uppercase;
}

.color-choices .choice-btn[data-value="red"] {
  background-color: #e74c3c;
  border-color: #e74c3c;
}

.color-choices .choice-btn[data-value="blue"] {
  background-color: #3498db;
  border-color: #3498db;
}

.color-choices .choice-btn[data-value="green"] {
  background-color: #2ecc71;
  border-color: #2ecc71;
}

.color-choices .choice-btn[data-value="black"] {
  background-color: #1a1c1c;
  border-color: #1a1c1c;
}

.color-choices .choice-btn[data-value="white"] {
  background-color: #ffffff;
  border-color: #cccccc;
}

.color-choices .choice-btn.active::after {
  content: '✓';
}

/* Size-specific styling */
.size-choices .choice-btn {
  min-width: 48px;
  padding: 0 10px;
}

/* Product Variant Selector - Simple Button Style */
.variant-selector {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.variant-title {
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: #333333;
  margin: 0;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.variants {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.variant-btn {
  background-color: transparent;
  border: 1px solid rgba(110, 0, 12, 0.7);
  color: rgba(110, 0, 12, 0.7);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 60px;
}

.variant-btn:hover {
  background-color: rgba(110, 0, 12, 0.1);
}

.variant-btn.active {
  background-color: #6e000c;
  color: #ffffff;
  border-color: #6e000c;
}

/* Multi-Dimensional Variant Matrix Selector */
.variant-matrix-selector {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.attribute-selector {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.attribute-values {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Generic attribute button (for any attribute type) */
.attribute-values .attribute-btn {
  min-width: 48px;
  height: 48px;
  border: 1px solid rgba(110, 0, 12, 0.7);
  color: rgba(110, 0, 12, 0.7);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: transparent;
  padding: 0 10px;
}

.attribute-values .attribute-btn:hover {
  background-color: rgba(110, 0, 12, 0.1);
}

.attribute-values .attribute-btn.active {
  border: 2px solid #6e000c;
  color: #6e000c;
  font-weight: 500;
  background-color: rgba(110, 0, 12, 0.05);
}

.attribute-values .attribute-btn.disabled {
  opacity: 0.3;
  pointer-events: none;
  text-decoration: line-through;
}

/* Color Radio Buttons - Simple Circular */
.attribute-values .attribute-btn.color-swatch,
.color-choices .attribute-btn {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  padding: 0 !important;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: block;
  font-size: 0;
}

.attribute-values .attribute-btn.color-swatch:hover,
.color-choices .attribute-btn:hover {
  transform: scale(1.1);
}

.attribute-values .attribute-btn.color-swatch.active,
.color-choices .attribute-btn.active {
  border-color: #6e000c;
  box-shadow: 0 0 0 2px rgba(110, 0, 12, 0.3);
  transform: scale(1.1);
}

.attribute-values .attribute-btn.color-swatch.disabled,
.color-choices .attribute-btn.disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* Size Buttons */
.size-choices .attribute-btn {
  min-width: 48px;
  height: 48px;
  border: 1px solid rgba(110, 0, 12, 0.7);
  color: rgba(110, 0, 12, 0.7);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: transparent;
}

.size-choices .attribute-btn:hover {
  background-color: rgba(110, 0, 12, 0.1);
}

.size-choices .attribute-btn.active {
  border: 2px solid #6e000c;
  color: #6e000c;
  font-weight: 500;
  background-color: rgba(110, 0, 12, 0.05);
}

.size-choices .attribute-btn.disabled {
  opacity: 0.3;
  pointer-events: none;
  text-decoration: line-through;
}

/* Loading and Error States */
.variant-loading,
.variant-error {
  font-size: 14px;
  color: #6e000c;
  padding: 10px 0;
}

.variant-error {
  color: #e74c3c;
}

.variant-fallback {
  font-size: 14px;
  color: #757575;
  padding: 10px 0;
}

/* Availability indicators */
.in-stock {
  color: #2ecc71;
  font-size: 14px;
}

.out-of-stock {
  color: #e74c3c;
  font-size: 14px;
}

/* Loading state for AJAX */
.variant-selector.loading {
  opacity: 0.6;
  pointer-events: none;
}

.variant-selector.loading::after {
  content: 'Loading...';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  color: #6e000c;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 430px;
  margin-top: 20px;
}

.btn-add-bag {
  background-color: #6e000c;
  color: #ffffff;
  height: 72px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: 16px;
  font-weight: 500;
  text-transform: uppercase;
  font-family: 'Gotham', sans-serif;
}

.btn-wishlist {
  background-color: transparent;
  color: #6e000c;
  border: 1px solid #6e000c;
  height: 72px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: 16px;
  font-weight: 500;
  text-transform: uppercase;
  font-family: 'Gotham', sans-serif;
}

@media (max-width: 1024px) {
  .product-content {
    flex-direction: column;
    padding: 40px;
  }
  .product-gallery {
    width: 100%;
  }
  .main-image {
    height: auto;
    aspect-ratio: 4/5;
  }
  .product-info {
    width: 100%;
    max-width: 100%;
  }
  .actions {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .product-content {
    padding: 20px;
  }
}

.related-wrapper {
  padding: 0 0 90px 0;
  overflow-x: hidden;
}

.related-wrapper > .container {
  display: flex;
  flex-direction: column;
  gap: 80px;
  max-width: 100%;
  overflow-x: hidden;
}

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

.section-title {
  font-family: 'Gotham', sans-serif;
  font-size: 24px;
  color: #6e000c;
  margin: 0;
  border-left: 4px solid #6e000c;
  padding-left: 24px;
  font-weight: 600;
}

.view-all {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(110, 0, 12, 0.7);
  font-size: 14px;
}

/* Related Products Grid - Same as basket.css */
.related-wrapper .product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  width: 100%;
  min-width: 0;
}

.related-wrapper .product-card {
  background-color: #f9f9f9;
  border: 1px solid rgba(110, 0, 12, 0.7);
  display: flex;
  flex-direction: column;
  min-width: 0;
  box-sizing: border-box;
}

.related-wrapper .product-image-container {
  position: relative;
  height: 420px;
  width: 100%;
  overflow: hidden;
}

.related-wrapper .product-image-container a {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.related-wrapper .product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-wrapper .badge-new {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: #6e000c;
  color: #ffffff;
  font-size: 12px;
  padding: 4px 10px;
}

.related-wrapper .product-info {
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  flex-grow: 1;
  box-sizing: border-box;
  min-width: 0;
}

.related-wrapper .product-text {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid #6e000c;
  padding: 20px 10px;
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
}

.related-wrapper .product-title {
  font-family: 'Gotham', sans-serif;
  margin: 0;
  font-size: 18px;
  color: #6e000c;
  font-weight: 600;
}

.related-wrapper .product-title a {
  text-decoration: none;
  color: #6e000c;
}

.related-wrapper .product-title a:hover {
  text-decoration: underline;
}

.related-wrapper .product-desc {
  margin: 0;
  font-size: 14px;
  color: #552329;
}

.related-wrapper .product-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  gap: 10px;
  box-sizing: border-box;
  min-width: 0;
}

.related-wrapper .product-price {
  font-family: 'Gotham', sans-serif;
  font-size: 16px;
  color: #6e000c;
  font-weight: 600;
}

.related-wrapper .add-to-bag-btn {
  background-color: #1a1c1c;
  color: #ffffff;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  transition: background-color 0.3s;
  cursor: pointer;
  font-family: 'Gotham', sans-serif;
}

.related-wrapper .add-to-bag-btn:hover {
  background-color: #333;
}

.related-wrapper .add-to-bag-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.related-wrapper .add-to-bag-form {
  margin: 0;
  display: inline;
}

/* Related Products Responsive Rules - Same as basket.css */
@media (max-width: 1024px) {
  .related-wrapper {
    padding: 0 40px 40px 40px;
  }
  .related-wrapper .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .related-wrapper .product-image-container {
    height: 350px;
  }
  .related-wrapper .product-info {
    padding: 30px 15px;
    gap: 20px;
  }
  .related-wrapper .product-title {
    font-size: 16px;
  }
  .related-wrapper .product-desc {
    font-size: 13px;
  }
  .related-wrapper .product-price {
    font-size: 15px;
  }
  .related-wrapper .add-to-bag-btn {
    padding: 8px 16px;
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  .related-wrapper {
    padding: 0 20px 40px 20px;
  }
  .related-wrapper .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  .related-wrapper .product-image-container {
    height: 280px;
  }
  .related-wrapper .badge-new {
    top: 12px;
    right: 12px;
    font-size: 11px;
    padding: 3px 8px;
  }
  .related-wrapper .product-info {
    padding: 20px 12px;
    gap: 15px;
  }
  .related-wrapper .product-text {
    padding: 15px 8px;
    gap: 8px;
  }
  .related-wrapper .product-title {
    font-size: 14px;
  }
  .related-wrapper .product-desc {
    font-size: 12px;
  }
  .related-wrapper .product-price {
    font-size: 14px;
  }
  .related-wrapper .add-to-bag-btn {
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* ============================================
   RECENTLY VIEWED PRODUCTS
   ============================================ */

.recently-viewed-section {
  padding: 80px 0;
  background-color: #ffffff;
}

.section-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
}

.section-header-flex .section-title {
  margin-bottom: 0;
}

.view-all-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(110, 0, 12, 0.7);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 600;
}

.icon-wrapper {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.product-card {
  background-color: #f9f9f9;
  border: 1px solid rgba(110, 0, 12, 0.7);
  display: flex;
  flex-direction: column;
  min-width: 0;
  box-sizing: border-box;
}

.product-image-container {
  position: relative;
  height: 420px;
  width: 100%;
  overflow: hidden;
}

.product-image-container a {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

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

.badge-new {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: #6e000c;
  color: #ffffff;
  font-size: 12px;
  padding: 4px 10px;
}

.product-info {
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  flex-grow: 1;
  box-sizing: border-box;
  min-width: 0;
}

.product-text {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid #6e000c;
  padding: 20px 10px;
  box-sizing: border-box;
  min-width: 0;
}

.product-title {
  font-family: 'Gotham', sans-serif;
  margin: 0;
  font-size: 18px;
  color: #6e000c;
  font-weight: 600;
}

.product-title a {
  text-decoration: none;
  color: #6e000c;
}

.product-title a:hover {
  text-decoration: underline;
}

.product-desc {
  margin: 0;
  font-size: 14px;
  color: #552329;
}

.product-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  gap: 10px;
  box-sizing: border-box;
  min-width: 0;
}

.product-price {
  font-family: 'Gotham', sans-serif;
  font-size: 16px;
  color: #6e000c;
  font-weight: 600;
}

.add-to-bag-btn {
  background-color: #1a1c1c;
  color: #ffffff;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  transition: background-color 0.3s;
  cursor: pointer;
  font-family: 'Gotham', sans-serif;
}

.add-to-bag-btn:hover {
  background-color: #333;
}

.add-to-bag-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.add-to-bag-form {
  margin: 0;
}

/* Responsive for Recently Viewed */
@media (max-width: 992px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .recently-viewed-section {
    padding: 40px 0;
  }

  .section-header-flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 25px;
  }

  .section-header-flex .section-title {
    margin-bottom: 0;
  }

  .view-all-link {
    font-size: 11px;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .product-card {
    border-width: 1px;
  }

  .product-image-container {
    height: 280px;
  }

  .badge-new {
    top: 12px;
    right: 12px;
  }

  .product-info {
    padding: 20px 10px;
  }

  .product-text {
    padding: 15px 8px;
  }

  .product-title {
    font-size: 16px;
  }

  .product-desc {
    font-size: 12px;
  }

  .product-price {
    font-size: 14px;
  }

  .add-to-bag-btn {
    font-size: 12px;
    padding: 8px 16px;
  }
}

@media (max-width: 480px) {
  .related-wrapper {
    padding: 0 15px 30px 15px;
  }
  .related-wrapper .product-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .related-wrapper .product-image-container {
    height: 250px;
  }
  .related-wrapper .product-info {
    padding: 20px 10px;
  }
  .related-wrapper .product-text {
    padding: 15px 8px;
  }
  .related-wrapper .product-title {
    font-size: 15px;
  }
  /* Recently viewed section */
  .product-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .product-image-container {
    height: 300px;
  }

  .section-header-flex .section-title {
    font-size: 16px;
  }
}