/* 
GLOBAL VARIABLES & RESET
*/
:root {
  --primary-blue: #345995;
  --accent-yellow: #eac435;
  --hover-yellow: #ffdd57;
  --light-bg: #f5f5f5; /* Changed to a soft off-white for a cleaner look */
  --text-dark: #222;
  --text-light: #fff;
  --card-bg: #ffffff;
  --border-color: #000;
  --max-width: 1280px;
  --border-radius-main: 2rem;
  --border-radius-sub: 1rem;
  --shadow-subtle: 0 4px 15px rgba(0, 0, 0, 0.1);
  --shadow-bold: 5px 5px 0px var(--border-color);
}

/* Import modern fonts from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Lato:wght@400;700&display=swap');

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

body {
  background-color: var(--light-bg);
  font-family: 'Lato', sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  color: var(--primary-blue);
}

/* 
HEADER - Now with scroll effect
*/
header {
  max-width: var(--max-width);
  margin: auto;
  position: sticky;
  top: 10px;
  z-index: 1000;
  transition: all 0.3s ease-in-out;
}

.navbar {
  background-color: var(--primary-blue);
  border: 3px solid var(--border-color);
  border-radius: 50px;
  margin: 0.7rem;
  padding: 10px 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: all 0.3s ease-in-out;
  box-shadow: var(--shadow-subtle);
  position: relative;
}

header.scrolled .navbar {
  padding: 5px 1.5rem;
  background-color: rgba(52, 89, 149, 0.95);
  backdrop-filter: blur(5px);
}

header.scrolled .logo img {
  height: 60px;
}

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

.logo img {
  height: 80px;
  transition: height 0.3s ease-in-out;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: bold;
  margin-left: 0.5rem;
  color: var(--text-light);
}

/* SEARCH INPUT BAR */
.input-container {
  display: flex;
  flex-grow: 1;
  max-width: 400px;
}

.input-container input {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  border: 2px solid var(--border-color);
  border-right: none;
  border-radius: 25px 0 0 25px;
  outline-color: var(--accent-yellow);
}

.input-container button {
  padding: 12px 18px;
  font-size: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 0 25px 25px 0;
  background-color: var(--accent-yellow);
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-weight: bold;
}

.input-container button:hover {
  background-color: var(--hover-yellow);
}

/* HAMBURGER MENU STYLES */
.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10;
  flex-shrink: 0;
}

.hamburger-menu span {
  width: 30px;
  height: 3px;
  background-color: var(--text-light);
  border-radius: 5px;
  transition: all 0.3s linear;
}

.hamburger-menu.active span:nth-child(1) { transform: rotate(45deg) translate(7px, 7px);}
.hamburger-menu.active span:nth-child(2) { opacity: 0;}
.hamburger-menu.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }

/* NAV LINKS */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-item {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-light);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 25px;
  transition: color 0.3s ease, background-color 0.3s ease;
  position: relative;
}

.nav-item:hover { color: var(--accent-yellow);}
.nav-item.login {
  background-color: var(--accent-yellow);
  color: var(--text-dark);
}
.nav-item.login:hover {
  background-color: var(--hover-yellow);
  transform: scale(1.05);
}

/*
UNIFIED PRODUCT CARD LAYOUT
*/
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 0 1rem;
}

.product-card {
  background-color: var(--card-bg);
  border: 3px solid var(--border-color);
  border-radius: var(--border-radius-main);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-bold);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 10px 10px 0px var(--accent-yellow);
}

.product-card--featured {
  grid-column: span 2;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
}

.product-card .product-image {
  text-align: center;
  margin-bottom: 1.5rem;
}

.product-card--featured .product-image {
  flex-basis: 50%;
  margin-bottom: 0;
}

.product-card .product-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-card--featured .product-info { flex-basis: 50%;}

.product-card .product-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.product-card .product-description {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.5;
  flex-grow: 1;
  margin-bottom: 1.5rem;
}

.product-card .product-image img {
  max-width: 100%;
  max-height: 250px;
  object-fit: contain;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Product Price & Similar Link */
.product-price {
  font-family: 'Poppins', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-blue);
  margin: 0.5rem 0 1rem 0;
  text-align: left;
}

.product-card--featured .product-price { text-align: left;}
.product-card:not(.product-card--featured) .product-price { text-align: center;}

.product-extra-links {
  text-align: center;
  margin-top: 1rem;
  border-top: 2px dashed #eee;
  padding-top: 1rem;
}

.see-similar-link {
  color: var(--primary-blue);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.3s ease;
}
.see-similar-link:hover {
  color: var(--accent-yellow);
  text-decoration: underline;
}

/* SIMILAR PRODUCTS MODAL */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(5px);
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal {
  background-color: var(--card-bg);
  padding: 2rem;
  border-radius: var(--border-radius-main);
  border: 3px solid var(--border-color);
  box-shadow: var(--shadow-bold);
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}
.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dark);
  line-height: 1;
}
.modal-title {
  text-align: center;
  margin-bottom: 2rem;
}
.modal-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
}
.similar-product-item {
  text-align: center;
}
.similar-product-item img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  background-color: var(--light-bg);
  border-radius: var(--border-radius-sub);
  padding: 0.5rem;
}
.similar-product-item h4 {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: var(--text-dark);
}

/* ACTION BUTTONS (Cart/Fav) with feedback */
.product-buttons {
  display: flex;
  gap: 1rem;
  margin-top: auto;
}
.icon-button {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: var(--primary-blue);
  color: var(--text-light);
  border: 2px solid var(--border-color);
  padding: 0.8rem 1rem;
  border-radius: var(--border-radius-sub);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
}
.icon-button:hover {
  background-color: #4a6fa8;
  transform: translateY(-3px);
  box-shadow: var(--shadow-subtle);
}
.icon-button .fa-heart {
  color: #ff7b7b;
}
.icon-button.success {
  background-color: #28a745;
  color: white;
  pointer-events: none;
}
.icon-button.success .fa-heart { color: white; }

/* "SEE MORE" FUNCTIONALITY STYLES */
.product-card.hidden-product {
  display: none;
}
.see-more-container {
  text-align: center;
  margin: 2rem 0;
}
#see-more-btn {
  background-color: var(--primary-blue);
  color: var(--text-light);
  border: 3px solid var(--border-color);
  padding: 1rem 2.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-bold);
}
#see-more-btn:hover {
  background-color: var(--accent-yellow);
  color: var(--text-dark);
  transform: translateY(-5px);
  box-shadow: 10px 10px 0px var(--primary-blue);
}

/* MAIN SECTIONS & FOOTER */
main { padding-top: 2rem; }
.about-section {
  padding: 4rem 1rem;
  background-color: var(--accent-yellow);
  margin: 4rem 0;
  border-top: 3px solid var(--border-color);
  border-bottom: 3px solid var(--border-color);
}
.about-container {
  max-width: 1000px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 3rem;
}
.about-text { flex: 1.5; }
.about-image { flex: 1; text-align: center; }
.about-image img {
  max-width: 100%;
  border-radius: var(--border-radius-main);
  border: 3px solid var(--border-color);
  box-shadow: var(--shadow-bold);
}
.footer-bar {
  background-color: var(--primary-blue);
  color: var(--text-light);
  border-top: 5px solid var(--border-color);
  padding: 3rem 1rem;
  margin-top: 4rem;
}
.footer-container {
  max-width: var(--max-width);
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}
.footer-section h3 { color: var(--accent-yellow);}
.footer-section ul { list-style: none; padding: 0; }
.footer-section ul li a {
  text-decoration: none;
  display: block;
  transition: all 0.3s ease;
  color: var(--text-light);
}
.footer-section ul li a:hover {
  color: var(--accent-yellow);
  transform: translateX(5px);
}
.social-icons a {
  margin-right: 15px;
  color: var(--text-light);
  font-size: 1.2rem;
  transition: all 0.3s ease;
}
.social-icons a:hover {
  color: var(--accent-yellow);
  transform: scale(1.2);
}
.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid rgba(255, 255, 255, 0.2);
}

/* ANIMATIONS */
.animate-on-scroll { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.animate-on-scroll.is-visible { opacity: 1; transform: translateY(0); }

/* RESPONSIVE SECTION  */

/* Responsive Design */
@media (max-width: 992px) {
  .navbar {
    justify-content: space-between;
    align-items: center;
    row-gap: 1rem;
    border-bottom: none;
  }
  .logo-text { display: none !important; }
  .logo { order: 1; }
  .hamburger-menu { order: 3; display: flex; margin-left: auto; }
  .input-container {
    order: 3;
    flex-basis: 100%;
    width: 90%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }
  .nav-links {
    order: 4;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--primary-blue);
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 0.5rem 0.7rem 0;
    /* border: 3px solid var(--border-color); */
    border-radius: var(--border-radius-main);
    box-shadow: var(--shadow-subtle);
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out;
  }
  .nav-links.active {
    max-height: 500px;
    padding: 2rem 0;
  }
  .nav-links .nav-item { display: none; }
  header .nav-links.active .nav-item {
    display: block;
    width: 90%;
    text-align: center;
  }
  .product-card--featured { 
    grid-column: span 1;
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .navbar {
    flex-direction: row;
    align-items: center;
  }
  .about-container { flex-direction: column; }
}
