/* ============================================
   MATY MATIX - OPTIMIZED GLOBAL STYLES
   Mobile-First Approach
   Features: Hamburger Menu, Scroll Animations, Mobile-Optimized
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
  background-color: #ffffff;
  line-height: 1.6;
}

/* ============================================
   TYPOGRAPHY - Mobile-First
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 1.8rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.95rem; }

p {
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.8;
  color: #666;
}

a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #E74C3C;
}

/* ============================================
   NAVIGATION BAR - Mobile-First with Hamburger
   ============================================ */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: #1a1a1a;
  z-index: 1000;
  padding: 12px 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1920px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nav-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.logo-img {
  height: 50px;
  width: auto;
  object-fit: contain;
}

/* ============================================
   HAMBURGER MENU (Mobile-Only)
   ============================================ */

.hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  gap: 5px;
}

.hamburger-btn span {
  display: block;
  width: 24px;
  height: 3px;
  background-color: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger-btn.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

/* Mobile Menu Sidebar */
.nav-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #1a1a1a;
  flex-direction: column;
  gap: 0;
  display: none;
  border-top: 1px solid #333;
  max-height: calc(100vh - 70px);
  overflow-y: auto;
}

.nav-menu.active {
  display: flex;
}

.nav-link {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  border-bottom: 1px solid #333;
  padding: 15px;
  display: block;
  width: 100%;
  text-align: left;
}

.nav-link:hover,
.nav-link.active {
  background-color: #2a2a2a;
  color: #E74C3C;
  border-left: 4px solid #E74C3C;
  padding-left: 12px;
}

/* Mobile Search & Cart */
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  order: 3;
}

.search-box {
  display: none;
  background-color: #2a2a2a;
  border: 1px solid #444;
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  width: 150px;
  transition: all 0.3s ease;
}

.search-box::placeholder {
  color: #999;
}

.search-box:focus {
  outline: none;
  background-color: #333;
  border-color: #E74C3C;
}

.cart-icon {
  position: relative;
  cursor: pointer;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.3s ease;
  width: 32px;
  height: 32px;
}

.cart-icon:hover {
  color: #E74C3C;
}

.cart-icon svg {
  width: 24px;
  height: 24px;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background-color: #E74C3C;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Account for fixed navbar */
body {
  padding-top: 70px;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-block;
  padding: 11px 24px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  white-space: nowrap;
  min-width: 120px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.btn-primary:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.btn-outline {
  background-color: transparent;
  color: #333;
  border: 2px solid #333;
}

.btn-outline:hover {
  background-color: #333;
  color: white;
}

.btn-whatsapp {
  background-color: #25D366;
  color: white;
  width: 100%;
  margin-top: 15px;
}

.btn-whatsapp:hover {
  background-color: #20ba5a;
  transform: translateY(-2px);
}

.btn-block {
  display: block;
  width: 100%;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background-color: #6B9FB0;
  color: white;
  padding: 30px 15px 15px;
  margin-top: 50px;
}

.footer-container {
  max-width: 1920px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
  margin-bottom: 20px;
}

.footer-column h3 {
  color: white;
  margin-bottom: 12px;
  font-size: 1rem;
}

.footer-column p {
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 8px;
}

.footer-column a {
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.3s ease;
  font-size: 0.9rem;
}

.footer-column a:hover {
  color: white;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  transition: all 0.3s ease;
  cursor: pointer;
  font-size: 1rem;
}

.social-icon:hover {
  background-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
}

/* ============================================
   PRODUCT MODAL
   ============================================ */

.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.3s ease;
  padding: 15px;
  overflow-y: auto;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  position: relative;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #999;
  transition: color 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.modal-close:hover {
  background-color: #f0f0f0;
  color: #333;
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.modal-image {
  position: relative;
  width: 100%;
}

.modal-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

.modal-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: #E74C3C;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.8rem;
}

.modal-details h2 {
  font-size: 1.5rem;
  margin-top: 10px;
  margin-bottom: 8px;
}

.modal-category {
  color: #999;
  font-size: 0.8rem;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.modal-price {
  display: flex;
  gap: 10px;
  margin: 12px 0 15px 0;
  align-items: center;
}

.original-price {
  font-size: 0.95rem;
  color: #999;
  text-decoration: line-through;
}

.sale-price {
  font-size: 1.3rem;
  color: #E74C3C;
  font-weight: 700;
}

.modal-description {
  margin: 15px 0;
  color: #666;
  line-height: 1.6;
  font-size: 0.9rem;
}

.modal-features {
  margin: 15px 0;
  padding: 12px;
  background-color: #f9f9f9;
  border-radius: 4px;
}

.modal-features ul {
  list-style: none;
  padding: 0;
}

.modal-features li {
  padding: 6px 0;
  color: #666;
  font-size: 0.9rem;
}

.modal-features li:before {
  content: "✓ ";
  color: #E74C3C;
  font-weight: 700;
  margin-right: 6px;
}

.modal-size {
  color: #666;
  font-size: 0.9rem;
  margin: 12px 0;
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes scaleUp {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Scroll animation classes */
.scroll-animate {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.scroll-animate.in-view {
  opacity: 1;
  transform: translateY(0);
}

.zoom-animate {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.6s ease;
}

.zoom-animate.in-view {
  opacity: 1;
  transform: scale(1);
}

/* ============================================
   TABLET & DESKTOP - Media Queries
   ============================================ */

@media (min-width: 768px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }
  h3 { font-size: 1.3rem; }

  body {
    padding-top: 90px;
  }

  .navbar {
    padding: 15px 30px;
  }

  .nav-container {
    gap: 30px;
  }

  .logo-img {
    height: 60px;
  }

  .hamburger-btn {
    display: none;
  }

  .nav-menu {
    position: static;
    display: flex !important;
    flex-direction: row;
    gap: 30px;
    border: none;
    background: transparent;
    max-height: none;
  }

  .nav-link {
    font-size: 0.9rem;
    border: none;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
  }

  .nav-link:hover,
  .nav-link.active {
    background-color: transparent;
    color: #E74C3C;
    border-bottom-color: #E74C3C;
    border-left: none;
  }

  .search-box {
    display: block;
    width: 220px;
  }

  .btn {
    min-width: auto;
    min-height: auto;
    display: inline-block;
    padding: 12px 30px;
  }

  .footer-container {
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
  }

  .modal-body {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .modal-content {
    max-width: 900px;
    padding: 30px;
  }
}

@media (min-width: 1024px) {
  .nav-container {
    gap: 40px;
  }

  .nav-menu {
    gap: 40px;
    margin-left: 60px;
    flex: 1;
  }

  .search-box {
    width: 250px;
  }

  .footer-container {
    gap: 40px;
  }
}

/* ============================================
   TOUCH-FRIENDLY SPACING
   ============================================ */

@media (hover: none) and (pointer: coarse) {
  .btn {
    min-height: 48px;
    min-width: 48px;
  }

  .cart-icon {
    padding: 8px;
  }

  .social-icon {
    width: 44px;
    height: 44px;
  }

  a {
    padding: 8px 4px;
  }
}

/* Print styles */
@media print {
  .navbar,
  .footer,
  .modal {
    display: none;
  }

  body {
    padding-top: 0;
  }
}
