/* ==== Cards and Components ==== */
.card {
  transition: all 0.3s ease;
  border-radius: 8px;
  overflow: hidden;
  --bs-card-inner-border-radius: none;
  --bs-card-bg: transparent;
  background-color: transparent;
  border: none;
}

.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);
}

iconify-icon.category-icon {
  color: rgba(74, 124, 89, 0.6);
  font-size: 2.5rem !important;
  transition: all 0.3s ease-in;
}

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

a.categories-item:hover iconify-icon.category-icon {
  color: var(--primary-color);
}

/* 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;
}

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

/* 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);
}

.service-icon {
  font-size: 30px;
  border-radius: 3.125rem;
  border: 1px solid #d9d9d8;
  padding: 1.25rem;
}

/* Testimonial style */
.testimonial-content {
  color: #666;
}

iconify-icon.quote-icon {
  color: var(--light-primary-color);
  font-size: 14rem;
}

/* Accordion styles */
.accordion-button:not(.collapsed) {
  color: var(--dark-color);
  background-color: transparent;
  box-shadow: none;
}

.accordion {
  --bs-accordion-color: var(--light-dark-color);
  --bs-accordion-bg: none;
  --bs-accordion-btn-color: var(--dark-color);
}

.accordion-button:not(.collapsed)::after {
  background-image: url("https://api.iconify.design/eva/arrow-down-fill.svg?color=%234A7C59");
}

.accordion-button::after {
  background-image: url("https://api.iconify.design/eva/arrow-down-fill.svg?color=%234A7C59");
}

.accordion-button:focus {
  z-index: 3;
  border-color: none;
  box-shadow: none;
}

/* Form controls */
.form-control {
  color: #666;
  line-height: normal;
  letter-spacing: 0.02125rem;
  text-transform: capitalize;
  border-radius: 0.25rem;
  border: 1px solid rgba(65, 64, 62, 0.2);
  background: #fff;
  display: flex;
  padding: 1.25rem 0rem 1.25rem 1.25rem;
  align-items: center;
  gap: 0.375rem;
  align-self: stretch;
}

.form-control:focus {
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
  border-color: var(--accent-color);
  outline: 0;
  box-shadow: none;
}

/* Dropdown menu */
.dropdown-menu {
  --bs-dropdown-link-active-bg: var(--bs-primary);
}

/* Tabs */
.nav-tabs .nav-item.show .nav-link,
.nav-tabs .nav-link.active {
  color: var(--accent-color);
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  color: var(--light-color);
  background-color: var(--primary-color);
}

/* Pagination */
.pagination .page-numbers {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  color: var(--bs-body-color);
  padding: 0 10px;
  line-height: 1.4;
  transition: 0.9s all;
  border-radius: 8px;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  color: var(--primary-color);
}

iconify-icon.pagination-arrow {
  color: var(--bs-body-color);
  transition: 0.9s all;
}

iconify-icon.pagination-arrow:hover {
  color: var(--primary-color);
}

/* Swiper pagination */
.swiper-pagination-bullet {
  border: 1px solid var(--bs-body-color);
  background-color: transparent;
  opacity: 1;
  width: var(--swiper-pagination-bullet-width, var(--swiper-pagination-bullet-size, 15px));
  height: var(--swiper-pagination-bullet-height, var(--swiper-pagination-bullet-size, 15px));
}

.swiper-pagination-bullet.swiper-pagination-bullet-active {
  background-color: var(--bs-body-color);
  background: var(--bs-body-color);
}

.swiper-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet,
.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet {
  margin: 0 var(--swiper-pagination-bullet-horizontal-gap, 8px);
}

/* Filter buttons */
button.filter-button {
  letter-spacing: 0.02125rem;
  border: none;
  border-bottom: 2px solid #d9d9d8;
  background: transparent;
  text-transform: uppercase;
  font-size: 1.0625rem;
  transition: all 0.3s ease-in;
}

button.filter-button.active,
button.filter-button:hover {
  border-bottom: 2px solid var(--primary-color);
}

/* Badge styles */
.badge {
  transition: all 0.3s ease;
}

@keyframes badgePulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.badge-pulse {
  animation: badgePulse 0.5s ease-in-out;
}

.bg-primary {
  background-color: var(--primary-color) !important;
}

.bg-secondary {
  background-color: var(--secondary-color) !important;
}

.bg-danger {
  background-color: var(--danger-color) !important;
}

.bg-warning {
  background-color: var(--warning-color) !important;
}

.bg-success {
  background-color: var(--success-color) !important;
  color: #fff !important;
}

.bg-info {
  background-color: #0dcaf0 !important;
}

.bg-primary-subtle {
  background-color: var(--light-primary-color) !important;
  color: var(--primary-color) !important;
}

/* Order Status Badges */
.order-status {
  padding: 0.35rem 0.75rem;
  border-radius: 50rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-pending {
  background-color: rgba(217, 180, 74, 0.2);
  color: #d4a900;
}

.status-processing {
  background-color: rgba(74, 124, 89, 0.1);
  color: var(--primary-color);
}

.status-completed {
  background-color: rgba(74, 124, 89, 0.1);
  color: var(--primary-color);
}

.status-cancelled {
  background-color: rgba(168, 62, 81, 0.1);
  color: var(--danger-color);
}

.status-pending {
  background-color: var(--warning-color);
  color: #212529 !important;
}
.status-processing {
  background-color: #0dcaf0;
}
.status-shipped,
.status-shipping {
  background-color: var(--primary-color);
}
.status-delivered,
.status-completed {
  background-color: var(--success-color);
}
.status-cancelled,
.status-failed {
  background-color: var(--danger-color);
}
.status-refunded {
  background-color: #6c757d;
}

/* Quick View Modal */
.quickview-modal .modal-content {
  border-radius: 0.75rem;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

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

.quickview-modal .product-info {
  padding: 1.5rem;
}

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

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

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

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

.quickview-modal .quantity-input {
  width: 60px; /* Adjusted width */
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0.375rem 0.75rem;
  margin: 0 5px; /* Added margin */
}

.quickview-modal .quantity-btn {
  width: 35px; /* Adjusted size */
  height: 35px; /* Adjusted size */
  border: 1px solid #ddd;
  background: #f8f8f8;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem; /* Added font size */
}

.quickview-modal .quantity-btn:hover {
  background: #eee;
}

/* Product Grid & Card Styles */
.product-grid {
  /* gy-4 in HTML handles row gap, gx-4 for column gap if needed */
}

.product-card {
  background-color: #fff;
  border: 1px solid #e9ecef;
  border-radius: 0.75rem; /* Softer corners */
  transition: all 0.3s ease-in-out;
  overflow: hidden; /* Ensures child elements conform to border-radius */
  display: flex;
  flex-direction: column;
  height: 100%; /* For consistent card height if using gy-4 */
}

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

.product-card .product-image-container {
  position: relative;
  overflow: hidden;
  background-color: #f8f9fa; /* Light background for images */
}

.product-card .product-image-container img.card-img-top {
  aspect-ratio: 1 / 1; /* Square aspect ratio for product images */
  object-fit: cover; /* Ensures image covers the area, might crop */
  transition: transform 0.3s ease;
}

.product-card:hover .product-image-container img.card-img-top {
  transform: scale(1.05);
}

.product-card .badge-sale {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--danger-color);
  color: white;
  font-size: 0.75rem;
  padding: 0.25em 0.5em;
}

.product-card .product-actions { /* This is the container for action buttons */
  position: absolute;
  bottom: 10px; /* Adjust as needed */
  left: 50%;
  transform: translateX(-50%) translateY(100%); /* Initially hidden below */
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 50px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 2;
}

.product-card:hover .product-actions {
  opacity: 1;
  transform: translateX(-50%) translateY(0); /* Slide in from bottom */
}


.product-card .card-body {
  padding: 1rem; /* Consistent padding */
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Allows card body to take remaining space */
}

.product-card .product-category {
  font-size: 0.75rem;
  color: #6c757d;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.product-card .card-title {
  font-size: 1rem; /* Slightly larger title */
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark-color);
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Limit to 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.4em; /* Approximate height for 2 lines */
}
.product-card .card-title a {
  color: inherit;
  text-decoration: none;
}
.product-card .card-title a:hover {
  color: var(--primary-color);
}

.product-card .product-rating {
  margin-bottom: 0.5rem;
  font-size: 0.8rem; /* Smaller stars */
  color: #ffc107; /* Yellow stars */
}
.product-card .product-rating .fa-star-half-alt { /* For half stars if used */
    color: #ffc107;
}
.product-card .product-rating .text-muted {
    font-size: 0.75rem;
    margin-left: 0.25rem;
}


.product-card .product-price {
  font-size: 1.1rem; /* Prominent price */
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 0.75rem; /* Space before buttons if they are at bottom of card-body */
  margin-top: auto; /* Pushes price and buttons to bottom if card-body flex-grows */
}

.product-card .product-price .old-price {
  font-size: 0.85rem;
  text-decoration: line-through;
  color: #6c757d;
  margin-left: 0.5rem;
}

.product-card .product-card-actions-bottom { /* For buttons directly in card-body */
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem; /* Space above buttons */
}


/* Responsive Grid Adjustments */
@media (min-width: 576px) { /* sm */
  .product-grid .col-sm-6 { /* 2 products per row on sm */
    flex: 0 0 auto;
    width: 50%;
  }
}

@media (min-width: 768px) { /* md */
  .product-grid .col-md-4 { /* 3 products per row on md */
    flex: 0 0 auto;
    width: 33.33333%;
  }
}

@media (min-width: 992px) { /* lg */
  .product-grid .col-lg-4, .product-grid .col-md-4 { /* Ensure lg also uses 3 per row if not overridden by col-lg-3 */
    flex: 0 0 auto;
    width: 33.33333%; /* 3 products per row */
  }
   .product-grid.products-lg-4 .col-lg-3 { /* If a class .products-lg-4 is added to product-grid */
    flex: 0 0 auto;
    width: 25%; /* 4 products per row */
  }
}

@media (min-width: 1200px) { /* xl */
  .product-grid .col-xl-3, .product-grid .col-lg-3 { /* 4 products per row on xl */
    flex: 0 0 auto;
    width: 25%;
  }
}


/* Filter Sidebar Styles */
.filter-sidebar {
  background-color: #fff;
  /* box-shadow: 0 2px 10px rgba(0,0,0,0.05); */ /* Already has shadow-sm */
}

.filter-group .filter-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--dark-color);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}

.filter-options li {
  margin-bottom: 0.5rem;
}

.filter-options .filter-link {
  text-decoration: none;
  color: #555;
  font-size: 0.9rem;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
}
.filter-options .filter-link:hover,
.filter-options .filter-link.active {
  color: var(--primary-color);
  font-weight: 500;
}
.filter-options .filter-link .fa-star {
    font-size: 0.8em; /* Adjust star size within links */
}
.filter-options .filter-link span {
    margin-left: 0.3rem;
    font-size: 0.85em;
}


/* Pagination Styles */
.pagination .page-item .page-link {
  color: var(--primary-color);
  border-radius: 0.25rem; /* Consistent border-radius */
  margin: 0 2px;
  border: 1px solid #dee2e6;
}

.pagination .page-item.active .page-link {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  z-index: 2;
}

.pagination .page-item.disabled .page-link {
  color: #6c757d;
  background-color: #e9ecef;
  border-color: #dee2e6;
}

.pagination .page-item .page-link:hover {
  background-color: var(--light-primary-color);
  border-color: var(--primary-hover);
  color: var(--primary-hover);
}
.pagination .page-item.active .page-link:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}


/* Quick View Modal Specific Styles */
.quickview-modal .modal-content {
  border-radius: 0.75rem;
  border: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.quickview-modal .modal-header {
  border-bottom: 1px solid #e9ecef;
  padding: 1rem 1.5rem;
}
.quickview-modal .modal-header .modal-title {
    font-weight: 600;
    color: var(--dark-color);
}
.quickview-modal .modal-body {
  padding: 1.5rem;
}
.quickview-modal .product-images img {
  max-height: 400px; /* Limit image height */
  object-fit: contain;
}
.quickview-modal .product-details h3 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}
.quickview-modal .product-rating {
    color: #ffc107;
    font-size: 0.9rem;
}
.quickview-modal .product-price {
    font-size: 1.5rem; /* Larger price in modal */
}
.quickview-modal #quickview-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
}
.quickview-modal .quantity-selector .form-label {
    font-weight: 500;
}

/* Make product cards more compact */
.product-grid .card { /* This rule might be overridden by .product-card, ensure specificity or remove if redundant */
  margin-bottom: 1.5rem;
}

.product-grid .card-body { /* This rule might be overridden by .product-card .card-body */
  padding: 0.75rem; 
}

.product-grid .card-title { /* This rule might be overridden by .product-card .card-title */
  font-size: 0.9rem;
}
