/* GLOBAL TOP PROGRESS BAR LOADER */
#kf-top-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3.5px;
  background: linear-gradient(90deg, #c5a06c 0%, #e5c899 50%, #7b2944 100%);
  box-shadow: 0 0 12px rgba(197, 160, 108, 0.9), 0 0 6px rgba(123, 41, 68, 0.6);
  z-index: 999999;
  transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  pointer-events: none;
  opacity: 0;
}

#kf-top-loader.loading {
  opacity: 1;
}

/* GLOBAL SPINNER ANIMATION */
.kf-spin {
  display: inline-block;
  animation: kfSpin 0.65s linear infinite;
}

@keyframes kfSpin {
  100% { transform: rotate(360deg); }
}

/* TOAST NOTIFICATIONS */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
  font-size: 13px;
  min-width: 280px;
  max-width: 380px;
  animation: toastIn .35s ease;
  border-left: 4px solid var(--wine);
}

.toast--success {
  border-left-color: #22c55e;
}

.toast--error {
  border-left-color: #ef4444;
}

.toast--info {
  border-left-color: var(--gold);
}

.toast-icon {
  font-size: 16px;
}

.toast-message {
  flex: 1;
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 16px;
  padding: 0 2px;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(-10px); }
}

/* QUICK VIEW MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(38,27,31,.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--white);
  border-radius: 24px;
  width: min(860px, 100%);
  max-height: 90vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  transform: scale(.96);
  transition: transform .3s ease;
}

.modal-overlay.open .modal {
  transform: scale(1);
}

.modal-image-wrap {
  position: relative;
  overflow: hidden;
  background: var(--cream-dark);
}

.modal-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}

.modal-image-wrap:hover img {
  transform: scale(1.04);
}

.modal-body {
  padding: 40px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.modal-category {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.1;
  color: var(--text);
}

.modal-price {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.modal-price .price {
  font-size: 20px;
}

.modal-description {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  margin-bottom: 24px;
}

.modal-qty-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.modal-qty-label {
  font-size: 11px;
  font-weight: 600;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 0;
}

.qty-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 16px;
  cursor: pointer;
  transition: .2s;
}

.qty-btn:hover {
  background: var(--cream-dark);
}

.qty-input {
  width: 48px;
  height: 36px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-left: 0;
  border-right: 0;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  background: var(--white);
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--white);
  border: none;
  cursor: pointer;
  font-size: 18px;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

/* PAGINATION */
.pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin-top: 50px;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: .25s;
  padding: 0 10px;
}

.page-btn:hover {
  border-color: var(--wine);
  color: var(--wine);
}

.page-btn.active {
  background: var(--wine);
  color: var(--white);
  border-color: var(--wine);
}

.page-btn.disabled {
  opacity: .4;
  pointer-events: none;
}

/* BREADCRUMB */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--muted);
  transition: color .2s;
}

.breadcrumb a:hover {
  color: var(--wine);
}

.breadcrumb-sep {
  opacity: .4;
}

/* STOCK BADGES */
.stock-badge {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.stock-in {
  background: rgba(34,197,94,.12);
  color: #15803d;
}

.stock-low {
  background: rgba(234,179,8,.12);
  color: #a16207;
}

.stock-out {
  background: rgba(239,68,68,.12);
  color: #dc2626;
}

/* SKELETON LOADERS */
.skeleton {
  background: linear-gradient(90deg, #f0e8e0 25%, #f8f0ea 50%, #f0e8e0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  border-radius: 18px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
}

.skeleton-img {
  height: 380px;
  width: 100%;
}

.skeleton-title {
  height: 22px;
  width: 75%;
  border-radius: 6px;
  margin-bottom: 12px;
}

.skeleton-text {
  height: 14px;
  width: 90%;
  border-radius: 4px;
  margin-bottom: 8px;
}

.skeleton-text-sm {
  height: 10px;
  width: 60%;
  border-radius: 4px;
}

.skeleton-price {
  height: 24px;
  width: 35%;
  border-radius: 6px;
}

.skeleton-btn {
  height: 44px;
  width: 100%;
  border-radius: 999px;
}

.skeleton-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

.skeleton-table-row {
  height: 48px;
  width: 100%;
  border-radius: 8px;
  margin-bottom: 10px;
}

/* LUXURY FLOATING CART BADGE & ANIMATION */
.nav-cart-btn {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.cart-count-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: linear-gradient(135deg, #c5a06c, #e5c899);
  color: #521727;
  font-size: 10px;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  border: 2px solid #521727;
  transition: transform .3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  line-height: 1;
}

.cart-count-badge.pulse {
  animation: badgePop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes badgePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.45); }
  100% { transform: scale(1); }
}

/* CENTER-SCREEN ORDER CONFIRMATION MODAL */
@keyframes kfModalOverlayFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes kfModalCardPop {
  0% { opacity: 0; transform: scale(0.86) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes kfModalCardExit {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.9); }
}

.kf-order-modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 2147483647 !important;
  background: rgba(18, 6, 12, 0.85) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
  animation: kfModalOverlayFade 0.25s ease-out forwards !important;
}

.kf-order-modal-overlay.kf-closing {
  animation: kfModalOverlayFade 0.2s ease-in reverse forwards !important;
}

.kf-order-modal-card {
  position: relative !important;
  background: #ffffff !important;
  border-radius: 26px !important;
  width: min(600px, 96vw) !important;
  max-height: 90vh !important;
  margin: auto !important;
  padding: 34px 30px 28px !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(197, 160, 108, 0.35) !important;
  text-align: center !important;
  animation: kfModalCardPop 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  scrollbar-width: thin;
}

.kf-order-modal-overlay.kf-closing .kf-order-modal-card {
  animation: kfModalCardExit 0.2s ease-in forwards !important;
}

.kf-order-modal-close {
  position: absolute !important;
  top: 16px !important;
  right: 16px !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: rgba(123, 41, 68, 0.08) !important;
  border: none !important;
  color: #7b2944 !important;
  font-size: 22px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
  z-index: 10 !important;
  line-height: 1 !important;
}

.kf-order-modal-close:hover {
  background: #7b2944 !important;
  color: #ffffff !important;
  transform: rotate(90deg) !important;
}


