/* Tablou.md mini-cart dropdown */

.tw-cart-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tw-cart-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, #3D7BFF 0%, #876BFF 100%);
  color: #fff;
  cursor: pointer;
  border: 0;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(89, 108, 255, .28);
  transition: transform .2s, box-shadow .2s;
  line-height: 1;
}
.tw-cart-trigger:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(89, 108, 255, .42);
}

.tw-cart-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
}

.tw-cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: #fff;
  color: #3D7BFF;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  margin-left: 4px;
  transition: transform .2s;
}
.tw-cart-count[data-empty="1"] { display: none; }
.tw-cart-count.tw-bump { animation: tw-cart-bump .55s cubic-bezier(.22,1.61,.36,1); }
@keyframes tw-cart-bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.45); background: #876BFF; color: #fff; }
  100% { transform: scale(1); }
}

.tw-cart-panel {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: 360px;
  max-width: calc(100vw - 24px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 14px 50px rgba(28,26,23,.18);
  padding: 18px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(.98);
  transform-origin: top right;
  transition: opacity .2s, transform .2s;
}
.tw-cart-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.tw-cart-panel::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 24px;
  width: 14px;
  height: 14px;
  background: #fff;
  transform: rotate(45deg);
  border-radius: 3px 0 0 0;
}

.tw-cart-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0ebe1;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8a8177;
  font-weight: 600;
}
.tw-cart-head-n { color: #c45a2f; }

.tw-cart-items {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}

.tw-cart-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
}
.tw-cart-item img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  background: #f5f5f7;
}
.tw-cart-item-name {
  font-family: 'Fraunces', serif;
  font-size: 15px;
  font-weight: 500;
  color: #1c1a17;
  text-decoration: none;
  line-height: 1.25;
  display: block;
  margin-bottom: 4px;
}
.tw-cart-item-name:hover { color: #c45a2f; }
.tw-cart-item-meta {
  font-size: 12px;
  color: #8a8177;
}
.tw-cart-item-price { color: #1c1a17; font-weight: 500; }

.tw-cart-item-rm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(28,26,23,.1);
  background: transparent;
  color: #8a8177;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: all .2s;
  padding: 0;
}
.tw-cart-item-rm:hover {
  background: #c45a2f;
  color: #fff;
  border-color: #c45a2f;
}

.tw-cart-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 16px 0;
  padding-top: 14px;
  border-top: 1px solid #f0ebe1;
}
.tw-cart-total span {
  font-size: 12px;
  color: #8a8177;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}
.tw-cart-total strong {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 22px;
  color: #1c1a17;
}

.tw-cart-actions {
  display: flex;
  gap: 8px;
}
.tw-cart-btn-ghost,
.tw-cart-btn-primary {
  flex: 1;
  padding: 12px 18px;
  border-radius: 999px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all .2s;
  border: 1px solid;
  cursor: pointer;
}
.tw-cart-btn-ghost {
  background: transparent;
  border-color: rgba(28,26,23,.14);
  color: #1c1a17;
}
.tw-cart-btn-ghost:hover { border-color: #1c1a17; }
.tw-cart-btn-primary {
  background: #1c1a17;
  border-color: #1c1a17;
  color: #f6f1e8;
}
.tw-cart-btn-primary:hover {
  background: #c45a2f;
  border-color: #c45a2f;
}

.tw-cart-empty {
  text-align: center;
  padding: 28px 16px;
  color: #8a8177;
}
.tw-cart-empty-ic { font-size: 36px; margin-bottom: 10px; }
.tw-cart-empty-title {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  color: #1c1a17;
  margin-bottom: 16px;
}
.tw-cart-empty .tw-cart-btn-ghost {
  display: inline-block;
  flex: 0 0 auto;
  padding: 10px 20px;
}

@media (max-width: 480px) {
  .tw-cart-panel {
    right: -8px;
    width: calc(100vw - 16px);
  }
  .tw-cart-trigger { padding: 9px 14px; font-size: 13px; }
}
