/* Text Color Utility */
.text-pink {
  --bs-text-opacity: 1;
  color: #d63384 !important;
}

/* Action Sheet Styles */
.action-sheet {
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
}

.action-sheet.inset {
  margin: 0 16px 16px;
  border-radius: 12px;
  overflow: hidden;
}

.action-button-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.action-button-list li {
  border-top: 1px solid #e1e1e1;
}

.action-button-list li:first-child {
  border-top: none;
}

.btn-list {
  width: 100%;
  text-align: left;
  padding: 16px;
  font-size: 15px;
  background: none;
  border: none;
  color: #141515;
  display: block;
  border-radius: 0;
}

.btn-list span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.action-divider {
  height: 8px;
  background: #f1f1f1;
  border: none;
  margin: 0;
}

/* Bottom Navigation */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  justify-content: space-around;
  align-items: center;
  padding: 0.75rem 0 1rem;
  background-color: rgba(var(--bs-body-bg-rgb), 0.9);
  border-top: 1px solid var(--bs-border-color);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
}

@media (max-width: 1024px),
       (hover: none) and (pointer: coarse) {
  .bottom-nav {
    display: flex;
  }
  
  body {
    padding-bottom: 5.5rem;
  }
}

@media only screen and (min-width: 1024px) and (max-height: 1366px) and (orientation: portrait) and (-webkit-min-device-pixel-ratio: 2) {
  .bottom-nav {
    display: flex;
  }
  
  body {
    padding-bottom: 5.5rem;
  }
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--bs-emphasis-color);
  position: relative;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border-radius: 0.5rem;
  flex: 1;
  max-width: 25%;
  overflow: hidden;
}

.bottom-nav-item.active {
  color: var(--bs-primary);
}

.bottom-nav-item:not(.active):hover {
  color: var(--bs-primary);
  transform: translateY(-0.25rem);
}

.bottom-nav-item.active .bottom-nav-icon {
  color: white !important;
  transform: scale(1.15);
}

.bottom-nav-icon {
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 0.6rem;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  margin-bottom: 0.25rem;
  font-size: 3rem;
  color: #FFF;
  font-weight: 900;
}

.bottom-nav-label {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: all 0.2s ease;
}

.bottom-nav-item.active .bottom-nav-label {
  font-weight: 600;
}

.bottom-nav-item:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

/* Dark/Light Theme Adjustments */
[data-bs-theme="dark"] {
  --nav-icon-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  --nav-bg-shadow: 0 -2px 12px rgba(0, 0, 0, 0.25);
  --nav-bg-color: rgba(var(--bs-body-bg-rgb), 0.95);
}

[data-bs-theme="dark"] .bottom-nav {
  box-shadow: var(--nav-bg-shadow);
  background-color: var(--nav-bg-color);
}

[data-bs-theme="light"] {
  --nav-icon-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  --nav-bg-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
  --nav-bg-color: rgba(var(--bs-body-bg-rgb), 0.98);
}

[data-bs-theme="light"] .bottom-nav {
  box-shadow: var(--nav-bg-shadow);
  background-color: var(--nav-bg-color);
}

@media (hover: none) and (pointer: coarse) {
  .bottom-nav-item:active {
    transform: scale(0.95);
  }
  
  .bottom-nav-item.active:active {
    transform: scale(0.95) translateY(-0.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bottom-nav-item,
  .bottom-nav-icon {
    transition: none !important;
  }
}

/* Progress Stepbar */
.progress-stepbar {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  list-style: none;
  margin: 1rem 0;
  padding: 1rem 0;
  position: relative;
  width: 100%;
  counter-reset: step;
}

.progress-stepbar:after {
  background: rgba(var(--bs-secondary-rgb), 0.2);
  border-radius: 10px;
  content: "";
  height: 6px;
  left: 10%;
  position: absolute;
  top: 28px;
  width: 80%;
  z-index: 1;
  transition: all 0.3s ease;
}

.progress-stepbar li {
  position: relative;
  text-align: center;
  flex: 1;
  max-width: 20%;
}

.progress-stepbar li > span {
  background: rgba(var(--bs-secondary-rgb), 0.1);
  border-radius: 20px;
  color: var(--bs-secondary);
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 2.5rem;
  padding: 0.5rem 0.75rem;
  transition: all 0.3s ease;
  position: relative;
  z-index: 3;
}

.progress-stepbar li:before {
  content: counter(step);
  counter-increment: step;
  background: var(--bs-body-bg);
  border: 3px solid rgba(var(--bs-secondary-rgb), 0.3);
  border-radius: 50%;
  color: var(--bs-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: bold;
  height: 2.5rem;
  width: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  position: absolute;
  top: 0;
  z-index: 2;
  transition: all 0.3s ease;
}

.progress-stepbar li:after {
  content: "";
  height: 6px;
  left: -50%;
  position: absolute;
  top: 1.25rem;
  width: 50%;
  z-index: 1;
  opacity: 0;
  transition: all 0.3s ease;
}

.progress-stepbar li:first-child:after {
  display: none;
}

/* Status Classes */
.progress-stepbar li.pending:before,
.progress-stepbar li.pending > span {
  border-color: var(--bs-primary);
  color: var(--bs-primary);
}

.progress-stepbar li.completed.pending:before {
  background: var(--bs-primary);
  color: white;
}

.progress-stepbar li.danger:before,
.progress-stepbar li.danger > span,
.progress-stepbar li.stop:before,
.progress-stepbar li.stop > span {
  border-color: var(--bs-danger);
  color: var(--bs-danger);
}

.progress-stepbar li.completed.danger:before,
.progress-stepbar li.completed.stop:before {
  background: var(--bs-danger);
  color: white;
}

.progress-stepbar li.success:before,
.progress-stepbar li.success > span {
  border-color: var(--bs-success);
  color: var(--bs-success);
}

.progress-stepbar li.completed.success:before {
  background: var(--bs-success);
  color: white;
}

.progress-stepbar li.warning:before,
.progress-stepbar li.warning > span {
  border-color: var(--bs-warning);
  color: var(--bs-warning);
}

.progress-stepbar li.completed.warning:before {
  background: var(--bs-warning);
  color: white;
}

.progress-stepbar li.dark:before,
.progress-stepbar li.dark > span {
  border-color: var(--bs-dark);
  color: var(--bs-dark);
}

.progress-stepbar li.completed.dark:before {
  background: var(--bs-dark);
  color: white;
}

.progress-stepbar li.active:before {
  transform: translateX(-50%) scale(1.1);
  box-shadow: 0 0 0 5px rgba(var(--bs-primary-rgb), 0.2);
}

.progress-stepbar li.active > span {
  font-weight: 600;
}

.progress-stepbar li.pulse:before {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--bs-warning-rgb), 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(var(--bs-warning-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--bs-warning-rgb), 0); }
}

.progress-stepbar li.completed:after {
  opacity: 1;
}

.progress-stepbar li.completed.pending:after {
  background: var(--bs-primary);
}

.progress-stepbar li.completed.danger:after,
.progress-stepbar li.completed.stop:after {
  background: var(--bs-danger);
}

.progress-stepbar li.completed.success:after {
  background: var(--bs-success);
}

.progress-stepbar li.completed.warning:after {
  background: var(--bs-warning);
}

.progress-stepbar li.completed.dark:after {
  background: var(--bs-dark);
}

[data-bs-theme="dark"] .progress-stepbar li > span,
[data-bs-theme="dark"] .progress-icon-stepbar li > div > span {
  background: rgba(var(--bs-secondary-rgb), 0.2);
}

[data-bs-theme="dark"] .progress-stepbar:after,
[data-bs-theme="dark"] .progress-icon-stepbar:after {
  background: rgba(var(--bs-secondary-rgb), 0.3);
}

/* Card Styles */
.branch-card {
  transition: all 0.3s ease;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.branch-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.branch-card .card-header {
  background: linear-gradient(135deg, #f5f8ff 0%, #f0f4ff 100%);
  border-bottom: none;
}

.branch-card .card-body {
  padding: 1.5rem;
}

.hover-elevate-up {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-elevate-up:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Address List */
.address-list-container {
  max-height: 70vh;
  overflow-y: auto;
}

.address-list-container::-webkit-scrollbar {
  width: 6px;
}

.address-list-container::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.address-list-container::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.map-preview {
  transition: opacity 0.3s ease;
}

.map-preview.leaflet-container {
  background: #f5f8fa;
}

.map-preview-error {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f8fa;
  color: #a1a5b7;
  font-size: 0.9rem;
}

/* Product Cards */
.card-category, 
.card-product,
.card-brand {
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  backface-visibility: hidden;
  transform: translateZ(0);
}

.card-category:hover,
.card-brand:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.card-product:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
  z-index: 10;
}

.truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  min-height: 2.8em;
}

/* Product Gallery */
.product-gallery {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(135deg, #f5f7fa 0%, #f0f2f5 100%);
}

.product-gallery img {
  transition: transform 0.3s ease;
}

.product-gallery:hover img {
  transform: scale(1.05);
}

/* Variant Options */
.color-option {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  position: relative;
}

.color-option:hover {
  transform: scale(1.15);
  box-shadow: 0 0 8px rgba(0,0,0,0.2);
}

.color-option.active {
  border-color: var(--kt-primary);
  box-shadow: 0 0 0 2px white, 0 0 0 4px var(--kt-primary);
}

.color-option.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.color-option.disabled::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #f00;
  transform: rotate(-45deg);
}

.storage-option {
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid var(--kt-border-color);
}

.storage-option.active {
  background-color: var(--kt-primary) !important;
  color: white !important;
  border-color: var(--kt-primary);
}

.storage-option.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.storage-option.disabled::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #f00;
  transform: rotate(-45deg);
}

/* Product Display */
.product-image-container {
  height: 220px;
  background: linear-gradient(135deg, #f5f7fa 0%, #f0f2f5 100%);
}

.price-tabs {
  border-bottom: 2px solid var(--kt-border-color);
}

.price-tabs .nav-link {
  border: none;
  color: var(--kt-gray-600);
  font-weight: 600;
  padding: 0.5rem 1rem;
  margin-bottom: -2px;
}

.price-tabs .nav-link.active {
  color: var(--kt-primary);
  border-bottom: 2px solid var(--kt-primary);
  background: transparent;
}

.price-display {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Sticky Action Bar */
.sticky-action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: white;
  box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
  padding: 1rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.sticky-action-bar.show {
  transform: translateY(0);
}

/* Ratings */
.rating-stars {
  display: inline-flex;
  align-items: center;
}

.rating-stars .star {
  color: #ffc107;
  margin-right: 2px;
}

.review-card {
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
}

.review-card:hover {
  transform: translateY(-5px);
}

.review-media {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.review-media img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.review-media img:hover {
  transform: scale(1.1);
}

/* Coordinate Display */
.coordinate-display {
  font-size: 14px;
  color: #000;
  line-height: 1.4;
  padding: 2px;
}

.coordinate-display div {
  padding: 5px 10px;
}

/* Responsive Adjustments */
@media (max-width: 767px) {
  .address-card {
    margin-bottom: 1.5rem;
  }
  
  .product-image-container {
    height: 180px;
  }
  
  .card-product .btn {
    padding: 0.5rem;
    font-size: 0.875rem;
  }
}

@media (min-width: 992px) {
  .sticky-action-bar {
    display: none;
  }
}