/* General page styling */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  background: linear-gradient(to bottom, #fff5f8, #ffeef5);
  color: #444;
  padding-top: 140px;
}

/* Header */
header {
  background: linear-gradient(to right, #f8c8dc, #f9e6ff, #ffd700);
  padding: 20px;
  text-align: center;
  color: #4a2c2a;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: padding 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

header.collapsed {
  padding: 8px 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

header h1 {
  margin: 0;
  font-size: 2.5em;
  transition: font-size 0.3s ease, margin 0.3s ease;
}

header.collapsed h1 {
  font-size: 1.5em;
  margin: 0;
}

header p {
  margin: 5px 0;
  transition: opacity 0.3s ease, max-height 0.3s ease;
  opacity: 1;
}

header.collapsed p {
  opacity: 0;
  max-height: 0;
  margin: 0;
}

nav {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  transition: margin-top 0.3s ease, gap 0.3s ease;
}

header.collapsed nav {
  margin-top: 0;
  gap: 5px;
}

nav a {
  margin: 5px 10px;
  padding: 8px 16px;
  text-decoration: none;
  color: #4a2c2a;
  font-weight: bold;
  border-radius: 6px;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease, margin 0.3s ease, font-size 0.3s ease;
  background: rgba(248, 200, 220, 0.7);
  border: 2px solid #f8c8dc;
}

header.collapsed nav a {
  padding: 6px 12px;
  margin: 3px 6px;
  font-size: 0.9em;
}

nav a:first-child,
nav a:nth-child(2) {
  border: 2px solid #f8c8dc;
}

nav a:nth-child(n+3) {
  border: 2px solid #f8c8dc;
}

nav a:hover {
  background: #ffd700;
  color: #4a2c2a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.nav-logout-btn {
  background: linear-gradient(90deg, #f8c8dc, #ffd700) !important;
  color: #4a2c2a !important;
  padding: 8px 16px !important;
  border-radius: 20px !important;
  text-decoration: none !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: all 0.25s ease !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
  cursor: pointer !important;
  border: 2px solid #ffd700 !important;
}

.nav-logout-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18) !important;
  background: linear-gradient(90deg, #ffd700, #f8c8dc) !important;
}

/* Sections */
section {
  padding: 40px;
  text-align: center;
}

section h2 {
  color: #4a2c2a;
  margin-bottom: 20px;
  transition: color 0.3s ease;
}

section h2:hover {
  color: #d4af37;
}

/* Catalogue grid */
.catalogue-grid {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.item {
  background: #fff;
  border: 2px solid #f8c8dc;
  border-radius: 12px;
  padding: 20px;
  width: 270px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.item img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 12px;
  transition: transform 0.4s ease, filter 0.4s ease;
  display: block;
}

.item:hover {
  transform: translateY(-8px) scale(1.04);
  border-color: #ffd700;
  box-shadow: 0 12px 20px rgba(248, 200, 220, 0.3);
}

.item:hover img {
  transform: scale(1.08);
  filter: brightness(1.1);
}

.item h3 {
  color: #4a2c2a;
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

.item:hover h3 {
  color: #d4af37;
}

.item p {
  font-size: 0.95em;
  line-height: 1.4;
}

/* Category styling */
.category {
  margin-bottom: 50px;
  padding: 30px 0;
  border-bottom: 2px solid #f0d0e0;
}

.category:last-child {
  border-bottom: none;
}

.category-title {
  color: #4a2c2a;
  font-size: 1.8em;
  margin-bottom: 30px;
  margin-top: 0;
  text-align: center;
  padding: 20px 0;
  border-bottom: 3px solid #f8c8dc;
  display: inline-block;
  width: 100%;
}

.category-badge {
  display: inline-block;
  background: #f8c8dc;
  color: #4a2c2a;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75em;
  font-weight: bold;
  margin-bottom: 10px;
  text-transform: uppercase;
  transition: background 0.3s ease, transform 0.3s ease;
}

.item:hover .category-badge {
  background: #ffd700;
  transform: scale(1.1);
}

.short-desc {
  font-size: 0.85em;
  color: #666;
  font-style: italic;
  margin: 8px 0;
  transition: color 0.3s ease;
}

.item:hover .short-desc {
  color: #d4af37;
}
.whatsapp-btn {
  margin-left: 40px;
  margin-top:80px;
  display: inline-block;
  background: #25D366;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.2);
}

.whatsapp-btn:hover {
  background: #1ebe5d;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

.price {
  font-weight: bold;
  color: #d4af37; /* gold shade */
  margin-top: 10px;
  font-size: 1.1em;
}

.original-price {
  text-decoration: line-through;
  color: #999;
  font-size: 0.85em;
  margin-left: 8px;
}

.learn-more-btn {
  background: #f8c8dc;
  color: #4a2c2a;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: bold;
  margin-top: 10px;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.learn-more-btn:hover {
  background: #ffd700;
  color: #4a2c2a;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.learn-more-btn:active {
  transform: scale(0.98);
}

.item-details {
  display: none;
  margin-top: 10px;
  font-size: 0.9em;
  color: #666;
  line-height: 1.5;
  opacity: 0;
  transition: opacity 0.3s ease;
  animation: slideIn 0.3s ease forwards;
}

.item.active .item-details {
  display: block;
  opacity: 1;
}

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

/* Footer */
footer {
  background: #f9e6ff;
  text-align: center;
  padding: 15px;
  color: #4a2c2a;
  font-size: 0.9em;
}

@media (max-width: 768px) {
  /* Adjust body padding for fixed header */
  body {
    padding-top: 120px;
  }

  /* Header responsive */
  header {
    padding: 15px 10px;
  }

  header h1 {
    font-size: 2em;
  }

  header p {
    font-size: 0.9em;
    margin: 10px 0;
  }

  /* Navigation responsive */
  nav {
    gap: 8px;
    margin-top: 12px;
  }

  nav a {
    margin: 3px 5px;
    padding: 6px 12px;
    font-size: 0.9em;
  }

  /* Section responsive */
  section {
    padding: 25px 15px;
  }

  section h2 {
    font-size: 1.5em;
    margin-bottom: 15px;
  }

  /* Category responsive */
  .category {
    margin-bottom: 35px;
    padding: 20px 0;
  }

  .category-title {
    font-size: 1.4em;
    padding: 15px 0;
    margin-bottom: 20px;
  }

  /* Grid responsive */
  .catalogue-grid {
    gap: 20px;
    padding: 0 10px;
  }

  .item {
    width: 100%;
    max-width: 300px;
    padding: 15px;
  }

  .item img {
    height: 150px;
    margin-bottom: 10px;
  }

  .item h3 {
    font-size: 1.1em;
    margin-bottom: 8px;
  }

  .item p {
    font-size: 0.9em;
  }

  .short-desc {
    font-size: 0.8em;
  }

  .price {
    font-size: 1em;
  }

  .learn-more-btn {
    padding: 8px 12px;
    font-size: 0.9em;
    margin-top: 8px;
  }

  .item-details {
    font-size: 0.85em;
  }

  .whatsapp-btn {
    margin-left: 0;
    padding: 10px 16px;
    font-size: 0.95em;
  }

  /* Footer responsive */
  footer {
    font-size: 0.85em;
    padding: 12px;
  }
}

/* Tablet/Small screens (max-width: 1024px) */
@media (max-width: 1024px) {
  body {
    padding-top: 130px;
  }

  header h1 {
    font-size: 2.2em;
  }

  nav {
    gap: 8px;
  }

  nav a {
    padding: 7px 14px;
    font-size: 0.95em;
  }

  .catalogue-grid {
    gap: 25px;
  }

  .item {
    width: 270px;
  }

  .category-title {
    font-size: 1.6em;
  }
}

/* Mobile phones (max-width: 480px) */
@media (max-width: 480px) {
  body {
    padding-top: 110px;
  }
  .wa-btn{
    margin-top:90px;
    justify-content:center;
    align-items:center;
    display:flex;
    border-radius:10px;
  }
  header {
    padding: 12px 8px;
  }

  header h1 {
    font-size: 1.6em;
    margin: 5px 0;
  }

  header p {
    font-size: 0.8em;
    margin: 5px 0;
  }

  nav {
    gap: 6px;
    margin-top: 10px;
  }

  nav a {
    margin: 3px 3px;
    padding: 5px 10px;
    font-size: 0.8em;
  }

  section {
    padding: 15px 10px;
  }

  section h2 {
    font-size: 1.3em;
  }

  .category-title {
    font-size: 1.2em;
    padding: 12px 0;
    margin-bottom: 15px;
  }

  .catalogue-grid {
    gap: 15px;
    padding: 0 5px;
  }

  .item {
    width: 100%;
    max-width: 280px;
    padding: 12px;
  }

  .item img {
    height: 140px;
    margin-bottom: 10px;
  }

  .item h3 {
    font-size: 1em;
    margin-bottom: 6px;
  }

  .item p {
    font-size: 0.85em;
  }

  .short-desc {
    font-size: 0.75em;
    margin: 6px 0;
  }

  .category-badge {
    padding: 4px 10px;
    font-size: 0.65em;
    margin-bottom: 8px;
  }

  .price {
    font-size: 0.95em;
    margin-top: 8px;
  }

  .original-price {
    font-size: 0.8em;
  }

  .learn-more-btn {
    padding: 6px 10px;
    font-size: 0.85em;
    margin-top: 6px;
  }

  .item-details {
    font-size: 0.8em;
    margin-top: 8px;
  }

  .item-details p {
    margin: 5px 0;
  }

  .whatsapp-btn {
    margin: 0;
    padding: 10px 15px;
    font-size: 0.9em;
    display: block;
    width: 90%;
    box-sizing: border-box;
    text-align: center;
  }

  .wa-btn {
    text-align: center;
  }

  footer {
    font-size: 0.8em;
    padding: 10px;
  }

  /* Disable hover effects on mobile for better performance */
  .item:hover {
    transform: translateY(-5px) scale(1.01);
  }

  .item:hover img {
    transform: scale(1.03);
  }

  nav a:hover {
    transform: translateY(-1px);
  }
}

/* Narrow-phone navigation: separate touch targets without overlap. */
@media (max-width: 600px) {
  body { padding-top: 246px; }
  header { padding: 12px 10px; }
  header nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin: 10px auto 0;
  }
  header nav a,
  header.collapsed nav a,
  header nav .nav-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 40px;
    box-sizing: border-box;
    margin: 0;
    padding: 7px 5px !important;
    text-align: center;
    font-size: .82rem;
    border-radius: 9px;
  }
  header nav a:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (max-width: 360px) {
  body { padding-top: 282px; }
  header nav { grid-template-columns: 1fr; }
  header nav a:last-child:nth-child(odd) { grid-column: auto; }
}

/* Very large screens (min-width: 1440px) */
@media (min-width: 1440px) {
  .catalogue-grid {
    gap: 35px;
  }

  .item {
    width: 300px;
  }

  section {
    padding: 50px;
  }

  .category {
    margin-bottom: 60px;
  }
}

@media (max-width: 600px) {
  body { padding-top: 104px; }
  header.nav-open { padding-bottom: 14px; }
  .menu-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 46px; height: 42px; margin: 10px auto 0; padding: 0;
    border: 1px solid rgba(74,44,42,.18); border-radius: 9px; background: rgba(255,255,255,.55);
  }
  .menu-toggle span { width: 22px; height: 2px; margin: 0 auto; background: #4a2c2a; border-radius: 2px; }
  header:not(.nav-open) nav { display: none; }
  header.nav-open nav { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
  header.nav-open nav a, header.nav-open nav .nav-logout-btn { width: 100%; min-height: 42px; }
}

@media (min-width: 601px) { .menu-toggle { display: none; } }
