/* Color Detail Page Styles */

/* Cart Icon Button in Navigation */
.cart-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: rgba(45, 143, 95, 0.1);
  border: 1px solid rgba(45, 143, 95, 0.3);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-right: 15px;
}

.cart-icon-btn:hover {
  background: rgba(45, 143, 95, 0.2);
  border-color: #2d8f5f;
}

.cart-icon-btn svg {
  stroke: #2d8f5f;
}

.cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #2d8f5f;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.color-detail-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 200px 2rem 4rem;
}

/* Back Navigation */
.back-navigation {
  margin-top: 3rem;
  margin-bottom: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e5e5;
  text-align: center;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: white;
  border: 1.5px solid #d0d0d0;
  color: #333;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.back-button:hover {
  background: #f8f8f8;
  border-color: #2c5f4f;
  color: #2c5f4f;
  box-shadow: 0 4px 8px rgba(44, 95, 79, 0.1);
  transform: translateY(-2px);
}

.back-button svg {
  transition: transform 0.3s ease;
  width: 18px;
  height: 18px;
}

.back-button:hover svg {
  transform: translateX(-3px);
}

/* Color Header */
.color-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e5e5e5;
}

.color-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem;
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

.color-code {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  color: #2c5f4f;
  font-weight: 500;
}

/* Content Grid */
.color-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

/* Left Column - Images */
.color-images {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.main-image-container {
  position: relative;
  background: #f8f8f8;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  aspect-ratio: 4/3;
  cursor: pointer;
}

.image-wrapper-detail {
  position: relative;
  width: 100%;
  height: 100%;
}

.main-color-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.color-swatch-detail {
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}

.kitchen-preview-detail {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}

/* Desktop hover effect only */
@media (min-width: 1025px) {
  .main-image-container:hover .color-swatch-detail {
    opacity: 0;
  }

  .main-image-container:hover .kitchen-preview-detail {
    opacity: 1;
  }
}

/* Mobile comparison slider */
@media (max-width: 1024px) {
  .main-image-container {
    cursor: ew-resize;
    touch-action: pan-y;
  }

  .image-wrapper-detail {
    overflow: hidden;
  }

  .kitchen-preview-detail {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }

  /* Only show kitchen image when slider is initialized */
  .kitchen-preview-detail.slider-ready {
    opacity: 1 !important;
  }

  .detail-slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    z-index: 5;
    transform: translateX(-50%) translateZ(0);
    pointer-events: none;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.2), 0 0 12px rgba(0, 0, 0, 0.1);
    will-change: left;
  }

  .detail-slider-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    box-shadow:
      0 2px 8px rgba(0, 0, 0, 0.2),
      0 0 0 1px rgba(255, 255, 255, 0.4),
      inset 0 1px 2px rgba(255, 255, 255, 1);
    pointer-events: auto;
    touch-action: none;
    cursor: ew-resize;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }

  .detail-slider-handle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231a3c2a' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='15 18 9 12 15 6'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231a3c2a' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E");
    background-size: 8px 16px, 8px 16px;
    background-position: left center, right center;
    background-repeat: no-repeat;
  }

}

.color-swatch {
  display: none;
}

/* Image Gallery */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gallery-image {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-image:hover {
  transform: scale(1.05);
}

.gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Right Column - Details */
.color-details {
  padding: 1rem 0;
}

.detail-section {
  margin-bottom: 3rem;
}

.detail-section h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #2c5f4f;
}

/* Info Grid */
.info-grid {
  display: grid;
  gap: 1rem;
}

.info-item {
  display: flex;
  justify-content: space-between;
  padding: 1rem;
  background: #f8f8f8;
  border-radius: 8px;
}

.info-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #666;
}

.info-value {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: #1a1a1a;
  text-align: right;
}

/* Specifications */
.specs-list {
  display: grid;
  gap: 1rem;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid #e5e5e5;
}

.spec-item:last-child {
  border-bottom: none;
}

.spec-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #666;
}

.spec-value {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: #1a1a1a;
  text-align: right;
}

/* Features List */
.features-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.features-list li {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: #333;
  padding: 0.75rem 0;
  padding-left: 2rem;
  position: relative;
}

.features-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #2c5f4f;
  font-weight: bold;
  font-size: 1.2rem;
}

/* Action Buttons */
.detail-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary,
.btn-cart {
  flex: 1;
  padding: 1rem 2rem;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 180px;
}

.btn-cart {
  background: linear-gradient(135deg, #2d8f5f 0%, #4ade80 100%);
  color: white;
  border: 2px solid transparent;
}

.btn-cart:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(45, 143, 95, 0.4);
}

.btn-cart.added {
  background: #0c4326;
  border-color: #0c4326;
}

.btn-cart svg {
  stroke: currentColor;
}

.btn-primary {
  background: #2c5f4f;
  color: white;
}

.btn-primary:hover {
  background: #1f4538;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(44, 95, 79, 0.3);
}

.btn-secondary {
  background: transparent;
  border: 1px solid #2c5f4f;
  color: #2c5f4f;
}

.btn-secondary:hover {
  background: #f8f8f8;
  transform: translateY(-2px);
}

/* Related Colors Section */
.related-colors-section {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid #e5e5e5;
}

.related-colors-section h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 2rem;
  text-align: center;
}

.related-colors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.related-color-card {
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.related-color-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  border-color: #2c5f4f;
}

.related-color-image {
  aspect-ratio: 1;
  overflow: hidden;
}

.related-color-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.related-color-info {
  padding: 1rem;
  text-align: center;
}

.related-color-name {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.related-color-code {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.25rem;
}

/* Simple Footer */
.simple-footer {
  background: #1a1a1a;
  color: white;
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
}

.simple-footer p {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  margin: 0;
}

/* Quote Modal */
.quote-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.quote-modal.active {
  display: flex;
}

.quote-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.quote-modal-content {
  position: relative;
  background: white;
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.quote-modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 0.5rem;
  transition: all 0.3s ease;
  border-radius: 50%;
}

.quote-modal-close:hover {
  background: #f0f0f0;
  color: #1a1a1a;
}

.quote-modal-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 500;
  color: #1a1a1a;
  margin: 0 0 0.5rem;
}

.quote-modal-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: #666;
  margin: 0 0 2rem;
}

.quote-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
}

.form-group input,
.form-group select {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  padding: 0.875rem 1rem;
  border: 1.5px solid #d0d0d0;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: white;
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-group textarea {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  padding: 0.875rem 1rem;
  border: 1.5px solid #d0d0d0;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: white;
  resize: vertical;
  min-height: 100px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #2c5f4f;
  box-shadow: 0 0 0 3px rgba(44, 95, 79, 0.1);
}

.form-group input[readonly] {
  background: #f8f8f8;
  color: #666;
  cursor: not-allowed;
}

.form-group input::placeholder {
  color: #999;
}

.quote-submit-btn {
  margin-top: 1rem;
  padding: 1rem 2rem;
  background: #2c5f4f;
  color: white;
  border: none;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.quote-submit-btn:hover {
  background: #1f4538;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(44, 95, 79, 0.3);
}

/* Responsive Design */
@media (max-width: 968px) {
  .color-content-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .color-images {
    position: relative;
    top: 0;
  }

  .color-title {
    font-size: 2.5rem;
  }

  .detail-actions {
    flex-direction: column;
  }

  .related-colors-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

@media (max-width: 640px) {
  .color-detail-container {
    padding: 160px 1rem 2rem;
  }

  .color-title {
    font-size: 2rem;
  }

  .image-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .info-item,
  .spec-item {
    flex-direction: column;
    gap: 0.5rem;
  }

  .info-value,
  .spec-value {
    text-align: left;
  }
}

/* Cart Notification */
.cart-notification {
  position: fixed;
  top: 100px;
  right: 20px;
  background: linear-gradient(135deg, #2d8f5f 0%, #4ade80 100%);
  color: white;
  padding: 15px 25px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(45, 143, 95, 0.3);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  z-index: 10000;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s ease;
}

.cart-notification.show {
  opacity: 1;
  transform: translateX(0);
}

.cart-notification svg {
  stroke: white;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .cart-notification {
    top: 80px;
    right: 10px;
    left: 10px;
    justify-content: center;
  }
}

/* ─── Cart Quantity Modal (same as main page) ─── */
.cart-qty-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 67, 38, 0.5);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cart-qty-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.cart-qty-dialog {
  background: #fff;
  border-radius: 20px;
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  box-shadow: 0 25px 50px rgba(12, 67, 38, 0.25);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.cart-qty-overlay.active .cart-qty-dialog {
  transform: translateY(0);
}

.cart-qty-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border: none;
  background: #f3f4f6;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  transition: all 0.2s ease;
}

.cart-qty-close:hover {
  background: #e5e7eb;
  color: #374151;
}

.cart-qty-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #0c4326;
  margin: 0 0 0.5rem 0;
}

.cart-qty-product-name {
  color: #6b7280;
  font-size: 0.95rem;
  margin: 0 0 1.5rem 0;
}

.cart-qty-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cart-qty-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cart-qty-label {
  font-weight: 500;
  color: #374151;
  font-size: 0.9rem;
}

.cart-qty-sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cart-qty-size-btn {
  padding: 0.6rem 1rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  color: #374151;
  transition: all 0.2s ease;
}

.cart-qty-size-btn:hover {
  border-color: #2d8f5f;
}

.cart-qty-size-btn.active {
  background: #0c4326;
  color: #fff;
  border-color: #0c4326;
}

.cart-qty-toggle-group {
  display: flex;
  gap: 0.5rem;
}

.cart-qty-board-btn,
.cart-qty-face-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #374151;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.cart-qty-board-btn:hover,
.cart-qty-face-btn:hover {
  border-color: #2d8f5f;
}

.cart-qty-board-btn.active,
.cart-qty-face-btn.active {
  background: linear-gradient(135deg, #0c4326, #2d8f5f);
  color: #fff;
  border-color: transparent;
}

.face-label {
  font-weight: 600;
}

.face-desc {
  font-size: 0.75rem;
  opacity: 0.8;
}

.cart-qty-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  width: fit-content;
}

.cart-qty-minus,
.cart-qty-plus {
  width: 44px;
  height: 44px;
  border: none;
  background: #f9fafb;
  cursor: pointer;
  font-size: 1.25rem;
  color: #374151;
  transition: background 0.2s ease;
}

.cart-qty-minus:hover,
.cart-qty-plus:hover {
  background: #e5e7eb;
}

.cart-qty-input {
  width: 60px;
  height: 44px;
  border: none;
  text-align: center;
  font-size: 1rem;
  font-weight: 500;
  color: #0c4326;
  background: #fff;
}

.cart-qty-input::-webkit-outer-spin-button,
.cart-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cart-qty-price-summary {
  background: #f9fafb;
  border-radius: 12px;
  padding: 1rem;
  margin-top: 0.5rem;
}

.cart-qty-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  color: #6b7280;
  font-size: 0.9rem;
}

.cart-qty-price-row.cart-qty-price-total {
  border-top: 1px solid #e5e7eb;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  font-weight: 600;
  color: #0c4326;
  font-size: 1.1rem;
}

.cart-qty-price-val {
  font-weight: 600;
  color: #0c4326;
}

.cart-qty-confirm {
  width: 100%;
  margin-top: 1.5rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #0c4326, #2d8f5f);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
}

.cart-qty-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(12, 67, 38, 0.3);
}

.cart-qty-confirm svg {
  stroke: #fff;
}

.confirm-total {
  font-weight: 700;
}

@media (max-width: 480px) {
  .cart-qty-dialog {
    padding: 1.5rem;
    border-radius: 16px 16px 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 100%;
    width: 100%;
    max-height: 85vh;
  }

  .cart-qty-toggle-group {
    flex-direction: column;
  }

  .cart-qty-sizes {
    flex-direction: column;
  }

  .cart-qty-size-btn {
    width: 100%;
    text-align: center;
  }
}
