/* ========================================================================= */
/* SHRINATH HANDICRAFT - CUSTOM STYLES & RESPONSIVE UTILITIES                 */
/* ========================================================================= */

/* Prevent horizontal overflow on mobile screens & offset fixed navbar on jump links */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

section {
  scroll-margin-top: 5.5rem;
}

html, body {
  overflow-x: hidden;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* Google Material Symbols Outlined Configuration */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
  user-select: none;
}

/* Custom Scrollbar Styles */
.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f9f2ed;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #d6c3bb;
}

/* Mobile Navigation Dropdown Transition */
#mobile-menu {
  animation: slideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Filter Pill Tabs Active & Hover Protection (Ensures text never disappears on hover) */
.product-filter-btn.bg-primary {
  background-color: #5f3725 !important;
  color: #ffffff !important;
  border-color: #5f3725 !important;
}

.product-filter-btn.bg-primary:hover {
  background-color: #7a4e3a !important;
  color: #ffffff !important;
}

.product-filter-btn:not(.bg-primary) {
  background-color: #fff8f3;
  color: #51443f;
  border-color: #d6c3bb;
}

.product-filter-btn:not(.bg-primary):hover {
  color: #5f3725 !important;
  background-color: #f3ede7 !important;
  border-color: #83746e !important;
}

/* Responsive Touch Target Sizing on Handheld Devices */
@media (max-width: 768px) {
  button, a {
    touch-action: manipulation;
  }
  
  /* Ensure modal fits comfortably on small screens with keyboard open */
  #rfq-modal form input, 
  #rfq-modal form select, 
  #rfq-modal form textarea {
    font-size: 14px;
  }
}

/* Responsive Images Protection */
img {
  max-width: 100%;
  height: auto;
}

/* Hide scrollbar for clean app-like horizontal category pills */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Mobile App Touch Feedback */
@media (hover: none) and (pointer: coarse) {
  .product-card:active,
  .mobile-app-btn:active {
    transform: scale(0.97);
    transition: transform 0.15s ease-out;
  }
}

/* Mobile App Bottom Dock */
.mobile-bottom-dock {
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
}

/* Mobile Bottom Sheet Modal Transitions */
@media (max-width: 639px) {
  .mobile-sheet-container {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  
  .mobile-sheet-dialog {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 1.25rem 1.25rem 0 0 !important;
    max-height: 88vh !important;
    animation: sheetSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25) !important;
  }
}

@keyframes sheetSlideUp {
  from {
    transform: translateY(100%);
    opacity: 0.8;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
