/* Home Page Styles - Default and Modern UI Support */

/* Expandable Description Styles */
.description-container {
  position: relative;
  overflow: hidden;
}

.description-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
  max-height: 4.5em; /* 3 lines * 1.5 line-height */
  transition: max-height 0.15s ease;
}

.description-text.expanded {
  -webkit-line-clamp: unset;
  line-clamp: unset;
  max-height: none;
}

/* Force expansion for Default UI */
[id*="desc-home-default"].expanded {
  -webkit-line-clamp: unset !important;
  line-clamp: unset !important;
  max-height: none !important;
  display: block !important;
  -webkit-box-orient: unset !important;
  overflow: visible !important;
}

.description-toggle {
  background: none;
  border: none;
  color: var(--brand, #3b82f6);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  margin-top: 0.5rem;
  border-radius: 0.25rem;
  transition: all 0.1s ease;
  text-decoration: underline;
  display: inline-block;
}

.description-toggle:hover {
  color: var(--accent, #53bcfc);
  background-color: rgba(59, 130, 246, 0.1);
  text-decoration: none;
}

.description-toggle:focus {
  outline: none;
}

.description-toggle:active {
  outline: none;
}

/* Fixed card heights for consistency */
.product-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-card .card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card .card-footer {
  margin-top: auto;
}

/* Fix image cropping - match production reference */
.product-image-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.product-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.2s ease;
}

.product-image:hover {
  transform: scale(1.05);
}

/* Default UI Specific Styles */
.ui-default .animate-on-scroll {
  opacity: 1 !important;
  transform: none !important;
}

.ui-default [data-aos] {
  opacity: 1 !important;
  transform: none !important;
}

/* Modern UI Specific Styles */
.ui-modern .product-card {
  transition: all 0.2s ease;
}

.ui-modern .product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Product glow effect - matches card border radius */
.product-glow {
  border-radius: 1rem !important;
  -webkit-border-radius: 1rem !important;
  -moz-border-radius: 1rem !important;
}

/* Force product glow effect visibility */
.ui-modern .product-glow {
  border-radius: 1rem !important;
  -webkit-border-radius: 1rem !important;
  -moz-border-radius: 1rem !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .product-card {
    margin-bottom: 1rem;
  }
  
  .description-text {
    font-size: 0.875rem;
  }
}

/* Animation keyframes for Modern UI */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ui-modern .animate-fade-in {
  animation: fade-in 0.3s ease-out forwards;
  opacity: 0;
}
