/**
 * Simple Variations CSS
 * File: assets/css/simple-variations.css
 */

 .simple-variations-wrapper {
  margin-bottom: 20px;
}

.variation-group {
  margin-bottom: 25px;
}
.variation-label-wrap {
  display: flex;
  align-items: center;
}
.variation-label {
  display: block;
  margin-bottom: 8px;
  min-width: 110px;
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

/* Select box visible */
.variation-select-visible {
  width: 100%;
  max-width: 300px;
  padding: 8px 12px;
  border: 1px solid #ddd;
  font-size: 14px;
  margin-bottom: 15px;
  background-color: #f7f7f7;
  cursor: pointer;
}

.variation-select-visible:focus {
  outline: none;
  border-color: #96bf48;
  box-shadow: 0 0 0 1px #96bf48;
}

/* Hình ảnh thumbnails */
.variation-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-left: 110px;
}

.variation-option {
  cursor: pointer;
  border: 2px solid #ddd;
  padding: 2px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.variation-option:hover {
  border-color: #999;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.variation-option.selected {
  border-color: #96bf48;
}

.variation-option.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.variation-option img {
  width: var(--img-size, 120);
  height: calc(var(--img-size, 120)*2/3);
  object-fit: cover;
  display: block;
}



/* Dấu X khi disabled */

.variation-option.disabled::before {
  content: "✕";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 30px;
  color: #999;
  z-index: 2;
}

.variation-option.disabled::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.7);
  z-index: 1;
}

/* Responsive */
@media (max-width: 768px) {
.variation-label {
  min-width: 80px;
}
  .variation-select-visible {
      max-width: 100%;
  }
  .variation-options {
    padding-left: 80px;
  }
  .variation-option img {
      width: 60px;
      height: 60px;
  }
}

@media (max-width: 480px) {
  .variation-option img {
      width: 50px;
      height: 50px;
  }
  
  .variation-options {
      gap: 8px;
  }
}

.product-info-row {
  display: flex;
  align-items: center;
  padding: 6px 0;
}

.product-info-row:last-child {
  margin-bottom: 15px;
}

.info-label {
  font-weight: 500;
  color: #333;
  font-size: 14px;
  min-width: 110px;
}

.info-value {
  color: #666;
  font-size: 14px;
}

.product-stock.in-stock {
  color: #46b450;
  font-weight: 600;
}

.product-stock.out-of-stock {
  color: #dc3232;
  font-weight: 600;
}

/* Quantity Input */
.quantity-input {
  display: flex;
  align-items: center;
  gap: 5px;
}

.qty-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: all 0.3s;
  display: flex;
  justify-content: center;
  color: black;
  align-items: center;
}

.qty-btn:hover, .qty-btn:focus {
  background: #f0f0f0;
  border-color: #999;
  color: black  !important;
  outline: none !important;
}

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

.qty-input {
  width: 60px;
  height: 32px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 3px;
  font-size: 14px;
  -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Thông báo */
.variation-notice {
  background: #fff3cd;
  color: #856404;
  padding: 12px 15px;
  border-radius: 4px;
  margin-bottom: 15px;
  text-align: center;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.3px;
}

/* Nút hành động */
.variation-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.variation-actions button {
  flex: 1;
  padding: 15px 20px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-add-to-cart {
  background: #00a0d2;
  color: #fff;
}

.btn-add-to-cart:hover:not(:disabled), .btn-add-to-cart:focus {
  background: #0085ba;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 160, 210, 0.3);
  outline: none !important;
}

.btn-buy-now {
  background: #ff6633;
  color: #fff;
}

.btn-buy-now:hover:not(:disabled), .btn-buy-now:focus {
  background: #ff5522;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(255, 102, 51, 0.3);
  outline: none !important;
}

.variation-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.variation-actions button:active:not(:disabled) {
  transform: translateY(0);
}

/* Thông báo */
.variation-message {
  padding: 12px 15px;
  border-radius: 4px;
  margin-top: 10px;
  text-align: center;
  font-size: 14px;
}

.variation-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.variation-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Loading state */
.variation-actions button.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.variation-actions button.loading:after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #fff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spinner 0.6s linear infinite;
}
.thumbs-item-list {
	display: flex;
  	flex-wrap: wrap;
  	gap: 8px;
}
.thumbs-item-slide {
	height: 100%;
    width: calc(100% / 8 - 8px * 7 / 8);
  opacity: .5;
  transition: opacity ease .4s;
  cursor: pointer;
  &.active, &:hover {
    opacity: 1;
  }
  img{
  	width: 100%;
    height: 100%;
  }
}
.variant-images-wrapper {
            width: 100%;
            max-width: 600px;
            margin: 0 auto;
        }
        
        .variant-swiper {
            width: 100%;
            height: 500px;
        }
        
        .variant-swiper .swiper-slide {
            display: flex;
            align-items: center;
            justify-content: center;
            background: #f5f5f5;
        }
        
        .variant-swiper .swiper-slide img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
        }

@keyframes spinner {
  to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 576px) {
  
  .product-info-row {
      flex-direction: column;
      align-items: flex-start;
      gap: 5px;
  }
  
  .quantity-row {
      flex-direction: row;
      justify-content: space-between;
      align-items: center;
  }
}