/* Reset default margins, padding, and set box-sizing */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Base body styles */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f8fafc;
  color: #0f1111;
  overflow: hidden;
}

/* Top navigation bar - Amazon-inspired vibrant green gradient */
.framework-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 60px;
  background: linear-gradient(
    135deg,
    rgba(20, 110, 84, 0.9),   /* Darker green */
    rgba(17, 122, 101, 0.9),  /* Mid-tone */
    rgba(19, 138, 114, 0.9)   /* Lighter green */
  );
  border-bottom: 2px solid #0d5c49;
  box-shadow: 0 4px 16px rgba(17, 122, 101, 0.3);
  color: white;
  z-index: 10;
  padding: 5px;
  display: flex;
  align-items: center;
  font-weight: 500;
}

/* Hover effect for top menu */
.framework-menu:hover {
  box-shadow: 0 8px 30px rgba(17, 122, 101, 0.45);
}

/* Secondary category bar - lighter green-blue gradient */
.framework-category {
  position: fixed;
  top: 60px;
  left: 0;
  width: 100vw;
  height: 39px;
  background: linear-gradient(
    to right,
    rgba(26, 175, 140, 0.9),  /* Brighter teal */
    rgba(23, 165, 137, 0.9)   /* Slightly darker */
  );
  border-bottom: 1px solid #148f6f;
  color: white;
  z-index: 11;
  padding: 0 28px;
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
}

/* Hover effect for category bar */
.framework-category:hover {
  background: #1cb596;
}

/* Left sidebar panel - subtle off-white with green tint */
.framework-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 365px;
  height: 100vh;
  background: linear-gradient(
    to bottom,
    rgba(253, 255, 248, 0.9),  /* Very light green tint */
    rgba(248, 255, 240, 0.9)
  );
  border-right: 1px solid #c8e6c9;
  box-shadow: 6px 0 20px rgba(20, 110, 84, 0.12);
  z-index: 13;
  padding: 99px 0 0 0;
  overflow-y: auto;
  display: none; /* Hidden by default, likely toggled via JS */
}

/* Hover effect for sidebar */
.framework-panel:hover {
  box-shadow: 12px 0 30px rgba(20, 110, 84, 0.18);
}

/* Main content area */
.framework-content {
  position: fixed;
  top: 99px;
  left: 0;
  width: 100vw;
  height: calc(100vh - 99px);
  background: transparent;
  z-index: 12;
  padding: 32px;
  overflow-y: auto;
  box-shadow: 0 0 30px rgba(20, 110, 84, 0.06);
}

/* Custom scrollbar styling */
*::-webkit-scrollbar {
  width: 11px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: #a8dcc9;
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover {
  background: #7ccbb1;
}

/* Products grid layout */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding: 16px 8px;
  max-width: 1600px;
  margin: 0 auto;
}

/* Individual product card */
.product-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(20, 110, 84, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid #e0f2e9;
}
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(20, 110, 84, 0.18);
}
.product-card:active {
  transform: translateY(2px);
  box-shadow: 0 20px 40px rgba(20, 10, 84, 0.18);
}

/* Product image container */
.product-image {
  height: 240px;
  background: #f0f9f5;
  border-bottom: 1px solid #d0edde;
  overflow: hidden;
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a8dcc9;
  font-size: 48px;
  font-weight: 300;
}

/* Product info section */
.product-info {
  padding: 18px;
}
.product-title {
  margin: 0 0 10px 0;
  font-size: 18px;
  font-weight: 600;
  color: #0f1111;
  line-height: 1.3;
}
.product-desc {
  margin: 0 0 16px 0;
  font-size: 14px;
  color: #555;
  line-height: 1.5;
  height: 42px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.product-price {
  font-size: 22px;
  font-weight: 700;
  color: #146e54;
}

/* Stock status badges */
.status-instock,
.status-soldout {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}
.status-instock {
  background: #e6f4ea;
  color: #146e54;
}
.status-soldout {
  background: #ffebee;
  color: #c62828;
}

/* Modal overlay */
.product-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2147483647;
  padding: 20px;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

/* Modal container */
.amazon-product-modal {
  background: #ffffff;
  border-radius: 20px;
  width: 960px;
  max-width: 96vw;
  max-height: 96vh;
  overflow: hidden;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.35);
  animation: modalRise 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid #e0e0e0;
}

/* Modal animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modalRise {
  0% { opacity: 0; transform: translateY(40px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Close button */
.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #ddd;
  border-radius: 50%;
  font-size: 34px;
  font-weight: 300;
  color: #333;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.modal-close-btn:hover {
  background: #fff;
  border-color: #146e54;
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(20, 110, 84, 0.25);
}

/* Modal grid layout */
.amazon-modal-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 48px;
  padding: 48px;
  background: #fff;
}

/* Image gallery section */
.amazon-image-gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.main-image-wrapper {
  background: #f8fafc;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  border: 1px solid #e8e8e8;
}
.amazon-main-img,
.amazon-img-placeholder {
  max-width: 340px;
  max-height: 239px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
}
.amazon-img-placeholder {
  background: #f0f9f5;
  font-size: 110px;
  color: #a8dcc9;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Thumbnails */
.thumbnails {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.thumbnails img {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: 10px;
  border: 3px solid #e0e0e0;
  cursor: pointer;
  transition: all 0.25s ease;
}
.thumbnails img:hover,
.thumbnails img.active {
  border-color: #146e54;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(20, 110, 84, 0.2);
}

/* Modal content area */
.amazon-modal-content {
  padding-top: 8px;
}
.amazon-modal-title {
  font-size: 30px;
  font-weight: 500;
  color: #0f1111;
  margin: 0 0 12px 0;
  line-height: 1.3;
}
.amazon-price-stock {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 16px 0 0;
  flex-wrap: wrap;
}
.amazon-price {
  font-size: 34px;
  font-weight: 500;
  color: #B12704; /* Amazon red/orange */
}
.in-stock {
  color: #067D62;
  font-weight: 700;
  font-size: 16px;
}
.out-of-stock {
  color: #c62828;
  font-weight: 700;
  font-size: 16px;
}
.amazon-description p {
  font-size: 16px;
  line-height: 1.6;
  color: #0f1111;
  margin: 20px 0;
}
.amazon-detail-line {
  font-size: 16px;
  margin: 16px 0;
  color: #0f1111;
}
.amazon-bullets {
  margin: 24px 0;
}
.amazon-bullets li {
  margin: 10px 0;
  line-height: 1.5;
  color: #0f1111;
}

/* Buy box and add-to-cart button */
.amazon-buy-box {
  margin-top: 32px;
}
.amazon-add-btn {
  background: linear-gradient(to bottom, #f7da8c, #f0c14b); /* Amazon yellow */
  border: 1px solid #a88734;
  border-radius: 12px;
  padding: 16px 48px;
  font-size: 18px;
  font-weight: 600;
  color: #0f1111;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: all 0.2s;
  min-width: 220px;
}
.amazon-add-btn:hover:not(:disabled) {
  background: linear-gradient(to bottom, #f5d78e, #eeb933);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
.amazon-add-btn:disabled {
  background: #e0e0e0;
  cursor: not-allowed;
  color: #666;
}

/* Social icons */
.social-icon {
  display: inline-block;
  padding: 5px 5px 3px 5px;
  border: 1px outset #999;
  background-color: #fff;
  border-radius: 10px;
  width: 28px;
  height: 28px;
  text-align: center;
  cursor: pointer;
  margin: 1px;
}
.social-icon:hover {
  transform: translateY(-1px);
}
.social-icon:active {
  transform: translateY(1px);
}

/* Search bar */
.search-container {
  position: relative;
  left: 250px;
  display: inline-block;
  height: 42px;
  width: calc(100% - 800px);
  min-width: 250px;
  background-color: #fff;
  border: 2px inset #393;
  border-radius: 10px;
  overflow: hidden;
}
.search-query {
  height: 100%;
  width: calc(100% - 38px);
  background-color: #ccc;
  color: #777;
  border: 0;
  font-size: 22px;
  padding-left: 10px;
}
.search-query:focus {
  background-color: #eee;
}
.search-button {
  height: 100%;
  width: 38px;
  background-color: rgb(169, 23, 111);
  position: absolute;
  top: 0;
  right: 0;
  cursor: pointer;
}
.search-button-svg:hover {
  fill: #fff;
}
.search-button-svg:active {
  transform: translateY(1px);
}

/* Category buttons */
.category-button {
  display: inline-block;
  padding: 6px;
  font: 16px "Comic Sans MS", cursive, sans-serif;
  border: 1px solid transparent;
  user-select: none;
  cursor: pointer;
  border-radius: 10px;
}
.category-button:hover {
  border: 1px solid #fff;
}
.category-button:active {
  transform: translateY(1px);
}

/* Cart icon */
.cart-icon {
  position: absolute;
  right: 5px;
  border: 2px outset #999;
  background: linear-gradient(
    to right,
    rgba(26, 175, 140, 0.9),
    rgba(23, 165, 137, 0.9)
  );
  border-radius: 10px;
  cursor: pointer;
  transform: scale(0.75);
}
.cart-icon:hover {
  border: 2px outset #bbb;
  transform: scale(0.85);
}
.cart-icon:active {
  transform: translateY(1px) scale(0.75);
}

.shopping-cart {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);  /* Perfect centering */
  width: 600px;
  height: 600px;
  background: white;
  border: 3px solid #333;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  z-index: 2147483647;        /* Max z-index */
  font-family: system-ui, sans-serif;
  overflow: hidden;
}

.shopping-cart-menu {
  padding: 16px 20px;
  background: #222;
  color: white;
  font-weight: bold;
  border-radius: 9px 9px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.shopping-cart-close {
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.shopping-cart-close:hover {
  background: rgba(255,255,255,0.2);
}

.shopping-cart-content {
  padding: 10px;
  height: calc(100% - 70px);
  overflow-y: auto;
}