/* =============================
   Global Styles
   ============================= */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #fff;
    color: #333;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #0077cc; /* accent color */
}

h1, h2, h3, h4 {
    margin-top: 0;
}

/* =============================
   Header
   ============================= */
header {
    background-color: #ffffff;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .logo img {
    height: 50px;
}

header .nav-links a {
    padding: 0.5rem 1rem;
    font-weight: 500;
}

header .nav-links a:hover {
    background-color: #f5f5f5;
    border-radius: 4px;
}

header .header-icons {
    font-size: 1.2rem;
}

/* Responsive navigation (mobile) */
@media (max-width: 768px) {
    header nav {
        display: none; /* replace with burger menu later */
    }
}

/* =============================
   Main Content
   ============================= */
main {
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

@media (max-width: 768px) {
    main {
        padding: 1rem 0.75rem;
    }
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.product-card {
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    padding: 1rem;
    text-align: center;
    background-color: #fafafa;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-card img {
    max-width: 100%;
    height: auto;
    border-bottom: 1px solid #ddd;
    margin-bottom: 1rem;
}

/* =============================
   Footer
   ============================= */
footer {
    background-color: #f8f8f8;
    color: #555;
    padding: 2rem 1rem;
    border-top: 1px solid #eee;
}

footer h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: #333;
}

footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

footer ul li {
    margin-bottom: 0.5rem;
}

footer a {
    color: #555;
    font-size: 0.9rem;
}

footer a:hover {
    color: #0077cc;
}

footer .footer-bottom {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.8rem;
    color: #999;
}

.category-link.active {
  color: #0d6efd;        /* bootstrap blue */
  font-weight: bold;
  background: #f0f8ff;   /* light highlight */
  border-radius: 4px;
  padding: 2px 6px;
}

/* Sticky image column (product detail only) */
.product-detail-page .left-column {
  position: sticky;
  top: 1rem;
  align-self: flex-start;
}

@media (max-width: 991.98px) {
  .product-detail-page .left-column {
    position: static;
  }
}

/* Thumbnails */
.thumb-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
}
.thumb-img:hover {
  border-color: #007bff;
}

/* Main image */
.main-img {
  max-width: 100%;
  cursor: zoom-in;
}

/* Zoom overlay */
.zoom-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1050;
}
.zoom-overlay img {
  max-width: 90%;
  max-height: 90%;
}

.option-invalid {
    border-left: 4px solid #dc3545;
    padding-left: 8px;
}

.option-error {
    color: #dc3545;
    margin-top: 4px;
}
