/* =============================
   GLOBAL STYLES
============================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

body { font-family: Arial, sans-serif; line-height: 1.6; background: #f9f9f9; color: #333; }

/* ===== Headings ===== */
h1, h2, h3 { margin-bottom: 15px; text-align: center; }
h1 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h2 { font-size: clamp(1rem, 2vw, 1.1rem); }
h3 { font-size: clamp(0.8rem, 1.5vw, 1rem); }

/* ===== Header ===== */
header { display: flex; justify-content: space-between; align-items: center; background: #333; padding: 15px; color: #fff; position: relative; z-index: 1001; }

/* ===== Hamburger Menu ===== */
.menu-toggle { display: none; font-size: 26px; cursor: pointer; z-index: 1002; }
body.no-scroll { overflow: hidden; }

/* ===== Logo and tagline container ===== */
header .logo-container { display: flex; flex-direction: column; margin-left: 10px; }
header .logo { font-size: 28px; font-weight: bold; line-height: 1.0; }
header .tagline { font-size: 12px; color: #ccc; }

/* ===== Navigation Menu ===== */
header nav { display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; }
nav ul { list-style: none; display: flex; gap: 10px; }
nav ul li { display: inline; white-space: nowrap; }
nav ul li a { color: #fff; padding: 10px 15px; text-decoration: none; font-weight: 500; transition: color 0.3s, background 0.3s; }
nav ul li a.active { color: #ffcc00; font-weight: bold; background-color: rgba(255, 204, 0, 0.1); border-radius: 5px; padding: 10px 15px; }
nav ul li a:hover { background-color: rgba(255, 204, 0, 0.2); border-radius: 5px; color: #ffcc00; }

/* ===== Overlay ===== */
#overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); opacity: 0; visibility: hidden; transition: opacity 0.3s ease; z-index: 999; }
#overlay.active { opacity: 1; visibility: visible; }

/* ===== Search button ===== */
#search-btn { background: none; border: none; font-size: 18px; cursor: pointer; margin-left: 10px; color: #fff; }

/* ===== Hidden search bar ===== */
#search-bar { display: none; position: fixed; top: 20px; left: 50%; transform: translateX(-50%); width: 90%; max-width: 600px; padding: 15px; background: #fff; border-radius: 8px; z-index: 10001; }
#search-bar form { display: inline-flex; max-width: 600px; width: 100%; }
#search-bar input { flex: 1; padding: 10px; border: none; border-radius: 5px 0 0 5px; font-size: 16px; }
#search-bar button { padding: 10px 20px; border: none; background: #ff6600; color: white; border-radius: 0 5px 5px 0; cursor: pointer; }
#search-bar button:hover { background: #ff8533; }

/* ===== Full overlay behind search ===== */
#search-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 10000; }
#search-results { display: grid; grid-template-columns: repeat(auto-fill,minmax(250px,1fr)); gap: 15px; }

/* ===== Cart Button ===== */
#cart-btn { display: inline-block; background: #ff6600; color: #fff;  margin-left: 10px; padding: 5px 10px; border-radius: 5px; text-decoration: none; white-space: nowrap; }
#cart-btn:hover { background:#ff8533; }

/* ===== (View, Back & Inquiry) Buttons ===== */
.view-all { display:block; width: max-content; text-align:center; margin: 20px auto; font-size:1rem; text-decoration:none; background:#333; color:#fff; padding:10px 20px; border-radius:8px; }
.view-all:hover { background:#555; }
.back-btn { margin-bottom: 20px; padding: 10px 20px; background:#555; color:#fff; border:none; border-radius:5px; cursor:pointer; font-size: 1.0rem; }
.back-btn:hover { background:#333; }
#inquiry-btn { margin-top: auto; display: inline-block; margin-top: 12px; padding: 8px 12px; background:#333; color:#fff; border:none; border-radius:5px; cursor:pointer; font-size: 1.0rem; }
#inquiry-btn:hover { background:#555; }

/* ===== Footer ===== */
.site-footer { background: #333; color: #fff; padding: 20px; font-size: 0.95rem; }
.footer-container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; max-width: 94%; margin: 0 auto; }
.footer-left p { margin: 0; }
.footer-right { display: flex; align-items: center; gap: 10px; }
.footer-right a { color: #fff; padding: 10px 15px; text-decoration: none; font-weight: 500; transition: color 0.3s, background 0.3s; }
.footer-right a:hover { background-color: rgba(255, 204, 0, 0.2); border-radius: 5px; color: #ffcc00; }

/* ===== Brand Section Wrapper ===== */
.brand-logos { width: 100%; overflow: hidden; background: linear-gradient(to right, #ffffff, #f8fbff); padding: 30px 0; border-top: 1px solid #e0e0e0; border-bottom: 1px solid #e0e0e0; }
.logo-slider { display: flex; align-items: center; position: relative; }
.logo-track { display: flex; width: max-content; animation: scroll linear infinite; }
.logo-item { display: flex; align-items: center; justify-content: center; margin: 0 10px; padding: 12px 12px; border-radius: 14px; background: #ffffff; box-shadow: 0 0 12px rgba(0, 102, 255, 0.15); transition: all 0.35s ease; flex-shrink: 0; }
.logo-item img { width: 160px; height: auto; opacity: 0.9; transition: all 0.35s ease; }
.logo-item:hover { box-shadow: 0 10px 35px rgba(0, 102, 255, 0.45); transform: translateY(-6px) scale(1.07); }
.logo-item:hover img { opacity: 1; transform: scale(1.1); }
/* Continuous Scroll Animation */
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ===== CTA ACTION SECTION ===== */
#cta-action-section { background: linear-gradient(135deg, #f8fafc, #eef2f7); padding: 30px 20px; text-align: center; }
.cta-action-title { font-size: clamp(1.5rem, 3vw, 2.5rem); margin-bottom: 40px; font-weight: 600; }
.cta-action-container { display: flex; justify-content: space-between; align-items: stretch; gap: 20px; width: 100%; flex-wrap: wrap; }
.cta-action-card { background: #fff; border-radius: 20px; padding: 20px 20px; flex: 1; min-width: 280px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08); transition: all 0.3s ease; cursor: pointer; text-align: center; }
.cta-action-card:hover { transform: translateY(-8px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12); }
.cta-action-icon { margin-bottom: 18px; }
.cta-action-icon img { width: 65px; height: 65px; transition: transform 0.3s ease; }
.cta-action-card:hover .cta-action-icon img { transform: scale(1.1); }
.cta-action-card h3 { color: #0d6efd; font-size: 1.3rem; margin-bottom: 10px; }
.cta-action-card p { color: #555; font-size: 0.95rem; line-height: 1.5; margin-bottom: 20px; }
.cta-action-btn { display: inline-block; padding: 10px 22px; background: #333; color: #fff; border-radius: 8px; text-decoration: none; font-weight: 500; transition: background 0.3s ease; }
.cta-action-btn:hover { background: #555; }
.cta-action-card.visible { transition: transform 0.3s ease-out, opacity 0.8s ease, box-shadow 0.3s ease-out, filter 0.3s ease-out; }
.cta-action-card.visible:hover { transform: scale(1.03); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15); filter: brightness(1.03); z-index: 3; }
/* --- Scroll Animation (Fixed for Hover) --- */
.animate-on-scroll { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease, transform 0.8s ease; transition-delay: calc(var(--i, 0) * 0.15s); pointer-events: none; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* ===== Hero Slider Container ===== */
.hero-slider { position: relative; width: 100%; height: 50vh; overflow: hidden; margin-bottom: 20px; }
.slides { display: flex; height: 100%; transition: transform 0.8s ease-in-out; }
.slide { flex: 0 0 100%; height: 100%; position: relative; background-size: cover; background-position: center; background-repeat: no-repeat; }
.slide::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.35); }
.slide-content { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; color: #fff; z-index: 2; width: 90%; max-width: 800px; opacity: 0; animation: fadeIn 1.5s ease forwards; }
.slide.active .slide-content { opacity: 1; }
.slide-content h1 { font-size: clamp(1.5rem, 4vw, 3rem); line-height: 1.2; margin-bottom: 10px; white-space: normal; animation: slideDown 1s ease forwards; }
.slide-content p { font-size: clamp(1rem, 2.5vw, 1.5rem); margin-bottom: 20px; animation: slideUp 1s ease forwards; }
.cta-btn { display: inline-block; padding: clamp(10px, 2vw, 15px) clamp(20px, 4vw, 30px); background: #ff9800; color: #fff; font-weight: 600; border-radius: 5px; text-decoration: none; transition: all 0.3s ease; font-size: clamp(0.9rem, 2vw, 1.1rem); }
.cta-btn:hover { background: #e68900; transform: scale(1.05); }
.progress-container { position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 3; }
.progress-bar { width: 100px; height: 5px; background: rgba(255, 255, 255, 0.3); border-radius: 10px; overflow: hidden; position: relative; }
.progress-bar .fill { width: 0%; height: 100%; background: #ff9800; transition: width linear; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
/* ---------- Slide Animations ---------- */
@keyframes fadeIn { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes slideDown { 0% { opacity: 0; transform: translateY(-50px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { 0% { opacity: 0; transform: translateY(50px); } 100% { opacity: 1; transform: translateY(0); } }

/* ===== Categories Grid ===== */
#categories { display: grid;grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 10px; }
.category-card { border: 1px solid #ddd; border-radius: 10px; overflow: hidden; cursor: pointer; text-align: center; transition: transform 0.2s, box-shadow 0.2s; background: #fff; }
.category-card img { width: 100%; height: 150px; max-height: 100%; object-fit: cover; }
.category-card h3 { padding: 10px; font-size: 16px; }
.category-card.visible { transition: transform 0.3s ease-out, opacity 0.8s ease, box-shadow 0.3s ease-out, filter 0.3s ease-out; }
.category-card.visible:hover { transform: scale(1.03); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15); filter: brightness(1.03); z-index: 3; }

/* ===== Main Content ===== */
main { padding: 20px; max-width: 98%; margin: 20px auto; background: #fff; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

/* ===== Contact Form ===== */
.contact-info { flex: 1; min-width: 280px; line-height: 1.6; }
.contact-info h3 { margin-top: 20px; text-align: left; }
.contact-info p, .contact-info a { margin-bottom: 10px; color: #333; text-decoration: none; text-align:justify; }
.contact-form { flex: 1; min-width: 280px; }
.contact-form form { display: flex; flex-direction: column; gap: 10px; }
.contact-form label { font-weight: bold; }
.contact-form input, .contact-form textarea { padding: 10px; border: 1px solid #ccc; border-radius: 5px; width: 100%; box-sizing: border-box; }
.contact-form button { padding: 10px; background:#333; color:#fff; border:none; border-radius:5px; cursor:pointer; }
.contact-form button:hover { background:#555; }

/* ===== Product/Related Grid ===== */
#products, .products-container, .related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px,1fr)); gap: 20px; }
#product-description { text-align: justify; line-height: 1.6; white-space: normal; }
.product-card, .related-card { background: #fff; border: 1px solid #ccc; border-radius: 8px; text-align: center; padding: 10px; display: flex; flex-direction: column; justify-content: space-between; height: 100%; transition: transform 0.3s ease-out, opacity 0.8s ease, box-shadow 0.3s ease-out, filter 0.3s ease-out; }
.product-card:hover, .related-card:hover { transform: scale(1.05); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15); filter: brightness(1.05); z-index: 3; }
.product-card img, .related-card img { width: 100%; height: 150px; object-fit: cover; border-radius: 5px; }
.product-card h3 { margin: 10px 0; font-size: 1.1rem; }
.product-card button { margin-top: 10px; padding: 8px 12px; background:#333; color:#fff; border:none; border-radius:5px; cursor:pointer; font-size: 1.0rem; }
.product-card button:hover { background:#555; }
.product-wrapper.hidden { display: none; }
.product-link { text-decoration: none; color: inherit; }
.related-section { margin-top: 20px; padding-top: 20px; border-top: 1px solid #e0e0e0; }
.related-section h2 { font-size: 1.5rem; margin-bottom: 15px; text-align: center; }

/* ===== Desktop fullscreen zoom overlay ===== */
#zoomOverlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); display: flex; justify-content: center; align-items: center; z-index: 9999; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
#zoomOverlay.active { opacity: 1; pointer-events: auto; }
#zoomOverlay img { max-width: 95%; max-height: 95%; border-radius: 10px; cursor: zoom-out; box-shadow: 0 0 20px rgba(0,0,0,0.5); transform: scale(0.8); opacity: 0; transition: all 0.3s ease; }
#zoomOverlay.active img { transform: scale(1); opacity: 1; }
#mobileZoomClose { display: none; }

/* ===== Leads Page ===== */
.leads form div { margin-bottom: 15px; }
.leads label { display: block; margin-bottom: 5px; font-weight: bold; }
.leads input, .leads textarea, .leads button { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 5px; }
.leads button { cursor: pointer; background: #333; color: #fff; border: none; font-size: 1.0rem; }
.leads button:hover { background:#555; }
.products-container .product-card { border: 1px solid #ccc; padding: 10px; border-radius: 5px; text-align: center; background: #fafafa; }
.products-container .product-card img { max-width: 100%; height: 120px; object-fit: cover; margin-bottom: 10px; }
.products-container .product-card a { text-decoration: none; color: #333; font-weight: bold; }
.products-container .product-card button { margin-top: 5px; padding: 5px 10px; background:#555; color:#fff; border:none; border-radius:5px; cursor:pointer; }
.products-container .product-card button:hover { background:#333; }

/* ===== Filter Section ===== */
.filter-section { text-align: center; margin: 0 0 10px; }
.filter-buttons button { background: #ddd; border: none; padding: 10px 20px; margin: 5px; cursor: pointer; border-radius: 6px; transition: background 0.3s; font-size: 16px; }
.filter-buttons button:hover { background: #555; color: #fff; }
.filter-buttons .active { background: #333; color: #fff; }
#filter-message { text-align: center; margin-top: 10px; color: #444; font-size: 16px; min-height: 22px; }

/* ===== PAGINATION ===== */
#pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; padding: 10px 15px; margin-top: 20px; background: rgba(50, 50, 50, 0.85); border-radius: 8px; transition: opacity 0.5s, transform 0.3s; opacity: 1; z-index: 1000; }
#pagination.sticky { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); }
#pagination.hidden { opacity: 0; }
#pagination button { background: #fff; color: #333; border: 1px solid #ccc; border-radius: 4px; padding: 6px 10px; cursor: pointer; font-size: 0.95rem; transition: background 0.3s, color 0.3s; }
#pagination button:hover:not(:disabled) { background: #333; color: #fff; }
#pagination button:disabled { opacity: 0.5; cursor: not-allowed; }
#pagination button.active { background: #333; color: #fff; font-weight: bold; border-color: #333; }
#pagination span { display: flex; align-items: center; justify-content: center; padding: 6px 10px; font-size: 0.95rem; color: #fff; }

/* ===== Responsive CSS ===== */
@media (max-width: 768px) {
  header .logo { font-size: 25px; }
  header .tagline { font-size: 10px; }
  nav { display: flex; align-items: center; justify-content: space-between; }
  nav ul { flex-direction: column; position: fixed; top: 0; left: -200px; width: 200px; height: 100%; background: #333; padding-top: 100px; gap: 10px; transition: left 0.4s ease; z-index: 1000; }
  nav ul li { text-align: left; padding-left: 20px; }
  nav ul li a { padding: 10px 15px; display: block; }
  nav ul li a.active { background-color: rgba(255, 204, 0, 0.2); border-top-right-radius: 0px; border-bottom-right-radius: 0px; }
  nav ul li a:hover { background-color: rgba(255, 204, 0, 0.3); border-top-right-radius: 0px; border-bottom-right-radius: 0px; }
  nav ul.show { left: 0; }
  .menu-toggle { display: block; margin-right: 0px; }
  #cart-btn { font-size: 0.8em; }
  .logo-item { margin: 0 10px; padding: 8px 10px; }
  .logo-item img { width: 120px; }
  .cta-action-container { flex-direction: column; align-items: center; }
  .cta-action-card { width: 100%; }
  .slide-content h1 { font-size: clamp(1.2rem, 5vw, 2rem); }
  .slide-content p { font-size: clamp(0.9rem, 3vw, 1.2rem); }
  .cta-btn { padding: 8px 16px; font-size: 0.95rem; }
  main { flex-direction: column; }
  #categories { grid-template-columns: 1fr; }
  #pagination button, #pagination span { padding: 5px 8px; font-size: 0.8rem; }
  #zoomOverlay { display: none !important; }
  #product-image { transition: transform 0.3s ease; transform-origin: center center; touch-action: none; cursor: zoom-in; }
  #product-image.zoomed { cursor: grab; z-index: 1000; }
  #product-image.dragging { cursor: grabbing; }
  #mobileZoomClose { display: none; position: fixed; top: 15px; right: 15px; z-index: 1001; font-size: 30px; background: rgba(0,0,0,0.5); color: white; border: none; border-radius: 50%; width: 40px; height: 40px; line-height: 36px; text-align: center; cursor: pointer; transition: opacity 0.3s ease; }
  #mobileZoomClose.active { display: block; opacity: 1; }
}
@media (max-width: 600px) {
  .footer-container { flex-direction: column; text-align: center; gap: 10px; }
}
@media (max-width: 480px) {
  .logo-item { margin: 0 10px; padding: 6px 8px; }
  .logo-item img { width: 100px; }
  .slide-content h1 { font-size: 1.2rem; }
  .slide-content p { font-size: 0.9rem; }
  .cta-btn { padding: 6px 12px; font-size: 0.85rem; }
  #pagination button, #pagination span { padding: 4px 6px; font-size: 0.7rem; }
}

input[name="website_url"] {
  position: absolute;
  left: -9999px;
}