/* ============================================================
   MODA CARAMELLO — components.css
   Product cards, forms, cart, badges, toast, etc.
   ============================================================ */

/* ---------- Product Card ---------- */
.product-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.product-card__img-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3/4;
  overflow: hidden;
}

.product-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}

.product-card:hover .product-card__img {
  transform: scale(1.05);
}

.product-card__badge {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  padding: .3rem .8rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.product-card__badge--new {
  background: var(--gold);
  color: var(--white);
}

.product-card__badge--best {
  background: var(--navy);
  color: var(--white);
}

.product-card__body {
  padding: 1rem;
}

.product-card__cat {
  font-size: .78rem;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 600;
}

.product-card__name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: .3rem 0;
  font-weight: 600;
}

.product-card__name a {
  color: var(--ink);
  transition: color .25s var(--ease);
}

.product-card__name a:hover {
  color: var(--navy);
}

.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: .5rem;
}

.product-card__price {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
}

.product-card__add {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .25s var(--ease);
  color: var(--navy);
}

.product-card__add:hover {
  background: var(--navy);
  color: var(--white);
}

.product-card__add svg {
  width: 18px;
  height: 18px;
}

/* ---------- Category Card ---------- */
.cat-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  color: var(--white);
  transition: transform .3s var(--ease);
}

.cat-card:hover { transform: translateY(-4px); }

.cat-card__icon {
  font-size: 2.5rem;
  position: absolute;
  top: 1rem;
  inset-inline-end: 1rem;
  opacity: .3;
}

.cat-card__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
}

/* ---------- Stat Card ---------- */
.stat-card {
  text-align: center;
  padding: 1.5rem;
}

.stat-card__num {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--gold);
}

.stat-card__label {
  font-size: .92rem;
  color: var(--ink-soft);
  margin-top: .3rem;
}

/* ---------- Testimonial Card ---------- */
.testi-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
}

.testi-card__quote {
  font-size: .95rem;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: 1rem;
  font-style: italic;
}

.testi-card__quote::before {
  content: "\201C";
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--gold);
  position: absolute;
  top: .8rem;
  inset-inline-end: 1rem;
  line-height: 1;
  opacity: .4;
}

.testi-card__author {
  display: flex;
  align-items: center;
  gap: .8rem;
}

.testi-card__avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .9rem;
}

.testi-card__name {
  font-weight: 600;
  font-size: .92rem;
}

.testi-card__stars {
  color: var(--gold);
  font-size: .85rem;
}

/* ---------- Form elements ---------- */
.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: .4rem;
  color: var(--ink);
}

.form-input {
  width: 100%;
  padding: .75rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
  background: var(--white);
}

.form-input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26, 58, 92, .1);
}

textarea.form-input {
  resize: vertical;
  min-height: 120px;
}

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-inline-end: 2.5rem;
}

/* ---------- Cart Item ---------- */
.cart-item {
  display: flex;
  gap: 1.2rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}

.cart-item__img {
  width: 90px;
  height: 110px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

.cart-item__info {
  flex: 1;
}

.cart-item__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: .2rem;
}

.cart-item__meta {
  font-size: .85rem;
  color: var(--ink-soft);
}

.cart-item__price {
  font-weight: 700;
  color: var(--navy);
  font-size: 1rem;
  margin-top: .3rem;
}

.cart-item__qty {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.cart-item__qty button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all .2s var(--ease);
}

.cart-item__qty button:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.cart-item__qty span {
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

.cart-item__remove {
  color: var(--danger);
  font-size: .85rem;
  cursor: pointer;
  padding: .3rem;
  transition: opacity .2s;
}

.cart-item__remove:hover { opacity: .7; }

/* ---------- Cart Summary ---------- */
.cart-summary {
  background: var(--off-white);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
}

.cart-summary h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.cart-summary__row {
  display: flex;
  justify-content: space-between;
  padding: .5rem 0;
  font-size: .95rem;
}

.cart-summary__row--total {
  border-top: 2px solid var(--navy);
  margin-top: .5rem;
  padding-top: .8rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--navy);
}

.cart-summary .btn {
  width: 100%;
  margin-top: 1rem;
}

/* ---------- Empty state ---------- */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state__icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: .4;
}

.empty-state__text {
  font-size: 1.2rem;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}

/* ---------- Size selector ---------- */
.size-selector {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.size-btn {
  min-width: 42px;
  height: 42px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: .88rem;
  cursor: pointer;
  transition: all .2s var(--ease);
  padding: 0 .6rem;
}

.size-btn:hover,
.size-btn.active {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}

/* ---------- Color selector ---------- */
.color-selector {
  display: flex;
  gap: .5rem;
}

.color-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--line);
  cursor: pointer;
  transition: all .2s var(--ease);
  position: relative;
}

.color-btn.active {
  border-color: var(--navy);
  box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--navy);
}

.color-btn[data-color="navy"]       { background: #1a3a5c; }
.color-btn[data-color="white"]      { background: #fff; }
.color-btn[data-color="black"]      { background: #1a1a1a; }
.color-btn[data-color="grey"]       { background: #999; }
.color-btn[data-color="light-blue"] { background: #87ceeb; }
.color-btn[data-color="brown"]      { background: #8b4513; }
.color-btn[data-color="khaki"]      { background: #c3b091; }

/* ---------- Toast ---------- */
.mc-toast {
  position: fixed;
  bottom: 2rem;
  inset-inline-start: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy);
  color: var(--white);
  padding: .8rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .92rem;
  opacity: 0;
  pointer-events: none;
  transition: all .3s var(--ease);
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}

.mc-toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* ---------- Filter sidebar ---------- */
.filter-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.filter-section:last-child {
  border-bottom: none;
}

.filter-section h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: .8rem;
  color: var(--navy);
}

.filter-option {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem 0;
  cursor: pointer;
  font-size: .92rem;
  color: var(--ink-soft);
  transition: color .2s;
}

.filter-option:hover { color: var(--navy); }

.filter-option.active { color: var(--navy); font-weight: 600; }

.filter-option input[type="checkbox"] {
  accent-color: var(--navy);
}

/* ---------- Sort bar ---------- */
.sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.sort-bar__count {
  font-size: .92rem;
  color: var(--ink-soft);
}

.sort-bar select {
  padding: .5rem 2rem .5rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  background: var(--white);
}

/* ---------- Checkout form ---------- */
.checkout-section {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.checkout-section h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 1rem;
  color: var(--navy);
  padding-bottom: .8rem;
  border-bottom: 1px solid var(--line);
}

.payment-options {
  display: flex;
  flex-direction: column;
  gap: .8rem;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: 1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .2s var(--ease);
}

.payment-option:hover,
.payment-option.active {
  border-color: var(--navy);
  background: rgba(26, 58, 92, .03);
}

.payment-option input[type="radio"] {
  accent-color: var(--navy);
}

/* ---------- Newsletter ---------- */
.newsletter {
  display: flex;
  gap: 0;
  max-width: 360px;
}

.newsletter input {
  flex: 1;
  padding: .65rem 1rem;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px 0 0 999px;
  background: rgba(255,255,255,.1);
  color: var(--white);
  font-size: .9rem;
}

.newsletter input::placeholder { color: rgba(255,255,255,.5); }

.newsletter button {
  padding: .65rem 1.2rem;
  background: var(--gold);
  color: var(--white);
  border-radius: 0 999px 999px 0;
  font-weight: 600;
  font-size: .9rem;
  transition: background .25s var(--ease);
}

.newsletter button:hover { background: var(--gold-dark); }

/* ---------- Contact info card ---------- */
.contact-info-card {
  background: var(--off-white);
  border-radius: var(--radius);
  padding: 2rem;
}

.contact-info-card h3 {
  font-family: var(--font-display);
  color: var(--navy);
  margin-bottom: 1.5rem;
}

.contact-info-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.contact-info-item__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-info-item__icon svg {
  width: 20px;
  height: 20px;
}

.contact-info-item h4 {
  font-size: .95rem;
  color: var(--navy);
  margin-bottom: .2rem;
}

.contact-info-item p {
  font-size: .9rem;
  color: var(--ink-soft);
}

/* ---------- Product detail gallery ---------- */
.pd-gallery {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--off-white);
  aspect-ratio: 3/4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
}

.pd-info h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: .5rem;
}

.pd-info__price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
}

.pd-info__desc {
  color: var(--ink-soft);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.pd-info__section {
  margin-bottom: 1.5rem;
}

.pd-info__section h3 {
  font-size: 1rem;
  margin-bottom: .6rem;
  color: var(--ink);
}

/* ---------- About page ---------- */
.about-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}

.about-value {
  padding: 2rem 1.5rem;
}

.about-value__icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
}

.about-value h3 {
  font-size: 1.1rem;
  margin-bottom: .5rem;
  color: var(--navy);
}

.about-value p {
  font-size: .92rem;
  color: var(--ink-soft);
}

@media (max-width: 768px) {
  .about-values { grid-template-columns: 1fr; }
  .cart-item { flex-wrap: wrap; }
}
