@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Colors */
  --primary: #0A2351; /* Dark Blue from AM Caser */
  --secondary: #E31837; /* Red from AM Caser */
  --bg-color: #F8F9FA;
  --text-main: #333333;
  --text-light: #666666;
  --white: #FFFFFF;
  --border-color: #E2E8F0;

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 20px rgba(0,0,0,0.15);

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* Typography */
h1, h2, h3, h4 {
  color: var(--primary);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.5rem; }
p { font-size: 1rem; color: var(--text-light); }

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  gap: 8px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
}
.btn-primary:hover {
  background-color: #081b40;
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--white);
}
.btn-secondary:hover {
  background-color: #c4142f;
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover {
  background-color: var(--primary);
  color: var(--white);
}

.btn-whatsapp {
  background-color: #25D366;
  color: var(--white);
}
.btn-whatsapp:hover {
  background-color: #1ebe5d;
}

/* Glassmorphism Class */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 12px;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition);
  padding: 15px 0;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  padding: 10px 0;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}
.logo span.red {
  color: var(--secondary);
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links li a {
  font-weight: 500;
  color: var(--primary);
  transition: var(--transition);
  position: relative;
}

.nav-links li a:hover {
  color: var(--secondary);
}

.nav-links li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--secondary);
  transition: var(--transition);
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.mobile-menu-btn {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
}

/* Hero Section */
.hero {
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  background: linear-gradient(to right, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.5) 100%), url('../assets/hero_bg.png') no-repeat center center/cover;
  padding-top: 80px; /* Offset for navbar */
}

.hero-content {
  max-width: 600px;
}

.hero h1 {
  margin-bottom: 20px;
  animation: fadeUp 0.8s ease-out forwards;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  color: #444;
  animation: fadeUp 1s ease-out forwards;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  animation: fadeUp 1.2s ease-out forwards;
}

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

/* Section Categories */
.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.category-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  height: 300px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}

.category-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-card:hover img {
  transform: scale(1.1);
}

.category-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 30px 20px 20px;
  background: linear-gradient(to top, rgba(10,35,81,0.9), transparent);
  color: var(--white);
}

.category-overlay h3 {
  color: var(--white);
  margin-bottom: 5px;
}

.category-overlay p {
  color: var(--white);
}

/* Brands Carousel */
.brands {
  background-color: var(--white);
  padding: 40px 0;
  overflow: hidden;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.brands-track {
  display: flex;
  align-items: center;
  gap: 50px;
  width: max-content;
  animation: scrollBrands 30s linear infinite;
}

.brand-item {
  font-size: 1.5rem;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
  transition: var(--transition);
}

.brand-item:hover {
  color: var(--primary);
}

@keyframes scrollBrands {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Catalog Page */
.catalog-header {
  background-color: var(--primary);
  color: var(--white);
  padding: 120px 0 60px;
  text-align: center;
}

.catalog-header h1 {
  color: var(--white);
  margin-bottom: 15px;
}

.catalog-header p {
  color: rgba(255,255,255,0.8);
}

.search-filter-section {
  padding: 40px 0;
  background-color: var(--white);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  position: relative;
  z-index: 10;
}

.search-bar {
  max-width: 600px;
  margin: 0 auto 30px;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 15px 25px;
  padding-right: 60px;
  border-radius: 30px;
  border: 2px solid var(--border-color);
  font-size: 1.1rem;
  transition: var(--transition);
}

.search-bar input:focus {
  outline: none;
  border-color: var(--primary);
}

.search-bar button {
  position: absolute;
  right: 5px;
  top: 5px;
  bottom: 5px;
  border: none;
  background-color: var(--primary);
  color: var(--white);
  border-radius: 50%;
  width: 45px;
  cursor: pointer;
  transition: var(--transition);
}

.search-bar button:hover {
  background-color: var(--secondary);
}

.category-pills {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.pill {
  padding: 8px 20px;
  border-radius: 20px;
  background-color: var(--bg-color);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.pill:hover {
  background-color: var(--border-color);
}

.pill.active {
  background-color: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  padding: 60px 0;
}

.factory-card {
  background-color: #e2e8f0;
  border-radius: 12px;
  padding: 25px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.factory-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}

.factory-header-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 20px;
}

.factory-logo-wrapper {
  width: 100%;
  height: 90px;
  background-color: var(--white);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  padding: 15px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
}

.factory-logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.factory-name {
  color: var(--primary);
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 5px;
}

.factory-category-text {
  font-size: 0.95rem;
  color: #64748b;
}

.catalog-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 25px;
  flex-grow: 1;
}

.catalog-link-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #334155;
  font-weight: 600;
  transition: var(--transition);
}

.catalog-link-item:hover {
  background-color: #94a3b8;
  color: var(--white);
}

.catalog-link-item svg {
  stroke: #64748b;
  transition: var(--transition);
}

.catalog-link-item:hover svg {
  stroke: var(--white);
}

.card-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-site {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: transparent;
  border: 1px solid #94a3b8;
  color: #475569;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 8px;
  transition: var(--transition);
}

.btn-site:hover {
  background-color: #94a3b8;
  color: var(--white);
}

.card-actions .btn {
  width: 100%;
}

.card-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Floating WhatsApp */
.floating-whatsapp {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 999;
}

.floating-text {
  background-color: var(--white);
  padding: 10px 15px;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  font-weight: 500;
  font-size: 0.9rem;
  position: relative;
  animation: float 3s ease-in-out infinite;
}

.floating-text::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 8px 0 8px 8px;
  border-style: solid;
  border-color: transparent transparent transparent var(--white);
}

.whatsapp-icon {
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  transition: var(--transition);
  animation: pulse 2s infinite;
}

.whatsapp-icon:hover {
  transform: scale(1.1);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(0px); }
}

/* Footer */
footer {
  background-color: var(--primary);
  color: var(--white);
  padding: 40px 0 20px;
  text-align: center;
}

.footer-content {
  margin-bottom: 20px;
}

footer p {
  color: var(--white);
}

.footer-logo {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 10px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  font-size: 0.9rem;
  color: var(--white);
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.2rem; }
  .hero-buttons { flex-direction: column; }
  .btn { width: 100%; }
  
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--white);
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow-md);
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path 0.4s ease-in-out;
    gap: 15px;
  }
  
  .nav-links.active {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
  }

  .mobile-menu-btn { display: block; }
  
  .floating-text { display: none; }
  
  .search-filter-section {
    padding: 20px 0;
  }
  .category-pills {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 10px;
    flex-wrap: nowrap;
  }
  .pill {
    white-space: nowrap;
  }
}
