/* ============================================
   Up-Sale Bundle Section (Shofy Style)
   ============================================ */
.ec-upsell-bundle {
  margin-bottom: 70px;
}

@media (max-width: 575px) {
  .ec-upsell-bundle {
    margin-bottom: 50px;
  }
}
.ec-upsell-bundle-wrapper {
  background: linear-gradient(135deg, #fff9f0 0%, #fff5eb 100%);
  border: 2px solid #ff6b35;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(255, 107, 53, 0.1);
}

@media (max-width: 575px) {
  .ec-upsell-bundle-wrapper {
    padding: 16px;
  }
}
.ec-upsell-bundle-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px dashed #ffcbb3;
}

.ec-upsell-bundle-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #ff6b35 0%, #ff8c5a 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ec-upsell-bundle-icon svg {
  color: white;
  width: 24px;
  height: 24px;
}

.ec-upsell-bundle-title h4 {
  font-size: 18px;
  font-weight: 700;
  color: #d4380d;
  margin: 0 0 4px 0;
}
.ec-upsell-bundle-title p {
  font-size: 13px;
  color: #666;
  margin: 0;
}

.ec-upsell-bundle-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ec-upsell-bundle-item {
  background: white;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  transition: all 0.2s ease;
}
.ec-upsell-bundle-item:hover {
  border-color: #ff6b35;
  box-shadow: 0 2px 12px rgba(255, 107, 53, 0.15);
}

.ec-upsell-bundle-item-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  cursor: pointer;
  margin: 0;
}

@media (max-width: 575px) {
  .ec-upsell-bundle-item-inner {
    gap: 10px;
    padding: 10px;
  }
}
.ec-upsell-bundle-checkbox {
  position: relative;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
}
.ec-upsell-bundle-checkbox input[type=checkbox] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 2;
  margin: 0;
}
.ec-upsell-bundle-checkbox input[type=checkbox]:checked ~ .ec-upsell-checkmark {
  background-color: #ff6b35;
  border-color: #ff6b35;
}
.ec-upsell-bundle-checkbox input[type=checkbox]:checked ~ .ec-upsell-checkmark:after {
  display: block;
}
.ec-upsell-bundle-checkbox input[type=checkbox]:disabled ~ .ec-upsell-checkmark {
  opacity: 0.5;
  cursor: not-allowed;
}

.ec-upsell-checkmark {
  display: block;
  width: 22px;
  height: 22px;
  background-color: white;
  border: 2px solid #ddd;
  border-radius: 6px;
  position: relative;
  transition: all 0.2s ease;
}
.ec-upsell-checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.ec-upsell-bundle-thumb {
  position: relative;
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #f8f8f8;
}
.ec-upsell-bundle-thumb img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

@media (max-width: 575px) {
  .ec-upsell-bundle-thumb {
    width: 60px;
    height: 60px;
  }
}
.ec-upsell-discount-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: linear-gradient(135deg, #ff4d4f 0%, #ff7875 100%);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  z-index: 1;
}

.ec-upsell-bundle-info {
  flex: 1;
  min-width: 0;
}

.ec-upsell-bundle-name {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 6px 0;
  line-height: 1.4;
}
.ec-upsell-bundle-name a {
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none;
}
.ec-upsell-bundle-name a:hover {
  color: #ff6b35;
}

.ec-upsell-bundle-price {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ec-upsell-price-original {
  font-size: 13px;
  color: #999;
  text-decoration: line-through;
}

.ec-upsell-price-sale {
  font-size: 16px;
  font-weight: 700;
  color: #d4380d;
}

.ec-upsell-bundle-action {
  flex-shrink: 0;
}

.ec-upsell-add-btn {
  width: 36px;
  height: 36px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ec-upsell-add-btn svg {
  color: #666;
  width: 16px;
  height: 16px;
  transition: color 0.2s ease;
}
.ec-upsell-add-btn:hover {
  background: #ff6b35;
  border-color: #ff6b35;
}
.ec-upsell-add-btn:hover svg {
  color: white;
}
.ec-upsell-add-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.ec-upsell-bundle-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed #ffcbb3;
}

@media (max-width: 575px) {
  .ec-upsell-bundle-footer {
    flex-direction: column;
    align-items: stretch;
  }
}
.ec-upsell-bundle-total {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ec-upsell-total-label {
  font-size: 14px;
  color: #666;
}

.ec-upsell-total-price {
  font-size: 20px;
  font-weight: 700;
  color: #d4380d;
}

.ec-upsell-bundle-add-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #ff6b35 0%, #ff8c5a 100%);
  color: white;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ec-upsell-bundle-add-all svg {
  width: 18px;
  height: 18px;
}
.ec-upsell-bundle-add-all:hover:not(:disabled) {
  background: linear-gradient(135deg, #e55a2b 0%, #ff6b35 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}
.ec-upsell-bundle-add-all:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 575px) {
  .ec-upsell-bundle-add-all {
    width: 100%;
    padding: 14px 24px;
  }
}
.ec-upsell-bundle-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  border: 1px solid #ffcc80;
  border-radius: 8px;
  padding: 12px 16px;
  width: 100%;
}
.ec-upsell-bundle-notice svg {
  color: #f57c00;
  flex-shrink: 0;
}
.ec-upsell-bundle-notice span {
  font-size: 14px;
  color: #e65100;
  font-weight: 500;
}

/* Up-Sale Attributes (Swatches) */
.ec-upsell-attributes {
  margin-top: 8px;
}

.ec-upsell-attribute-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.ec-upsell-attribute-label {
  font-size: 12px;
  font-weight: 500;
  color: #666;
}

.ec-upsell-attribute-options {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}

.ec-upsell-attribute-option {
  position: relative;
  cursor: pointer;
  margin: 0;
}
.ec-upsell-attribute-option label {
  cursor: pointer;
  margin: 0;
}
.ec-upsell-attribute-option input[type=radio] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.ec-upsell-attribute-option input[type=radio]:checked + .ec-upsell-attribute-visual {
  border-color: #ff6b35;
  box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.3);
}
.ec-upsell-attribute-option input[type=radio]:checked + .ec-upsell-attribute-text {
  background: #ff6b35;
  color: white;
  border-color: #ff6b35;
}
.ec-upsell-attribute-option.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.ec-upsell-attribute-option.disabled label {
  cursor: not-allowed;
  pointer-events: none;
}

.ec-upsell-attribute-visual {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #e8e8e8;
  transition: all 0.2s ease;
}

.ec-upsell-attribute-text {
  display: inline-block;
  background: #f5f5f5;
  color: #666;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #e8e8e8;
  transition: all 0.2s ease;
}

/* Has variations item layout */
.ec-upsell-bundle-item.has-variations .ec-upsell-bundle-item-inner {
  flex-wrap: wrap;
}
.ec-upsell-bundle-item.has-variations .ec-upsell-bundle-info {
  flex-basis: calc(100% - 130px);
}
.ec-upsell-bundle-item.has-variations .ec-upsell-bundle-action {
  margin-left: auto;
}

@media (max-width: 575px) {
  .ec-upsell-bundle-item.has-variations .ec-upsell-bundle-info {
    flex-basis: calc(100% - 110px);
  }
}
/* ============================================
   Cross-Sale Section (Shofy Style)
   ============================================ */
.ec-cross-sale-section {
  margin-bottom: 70px;
}

@media (max-width: 575px) {
  .ec-cross-sale-section {
    margin-bottom: 50px;
  }
}
.ec-cross-sale-wrapper {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

@media (max-width: 575px) {
  .ec-cross-sale-wrapper {
    padding: 20px 16px;
    border-radius: 12px;
  }
}
.ec-cross-sale-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px dashed #cbd5e1;
}

.ec-cross-sale-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--primary-color, #0d6efd) 0%, #1e293b 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.ec-cross-sale-icon svg {
  color: white;
  width: 24px;
  height: 24px;
}

@media (max-width: 575px) {
  .ec-cross-sale-icon {
    width: 44px;
    height: 44px;
  }
  .ec-cross-sale-icon svg {
    width: 20px;
    height: 20px;
  }
}
.ec-cross-sale-title h4 {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 6px 0;
}
.ec-cross-sale-title p {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

@media (max-width: 575px) {
  .ec-cross-sale-title h4 {
    font-size: 17px;
  }
  .ec-cross-sale-title p {
    font-size: 13px;
  }
}
.ec-cross-sale-slider {
  position: relative;
}

.ec-cross-sale-card {
  position: relative;
  height: 100%;
}

.ec-cross-sale-plus {
  position: absolute;
  left: -16px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.ec-cross-sale-plus svg {
  color: var(--primary-color, #0d6efd);
  width: 20px;
  height: 20px;
}

@media (max-width: 575px) {
  .ec-cross-sale-plus {
    width: 28px;
    height: 28px;
    left: -12px;
  }
  .ec-cross-sale-plus svg {
    width: 16px;
    height: 16px;
  }
}
.ec-cross-sale-card-inner {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}
.ec-cross-sale-card-inner:hover {
  border-color: var(--primary-color, #0d6efd);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

@media (max-width: 575px) {
  .ec-cross-sale-card-inner {
    padding: 12px;
    border-radius: 10px;
  }
}
.ec-cross-sale-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
  margin-bottom: 14px;
}
.ec-cross-sale-thumb img {
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
  transition: transform 0.3s ease;
}
.ec-cross-sale-thumb:hover img {
  transform: scale(1.05);
}

.ec-cross-sale-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ec-cross-sale-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 10px 0;
  flex: 1;
}
.ec-cross-sale-name a {
  color: #1e293b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
  text-decoration: none;
}
.ec-cross-sale-name a:hover {
  color: var(--primary-color, #0d6efd);
}

.ec-cross-sale-price {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ec-cross-sale-price-current {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-color, #0d6efd);
  line-height: 1.3;
}

.ec-cross-sale-price-old {
  font-size: 13px;
  color: #94a3b8;
  text-decoration: line-through;
  line-height: 1.3;
}

.ec-cross-sale-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: white;
  background: var(--primary-color, #0d6efd);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: auto;
  white-space: nowrap;
}
.ec-cross-sale-add-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.ec-cross-sale-add-btn:hover {
  background: #1e293b;
  color: white;
}
.ec-cross-sale-add-btn:active {
  transform: scale(0.98);
}
.ec-cross-sale-add-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Slick/Swiper carousel styles */
.ec-cross-sale-carousel:not(.slick-initialized) {
  display: flex;
  overflow: hidden;
  gap: 16px;
}
.ec-cross-sale-carousel:not(.slick-initialized) .ec-cross-sale-slide {
  flex: 0 0 220px;
  max-width: 220px;
}

@media (max-width: 575px) {
  .ec-cross-sale-carousel:not(.slick-initialized) .ec-cross-sale-slide {
    flex: 0 0 180px;
    max-width: 180px;
  }
}
.ec-cross-sale-slide {
  padding: 0 8px;
}

/* Arrows styling */
.ec-cross-sale-arrows {
  position: absolute;
  top: -72px;
  right: 8px;
  display: flex;
  gap: 8px;
}
.ec-cross-sale-arrows .slick-arrow {
  width: 36px;
  height: 36px;
  border: 1px solid #e2e8f0;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #64748b;
  font-size: 0;
  line-height: 0;
  padding: 0;
}
.ec-cross-sale-arrows .slick-arrow svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.ec-cross-sale-arrows .slick-arrow:hover:not(.slick-disabled) {
  border-color: var(--primary-color, #0d6efd);
  background: var(--primary-color, #0d6efd);
  color: white;
}
.ec-cross-sale-arrows .slick-arrow.slick-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============================================
   Skeleton Loading Styles
   ============================================ */
.skeleton,
.skeleton-box {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
/* Up-Sale Skeleton */
.ec-upsell-skeleton {
  margin-bottom: 70px;
}

.ec-upsell-skeleton-wrapper {
  background: linear-gradient(135deg, #fff9f0 0%, #fff5eb 100%);
  border: 2px solid #ffcbb3;
  border-radius: 12px;
  padding: 24px;
}

.ec-upsell-skeleton-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px dashed #ffcbb3;
}
.ec-upsell-skeleton-header .skeleton-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
}
.ec-upsell-skeleton-header .skeleton-title {
  width: 180px;
  height: 20px;
  margin-bottom: 8px;
}
.ec-upsell-skeleton-header .skeleton-subtitle {
  width: 150px;
  height: 14px;
}

.ec-upsell-skeleton-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ec-upsell-skeleton-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  border-radius: 10px;
  padding: 12px;
}
.ec-upsell-skeleton-item .skeleton-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}
.ec-upsell-skeleton-item .skeleton-thumb {
  width: 70px;
  height: 70px;
  border-radius: 8px;
}
.ec-upsell-skeleton-item .skeleton-info {
  flex: 1;
}
.ec-upsell-skeleton-item .skeleton-name {
  width: 70%;
  height: 16px;
  margin-bottom: 8px;
}
.ec-upsell-skeleton-item .skeleton-price {
  width: 100px;
  height: 18px;
}
.ec-upsell-skeleton-item .skeleton-action {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.ec-upsell-skeleton-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed #ffcbb3;
}
.ec-upsell-skeleton-footer .skeleton-total {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ec-upsell-skeleton-footer .skeleton-label {
  width: 120px;
  height: 16px;
}
.ec-upsell-skeleton-footer .skeleton-price {
  width: 80px;
  height: 24px;
}
.ec-upsell-skeleton-footer .skeleton-btn {
  width: 180px;
  height: 44px;
  border-radius: 8px;
}

/* Cross-Sale Skeleton */
.ec-cross-sale-skeleton {
  margin-bottom: 70px;
}

.ec-cross-sale-skeleton-wrapper {
  background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 50%, #f8fafc 100%);
  border-radius: 20px;
  padding: 35px;
  border: 1px solid #e2e8f0;
}

@media (max-width: 575px) {
  .ec-cross-sale-skeleton-wrapper {
    padding: 20px;
  }
}
.ec-cross-sale-skeleton-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 30px;
}
.ec-cross-sale-skeleton-header .skeleton-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}
.ec-cross-sale-skeleton-header .skeleton-title {
  width: 220px;
  height: 22px;
  margin-bottom: 8px;
}
.ec-cross-sale-skeleton-header .skeleton-subtitle {
  width: 300px;
  height: 14px;
}

.ec-cross-sale-skeleton-slider {
  display: flex;
  gap: 20px;
  overflow: hidden;
}

@media (max-width: 575px) {
  .ec-cross-sale-skeleton-slider {
    gap: 12px;
  }
}
.ec-cross-sale-skeleton-card {
  flex: 0 0 220px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.ec-cross-sale-skeleton-card .skeleton-thumb {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 0;
}
.ec-cross-sale-skeleton-card .skeleton-content {
  padding: 16px;
}
.ec-cross-sale-skeleton-card .skeleton-name {
  width: 90%;
  height: 16px;
  margin-bottom: 12px;
}
.ec-cross-sale-skeleton-card .skeleton-price {
  width: 80px;
  height: 18px;
  margin-bottom: 12px;
}
.ec-cross-sale-skeleton-card .skeleton-btn {
  width: 100%;
  height: 38px;
  border-radius: 8px;
}

@media (max-width: 575px) {
  .ec-cross-sale-skeleton-card {
    flex: 0 0 160px;
  }
  .ec-cross-sale-skeleton-card .skeleton-content {
    padding: 12px;
  }
}
.ec-cross-sale-skeleton-scrollbar {
  margin-top: 24px;
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
}
.ec-cross-sale-skeleton-scrollbar .skeleton-drag {
  height: 100%;
  width: 30%;
  background: linear-gradient(90deg, #cbd5e1 25%, #94a3b8 50%, #cbd5e1 75%);
  background-size: 200px 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 2px;
}

/* Cart Up-Sale Badge */
.ec-cart-upsale-badge .badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: #155724;
  border: 1px solid #b8dacc;
}
.ec-cart-upsale-badge .badge svg {
  flex-shrink: 0;
}
