/* --- Modern Layout & Nav --- */
:root {
  --primary: #2563eb;
  --dark: #0f172a;
  --light: #f8fafc;
  --white: #ffffff;
  --border: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --radius: 14px;
}
/* --- Global Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box;}
/* --- Base --- */
body { font-family: 'Mulish', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif; font-size: 1rem; color: var(--text-main); 
       line-height: 1.6; background: var(--white); }
h1 {font-size: 2rem;}
h2 {font-size: 1.5rem;}
h3 {font-size: 1rem;}
h4 {font-size: .875rem;}
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* --- Layout Containers --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
header { position: sticky; top: 0; z-index: 1000; /* keep it above content */ background: #ffffff; box-shadow: 0 2px 15px rgba(0,0,0,0.05);width: 100%;}
/* --- Top Bar --- */
.top-bar { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; gap: 20px; } 
.top-utils { display: flex; gap: 10px; } 
.top-utils a { font-size: 0.7rem; color: var(--text-muted); transition: color 0.3s ease; } 
.top-utils a:hover { color: var(--primary); }

/* --- Search Bar --- */
.search-container { flex: 1; position: relative; max-width: 280px; } 
.search-container input { width: 100%; padding: 12px 20px 12px 45px; border: 1px solid var(--border); border-radius: 8px; background: var(--light); }

/* --- The Main Nav Fix --- */
.main-nav { display: flex; align-items: center; gap: 40px; padding: 15px 0; border-top: 1px solid var(--border); } 
.main-nav > a, .dropdown > a { text-decoration: none; color: var(--dark); font-weight: 600; font-size: 1rem; display: flex; align-items: center; }

/* --- Vertical Dropdown Corrected --- */
.dropdown {position: relative; /* Essential for positioning the menu */}
.dropdown-menu { display: none; position: absolute; top: 100%; left: 0; background: var(--white); min-width: 220px; box-shadow: 0 2px 15px rgba(0,0,0,0.05); border-radius: 8px; padding: 10px 0; z-index: 1000; border: 1px solid var(--border); margin: 0; list-style: none; }
/* Vertical stacking for items inside */
.dropdown-menu li { width: 100%;}
.dropdown-menu li a { display: block; padding: 10px 20px; font-size: 0.9rem; font-weight: 500; color: var(--text-main); transition: all 0.2s ease; } 
.dropdown-menu li a:hover { background: var(--light); color: var(--primary); padding-left: 25px; }
/* Show on hover */
.dropdown:hover .dropdown-menu { display: block;}

/* --- Breadcrumb Polish --- */
.breadcrumb-wrapper { background: #f1f5f9; padding: 12px 0; border-bottom: 1px solid var(--border); } 
.breadcrumb { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; } 
.breadcrumb a { color: var(--text-muted); text-decoration: none; transition: var(--transition); } 
.breadcrumb a:hover { color: var(--primary); text-decoration: underline; } 
.breadcrumb span.separator { color: #cbd5e1; font-family: serif; } 
.breadcrumb span.current { color: var(--dark); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- Hero Slider --- */
.slider-container { position: relative; height: 400px; overflow: hidden; background: var(--dark); border-radius: 15px; margin-top: 20px; } 
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s ease-in-out; display: flex; align-items: center; background-size: cover; background-position: center; } 
.slide.active { opacity: 1; } 
.slide-content { padding: 0 80px; color: white; max-width: 700px; }

/* Ensure the content inside scales well with the shorter height */
.slide-content h2 { font-size: 2.8rem; line-height: 1.1; margin-bottom: 15px; } 
.slide-content p { font-size: 1.2rem; margin-bottom: 30px; opacity: 0.9; }

/* Slider Nav Dots */
.slider-dots { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; } 
.dot { width: 12px; height: 12px; background: rgba(255,255,255,0.3); border-radius: 50%; cursor: pointer; } 
.dot.active { background: #fff; width: 30px; border-radius: 10px; }

/* --- Product Grid --- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; padding: 50px 0; }
.card { border: 1px solid #eee; border-radius: var(--radius); overflow: hidden; transition: 0.3s; }
.card:hover { transform: translateY(-5px); box-shadow: 0 2px 15px rgba(0,0,0,0.05); }
.card-img { height: 200px; background: #f3f4f6; overflow: hidden; }
.card-img img { width: 100%; h-full: 100%; object-fit: cover; }
.card-body { padding: 20px; }
.card-body h3 { margin-bottom: 10px; font-size: 1.1rem; }
.sku { font-size: 0.8rem; color: var(--text-muted); display: block; margin-bottom: 15px; }
.btn-details { color: var(--primary); font-weight: 700; font-size: 0.9rem; }

/* ---  Page Header --- */
.page-header { background: var(--light); border-radius: var(--radius); padding: 10px 10px; margin: 20px 0; display: flex; align-items: center; gap: 40px; border: 1px solid var(--border); } 
.page-logo-large { width: 150px; height: 150px; background: #fff; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 15px rgba(0,0,0,0.05); flex-shrink: 0; } 
.page-info h1 { font-size: 2.2rem; margin-bottom: 10px; } 
.page-info p { color: var(--text-muted); }

@media (max-width: 768px) { .page-header { flex-direction: column; text-align: center; }}

/* --- Filter Bar --- */
.catalog-controls { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--border); margin-bottom: 30px; } 
.filter-group { display: flex; gap: 15px; } 
.filter-select { padding: 8px 15px; border-radius: 6px; border: 1px solid var(--border); background: #fff; font-size: 0.9rem; }

/* --- Featured Section Layout --- */
.featured-header { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 10px; padding: 10px; background: var(--light); border-radius: var(--radius); border: 1px solid var(--border); } 
/* --- Unified Master Product Grid --- */
.featured-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(250px,1fr)); gap: 25px; margin-top: 20px; } 
.product-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 20px; position: relative; display: flex; flex-direction: column; transition: all 0.4s cubic-bezier(0.175,0.885,0.32,1.275); } 
.product-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.08); border-color: var(--primary); }

/* Badge (from old version) */
.badge { position: absolute; top: 15px; left: 15px; background: var(--primary); color: white; padding: 4px 12px; border-radius: 4px; font-size: 0.7rem; font-weight: 700; z-index: 10; }

/* Image Thumbnail & Zoom Effect */
.product-thumb { width: 100%; aspect-ratio: 1/1; background: var(--light); border-radius: 8px; overflow: hidden; margin-bottom: 15px; } 
.product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; } 
.product-card:hover .product-thumb img { transform: scale(1.1); }

/* Content & Meta */
.product-meta { flex-grow: 1; /* Ensures the middle section expands so prices line up */}
.product-meta h3 { font-size: 1rem; /* Reduced from 1.15rem for better fit in 4-column layout */ margin: 10px 0 5px; color: var(--dark);}
.category-tag { font-size: .75rem; color: var(--muted);}
/* Star Rating Style */
.rating-container { display: flex; align-items: center; gap: 5px; margin-bottom: 8px; } 
.stars { color: #fbbf24; font-size: 1.1rem; letter-spacing: -2px; } 
.rating-count { font-size: 0.8rem; color: var(--text-muted); }

/* Bottom Row: Price and Status */
.product-price-row { display: flex; justify-content: space-between; align-items: center; margin-top: 2px; padding-top: 2px; border-top: 1px solid var(--light); } 
.price-tag { font-weight: 700; color: var(--dark); } 
.price-tag small { font-size: 0.8rem; font-weight: 400; color: var(--text-muted); margin-left: 2px; } 
.stock-badge { font-size: 0.75rem; padding: 4px 8px; background: #ecfdf5; color: #059669; border-radius: 20px; font-weight: 600; }

/* --- Modern Footer Styles --- */
.site-footer { background: var(--dark); color: #cbd5e1; padding: 50px 0 30px; margin-top: 80px; } 
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; margin-bottom: 60px; }

.footer-brand .logo { color: #fff; margin-bottom: 20px; display: block; } 
.footer-brand p { font-size: 0.95rem; line-height: 1.7; margin-bottom: 20px; } 
.footer-heading { color: #fff; font-size: 1.1rem; font-weight: 700; margin-bottom: 25px; text-transform: uppercase; letter-spacing: 1px; } 
.footer-links li { margin-bottom: 12px; } 
.footer-links a:hover { color: var(--primary); padding-left: 5px; } 
.footer-newsletter p { font-size: 0.9rem; margin-bottom: 15px; } 
.footer-form { display: flex; gap: 10px; } 
.footer-form input { flex: 1; padding: 12px; border-radius: 6px; border: 1px solid #334155; background: #1e293b; color: #fff; outline: none; } 
.footer-form button { background: var(--primary); color: #fff; border: none; padding: 0 20px; border-radius: 6px; font-weight: 600; cursor: pointer; } 
.footer-bottom { border-top: 1px solid #334155; padding-top: 30px; display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; }

@media (max-width: 992px) { .footer-grid { grid-template-columns: 1fr 1fr; }}
@media (max-width: 576px) {.footer-grid { grid-template-columns: 1fr; }}
@media (max-width: 768px) {.footer-bottom { flex-direction: column; gap: 20px; text-align: center; }}

/* --- Related Products Section --- */
.related-product { padding: 20px 0; border-top: 1px solid var(--border); margin-top: 20px;}

/* --- Product Detail Layout --- */
.product-container { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 60px 0; align-items: start; }
@media (max-width: 768px) { .product-container { grid-template-columns: 1fr; } }

/* --- Product Info Column Polish --- */
.product-info { display: flex; flex-direction: column; gap: 5px; } 
.product-info h1 { font-size: 2.2rem; color: var(--dark); line-height: 1.2; margin-bottom: 5px; } 

/* Pricing Section */
.product-price-large { font-size: 1.5rem; font-weight: 700; color: var(--dark); display: flex; align-items: baseline; gap: 8px; margin: 10px 0; } 
.product-price-large small { font-size: .875rem; color: var(--text-muted); font-weight: 400; }

/* --- Inquiry Form Styles --- */
.inquiry-box { background: #f8fafc; border: 2px solid var(--primary); border-radius: 12px; padding: 15px; margin-top: 5px; box-shadow: 0 2px 15px rgba(0,0,0,0.05); } 
.inquiry-box h3 { margin-bottom: 10px; font-size: 1.5rem; color: var(--dark); font-weight: 700;} 
.form-row { display: flex; gap: 10px;}
.form-row .form-group { flex: 1;}
@media (max-width: 768px) {
  .form-row { flex-direction: column; }
}
.form-group { margin-bottom: 10px; font-size: 1rem;} 
.form-group label { display: block; font-weight: 700; margin-bottom: 5px;} 
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; outline: none; } 
.form-group input:focus { border-color: var(--primary); } 
.btn-submit { background: var(--primary); color: white; padding: 15px; border: none; border-radius: 8px; font-weight: 700; cursor: pointer; font-size: 1rem; }
.hide-field { display:none; }
/* Description Text */
.product-overview { color: var(--text-muted); line-height: 1.7;}

/* Specifications Preview List */
.spec-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; list-style: none; padding: 0; margin-bottom: 25px;}
.spec-preview li { font-size: 0.9rem; color: var(--dark); display: flex; align-items: center; gap: 8px;}
.spec-preview li::before { content: "•"; color: var(--primary); font-weight: bold;}

/* --- Gallery Layout --- */
.gallery-container { display: flex; flex-direction: column; gap: 15px; } 
.main-view { width: 100%; aspect-ratio: 1 / 1; background: var(--bg-light); border-radius: var(--radius); overflow: hidden; border: 1px solid #eee; cursor: zoom-in; } 
.main-view img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.3s ease; } 
.thumbnails-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; } 
.thumb { aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden; cursor: pointer; border: 2px solid transparent; transition: 0.2s; background: var(--bg-light); } 
.thumb img { width: 100%; height: 100%; object-fit: cover; } 
.thumb:hover { border-color: #ddd; } 
.thumb.active { border-color: var(--primary); }

/* --- Lightbox Overlay --- */
.lightbox-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); z-index: 99999; justify-content: center; align-items: center; cursor: zoom-out; } 
.lightbox-overlay.active { display: flex; } 
.lightbox-content { max-width: 90vw; max-height: 90vh; object-fit: contain; border: 3px solid #fff; border-radius: 4px; animation: zoomIn 0.3s ease; } 
.lightbox-close { position: absolute; top: 30px; right: 40px; color: #fff; font-size: 50px; cursor: pointer; line-height: 1; }
@keyframes zoomIn { 
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
/* Update main-view to show it's clickable */
.main-view { cursor: zoom-in;}
/* --- End Lightbox Overlay --- */

/* --- product-details Long Description Styling --- */
.product-details-content { margin-top: 0; padding: 15px; border: 2px solid var(--border); border-radius: var(--radius); } 
.product-details-content h2 { font-size: 1.8rem; margin-bottom: 20px; color: var(--dark); position: relative; padding-bottom: 10px; } 
.product-details-content p { line-height: 1.8; color: var(--dark); margin-bottom: 20px; } 
.product-details-content table { width: 100%; border-collapse: collapse; margin: 30px 0; background: #fff; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); } 
.product-details-content table th { background: #f8fafc; text-align: left; padding: 15px 20px; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--dark); border-bottom: 2px solid var(--border); } 
.product-details-content table td { padding: 15px 20px; border-bottom: 1px solid var(--border); color: var(--text-muted); font-size: 0.95rem; } 
.product-details-content table tr:last-child td { border-bottom: none; } 
.product-details-content table tr:hover td { background: #f1f5f9; } 
.product-details-content ul { margin: 20px 0; padding-left: 20px; list-style: none; } 
.product-details-content ul li { position: relative; padding-left: 25px; margin-bottom: 12px; color: var(--text-muted); line-height: 1.6; } 
.product-details-content ul li::before { content: "→"; position: absolute; left: 0; color: var(--primary); font-weight: bold; } 
.product-details-content img { width: 100%; height: auto; border-radius: 12px; margin: 30px 0; box-shadow: 0 2px 15px rgba(0,0,0,0.05); }
/* --- End product-details Long Description Styling --- */

/* --- 404 Page Styling --- */
.error-container {text-align: center; justify-items: center; padding: 20px 0;}
.error-code { font-size: 8rem; font-weight: 700; color: var(--light); margin: 0; line-height: 1; text-shadow: 2px 2px 0px var(--border); }
.error-title { font-size: 2rem; color: var(--dark); margin-bottom: 20px; }
.error-message { max-width: 500px; margin: 0 auto 40px; color: var(--text-muted); line-height: 1.6; }
.error-search { max-width: 450px; margin: 0 auto 40px; }
.error-search form { display: flex; gap: 10px; }
.error-search input { flex-grow: 1; padding: 12px; border: 1px solid var(--border); border-radius: 6px; }
.error-actions { display: flex; justify-content: center; gap: 20px; margin-bottom: 50px; }
.tag-cloud { display: flex; justify-content: center; gap: 10px; margin-top: 15px; }
.tag-cloud a { padding: 6px 15px; background: #f1f5f9; color: var(--primary); border-radius: 20px; font-size: 0.85rem; text-decoration: none; transition: background 0.3s; }
.tag-cloud a:hover { background: var(--primary); color: #fff; }
        
/* --- Contact Page Layout --- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 60px; padding: 10px 0;}
@media (max-width: 992px) { .contact-grid { grid-template-columns: 1fr; }}
.contact-info-card { background: #0f172a; color: white; padding: 10px 20px; border-radius: 14px; height: fit-content; }
.contact-info-card h2 { margin-bottom: 20px; color: white; }
.info-item { display: flex; gap: 15px; margin-bottom: 10px; }
.info-icon { font-size: 1.2rem; color: #2563eb;}
.info-text h4 { margin-bottom: 5px; }
.info-text p { color: #cbd5e1; line-height: 1.5; }

/* --- Modern Pagination Styling --- */
.pagination { display:flex; justify-content:center; align-items:center; gap:8px; margin:60px 0; }
.pag-btn,.pag-num { padding:10px 18px; border:1px solid var(--border); border-radius:8px; background:var(--white); color:var(--dark); font-weight:600; font-size:.9rem; transition:var(--transition); }
.pag-num.active { background:var(--primary); color:var(--white); border-color:var(--primary); box-shadow:0 4px 12px rgba(37,99,235,.2); }
.pag-num:hover:not(.active),.pag-btn:hover { background:var(--light); border-color:var(--primary); color:var(--primary); }
.pag-btn { min-width:100px; text-align:center; }
