/* Reset and base */
* {
  box-sizing: border-box;
}

.carousel-item {
  height: 550px;
  background-size: cover;
  background-position: center;
  position: relative;
  color: white;
}

.carousel-caption {
  position: relative;
  z-index: 2;
  max-width: 50%;
  text-align: left;
  left: 5%;
  top: 50%;
  transform: translateY(-50%);
}

/* Main container */
.main-container {
  display: flex;
  padding: 5%;
  gap: 2.5rem;
  background-color: #fafafa;
}

/* Sidebar filters */
.sidebar {
  flex: 1 1 250px;
  background-color: #fafafa;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid #ddd;
}

/* Improved filter labels for principles and categories */
.brand-filter,
.category-filter {
  display: inline-block;
  margin: 0 8px 8px 0;
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.3s ease, border-color 0.3s ease;
  user-select: none;
  font-size: 0.9rem;
  color: #333;
  background-color: #fff;
}

.brand-filter:hover,
.category-filter:hover,
.brand-filter.active-filter,
.category-filter.active-filter {
  color: #ff6600;
  border-color: #ff6600;
  text-decoration: underline;
  background-color: #fff7f0;
}

#searchInput {
  padding: 0.5rem;
  border: 2px solid #ff6600;
  border-radius: 50px;
  width: 100%;
}

.sidebar h3 {
  border-bottom: 2px solid #ff6600;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  color: #ff6600;
}

.filter-group {
  margin-bottom: 1.5rem;
}

.filter-group label {
  display: block;
  margin-bottom: 0.5rem;
  cursor: pointer;
  color: #555;
}

.filter-group input[type="checkbox"] {
  margin-right: 0.5rem;
}

.filter-group input[type="range"] {
  width: 100%;
}

.filter-button {
  background: linear-gradient(90deg, #ff6600, #ff944d);
  border: none;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
  width: 100%;
}

/* Product grid */
.product-grid {
  flex: 3 1 700px;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.product-card {
  background-color: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  border: none;
  max-height: 560px;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  background: linear-gradient(135deg, #ffffff 0%, #fff7f0 100%);
  flex: 1 1 280px;
  max-width: 280px;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.15));
}

.product-image {
  width: 100%;
  height: 250px;
  object-fit: contain;
  background-color: #fff;
  border-bottom: 1px solid #eee;
  border-radius: 15px 15px 0 0;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image {
  transform: scale(1.1) rotate(1deg);
}

.product-info {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 0.75rem 0;
  color: #ff6600;
  transition: color 0.3s ease;
  text-shadow: 1px 1px 2px rgba(255, 102, 0, 0.5);
}

.product-title:hover {
  color: #e65c00;
}

.product-category {
  font-size: 1.1rem;
  color: #555;
  font-weight: 600;
}

.product-features {
  display: flex;
  justify-content: space-between;
  font-size: 1rem;
  color: #ff6600;

}

.product-actions {
  margin-top: auto;
  display: flex;
  gap: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  border-radius: 0.375rem;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.btn-primary {
  color: #fff;
  background-color: #ff6600;
  border: 1px solid #ff6600;
}

.btn-primary:hover {
  background-color: #e65c00;
  border-color: #e65c00;
}

.btn-secondary {
  color: #fff;
  background-color: #6c757d;
  border: 1px solid #6c757d;
  margin-left: 0.5rem;
}

.btn-secondary:hover {
  background-color: #5a6268;
  border-color: #545b62;
}

.btn-outline-primary {
  color: #ff6600;
  background-color: transparent;
  border: 1px solid #ff6600;
}

.btn-outline-primary:hover {
  background-color: #ff6600;
  color: #fff;
}

.btn-outline-secondary {
  color: #6c757d;
  background-color: transparent;
  border: 1px solid #6c757d;
  margin-left: 0.5rem;
}

.btn-outline-secondary:hover {
  background-color: #6c757d;
  color: #fff;
}

.btn-details {
  color: #fff;
  background: linear-gradient(90deg, #ff6600, #ff944d);
  border: 1px solid #e5620b;
}

.btn-details:hover {
  color: #0a0000;
  background: #ffa200 !important;
}

/* Sale badge */
.sale-badge {
  background-color: #ff6600;
  color: #fff;
  padding: 0.2rem 0.8rem;
  border-radius: 10px;
  position: absolute;
  top: 10px;
  left: 10px;
  font-weight: bold;
  z-index: 1000;
}



/* Pagination styles */
.pagination-container {
  text-align: center;
  margin-top: 20px;
}

.pagination-container button {
  margin: 0 5px;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  border-radius: 0.375rem;
  border: 1px solid #ff6600;
  background-color: white;
  color: #ff6600;
  cursor: pointer;
}

.pagination-container button.active,
.pagination-container button:hover {
  background-color: #ff6600;
  color: white;
}

.pagination-container button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@keyframes flyInRight {
  0% {
    opacity: 0;
    transform: translateX(100%);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes flyInLeft {
  0% {
    opacity: 0;
    transform: translateX(-100%);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.product-fly-in-left {
  animation: flyInLeft 1s ease forwards;
}

.image-column {
  background-color: white;
  padding: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  height: 100%;
  flex: 1;
}

.image-column img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  position: sticky;
  top: 0;
  left: 0;
  align-self: flex-start;
  height: 100%;
}

.text-column {
  background-color: #f66206ce;
  color: white;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  height: 100%;
  animation: floatFromCorner 4s ease-in-out infinite;
}

@keyframes floatFromCorner {

  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(15px, -15px);
  }
}

.image-column {
  /* Remove animation from container */
  animation: none;
}

.image-column img {
  animation: floatFromTextCornerRotate 2s ease forwards;
  transform-origin: top right;
}

@keyframes floatFromTextCornerRotate {
  0% {
    opacity: 0;
    transform: translate(50px, -50px) rotate(-45deg);
  }

  100% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg);
  }
}