.products-section {
  padding: 4rem 2rem;
  background: #f9f9f9;
  
}

.products-section h2 {
  font-size: 2.5rem;
  letter-spacing: 0.08em;
  margin-bottom: 2rem;
  text-align: center;
}

/* === Grid Layout === */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2rem;
}

/* === Flip Card Setup === */
.flip-container {
  perspective: 1000px;
  width: 100%;
  aspect-ratio: 3 / 5.2;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.flip-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.8s ease;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* === Front and Back Shared Styles === */
.flip-front,
.flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
  border-radius: 50% 50% 50% 50% / 10% 10% 20% 20%;
  background: #fff;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 0;
  box-sizing: border-box;
}

/* === Front Side === */
.flip-front {
  transform: rotateY(0deg);
  z-index: 2;
}

.flip-front img {
  height: 220px;
  width: 100%;
  object-fit: cover;
}

/* === Back Side === */
.flip-back {
  transform: rotateY(180deg);
  z-index: 1;
  justify-content: center;
  padding: 2rem 1rem;
  text-align: center;
}

/* === Product Info === */
.product-details {
  padding: 0rem;
  text-align: center;
}

.product-details h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  margin-top: 0;
}

.product-details p {
  font-size: 0.95rem;
padding: 0 2%;
  line-height: 1.5;
}

.product-details a {
  display: inline-block;
  margin-top: 0.3rem;
  text-decoration: none;
  color: #333;
  font-size: 0.9rem;
}

/* === Button Animation === */
.animated-buy-button {
  display: inline-block;
  position: relative;
  margin-top: 0.3rem;
  font-size: 0.9rem;
  text-decoration: none;
  color: #c09f67;
  animation: textPulse 2.5s ease-in-out infinite;
}

@keyframes textPulse {
  0%, 100% {
    opacity: 1;
    transform: translateY(0);
  }
  50% {
    opacity: 0.5;
    transform: translateY(-2px);
  }
}

/* Show More Button */
.show-more-button {
  display: none;
}
/* === Product Type Badge === */
.product-type {
  position: absolute;
  top: 5%;
  left: 5%;
  padding: .2em;
  font-size: 0.8rem;
  font-weight: bold;
  color: #fff;
  background-color: rgba(192, 159, 103, 0.9);
  border-radius: 10px;
  z-index: 10;
}
.product-price{
  margin: 0;
  padding: 0;
}
.product-type.cs{
  background-color: rgb(252, 171, 218);
}
.product-type.ch{
  background-color: rgb(144, 197, 250);
}
.product-type.mix{
  background-color: rgb(207, 156, 252);
}
/* ==========================
   GENERAL STYLING
========================== */
.sizeSelect {
  font-family: inherit;
  font-size: 14px;
  color: #333;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  appearance: none;
  cursor: pointer;
  padding: 2px 24px 2px 8px;
  line-height: 1.5;
  background-image:
    linear-gradient(45deg, transparent 50%, #555 50%), 
    linear-gradient(-45deg, transparent 50%, #555 50%);
  background-position:
    calc(100% - 14px) calc(50% - 3px), 
    calc(100% - 8px) calc(50% - 3px);
  background-size: 6px 6px;
  background-repeat: no-repeat;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.sizeSelect:focus {
  outline: none;
  border-color: #888;
  box-shadow: 0 0 2px rgba(0,0,0,0.25);
}

.sizeSelect option {
  padding: 2px 4px;
}

/* ==========================
   RESPONSIVE ADJUSTMENTS
========================== */
@media screen and (max-width: 600px) {
  .sizeSelect {
    font-size: 12px;
    padding: 2px 18px 2px 6px;
    background-position:
      calc(100% - 12px) calc(50% - 3px),
      calc(100% - 6px) calc(50% - 3px);
    background-size: 5px 5px;
  }
}
/* ==================================================
   #tips-slider Styles with Slant Clip Paths
================================================== */
#tips-slider {
  position: relative;
  text-align: center;
  font-family: 'Zen Old Mincho', serif;
  color: #fff;

  /* Main background */
  background-image: url('images/_DSC2915-min.jpg');
  background-size: cover;
  background-position: center;

  /* Fallback for gaps */
  background-color: #fff;

  /* ==================================================
     Final Clip Paths:
       Left slices: 0–5%, 7–12%, 14–19%
       Center area: 20–80%
       Right slices: 81–86%, 88–93%, 95–100%
  ================================================== */
  -webkit-mask-image:
    linear-gradient(#000 0 0),
    linear-gradient(#000 0 0),
    linear-gradient(#000 0 0),
    linear-gradient(#000 0 0),
    linear-gradient(#000 0 0),
    linear-gradient(#000 0 0),
    linear-gradient(#000 0 0);
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size:
    3.5% 100%,    /* Left Slice 1 */
    6% 100%,    /* Left Slice 2 */
    9% 100%,    /* Left Slice 3 */
    61.5% 100%,   /* Center */
    9% 100%,    /* Right Slice 1 */
    6% 100%,    /* Right Slice 2 */
    3.5% 100%;    /* Right Slice 3 */
  -webkit-mask-position:
   0% top,     /* Left Slice 1 */
    4% top,     /* Left Slice 2 */
    11% top,    /* Left Slice 3 */
    50% top,    /* Center Area */
    89% top,    /* Right Slice 1 */
    96% top,    /* Right Slice 2 */
    100% top;    /* Right Slice 3 */

  mask-image:
    linear-gradient(#000 0 0),
    linear-gradient(#000 0 0),
    linear-gradient(#000 0 0),
    linear-gradient(#000 0 0),
    linear-gradient(#000 0 0),
    linear-gradient(#000 0 0),
    linear-gradient(#000 0 0);
  mask-repeat: no-repeat;
  mask-size:
    3.5% 100%,    /* Left Slice 1 */
    6% 100%,    /* Left Slice 2 */
    9% 100%,    /* Left Slice 3 */
    61.5% 100%,   /* Center */
    9% 100%,    /* Right Slice 1 */
    6% 100%,    /* Right Slice 2 */
    3.5% 100%;    /* Right Slice 3 */
  mask-position:
   0% top,     /* Left Slice 1 */
    4% top,     /* Left Slice 2 */
    11% top,    /* Left Slice 3 */
    50% top,    /* Center Area */
    89% top,    /* Right Slice 1 */
    96% top,    /* Right Slice 2 */
    100% top;    /* Right Slice 3 */

  padding: 3rem 1rem;
}

#tips-slider::before {
  /* Semi-transparent overlay for text readability */
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.381);
  z-index: 1;
}

#tips-slider h2,
#tips-slider .tips-container,
#tips-slider .tips-buttons {
  position: relative;
  z-index: 2;
}

#tips-slider h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.tips-container {
  position: relative;
  overflow: hidden;
  max-width: 600px;
  margin: 0 auto;
}
.tips-container {
  max-width: 600px;
  margin: 0 auto;
  height: 160px; /* Adjust to fit tallest content */
  position: relative;
  overflow: hidden;
}

.tip-slide {
  min-width: 100%;
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 1rem;
  line-height: 1.6;
  transition: opacity 0.5s ease-in-out;
  text-align: center;
  padding: 0 1rem;
  box-sizing: border-box;
}


.tip-slide.active {
  position: relative;
  opacity: 1;
}

/* Buttons as navigation */
.tips-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0;
 
}
.tips-buttons button {
  font-size: 1rem;
  padding: 0.25rem 1rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  color: #383838;

  background: #f1d39aa3;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.tips-buttons button:hover {
  background: #e3b36b;
  transform: translateY(-2px);
  box-shadow: 0px 0px 15px rgba(243, 194, 127, 0.5);
}
.tips-buttons button.active {
  background: #dba44a;
}
#tips-slider:hover {
  filter: brightness(1.1) saturate(1.2);
 
}
/* === Step 1: Basic slide-in drawer === */
.purchase-drawer { position: fixed; inset: 0; z-index: 9999; pointer-events: none; }
.purchase-drawer .drawer-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,.35);
  opacity: 0; transition: opacity .25s ease;
}
.purchase-drawer .drawer-panel {
  position: absolute; top: 0; right: 0; height: 100%;
  width: 50vw; max-width: 560px; background: #fff;
  transform: translateX(100%); transition: transform .35s ease;
  box-shadow: -8px 0 24px rgba(0,0,0,.18);
}
.purchase-drawer.open { pointer-events: auto; }
.purchase-drawer.open .drawer-overlay { opacity: 1; }
.purchase-drawer.open .drawer-panel { transform: translateX(0); }

.drawer-close {
  position: absolute; top: 10px; right: 12px;
  width: 40px; height: 40px; border: 0; border-radius: 999px;
  font-size: 28px; line-height: 1; cursor: pointer; background: #f3f3f3; color: #333;
}
.drawer-close:hover { background: #e9e9e9; }

@media (max-width: 768px) {
  .purchase-drawer .drawer-panel { width: 85vw; max-width: none; }
}
.drawer-content {
  padding: 1rem 1.25rem;
  display: grid;
  gap: 1rem;
}

.drawer-brand {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .75rem;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  background: #fafafa;
}

.drawer-brand img {
  width: 120px;
  max-width: 40%;
  height: auto;
  object-fit: contain;
}

.drawer-links {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding-top: .25rem;
}

.drawer-links a {
  display: inline-block;
  padding: .5rem .75rem;
  border-radius: 8px;
  background: #f7f7f7;
  text-decoration: none;
  color: #333;
  transition: transform .2s ease, box-shadow .2s ease;
}

.drawer-links a:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

@media (max-width: 768px) {
  .drawer-brand img { width: 96px; }
}
