/* ============================================================
   Rivanta Jewels — Products.css
   Premium jewelry aesthetic: champagne gold, ivory, deep charcoal
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Jost:wght@300;400;500;600&display=swap');

/* ── CSS Variables ──────────────────────────────────────── */
:root {
  --gold:         #c9a84c;
  --gold-light:   #e8d5a3;
  --gold-dark:    #9d7a2e;
  --ivory:        #faf8f3;
  --cream:        #f2ede4;
  --charcoal:     #1e1c19;
  --muted:        #6b6560;
  --border:       #e0d5c5;
  --white:        #ffffff;
  --shadow-soft:  0 4px 24px rgba(0,0,0,0.07);
  --shadow-hover: 0 12px 40px rgba(0,0,0,0.13);
  --radius:       12px;
  --transition:   all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Global ─────────────────────────────────────────────── */
body {
  background-color: var(--ivory);
  font-family: 'Jost', sans-serif;
  color: var(--charcoal);
}

/* ============================================================
   CATEGORY FILTER NAV
   ============================================================ */
.my-4 {
  margin-top: 2.5rem !important;
  margin-bottom: 2rem !important;
}

.my-4 .container::before {
  content: "EXPLORE OUR COLLECTIONS";
  display: block;
  text-align: center;
  font-family: 'Jost', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--gold);
  margin-bottom: 0.6rem;
}

.my-4 .container::after {
  content: "";
  display: block;
  width: 48px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto 1.8rem;
}

.col-12.d-flex.flex-wrap {
  display: flex !important;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0 0.5rem;
}

.col-2-5 {
  flex: 0 0 auto !important;
  width: auto !important;
}

/* ── Category Buttons ───────────────────────────────────── */
.list-btn,
.list-btn-active {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
}

.list-btn a,
.list-btn-active a {
  display: inline-block;
  padding: 0.52rem 1.5rem;
  border-radius: 50px;
  font-family: 'Jost', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  transition: var(--transition);
}

.list-btn a {
  color: var(--muted);
  background: transparent;
  border: 1.5px solid var(--border);
}

.list-btn a:hover {
  color: var(--gold-dark);
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.06);
}

.list-btn-active a {
  color: var(--white);
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border: 1.5px solid transparent;
  box-shadow: 0 4px 14px rgba(201,168,76,0.35);
}

.product-hero {
  padding: 3rem 0 2.2rem;
  background: linear-gradient(180deg, rgba(250,248,243,0.95), rgba(255,255,255,0.94));
}

.collection-intro {
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(201,168,76,0.18);
  box-shadow: 0 20px 45px rgba(30,28,25,0.08);
  border-radius: 28px;
  padding: 2.2rem 2rem;
  text-align: center;
}

.collection-intro h2 {
  font-family: 'Jost', sans-serif;
  font-size: clamp(2rem, 2.3vw, 2.8rem);
  color: var(--charcoal);
  margin-bottom: 1rem;
}

.collection-intro h3 {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--muted);
  max-width: 720px;
  margin: 0 auto 1.4rem;
}

.stat-list {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
}

.stat-list span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.16);
  color: var(--charcoal);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
}

.stat-list i {
  color: var(--gold-dark);
  font-size: 1rem;
}

@media (max-width: 768px) {
  .product-hero {
    padding: 2rem 0 1.5rem;
  }

  .collection-intro {
    padding: 1.6rem 1.2rem;
  }

  .collection-intro h2 {
    font-size: 2rem;
  }

  .collection-intro h3 {
    font-size: 0.95rem;
  }

  .stat-list {
    gap: 0.65rem;
  }

  .stat-list span {
    padding: 0.65rem 0.9rem;
    font-size: 0.82rem;
  }
}

/* ============================================================
   PRODUCTS GRID
   The selector targets .container > .row specifically so we
   don't accidentally affect Bootstrap .row elements elsewhere
   (e.g. inside the header/footer partials).
   Every rule uses !important to beat Bootstrap's inline flex.
   ============================================================ */
section.product-grid {
  padding: 1.5rem 0 5rem;
}

section.product-grid .container > .row {
  /* Replace Bootstrap flex with CSS Grid */
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 1.8rem !important;
  padding: 0.5rem !important;
  /* Neutralise Bootstrap's negative margins & flex settings */
  margin-left:  0 !important;
  margin-right: 0 !important;
  flex-wrap:    unset !important;
}

/* No-products message — span all columns */
section.product-grid .container > .row > .no-products-message {
  grid-column: 1 / -1;
  text-align: center;
  font-family: 'Jost', sans-serif;
  font-size: 1.3rem;
  color: var(--muted);
}

/*
 * Strip every Bootstrap col-* sizing rule from grid children.
 * [class*="col"] matches col-3, col-md-6, col-12, col-sm-* etc.
 * min-width:0 is critical — prevents content from blowing grid cells.
 */
section.product-grid .container > .row > [class*="col"] {
  width:         100% !important;
  max-width:     100% !important;
  min-width:     0   !important;
  padding-left:  0   !important;
  padding-right: 0   !important;
  flex:          none !important;
  float:         none !important;
}

/* ── Ring Card ─────────────────────────────────────────── */
.ring-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  box-shadow: var(--shadow-soft);
  position: relative;
  height: 100%;
}

.ring-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 2;
}

.ring-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--gold-light);
}

.ring-card:hover::before { opacity: 1; }

/* ── Product Image ─────────────────────────────────────── */
.ring-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  /* overflow:visible keeps the like-btn pill from being clipped */
  overflow: visible;
}

.ring-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  position: relative;
  z-index: 1;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  /* Round top corners to match the card — image itself is clipped */
  border-radius: var(--radius) var(--radius) 0 0;
}

.ring-card:hover .ring-img { transform: scale(1.07); }

/* ── Product Info ──────────────────────────────────────── */
.ring-info {
  padding: 1.1rem 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.ring-info h4 {
  font-family: 'Jost', sans-serif;
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--charcoal);
  margin: 0 0 0.1rem;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

/* SKU */
.ring-info p:first-of-type {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Price */
.ring-info p:last-of-type {
  font-family: 'Jost', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gold-dark);
  margin: 0.4rem 0 0.7rem;
  letter-spacing: 0.02em;
}

/* View More */
.ring-info a {
  display: inline-block;
  align-self: flex-start;
  font-family: 'Jost', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold-dark);
  padding: 0.45rem 1.2rem;
  border: 1.5px solid var(--gold);
  border-radius: 50px;
  transition: var(--transition);
  margin-top: auto;
}

.ring-info a:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--white);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(201,168,76,0.3);
}

/* ============================================================
   LIKE / WISHLIST BUTTON
   ============================================================ */
.like-btn {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1),
              background 0.2s ease,
              box-shadow 0.2s ease;
}

.like-btn .heart-icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #b0a090;
  stroke-width: 1.8px;
  transition: fill 0.25s ease, stroke 0.25s ease;
  display: block;
}

.like-btn:hover {
  background: rgba(255,255,255,0.98);
  box-shadow: 0 4px 16px rgba(201,168,76,0.25);
  transform: scale(1.1);
}

.like-btn:hover .heart-icon {
  stroke: var(--gold);
  fill: rgba(201,168,76,0.12);
}

.like-btn.liked {
  background: rgba(255,255,255,0.98);
  box-shadow: 0 4px 16px rgba(201,168,76,0.3);
}

.like-btn.liked .heart-icon {
  fill: var(--gold);
  stroke: var(--gold-dark);
}

@keyframes like-burst {
  0%   { transform: scale(1);    }
  40%  { transform: scale(1.38); }
  70%  { transform: scale(0.9);  }
  100% { transform: scale(1);    }
}

.like-btn.like-burst {
  animation: like-burst 0.4s cubic-bezier(0.34,1.56,0.64,1) forwards;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   All grid rules repeat the same selector + !important so they
   reliably beat Bootstrap at every viewport width.
   ============================================================ */

/* ── Large desktop and laptop: 3 columns ── */
@media (min-width: 992px) {
  section.product-grid .container > .row {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.8rem !important;
  }
}

/* ── ≤991px  Tablet landscape / md: 2 columns ── */
@media (max-width: 991px) {
  section.product-grid .container > .row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.2rem !important;
  }

  .col-12.d-flex.flex-wrap { gap: 0.5rem; }

  .list-btn a,
  .list-btn-active a {
    padding: 0.45rem 1.1rem;
    font-size: 0.78rem;
  }
}

/* ── ≤768px  Tablet portrait / sm: 1 column ── */
@media (max-width: 768px) {
  section.product-grid .container > .row {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .ring-info h4           { font-size: 0.98rem; }
  .ring-info p:last-of-type { font-size: 1.05rem; }
  .ring-info               { padding: 0.9rem 1rem 1rem; }
}

/* ── ≤575px  Mobile: 1 compact column ── */
@media (max-width: 575px) {
  section.product-grid .container > .row {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
    padding: 0.25rem !important;
  }

  .my-4 .container::before { font-size: 0.65rem; }

  /* Horizontal-scroll pill row */
  .col-12.d-flex.flex-wrap {
    gap: 0.4rem;
    justify-content: flex-start;
    padding: 0;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .col-12.d-flex.flex-wrap::-webkit-scrollbar { display: none; }

  .list-btn a,
  .list-btn-active a {
    padding: 0.42rem 0.9rem;
    font-size: 0.73rem;
    white-space: nowrap;
  }

  .ring-info h4              { font-size: 0.88rem; }
  .ring-info p:first-of-type { font-size: 0.62rem; }
  .ring-info p:last-of-type  { font-size: 0.95rem; margin: 0.3rem 0 0.5rem; }
  .ring-info a               { font-size: 0.68rem; padding: 0.38rem 0.9rem; }
  .ring-info                 { padding: 0.75rem 0.8rem 0.85rem; gap: 0.15rem; }

  .like-btn {
    width: 30px;
    height: 30px;
    top: 0.45rem;
    right: 0.45rem;
  }
  .like-btn .heart-icon { width: 14px; height: 14px; }
}

/* ── ≤380px  Very small phones: 1 column ── */
@media (max-width: 380px) {
  section:not(.my-4) .container > .row {
    grid-template-columns: 1fr !important;
    gap: 0.55rem !important;
  }

  .ring-info h4             { font-size: 0.82rem; }
  .ring-info p:last-of-type { font-size: 0.88rem; }
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination-section {
  padding: 2.5rem 0;
  display: flex;
  justify-content: center;
}

.pagination {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.page-item {
  list-style: none;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-family: 'Jost', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  border: 1.5px solid var(--border);
  color: var(--charcoal);
  background: var(--white);
  transition: var(--transition);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.page-link:hover:not(.disabled) {
  border-color: var(--gold);
  color: var(--gold-dark);
  background: rgba(201, 168, 76, 0.06);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(201,168,76,0.15);
}

.page-item.active .page-link {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--white);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(201,168,76,0.35);
}

.page-item.disabled .page-link {
  color: var(--muted);
  border-color: var(--border);
  background: var(--cream);
  cursor: not-allowed;
  opacity: 0.5;
}

.page-item.disabled .page-link:hover {
  border-color: var(--border);
  color: var(--muted);
  background: var(--cream);
  transform: none;
  box-shadow: none;
}

.page-link.prev-next {
  min-width: 90px;
  font-weight: 600;
}

/* ── Pagination Responsive ── */
@media (max-width: 768px) {
  .pagination-section {
    padding: 2rem 0;
  }

  .pagination {
    gap: 0.3rem;
  }

  .page-link {
    min-width: 32px;
    height: 32px;
    font-size: 0.78rem;
    padding: 0.3rem 0.6rem;
  }

  .page-link.prev-next {
    min-width: 75px;
    font-size: 0.73rem;
  }
}

@media (max-width: 575px) {
  .pagination-section {
    padding: 1.5rem 0;
  }

  .pagination {
    gap: 0.25rem;
  }

  .page-link {
    min-width: 28px;
    height: 28px;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
  }

  .page-link.prev-next {
    min-width: 60px;
    font-size: 0.65rem;
  }
}

/* ============================================================
   RINGS SEARCH / FILTER
   ============================================================ */
.rings-search-section {
  padding: 1.5rem 0 2.2rem;
}

.rings-search-intro {
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(201,168,76,0.18);
  box-shadow: 0 20px 45px rgba(30,28,25,0.08);
  border-radius: 24px;
  padding: 1.4rem 1.2rem;
  height: 100%;
}

.rings-search-intro h3 {
  margin: 0 0 0.25rem;
  font-size: 1.45rem;
  font-weight: 700;
  font-family: 'Jost', sans-serif;
  color: var(--charcoal);
}

.rings-search-intro p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.rings-search-form {
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(201,168,76,0.18);
  box-shadow: 0 20px 45px rgba(30,28,25,0.08);
  border-radius: 24px;
  padding: 1.2rem;
}

.rings-search-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr auto;
  gap: 1rem;
  align-items: end;
}

.rings-search-field label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin: 0 0 0.45rem;
}

.rings-search-input-wrap {
  position: relative;
}

.rings-search-input-wrap i {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(157, 126, 46, 0.9);
  font-size: 1.05rem;
}

.rings-search-input-wrap input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--ivory);
  padding: 0.85rem 1rem 0.85rem 2.4rem;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.rings-search-input-wrap input:focus {
  border-color: rgba(201,168,76,0.65);
  box-shadow: 0 0 0 4px rgba(201,168,76,0.14);
  background: #fff;
}

.rings-search-field select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--ivory);
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.rings-search-field select:focus {
  border-color: rgba(201,168,76,0.65);
  box-shadow: 0 0 0 4px rgba(201,168,76,0.14);
  background: #fff;
}

.rings-search-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 0.1rem;
}

.rings-search-btn {
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.4rem;
  font-family: 'Jost', sans-serif;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--white);
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  box-shadow: 0 10px 26px rgba(201,168,76,0.35);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.rings-search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(201,168,76,0.45);
}

.rings-search-btn i {
  font-size: 1rem;
}

.rings-search-clear {
  text-decoration: none;
  border-radius: 999px;
  padding: 0.75rem 1.1rem;
  border: 1.5px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: var(--transition);
  background: transparent;
  white-space: nowrap;
}

.rings-search-clear:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
  background: rgba(201,168,76,0.06);
}

@media (max-width: 991px) {
  .rings-search-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .rings-search-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 575px) {
  .rings-search-section {
    padding: 1.1rem 0 1.6rem;
  }

  .rings-search-form {
    padding: 1rem;
  }

  .rings-search-grid {
    grid-template-columns: 1fr;
  }

  .rings-search-actions {
    justify-content: flex-start;
  }

  .rings-search-btn {
    width: 100%;
    justify-content: center;
  }

  .rings-search-clear {
    width: 100%;
    text-align: center;
  }
}

