:root{
  --accent-color: #be7878;
  --light-text: #fff;
  --shadow: 0 10px 20px rgba(100, 100, 100, 0.1);
  --transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

:where(.product-card-wrapper) * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--body-font-family);
}

.p-card-body {
  /* background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); */
  background : var(--section-gb-color);
  padding: 40px 20px;
  min-height: 80vh;
}

.products-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
}

.product-card {
  background-color: var(--section-gb-color);
  border-radius: var(--border-radius-medium);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  height: 420px;
  border: 1px solid rgba(0,0,0,0.05);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.product-image-container {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.product-image {
  border-radius: 8px;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: var(--transition);
  filter: drop-shadow(0 5px 10px rgba(0,0,0,0.1));
}

.product-content {
  padding: 0 20px 20px;
  position: relative;
}

.product-name {
  font-size: var(--h5-font-size);
  margin-bottom: 12px;
  color: var(--p-color);
  text-align: center;
  font-weight: var(--font-weight-bold);
}


.product-price {
  font-size: 20px;
  font-weight: bold;
  color: var(--accent-color);
  text-align: center;
  margin-bottom: 20px;
  direction: ltr;
}

.seller {
 font-size: 17px;
  font-weight: bold;
  color: var(--p-color);
  text-align: center;
  margin-bottom: 15px;
  direction: ltr;
}

.order-btn {
  display: block;
  width: 100%;
  padding: 12px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  color: var(--light-text);
  border: none;
  border-radius: var(--border-radius-small);
  cursor: pointer;
  font-size: var(--btn-font-size);
  font-weight: var(--font-weight-semibold);
  transition: var(--transition);
  box-shadow: 0 4px 15px  rgb(73, 73, 73);
}

.order-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgb(73, 73, 73);
  background: var(--primary-color);
}


.details-btn {
  background-color: var(--secondary-color) !important;
  position: absolute;
  top: -18px;
  right: -23px;
  /* background: var(--section-bg-color); */
  color: var(--white-color);
  border: 1px solid var(--secondary-color);
  padding: 30px 32px 18px 22px;
  border-radius: var(--border-radius-large);
  font-size: 18px;
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  z-index: 8;
  transition: var(--transition);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.details-btn:hover {
  background: var(--primary-color);
  color: var(--primary-color);
}

.ribbon-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 120px;
  height: 120px;
  overflow: hidden;
  z-index: 8;
}
.ribbon-container.active{
  display: none;
}

.ribbon {
  position: absolute;
  display: block;
  width: 135px;
  padding: 7px 0;
  font-size: 11px;
  font-weight: var(--font-weight-bold);
  color: white;
  text-align: center;
  transform: rotate(-45deg);
  left: -40px;
  top: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.ribbon.free-shipping {
  padding: 10px 0;
  background-color: var(--secondary-color);
  top: 13px;
}

.ribbon.verified {
  background-color: var(--primary-color);
  top: 38px;
  left: -39px;
  width: 174px;
}

.details-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background-color: var(--section-gb-color);
  padding: 25px;
  overflow-y: auto;
  overflow-x: hidden;
  word-break: break-word;
  transform: translateX(100%);
  transition: var(--transition);
  z-index: 5;
  border-radius: var(--border-radius-medium);
}

.details-content.active {
  transform: translateX(0);
}

.details-content h3 {
  margin-bottom: 20px;
  color: var(--primary-color);
  text-align: center;
  font-size: var(--h4-font-size);
  padding-bottom: 10px;
  border-bottom: 1px dashed #eee;
}

.details-list {
  list-style-type: none;
}

.details-list li {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #eee;
  color: var(--p-color);
  display: flex;
  align-items: center;
}

.details-list li::before {
  content: '•';
  color: var(--secondary-color);
  font-size: 20px;
  margin-left: 8px;
}

.hide-on-details {
  transition: var(--transition);
}

.details-content.active ~ .hide-on-details {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-20px);
}

.details-content.active ~ .ribbon-container,
.details-content.active ~ .details-btn {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 1200px) {
  .products-container {
      grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .products-container {
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

@media (max-width: 480px) {
  .products-container {
      grid-template-columns: 1fr;
  }
  
  .product-card {
      height: 400px;
  }
}