/*
Theme Name: HSN Machinery
Theme URI: https://hsnmachinery.in
Author: HSN Machinery
Author URI: https://hsnmachinery.in
Description: Custom WordPress theme for HSN Machinery - Textile Recycling Equipment
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hsn-machinery
Tags: custom, business, machinery
*/

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Oxygen", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: #212529;
  background: #fff;
}
h1,h2,h3,h4,h5,h6 { font-family: "Montserrat", sans-serif; margin-top:0; }
a { color: #E6001E; text-decoration: none; }
a:hover { color: #b3001a; }
img { max-width:100%; height:auto; }
p { margin-top:0; margin-bottom:1rem; }

/* ===== LOADER ===== */
#loader {
  position: fixed; top:0; left:0; width:100%; height:100%;
  background:#fff; z-index:9999;
  display:flex; align-items:center; justify-content:center;
}
#loader.hide { display:none; }

/* ===== NAVBAR ===== */
.hsn-navbar {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
  position: sticky; top:0; z-index:1000;
  padding: 0 0;
}
.hsn-navbar .navbar-inner {
  max-width:1200px; margin:0 auto;
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 20px;
}
.hsn-navbar .logo img { height:55px; }
.hsn-nav-links { list-style:none; margin:0; padding:0; display:flex; gap:24px; }
.hsn-nav-links a {
  color:#333; font-weight:600; font-size:.9rem;
  text-transform:uppercase; letter-spacing:.5px;
  transition:color .2s;
}
.hsn-nav-links a:hover, .hsn-nav-links a.active { color:#E6001E; }
.hsn-nav-toggle { display:none; background:none; border:none; cursor:pointer; font-size:1.5rem; }

@media(max-width:991px){
  .hsn-nav-links { display:none; flex-direction:column; gap:0; position:absolute; top:80px; left:0; right:0; background:#fff; box-shadow:0 4px 10px rgba(0,0,0,.1); padding:10px 0; }
  .hsn-nav-links.open { display:flex; }
  .hsn-nav-links li a { display:block; padding:10px 20px; }
  .hsn-nav-toggle { display:block; }
}

/* ===== HERO BANNER ===== */
.hero-section {
  position:relative; overflow:hidden;
  background:#1a1a1a; color:#fff;
  min-height:80vh; display:flex; align-items:center;
}
.hero-section .hero-bg {
  position:absolute; inset:0;
  background-size:cover; background-position:center;
  opacity:.55;
}
.hero-section .hero-content {
  position:relative; z-index:2;
  max-width:1200px; margin:0 auto; padding:80px 20px;
}
.hero-section h1 { font-size:clamp(2rem,5vw,3.5rem); font-weight:700; margin-bottom:1rem; }
.hero-section p { font-size:1.15rem; max-width:600px; margin-bottom:2rem; opacity:.9; }

/* ===== BUTTONS ===== */
.btn-hsn {
  display:inline-block; padding:12px 32px;
  background:#E6001E; color:#fff; border:none;
  border-radius:3px; font-weight:600; font-size:.95rem;
  text-transform:uppercase; letter-spacing:.5px;
  cursor:pointer; transition:background .2s, transform .1s;
}
.btn-hsn:hover { background:#b3001a; color:#fff; transform:translateY(-1px); }
.btn-hsn-outline {
  background:transparent; border:2px solid #E6001E; color:#E6001E;
}
.btn-hsn-outline:hover { background:#E6001E; color:#fff; }

/* ===== SECTION TITLE ===== */
.section-title { text-align:center; margin-bottom:48px; }
.section-title h2 { font-size:2rem; font-weight:700; color:#1a1a1a; margin-bottom:12px; }
.section-title p { color:#666; max-width:600px; margin:0 auto; }
.section-title .divider {
  width:60px; height:3px; background:#E6001E; margin:14px auto 0;
}

/* ===== SECTIONS ===== */
section { padding:80px 0; }
.container { max-width:1200px; margin:0 auto; padding:0 20px; }
.bg-light-gray { background:#f8f9fa; }

/* ===== PRODUCT CARDS ===== */
.products-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(280px,1fr));
  gap:28px;
}
.product-card {
  background:#fff; border-radius:6px;
  box-shadow:0 2px 15px rgba(0,0,0,.08);
  overflow:hidden; transition:transform .2s, box-shadow .2s;
}
.product-card:hover { transform:translateY(-4px); box-shadow:0 8px 30px rgba(0,0,0,.13); }
.product-card img { width:100%; height:220px; object-fit:cover; }
.product-card .card-body { padding:20px; }
.product-card h3 { font-size:1.1rem; font-weight:700; margin-bottom:8px; color:#1a1a1a; }
.product-card p { font-size:.9rem; color:#666; margin-bottom:16px; }

/* ===== FEATURES / ICONS ===== */
.features-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(220px,1fr));
  gap:32px;
}
.feature-item { text-align:center; padding:20px; }
.feature-item .icon {
  font-size:2.5rem; color:#E6001E; margin-bottom:16px; display:block;
}
.feature-item h4 { font-size:1rem; font-weight:700; margin-bottom:8px; }
.feature-item p { font-size:.9rem; color:#666; margin:0; }

/* ===== ABOUT / TWO-COL ===== */
.two-col { display:grid; grid-template-columns:1fr 1fr; gap:48px; align-items:center; }
@media(max-width:768px){ .two-col { grid-template-columns:1fr; } }
.two-col img { border-radius:6px; box-shadow:0 4px 20px rgba(0,0,0,.12); }

/* ===== COUNTER ===== */
.counter-section { background:#E6001E; color:#fff; padding:60px 0; }
.counters-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:32px; text-align:center; }
.counter-item .number { font-size:2.8rem; font-weight:700; font-family:"Montserrat",sans-serif; }
.counter-item .label { font-size:.95rem; opacity:.85; }

/* ===== TESTIMONIALS ===== */
.testimonial-card {
  background:#fff; border-radius:6px;
  box-shadow:0 2px 15px rgba(0,0,0,.07);
  padding:32px; margin:10px;
}
.testimonial-card p { font-style:italic; color:#555; margin-bottom:16px; }
.testimonial-card .author { font-weight:700; color:#1a1a1a; }

/* ===== CONTACT ===== */
.contact-grid { display:grid; grid-template-columns:1fr 1fr; gap:40px; }
@media(max-width:768px){ .contact-grid { grid-template-columns:1fr; } }
.contact-info h3 { color:#E6001E; margin-bottom:8px; }
.contact-info p { color:#555; margin-bottom:6px; }
.contact-form input, .contact-form textarea, .contact-form select {
  width:100%; padding:12px 14px; border:1px solid #ddd; border-radius:4px;
  margin-bottom:14px; font-size:.95rem; font-family:inherit;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline:none; border-color:#E6001E;
}
.contact-form textarea { height:130px; resize:vertical; }

/* ===== PRODUCT DETAIL ===== */
.product-detail-hero {
  background:#f8f9fa; padding:60px 0;
}
.product-detail-hero h1 { font-size:clamp(1.5rem,3vw,2.5rem); color:#1a1a1a; }
.product-specs { border-collapse:collapse; width:100%; }
.product-specs th, .product-specs td { padding:10px 14px; border:1px solid #e0e0e0; text-align:left; }
.product-specs th { background:#f8f9fa; font-weight:700; width:40%; }
.product-gallery { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:12px; }
.product-gallery img { border-radius:4px; cursor:pointer; transition:opacity .2s; }
.product-gallery img:hover { opacity:.85; }

/* ===== FOOTER ===== */
.hsn-footer { background:#1a1a1a; color:#ccc; padding:60px 0 0; }
.footer-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:36px; margin-bottom:40px; }
.footer-col h4 { color:#fff; font-size:1rem; font-weight:700; margin-bottom:16px; text-transform:uppercase; letter-spacing:.5px; }
.footer-col p, .footer-col li { font-size:.88rem; color:#aaa; line-height:1.8; }
.footer-col ul { list-style:none; padding:0; margin:0; }
.footer-col ul li a { color:#aaa; transition:color .2s; }
.footer-col ul li a:hover { color:#E6001E; }
.footer-bottom { border-top:1px solid #333; padding:20px 0; text-align:center; font-size:.85rem; color:#777; }

/* ===== PAGE BANNER ===== */
.page-banner {
  background:#1a1a1a; color:#fff; padding:60px 0; text-align:center;
  position:relative; overflow:hidden;
}
.page-banner .bg { position:absolute; inset:0; background-size:cover; background-position:center; opacity:.35; }
.page-banner .content { position:relative; z-index:2; }
.page-banner h1 { font-size:clamp(1.8rem,4vw,3rem); font-weight:700; }
.page-banner .breadcrumb { color:#aaa; font-size:.9rem; }
.page-banner .breadcrumb a { color:#E6001E; }

/* ===== GUTENBERG BLOCK FIXES ===== */
.wp-block-image img { border-radius:6px; max-width:100%; height:auto; }
.wp-block-cover { position:relative; }
.wp-block-cover__inner-container { max-width:1200px; margin:0 auto; padding:0 20px; }
.wp-block-group { width:100%; }
.wp-block-columns { max-width:1200px; margin:0 auto; padding:0 20px; }
.wp-block-button__link { border-radius:3px; font-weight:600; text-transform:uppercase; letter-spacing:.5px; padding:12px 32px; }
.wp-block-separator.hsn-divider {
  width:60px; height:3px; background:#E6001E;
  border:none; margin:14px auto 28px; display:block;
}
.wp-block-separator.hsn-divider-left {
  width:50px; height:3px; background:#E6001E;
  border:none; margin:12px 0 20px; display:block;
}
.wp-block-list { padding-left:1.5rem; }
.wp-block-list li { margin-bottom:.4rem; }

/* Block container max-width fix */
.home-content .wp-block-group,
.page-content .wp-block-group,
.product-page-content .wp-block-group { width:100%; }

.home-content .wp-block-group > .wp-block-group__inner-container,
.page-content .wp-block-group > .wp-block-group__inner-container {
  max-width:1200px; margin:0 auto; padding:0 20px;
}

/* Hero cover block */
.hsn-hero-block.wp-block-cover { min-height:80vh !important; }
.hsn-hero-block .wp-block-cover__inner-container { max-width:1200px; margin:0 auto; padding:0 20px; }
.hsn-hero-block h1 { margin-bottom:1rem; }

/* Page banner block */
.page-banner-block { text-align:center; }
.page-banner-block .wp-block-group__inner-container { max-width:1200px; margin:0 auto; padding:0 20px; }

/* Counter / stats */
.counter-section .wp-block-columns { flex-wrap:wrap; justify-content:center; gap:0; }
.counter-section .wp-block-column { text-align:center; padding:20px; }
.counter-section .wp-block-column h3 { margin-bottom:8px; }

/* About image */
.about-img img, .product-featured-img img {
  border-radius:6px;
  box-shadow:0 4px 20px rgba(0,0,0,.12);
  width:100%;
}

/* Product specs table from shortcode */
.product-specs { border-collapse:collapse; width:100%; max-width:700px; margin:0 auto; }
.product-specs th, .product-specs td { padding:12px 16px; border:1px solid #e0e0e0; text-align:left; }
.product-specs th { background:#f8f9fa; font-weight:700; width:40%; }

/* Contact section */
.hsn-contact-section { padding:80px 0; }
.contact-grid { display:grid; grid-template-columns:1fr 1fr; gap:40px; }
.contact-info h3 { color:#E6001E; margin-bottom:8px; font-size:1rem; }
.contact-info p  { color:#555; margin-bottom:6px; }
.contact-form input, .contact-form textarea {
  width:100%; padding:12px 14px; border:1px solid #ddd;
  border-radius:4px; margin-bottom:14px;
  font-size:.95rem; font-family:inherit;
}
.contact-form input:focus, .contact-form textarea:focus { outline:none; border-color:#E6001E; }
.contact-form textarea { height:130px; resize:vertical; }
@media(max-width:768px) {
  .contact-grid { grid-template-columns:1fr; }
}

/* ===== UTILITIES ===== */
.text-center { text-align:center; }
.mt-4 { margin-top:2rem; }
.mb-4 { margin-bottom:2rem; }
.container { max-width:1200px; margin:0 auto; padding:0 20px; }
