/* A & A Afrogems - Essential Base Layout Styles */
/* This ensures the page has proper styling while optimizations load */

/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  line-height: 1.5;
  color: #292524;
  background-color: #FAFAF9;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Essential Layout Classes */
.min-h-screen { min-height: 100vh; }
.bg-stone-50 { background-color: #FAFAF9; }
.bg-white { background-color: white; }
.container { 
  width: 100%; 
  max-width: 100vw; 
  margin: 0 auto; 
  padding: 0 1rem; 
}

/* Top Navigation */
.navbar {
  background: white;
  border-bottom: 1px solid #E7E5E4;
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.navbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 100vw;
  margin: 0 auto;
  padding: 0 1rem;
}

.navbar-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0F4C3A;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.navbar-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Basic Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 44px;
}

.btn-primary {
  background: #0F4C3A;
  color: white;
}

.btn-primary:hover {
  background: #1A5D47;
}

.btn-secondary {
  background: white;
  border: 1px solid #E7E5E4;
  color: #57534E;
}

.btn-secondary:hover {
  border-color: #0F4C3A;
  color: #0F4C3A;
}

/* Main Content */
main {
  padding-bottom: 5rem;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid #E7E5E4;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  z-index: 50;
}

.bottom-nav-content {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.5rem 0;
  max-width: 100vw;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #78716C;
  font-size: 0.75rem;
  padding: 0.5rem;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s;
  min-width: 44px;
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
  color: #0F4C3A;
}

.bottom-nav-item i {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

/* Utility Classes */
.hidden-mobile {
  display: none;
}

@media (min-width: 768px) {
  .hidden-mobile {
    display: flex;
  }
  
  main {
    padding-bottom: 2rem;
  }
  
  .container {
    max-width: 1200px;
  }
}

.mr-2 { margin-right: 0.5rem; }
.pb-20 { padding-bottom: 5rem; }
.pb-8 { padding-bottom: 2rem; }

/* Responsive Grid */
.grid {
  display: grid;
}

.gap-4 { gap: 1rem; }

/* Flexbox */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.items-center {
  align-items: center;
}

/* Text */
.text-center {
  text-align: center;
}

.font-bold {
  font-weight: 700;
}

.text-stone-600 {
  color: #57534E;
}

.text-stone-800 {
  color: #292524;
}

/* Backgrounds */
.bg-stone-100 {
  background-color: #F5F5F4;
}

.bg-stone-200 {
  background-color: #E7E5E4;
}

/* Borders */
.border {
  border: 1px solid #E7E5E4;
}

.border-stone-200 {
  border-color: #E7E5E4;
}

.border-b {
  border-bottom: 1px solid #E7E5E4;
}

.rounded {
  border-radius: 0.25rem;
}

.rounded-lg {
  border-radius: 0.5rem;
}

.rounded-xl {
  border-radius: 0.75rem;
}

/* Position */
.sticky {
  position: sticky;
}

.top-0 {
  top: 0;
}

.top-16 {
  top: 4rem;
}

/* Z-index */
.z-40 {
  z-index: 40;
}

.z-50 {
  z-index: 50;
}

/* Padding */
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }

/* Margin */
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

/* Width */
.w-full { width: 100%; }

/* Height */
.h-full { height: 100%; }

/* Display */
.block { display: block; }
.inline-block { display: inline-block; }
.hidden { display: none; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }

/* Transform */
.transform { transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); }

/* Ensure FontAwesome icons work */
.fas, .far, .fal, .fab {
  font-weight: 900;
  font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Pro', 'Font Awesome 5 Free', 'Font Awesome 5 Pro';
}

/* Essential Search and Filter Styles */
input[type="text"], input[type="search"] {
  border: 1px solid #E7E5E4;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  background: white;
  color: #292524;
  width: 100%;
}

input[type="text"]:focus, input[type="search"]:focus {
  outline: none;
  border-color: #0F4C3A;
  box-shadow: 0 0 0 3px rgba(15, 76, 58, 0.1);
}

select {
  border: 1px solid #E7E5E4;
  border-radius: 0.5rem;
  padding: 0.5rem;
  background: white;
  color: #292524;
  font-size: 0.875rem;
}

/* Basic Grid Layout */
.stone-grid, .stone-grid-compact {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  width: 100%;
  align-items: start; /* Prevent stretching that could cause cropping */
}

@media (min-width: 640px) {
  .stone-grid, .stone-grid-compact {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .stone-grid, .stone-grid-compact {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Basic Card Styles */
.stone-card, .stone-card-compact {
  background: white;
  border: 1px solid #E7E5E4;
  border-radius: 0.75rem;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stone-card:hover, .stone-card-compact:hover {
  border-color: #D4AF37;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Image containers */
.stone-image-container, .stone-image-compact {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.stone-image, .stone-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}