/* ===========================
   CSS Custom Property Utilities
   =========================== */
* {
  max-width: 100dvw;
}

.text-pink-50 {
  color: var(--color-pink-50) !important;
}

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

.text-pink-100 {
  color: var(--color-pink-100) !important;
}

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

.text-pink-200 {
  color: var(--color-pink-200) !important;
}

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

.text-pink-500 {
  color: var(--color-pink-500) !important;
}

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

.text-pink-600 {
  color: var(--color-pink-600) !important;
}

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

.text-black-300 {
  color: var(--color-black-300) !important;
}

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

.text-black-400 {
  color: var(--color-black-400) !important;
}

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

.text-black-500 {
  color: var(--color-black-500) !important;
}

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

.text-black-900 {
  color: var(--color-black-900) !important;
}

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

.text-white-900 {
  color: var(--color-white-900) !important;
}

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

/* ===========================
   Icon Sizes
   =========================== */

.icon-xs {
  font-size: 0.75rem;
}

.icon-sm {
  font-size: 1rem;
}

.icon-md {
  font-size: 1.5rem;
}

.icon-lg {
  font-size: 2rem;
}

/* ===========================
   Shadow Utilities
   =========================== */

.shadow-light {
  box-shadow: 0 2px 12px var(--color-black-50);
}

.shadow-dark {
  box-shadow: 0 2px 4px var(--color-black-500);
}

/* ===========================
   Focus Utilities
   =========================== */

.no-focus:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* ===========================
   Font Weight Utilities
   =========================== */

.fw-500 {
  font-weight: 500 !important;
}

.fw-600 {
  font-weight: 600 !important;
}

.fw-700 {
  font-weight: 700 !important;
}

/* ===========================
   Border Utilities
   =========================== */

.border-pink-500 {
  border-color: var(--color-pink-500) !important;
}

.border-primary-custom {
  border-color: var(--color-pink-500) !important;
}

/* ===========================
   Base Styles
   =========================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  font-size: 14px;
  color: var(--color-black-800);
  background-color: #f8f9fa;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===========================
   Typography
   =========================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--color-pink-500);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-pink-700);
}

/* ===========================
   Navbar
   =========================== */

.navbar {
  padding: 1rem 0;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--color-pink-500) !important;
}

.nav-link {
  color: var(--color-black-800) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: var(--color-pink-500) !important;
}

.nav-link.active {
  color: var(--color-pink-500) !important;
}

/* ===========================
   Buttons
   =========================== */

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background-color: var(--color-pink-500);
  color: var(--color-white-900);
}

.btn-primary:hover {
  background-color: var(--color-pink-600);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--color-black-400);
}

.btn-outline-primary {
  border: 2px solid var(--color-pink-500);
  color: var(--color-pink-500);
  background-color: transparent;
}

.btn-outline-primary:hover {
  background-color: var(--color-pink-500);
  color: var(--color-white-900);
}

/* ===========================
   Cards (General)
   =========================== */

.card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 15px var(--color-black-50);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px var(--color-black-400);
}

.card-header {
  background-color: var(--color-white-700);
  border-bottom: 1px solid var(--color-white-600);
  font-weight: 600;
}

/* ===========================
   Forms
   =========================== */

.form-control,
.form-select {
  border: 1px solid var(--color-white-500);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--color-pink-500);
  box-shadow: 0 0 0 0.2rem var(--color-pink-100);
}

.form-label {
  font-weight: 500;
  color: var(--color-black-800);
  margin-bottom: 0.5rem;
}

/* ===========================
   Sections
   =========================== */



.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 1rem;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background-color: var(--color-pink-500);
  border-radius: 2px;
}

/* ===========================
   Custom Utilities
   =========================== */

.bg-light-custom {
  background-color: var(--color-white-800);
}

.text-primary-custom {
  color: var(--color-pink-500);
}

/* ===========================
   Animations
   =========================== */

.fade-in {
  animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===========================
   Scrollbar
   =========================== */

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-white-700);
}

::-webkit-scrollbar-thumb {
  background: var(--color-pink-500);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-pink-600);
}

/* ===========================
   Responsive Masonry Layout
   =========================== */

.masonry-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 12px;
}

.banner-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  min-height: 220px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s ease;
  box-shadow: 0 4px 10px var(--color-black-400);
}

.banner-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px var(--color-black-500);
}

.banner-image-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
}

.banner-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

/* ===========================
   Collection Section
   =========================== */

.collection-section {
  margin-bottom: 3rem;
}

.collection-section:last-child {
  margin-bottom: 0;
}

.collection-header {
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--color-pink-200);
}

.collection-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-black-900);
  letter-spacing: -0.5px;
}

.collection-view-all {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-pink-500);
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

.collection-view-all:hover {
  background-color: var(--color-pink-50);
  color: var(--color-pink-600);
}

.collection-view-all i {
  transition: transform 0.3s ease;
}

.collection-view-all:hover i {
  transform: translateX(4px);
}

.collection-view-all:focus {
  outline: 2px solid var(--color-pink-500);
  outline-offset: 4px;
}

/* ===========================
   Product Cards - Shared Styles (card-1 & card-2)
   =========================== */

.card-1,
.card-2 {
  border: 1px solid var(--color-white-600);
  border-radius: 16px;
  transition: all 0.3s ease;
  background-color: var(--color-white-900);
  overflow: hidden;
}

.card-1:hover,
.card-2:hover {
  border-color: var(--color-pink-200);
  box-shadow: 0 8px 30px var(--color-black-400) !important;
  transform: translateY(-5px);
}

/* Badges */
.badges-container {
  z-index: 2;
}

.card-1 .badge,
.card-2 .badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  letter-spacing: 0.5px;
  background: var(--color-pink-500);
  color: var(--color-white-900);
}

/* Wishlist Button */
.wishlist-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  transition: all 0.3s ease;
  border: 1px solid var(--color-white-600);
  background-color: var(--color-white-900);
  z-index: 2;
}

.wishlist-btn:hover {
  background-color: var(--color-pink-50) !important;
  border-color: var(--color-pink-500);
  transform: scale(1.1);
}

.wishlist-btn:hover i {
  color: var(--color-pink-600) !important;
}

.wishlist-btn.active i {
  color: var(--color-pink-500) !important;
}

.wishlist-btn:focus {
  outline: 2px solid var(--color-pink-500);
  outline-offset: 2px;
}

/* Card Content - Default (Mobile First) */
.card-content {
  min-height: 300px;
  display: flex;
  flex-direction: column;
}

/* Product Image Container */
.product-image-container,
.card-2 .product-image-container {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-white-800);
  border-radius: 12px;
  padding: 1.5rem;
  overflow: hidden;
  min-height: 250px;
  max-height: 250px;
  height: 250px;
  position: relative;
}

.card-2 .product-image-container {
  background-color: var(--color-pink-50);
}

.product-img-hover,
.card-2 .product-img-hover {
  transition: transform 0.4s ease;
  border-radius: 8px;
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.card-1:hover .product-img-hover,
.card-2:hover .product-img-hover {
  transform: scale(1.05);
}

/* Card Body */
.card-1 .card-body,
.card-2 .card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.product-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  margin-top: 20px;
}

/* Product Info */
.product-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-black-900);
  margin-bottom: 0.5rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.8rem;
  transition: color 0.25s ease, transform 0.25s ease;
}

.product-name:hover {
  color: var(--color-pink-500);
  transform: scale(1.03);
}

.product-desc {
  font-size: 0.875rem;
  color: var(--color-black-600);
  line-height: 1.5;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.6rem;
}

/* Rating */
.rating-icon {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.rating-icon i {
  font-size: 0.875rem;
}

/* Price */
.product-price {
  line-height: 1.2;
  margin-top: auto;
}

.price-current {
  font-size: 1.25rem;
  color: var(--color-pink-500);
}

.price-original {
  font-size: 0.875rem;
  color: var(--color-black-600) !important;
}

/* Add to Cart */
.add-to-cart {
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

.add-to-cart:focus {
  outline: 2px solid var(--color-pink-500);
  outline-offset: 2px;
}

.cart-button-size {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  transition: all 0.3s ease;
}

.add-to-cart:hover .cart-button-size {
  background-color: var(--color-pink-600) !important;
  transform: scale(1.05);
}

.add-to-cart-text {
  font-size: 0.9rem;
  color: var(--color-black-800);
  transition: color 0.3s ease;
  white-space: nowrap;
}

.add-to-cart:hover .add-to-cart-text {
  color: var(--color-pink-500);
}

/* Empty Collection State */
.empty-collection {
  padding: 3rem 1rem;
  background-color: var(--color-white-800);
  border-radius: 16px;
}

.empty-collection i {
  color: var(--color-black-300);
}

/* Loading State */
.card-1.loading,
.card-2.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Out of Stock State */
.card-1.out-of-stock,
.card-2.out-of-stock {
  opacity: 0.7;
}

.card-1.out-of-stock::after,
.card-2.out-of-stock::after {
  content: 'Out of Stock';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--color-black-900);
  color: var(--color-white-900);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  z-index: 10;
}

/* ===========================
   Responsive Design - Desktop (>= 1200px)
   IMAGE ON RIGHT, DETAILS ON LEFT
   =========================== */

@media (min-width: 1200px) {
  .card-content {
    flex-direction: row;
    min-height: 320px;
    align-items: stretch;
  }

  /* Details on LEFT - 60% width */
  .card-1 .card-body,
  .card-2 .card-body {
    flex: 0 0 60%;
    width: 60%;
    order: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }


  /* Image on RIGHT - 40% width */
  .product-image-container,
  .card-2 .product-image-container {
    flex: 0 0 40%;
    width: 40%;
    order: 2;
    min-height: 100%;
    max-height: 100%;
    height: 100%;
    padding: 1.5rem;
    margin: 0;
    border-radius: 0 16px 16px 0;
  }

  .product-img-hover,
  .card-2 .product-img-hover {
    width: 100%;
    height: 100%;
  }
}

/* ===========================
   Responsive Design - Tablet (768px - 1199px)
   IMAGE ON TOP, DETAILS ON BOTTOM
   =========================== */

@media (min-width: 992px) and (max-width: 1199px) {
  .card-content {
    flex-direction: row;
    min-height: 280px;
    align-items: stretch;
  }

  /* Image on Right - 40% width */
  .product-image-container,
  .card-2 .product-image-container {
    flex: 0 0 40%;
    width: 40%;
    order: 2;
    min-height: 100%;
    max-height: 100%;
    height: 100%;
    padding: 1rem;
    margin: 0;
    border-radius: 0 12px 12px 0;
  }

  .product-img-hover,
  .card-2 .product-img-hover {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  /* Content on Left - 60% width */
  .card-1 .card-body,
  .card-2 .card-body {
    flex: 0 0 60%;
    width: 60%;
    order: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .collection-title {
    font-size: 1.5rem;
  }
}


/* ===========================
   Responsive Design - Mobile (< 768px)
   IMAGE ON TOP, DETAILS ON BOTTOM
   =========================== */

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  section {
    padding: 2rem 0;
  }

  .navbar {
    padding: 0.5rem 0;
  }

  .product-image-container,
  .card-2 .product-image-container {
    order: 0;
  }

}

@media (max-width: 767px) {
  .collection-section {
    margin-bottom: 2rem;
  }

  .collection-title {
    font-size: 1.25rem;
  }

  .view-all-text {
    display: none;
  }

  .collection-view-all {
    padding: 0.5rem;
    font-size: 0.875rem;
  }

  .card-content {
    flex-direction: column;
    min-height: auto;
  }

  .product-image-container,
  .card-2 .product-image-container {
    width: 100%;
    order: 1;
    min-height: 200px;
    max-height: 200px;
    height: 200px;
    padding: 1rem;
    border-radius: 12px;
  }

  .product-img-hover,
  .card-2 .product-img-hover {
    width: 100%;
    height: 100%;
  }

  .card-1 .card-body,
  .card-2 .card-body {
    width: 100%;
    order: 2;
    padding: 1rem;
  }

  .product-name {
    font-size: 1rem;
    min-height: 2.4rem;
  }

  .product-desc {
    font-size: 0.8125rem;
    min-height: 2.4rem;
  }

  .rating-icon i {
    font-size: 0.75rem;
  }

  .price-current {
    font-size: 1.125rem;
  }

  .cart-button-size {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }

  .add-to-cart-text {
    font-size: 0.85rem;
  }

  .empty-collection {
    padding: 2rem 1rem;
  }

  .empty-collection i {
    font-size: 3rem;
  }

  .empty-collection p {
    font-size: 1rem !important;
  }
}

/* ===========================
   Responsive Design - Small Mobile (< 480px)
   =========================== */

@media (max-width: 480px) {
  .collection-header {
    padding-bottom: 0.75rem;
  }

  .collection-title {
    font-size: 1.125rem;
  }

  .badges-container {
    margin: 0.75rem !important;
  }

  .card-1 .badge,
  .card-2 .badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
  }

  .wishlist-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    margin: 0.5rem !important;
  }

  .wishlist-btn i {
    font-size: 1rem !important;
  }

  .product-image-container,
  .card-2 .product-image-container {
    min-height: 250px;
    max-height: 180px;
    height: 180px;
    padding: 0.75rem;
  }

  .card-1 .card-body,
  .card-2 .card-body {
    padding: 0.875rem;
  }

  .empty-collection {
    padding: 1.5rem 0.75rem;
  }
}

/* ===========================
   Banner Responsive - Desktop
   =========================== */

@media (min-width: 992px) {
  .banner-1 {
    grid-column: span 2;
    grid-row: span 1;
  }

  .banner-2 {
    grid-column: span 1;
    grid-row: span 1;
  }

  .banner-3 {
    grid-column: span 1;
    grid-row: span 2;
  }

  .banner-4 {
    grid-column: span 1;
    grid-row: span 1;
  }

  .banner-5 {
    grid-column: span 2;
    grid-row: span 1;
  }
}

/* ===========================
   Banner Responsive - Tablet
   =========================== */

@media (max-width: 991px) {
  .masonry-container {
    grid-template-columns: repeat(1, 1fr);
    grid-auto-rows: 200px;
    gap: 30px;
  }

  .masonry-container a {
    margin-top: 0 !important;
  }
}

/* ===========================
   Banner Responsive - Mobile
   =========================== */

@media (max-width: 767px) {
  .masonry-container {
    grid-template-columns: repeat(1, 1fr);
    grid-auto-rows: 200px;
  }

  .banner-card {
    min-height: 200px;
    height: auto;
  }

  .banner-image-placeholder {
    object-fit: contain;
  }
}

/* ===========================
   Print Styles
   =========================== */

@media print {

  header,
  footer,
  .back-to-top,
  .loader-wrapper {
    display: none !important;
  }

  main {
    min-height: auto;
    padding: 0;
  }

  body {
    background: white;
  }
}

/* ===========================
   Reduced Motion Support
   =========================== */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===========================
   Pagination
   =========================== */

.products-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding: 1rem 0;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.5rem;
  border: 1px solid var(--color-white-600);
  background-color: var(--color-white-900);
  color: var(--color-black-800);
  border-radius: 8px;
  /* Use 50% for circle if preferred */
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.pagination-btn:hover:not(:disabled) {
  background-color: var(--color-pink-500);
  color: var(--color-white-900);
  border-color: var(--color-pink-500);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px var(--color-pink-200);
}

.pagination-btn.active {
  background-color: var(--color-pink-500);
  color: var(--color-white-900);
  border-color: var(--color-pink-500);
  pointer-events: none;
}

.pagination-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: var(--color-white-800);
  border-color: var(--color-white-600);
}

.pagination-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 40px;
  font-weight: 600;
  color: var(--color-black-600);
}

/* Pagination Responsive */
@media (max-width: 576px) {
  .products-pagination {
    gap: 0.25rem;
  }

  .pagination-btn {
    min-width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }

  .pagination-dots {
    min-width: 20px;
  }
}