/* Custom responsive styles for JanyPet website */

:root {
  /* Enhanced Pawfect Luxury palette - more vibrant */

  
  /* Font sizes - responsive (unchanged) */
  --fs-small: clamp(0.75rem, 2vw, 0.875rem);
  --fs-base: clamp(0.875rem, 2vw, 1rem); 
  --fs-md: clamp(1rem, 2vw, 1.125rem);
  --fs-lg: clamp(1.125rem, 2.5vw, 1.375rem);
  --fs-xl: clamp(1.25rem, 3vw, 1.5rem);
  --fs-2xl: clamp(1.5rem, 4vw, 2rem);
  --fs-3xl: clamp(1.75rem, 5vw, 2.5rem);
  
  /* Spacing (unchanged) */
  --space-xs: clamp(0.25rem, 1vw, 0.5rem);
  --space-sm: clamp(0.5rem, 1vw, 0.75rem);
  --space-md: clamp(0.75rem, 1.5vw, 1rem);
  --space-lg: clamp(1rem, 2vw, 1.5rem);
  --space-xl: clamp(1.5rem, 3vw, 2rem);
}

/* ==== Cải thiện typography ==== */
body {
  font-family: var(--body-font, 'Open Sans', sans-serif);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: #505050;
  background-color: #fefefe;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font, 'Nunito', sans-serif);
  line-height: 1.3;
  margin-bottom: 0.5em;
  color: var(--dark-color);
}

.display-1, .display-2, .display-3, .display-4, .display-5 {
  font-weight: 700;
}

.display-3 {
  font-size: var(--fs-3xl);
}

.display-4 {
  font-size: var(--fs-2xl);
}

.lead {
  font-size: var(--fs-md);
  line-height: 1.6;
}

/* ==== Nút bấm nhỏ gọn hơn ==== */
.btn {
  padding: var(--space-sm) var(--space-lg);
  border-radius: 4px;
  transition: all 0.25s ease;
  font-size: var(--fs-base);
  font-weight: 500;
}

.btn-lg {
  
  font-size: var(--fs-md);
}

.btn-sm {
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--fs-small);
}

.btn-xs {
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
}

/* Làm cho các nút tròn hơn */
.btn-pill, .rounded-pill {
  border-radius: 50px !important;
}

/* Điều chỉnh màu nút */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff; /* Ensure text color changes for better contrast */
}

/* Nút giỏ hàng và yêu thích - These are now primarily styled in buttons.css and components.css */
/* Removing or commenting out to avoid conflicts if styles in buttons.css are preferred.
.btn-cart, .btn-wishlist, .btn-quickview {
  width: 40px;
  height: 40px;
  padding: 0 !important;
  font-size: 1rem;
  transition: all 0.2s ease;
}
*/

/* Tạo vùng chứa cho các nút - This is now primarily styled in buttons.css and components.css */
/* Removing or commenting out to avoid conflicts if styles in buttons.css are preferred.
.product-actions {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  transition: all 0.3s ease;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 8px;
  border-radius: 50px;
  opacity: 0;
}
*/

.card:hover .product-actions { /* This hover effect is now in components.css for .product-card */
  opacity: 1;
}

/* Loại bỏ hiệu ứng zoom ảnh khi hover - This is now handled in components.css for .product-card */
/*
.card .position-relative img {
  transition: none !important;
}

.card:hover .position-relative img {
  transform: none !important;
}
*/

/* Overlay cho Quick View */
.card .image-container { /* Renamed to .product-image-container in components.css */
  position: relative;
  overflow: hidden;
  border-radius: 8px; /* Match .product-card border-radius if applicable */
}

/* Quick View Modal */
.quickview-modal .modal-content {
  border-radius: 12px; /* Can be overridden by components.css */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); /* Can be overridden by components.css */
}

.quickview-modal .product-gallery {
  border-radius: 8px;
  overflow: hidden;
}

.quickview-modal .product-info {
  padding: 20px;
}

.quickview-modal .product-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.quickview-modal .product-price {
  font-size: 1.25rem;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 15px;
}

.quickview-modal .product-description {
  margin-bottom: 20px;
  line-height: 1.6;
}

.quickview-modal .quantity-selector {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.quickview-modal .quantity-input {
  width: 60px;
  text-align: center;
  border: 1px solid #ddd;
  padding: 5px;
  border-radius: 4px;
}

.quickview-modal .quantity-btn {
  width: 30px;
  height: 30px;
  border: 1px solid #ddd;
  background: #f8f8f8;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 767px) {
  .btn-cart, .btn-wishlist, .btn-quickview {
    width: 35px;
    height: 35px;
    font-size: 0.875rem;
  }
  
  .product-actions {
    padding: 6px;
    gap: 5px;
  }
}

/* ==== Header styles ==== */
header.sticky-top {
  box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

/* Logo kích thước nhỏ hơn trên mobile */
@media (max-width: 576px) {
  .main-logo img {
    max-height: 45px !important;
  }
}

/* Thanh tìm kiếm */
.search-bar {
  transition: all 0.3s ease;
}

.search-bar:focus-within {
  box-shadow: 0 0 0 0.25rem rgb(74 154 209 / 25%);
}

/* ==== Card styles ==== */
.card {
  transition: all 0.3s ease;
  border-radius: 8px;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.card-title {
  font-size: var(--fs-md);
  font-weight: 600;
}

/* Product image overlay effect */
.card .position-relative img {
  transition: all 0.5s ease;
}

.card:hover .position-relative img {
  transform: scale(1.05);
}

/* ==== Category styles ==== */
.categories-card {
  transition: all 0.3s ease;
}

.categories-card:hover {
  transform: translateY(-5px);
}

.categories-item {
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.categories-item:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.category-icon {
  font-size: 2.5rem !important;
  transition: all 0.3s ease;
}

.categories-item:hover .category-icon {
  color: var(--primary-color) !important;
  transform: scale(1.1);
}

/* ==== Banner section ==== */
#banner, #banner-2 {
  background: linear-gradient(135deg, var(--grey-color) 0%, var(--light-color) 100%) !important;
}

.banner-title {
  font-size: var(--fs-2xl);
  line-height: 1.3;
}

.highlight-text {
  position: relative;
  z-index: 1;
}

.highlight-text::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 30%;
  bottom: 0;
  left: 0;
  background-color: rgba(109, 152, 134, 0.2); /* Using primary color with opacity */
  z-index: -1;
  transition: height 0.3s ease;
}

.highlight-text:hover::after {
  height: 100%;
}

/* Animate badge */
.animated-badge {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* ==== Animation bounce for images ==== */
.animation-bounce {
  animation: bounce 3s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* ==== Service section styles ==== */
.service-icon-wrapper {
  transition: all 0.3s ease;
}

.card:hover .service-icon-wrapper {
  background-color: var(--primary-color) !important;
}

.card:hover .service-icon-wrapper i {
  color: white !important;
}

.service-img-container {
  overflow: hidden;
  border-radius: 8px 8px 0 0;
}

.service-img-container img {
  transition: all 0.5s ease;
}

.card:hover .service-img-container img {
  transform: scale(1.1);
}

/* ==== Responsive adjustments ==== */
@media (max-width: 991px) {
  .section-header h2 {
    font-size: 1.75rem !important;
  }
  
  .btn-cart, .btn-wishlist {
    padding: 0.4rem 0.75rem !important;
    font-size: 0.85rem;
  }
  
  .btn-cart h5 {
    font-size: 0.85rem !important;
  }
  
  .btn-wishlist {
    width: 36px;
    height: 36px;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 767px) {
  .banner-content {
    text-align: center;
  }
  
  .banner-content .content-wrapper {
    padding: 2rem 1rem !important;
  }
  
  .banner-title {
    font-size: 1.5rem !important;
  }
}

/* ==== Footer styles ==== */
footer {
  background-color: #f8fafc !important;
}

.footer-link {
  transition: all 0.3s ease;
  color: #505050;
}

.footer-link:hover {
  color: var(--primary-color);
  transform: translateX(5px);
}

/* Back to top button */
/* Back to top button enhancements */
#back-to-top {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: fixed;
    bottom: -60px; /* Start offscreen */
    right: 20px;
    z-index: 999;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  #back-to-top.show {
    bottom: 20px;
    opacity: 1;
  }
  
  #back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    background: var(--primary-hover);
  }
  
  /* Pulse animation for the back to top button */
  @keyframes pulse {
    0% {
      box-shadow: 0 0 0 0 rgba(109, 152, 134, 0.7);
    }
    70% {
      box-shadow: 0 0 0 10px rgba(109, 152, 134, 0);
    }
    100% {
      box-shadow: 0 0 0 0 rgba(109, 152, 134, 0);
    }
  }
  
  #back-to-top.pulse {
    animation: pulse 2s infinite;
  }

/* Tùy chỉnh thông báo toast */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1060;
}

.toast {
  max-width: 350px;
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.15);
  border: none;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Màu sắc cho các loại toast */
.toast-success {
  background-color: #E7F0EC; /* Slightly more saturated */
  border-left: 4px solid var(--primary-color);
}

.toast-success .toast-icon {
  background-color: rgba(92, 141, 120, 0.3); /* More opaque background */
  color: var(--primary-color);
}

.toast-error {
  background-color: #F0E7E7; /* More distinct error background */
  border-left: 4px solid #A86565;
}

.toast-info {
  background-color: #E9E5DF; /* More defined info background */
  border-left: 4px solid var(--accent-color);
}

.toast-warning {
  background-color: #F2EDE3; /* Warmer warning background */
  border-left: 4px solid #CFC0B3;
}

/* Enhanced toast icons */
.toast-success .toast-icon {
  background-color: rgba(92, 141, 120, 0.25);
  color: #4A7866; /* Darker for better visibility */
}

.toast-error .toast-icon {
  background-color: rgba(168, 101, 101, 0.25);
  color: #8F5252; /* Deeper color for better contrast */
}

.toast-info .toast-icon {
  background-color: rgba(181, 169, 157, 0.25);
  color: #A19285; /* Richer info icon color */
}

.toast-warning .toast-icon {
  background-color: rgba(207, 192, 179, 0.25);
  color: #BEAB96; /* More saturated warning icon */
}

/* Progress bar enhancements */
.toast-success .toast-progress-bar {
  background-color: #4A7866; /* Deeper green for progress */
}

.toast-error .toast-progress-bar {
  background-color: #8F5252; /* Richer red */
}

.toast-info .toast-progress-bar {
  background-color: #A19285; /* Enhanced info progress */
}

.toast-warning .toast-progress-bar {
  background-color: #BEAB96; /* Deeper warning progress */
}