
/* ==========================================================================
   1. BASE & CAROUSEL LAYOUT
   ========================================================================== */
.products {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

.carousel {
  position: relative;
  width: 100%;
}

.carousel-loading-skeleton {
    width: 100%;
    height: 550px; 
    background: #f4f4f4; 
    border-radius: 12px;
}

.track {
  display: flex;
  gap: 32px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 20px 0 10px 0; 
  cursor: grab;
}

.track::-webkit-scrollbar { display: none; }

.track.dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  scroll-snap-type: none;
}

/* User Selection Prevention */
.carousel .track,
.carousel .track .card,
.carousel .track .card * {
  user-select: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  -webkit-user-drag: none !important;
}

/* ==========================================================================
   2. CARD DESIGN
   ========================================================================== */
.card {
  position: relative;
  flex: 0 0 calc(90vw - 32px);
  min-height: 0;
  padding: 36px;
  padding-bottom: 100px; 
  border-radius: 12px;
  background: #f4f4f4;
  scroll-snap-align: start;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  flex-shrink: 0;
}

.card:hover { cursor: none; }

.card .img-container {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 55vw; 
  margin-top: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  overflow: hidden;
  position: relative; 
  flex-shrink: 0;  
}

.card .main-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  z-index: 2;
  transition: all .7s cubic-bezier(.76, 0, .24, 1);
  display: block;
}

.card .hover-img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0;
  transition: all .7s cubic-bezier(.76, 0, .24, 1);
  pointer-events: none;
}

.card:hover .hover-img { opacity: 1; }
.card:hover .main-img { opacity: 0; }
.card:hover .swipe-cursor { opacity: 1; }

/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */
.card h2 {
  position: absolute;
  top: 20px; left: 36px;
  margin: 0;
  font-family: "Rektorat Heavy", sans-serif;
  font-size: clamp(36px, 8vw, 76px);
  letter-spacing: -3px;
  font-weight: 900;
  color: #afafaf;
  z-index: 3;
  text-transform: lowercase;
  pointer-events: none;
  max-width: calc(100% - 120px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card .tag {
  position: absolute;
  top: 48px; right: 36px;
  min-width: 54px; height: 24px;
  padding: 0 12px; border-radius: 30px;
  display: flex; align-items: center; justify-content: center;
  background-color: #67645e; color: #ffffff;
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  z-index: 3; text-transform: uppercase;
}

.card .card-bottom {
  position: absolute;
  left: 36px; right: 36px; bottom: 40px;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px;
  z-index: 3; pointer-events: none;
  
  /* ✨ JADU YAHAN HAI: Smooth transition add ki hai */
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* ✨ JADU YAHAN HAI: Hover karne par bottom text gayab hoga */
.card:hover .card-bottom {
    opacity: 0;
    visibility: hidden;
}
.card .product-info h3 {
  margin: 0; font-size: 15px; font-weight: 800;
  letter-spacing: 0.5px; line-height: 1.2;
}

.card .product-info p {
  margin: 4px 0 0; font-size: 14px; font-weight: 700; color: #67645e; line-height: 1.3;
}

/* Link Resets */
.card a, .card a:visited { color: inherit; text-decoration: none; }
.card a:active, .card a:focus {
    color: inherit; outline: none; background: none;
    -webkit-tap-highlight-color: transparent; 
}

.arrow {
  position: absolute;
  top: 50%; z-index: 100;
  width: 56px; height: 56px;
  border: 0; display: none; align-items: center; justify-content: center;
  color: #67645e; font-size: 40px; line-height: 1; cursor: pointer;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(6px); border-radius: 50%;
}
.arrow.show { display: flex; }
.arrow-left { left: 30px; }
.arrow-right { right: 30px; }

/* ==========================================================================
   5. RESPONSIVE BREAKPOINTS (For Carousel)
   ========================================================================== */
@media (max-width: 768px) {
    .carousel-loading-skeleton { height: 400px; }
}
@media (max-width: 374px) {
  .card { flex: 0 0 85vw; padding: 24px; padding-bottom: 90px; }
  .card .img-container { margin-top: 30px; max-height: 60vw; }
  .card h2 { top: 20px; left: 24px; letter-spacing: -2px; }
  .card .tag { top: 36px; right: 24px; }
  .card .card-bottom { left: 24px; right: 24px; bottom: 28px; }
}
@media (min-width: 375px) and (max-width: 575px) {
  .card { flex: 0 0 88vw; } .card .img-container { max-height: 55vw; }
}
@media (min-width: 576px) and (max-width: 767px) {
  .card { flex: 0 0 75vw; } .card .img-container { max-height: 45vw; }
}
@media (min-width: 768px) {
  .card { flex: 0 0 calc(50% - 16px); }
  .card .img-container { max-height: none; }
  .card h2 { font-size: clamp(48px, 5vw, 76px); letter-spacing: -4px; }
}
@media (min-width: 1024px) {
  .card { flex: 0 0 calc(33.333% - 22px); }
  .card h2 { font-size: 76px; letter-spacing: -6px; }
}
@media (min-width: 1440px) {
  .card { flex: 0 0 calc(33.333% - 22px); max-width: 460px; }
}

/* ==========================================================================
   6. GRID LAYOUT (Bina Carousel Ke Cards Dikhane Ke Liye)
   ========================================================================== */
#favvl-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    max-width: 1440px;
    margin: 100px auto;
    padding: 20px 0;
}

#favvl-grid-container .card {
    flex: unset; 
    width: 100%;
    max-width: 100%; 
}

/* Optional: Swipe text ki jagah 'view' dikhana grid layout mein */
#favvl-grid-container .card .swipe-cursor {
    font-size: 0; 
}
#favvl-grid-container .card .swipe-cursor::after {
    content: "view";
    font-size: 13px;
}


/* ==============================================
   RESPONSIVE
   ============================================== */

/* ---- Small phones (up to 374px) ---- */
@media (max-width: 374px) {
  #favvl-grid-container {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px 0;
  }

  #favvl-grid-container .card {
    padding: 24px;
    padding-bottom: 90px;
  }

  #favvl-grid-container .card .img-container {
    margin-top: 30px;
    max-height: 60vw;
  }

  #favvl-grid-container .card h2 {
    top: 50px;
    left: 24px;
    font-size: clamp(36px, 8vw, 76px);
    letter-spacing: -2px;
  }

  #favvl-grid-container .card .tag {
    top: 36px;
    right: 24px;
  }

  #favvl-grid-container .card .card-bottom {
    left: 24px;
    right: 24px;
    bottom: 28px;
  }
}

/* ---- Regular phones (375px – 575px) ---- */
@media (min-width: 375px) and (max-width: 575px) {
  #favvl-grid-container {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 20px 0;
  }

  #favvl-grid-container .card .img-container {
    max-height: 55vw;
  }

  #favvl-grid-container .card h2 {
    font-size: clamp(36px, 8vw, 76px);
    letter-spacing: -3px;
  }
}

/* ---- Large phones / Small tablets (576px – 767px) ---- */
@media (min-width: 576px) and (max-width: 767px) {
  #favvl-grid-container {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 20px 0;
  }

  #favvl-grid-container .card .img-container {
    max-height: 45vw;
  }

  #favvl-grid-container .card h2 {
    font-size: clamp(36px, 8vw, 76px);
    letter-spacing: -3px;
  }
}

/* ---- Tablets (768px – 1023px) — 2 cards ---- */
@media (min-width: 768px) and (max-width: 1023px) {
  #favvl-grid-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    padding: 20px 0;
  }

  #favvl-grid-container .card .img-container {
    max-height: none;
  }

  #favvl-grid-container .card h2 {
    font-size: clamp(48px, 5vw, 76px);
    letter-spacing: -4px;
  }
}

/* ---- Small desktops (1024px+) — 3 cards ---- */
@media (min-width: 1024px) {
  #favvl-grid-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    padding: 20px 0;
  }

  #favvl-grid-container .card h2 {
    font-size: 76px;
    letter-spacing: -6px;
  }
}

/* ---- Large desktops (1440px+) ---- */
@media (min-width: 1440px) {
  #favvl-grid-container {
    padding: 20px 0;
  }
}


/* ==========================================================================
   GLOBAL SWIPE/VIEW CURSOR (Azaad Smooth Cursor)
   ========================================================================== */
#global-swipe-cursor {
    position: fixed; /* Poori screen par fixed */
    pointer-events: none; /* Taaki iske aar-paar click ho sake */
    z-index: 99999; /* Sabse upar rahega */
    
    /* UI Design */
    width: 100px; 
    height: 100px;
    margin-top: -50px; /* Exact center alignment */
    margin-left: -50px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50%;
    
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 13px; 
    font-weight: 800; 
    color: #000;
    text-transform: lowercase;
    
    /* ✨ MAGIC: Smooth Hover Animation */
    opacity: 0;
    transform: scale(0.4); /* Shuru mein chota rahega */
    transition: opacity 0.3s cubic-bezier(.76, 0, .24, 1), transform 0.3s cubic-bezier(.76, 0, .24, 1);
    will-change: transform, opacity;
}

/* Jab mouse card ke upar aayega (JS lagayega) */
#global-swipe-cursor.active {
    opacity: 1;
    transform: scale(1); /* Smoothly full size ka ho jayega */
}