/* ===== IdealHands Shared Styles ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --cream: #E6D5F0;
  --cream-dark: #D9C8E8;
  --terracotta: #c67a4a;
  --terracotta-light: #d9915f;
  --terracotta-dark: #a8613a;
  --sage: #7a9e7e;
  --sage-light: #96b89a;
  --sage-dark: #5f7d63;
  --brown: #5c4033;
  --brown-light: #7a5a4a;
  --amber: #d4a574;
  --amber-light: #e3be94;
  --charcoal: #2c2421;
  --text: #3d3230;
  --text-light: #7a6e6a;
  --white: #ffffff;
  --danger: #c0392b;
  --danger-light: #e74c3c;
  --success: #27ae60;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

/* ===== NAV ===== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(230, 213, 240, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(92, 64, 51, 0.06);
  transition: all 0.3s ease;
}

/* Push nav down when announcement bar is visible */
body.has-banner nav {
  top: 38px !important;
}

nav.scrolled {
  padding: 0.75rem 2rem;
  box-shadow: 0 2px 20px rgba(92, 64, 51, 0.08);
}

.logo {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--brown);
  letter-spacing: -0.01em;
}

.logo span { color: var(--terracotta); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-light);
  transition: color 0.25s ease;
  letter-spacing: 0.01em;
}

.nav-links a:hover { color: var(--terracotta); }
.nav-links a.active { color: var(--terracotta); font-weight: 600; }

.nav-cta {
  background: var(--terracotta) !important;
  color: var(--white) !important;
  padding: 0.6rem 1.5rem;
  border-radius: 50px;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  transition: all 0.3s ease !important;
}

.nav-cta:hover {
  background: var(--terracotta-dark) !important;
  transform: translateY(-1px);
}

.cart-badge {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background: var(--terracotta);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.cart-count:empty,
.cart-count[data-count="0"] { display: none; }

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.mobile-toggle span {
  width: 24px;
  height: 2px;
  background: var(--brown);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--terracotta);
  color: var(--white);
  padding: 0.85rem 1.75rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}

.btn-primary:hover {
  background: var(--terracotta-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(198, 122, 74, 0.3);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--brown);
  padding: 0.85rem 1.75rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid rgba(92, 64, 51, 0.15);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}

.btn-secondary:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.82rem;
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-danger:hover {
  background: var(--danger-light);
}

/* ===== PAGE CONTAINER ===== */
.page-container {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 7rem 2rem 4rem;
  width: 100%;
}

.page-header {
  margin-bottom: 2.5rem;
}

.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--charcoal);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.page-header p {
  font-size: 1.05rem;
  color: var(--text-light);
  line-height: 1.7;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--terracotta);
  text-decoration: none;
}

.breadcrumb a:hover { text-decoration: underline; }

/* ===== PRODUCT GRID ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(92, 64, 51, 0.06);
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(92, 64, 51, 0.1);
}

.product-card-img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-card-img {
  transform: scale(1.03);
}

.product-card-body {
  padding: 1.25rem;
}

.product-card-category {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--terracotta);
  margin-bottom: 0.4rem;
}

.product-card-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.product-card-desc {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-price {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.product-price {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--charcoal);
}

.product-compare-price {
  font-size: 0.88rem;
  color: var(--text-light);
  text-decoration: line-through;
}

/* ===== CATEGORY FILTER ===== */
.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.category-chip {
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1.5px solid rgba(92, 64, 51, 0.12);
  background: var(--white);
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: 'DM Sans', sans-serif;
}

.category-chip:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
}

.category-chip.active {
  background: var(--terracotta);
  color: var(--white);
  border-color: var(--terracotta);
}

/* ===== PRODUCT COUNT ===== */
.product-count {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 1.25rem;
  font-weight: 500;
  min-height: 1.25rem;
}

/* ===== FORM STYLES ===== */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid rgba(92, 64, 51, 0.1);
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--cream);
  transition: all 0.25s ease;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(198, 122, 74, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ===== CARD STYLES ===== */
.card {
  background: var(--white);
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid rgba(92, 64, 51, 0.06);
  box-shadow: 0 4px 20px rgba(92, 64, 51, 0.04);
}

/* ===== FOOTER ===== */
footer {
  padding: 4rem 2rem 2rem;
  background: var(--charcoal);
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.footer-brand .logo {
  color: var(--white);
  font-size: 1.4rem;
  margin-bottom: 1rem;
  display: block;
}

.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 1.25rem;
  max-width: 280px;
}

.footer-col h4 {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 1.25rem;
}

.footer-col a {
  display: block;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  margin-bottom: 0.7rem;
  transition: color 0.25s ease;
}

.footer-col a:hover { color: var(--terracotta-light); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
}

.footer-bottom p {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.3);
}

/* ===== NEWSLETTER SIGNUP ===== */
.newsletter-signup {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.newsletter-signup h4 {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.newsletter-signup p {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
}

.newsletter-form input {
  flex: 1;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  color: var(--white);
  background: rgba(255, 255, 255, 0.04);
  outline: none;
  transition: all 0.25s ease;
}

.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.newsletter-form input:focus {
  border-color: var(--terracotta);
  background: rgba(255, 255, 255, 0.06);
}

.newsletter-form button {
  padding: 0.65rem 1rem;
  background: var(--terracotta);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.newsletter-form button:hover {
  background: var(--terracotta-dark);
}

.newsletter-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.newsletter-success {
  color: #7a9e7e;
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 0.75rem;
  display: none;
}

.newsletter-error {
  color: #e57373;
  font-size: 0.8rem;
  margin-top: 0.5rem;
  display: none;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--charcoal);
  margin-bottom: 0.75rem;
}

.empty-state p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

/* ===== TOAST NOTIFICATION ===== */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--charcoal);
  color: var(--white);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success { background: var(--sage-dark); }

/* ===== LOADING ===== */
.loading-spinner {
  display: flex;
  justify-content: center;
  padding: 3rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(198, 122, 74, 0.2);
  border-top-color: var(--terracotta);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  nav { padding: 0.85rem 1.25rem; }
  .nav-links { display: none; }
  .mobile-toggle { display: flex; }

  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #E6D5F0;
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid rgba(92, 64, 51, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  }

  .page-container { padding: 5.5rem 1.25rem 3rem; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .product-card-img { height: 180px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.75rem; text-align: center; }
  .category-filters { gap: 0.4rem; }
  .category-chip { padding: 0.4rem 1rem; font-size: 0.78rem; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .product-card-img { height: 220px; }
}

/* ===== ANIMATION UTILS ===== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
