/*
Theme Name: Ganesh Textiles
Theme URI: https://www.ganeshtextiles.lk
Author: Wintone Media
Author URI: https://wintonemedia.com
Description: Premium luxury textile showcase theme. Optimized for Hostinger, Elementor, and PHP 8.3+.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.6
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ganesh-textiles
Tags: one-column, two-columns, custom-colors, custom-logo, custom-menu, featured-images, translation-ready, rtl-language-support, editor-style
*/

/* =========================================
   CORE VARIABLES & RESET
   ========================================= */
:root {
  --brand-red: #8B1A1A; --brand-red-hover: #6B1414;
  --brand-green: #1B4D3E; --brand-green-hover: #143A2E;
  --luxury-gold: #C5A059; --bg-cream: #FAF8F5; --bg-cream-dark: #F0EBE3;
  --text-dark: #222222; --text-medium: #5A5A5A; --white: #FFFFFF;
  --shadow: 0 6px 16px rgba(0,0,0,0.08); --radius: 10px;
  --font-heading: 'Playfair Display', serif; --font-body: 'Lato', sans-serif;
  --max-width: 1200px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-body); color: var(--text-dark); background: var(--bg-cream); line-height: 1.6; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
.btn { display: inline-block; padding: 12px 28px; border-radius: var(--radius); font-weight: 600; cursor: pointer; border: 2px solid transparent; transition: all 0.3s ease; }
.btn-primary { background: var(--brand-red); color: var(--white); }
.btn-primary:hover { background: var(--brand-red-hover); transform: translateY(-2px); }
.btn-outline { background: transparent; border-color: var(--brand-green); color: var(--brand-green); }
.btn-outline:hover { background: var(--brand-green); color: var(--white); transform: translateY(-2px); }
.section { padding: 90px 0; }
.section-title { font-family: var(--font-heading); font-size: 2.6rem; text-align: center; margin-bottom: 40px; color: var(--text-dark); position: relative; }
.section-title::after { content: ''; display: block; width: 70px; height: 3px; background: var(--luxury-gold); margin: 14px auto 0; }

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
.utility-bar { background: var(--bg-cream-dark); padding: 10px 0; font-size: 0.9rem; border-bottom: 1px solid rgba(0,0,0,0.05); }
.utility-bar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.utility-bar a { color: var(--text-medium); font-weight: 500; margin-right: 15px; }
.btn-inquire { background: var(--brand-green); color: var(--white); padding: 6px 18px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; display: inline-block; }
.main-header { background: var(--white); border-bottom: 2px solid var(--bg-cream-dark); padding: 18px 0; position: relative; z-index: 100; }
.header-flex { display: flex; justify-content: space-between; align-items: center; }
.logo h1 { font-family: var(--font-heading); font-size: 1.9rem; color: var(--brand-red); margin: 0; }
.logo span { font-size: 0.8rem; color: var(--brand-green); letter-spacing: 1.5px; font-weight: 600; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { font-weight: 500; position: relative; padding: 8px 0; }
.nav-links a:hover, .nav-links a.active { color: var(--brand-green); }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; top: 100%; left: 0; background: var(--white); box-shadow: var(--shadow); border-radius: var(--radius); padding: 10px 0; min-width: 210px; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.3s ease; z-index: 100; border-top: 2px solid var(--brand-green); }
.dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a { display: block; padding: 10px 20px; color: var(--text-medium); }
.dropdown-menu a:hover { background: var(--bg-cream); color: var(--brand-green); }
.mobile-toggle { display: none; background: none; border: none; font-size: 1.8rem; cursor: pointer; }

/* =========================================
   HERO SLIDER
   ========================================= */
.hero-slider { position: relative; height: 80vh; min-height: 500px; overflow: hidden; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s ease-in-out; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; text-align: center; }
.slide.active { opacity: 1; z-index: 1; }
.slide-content { max-width: 800px; padding: 0 20px; }
.slide-content h2 { font-family: var(--font-heading); font-size: 3.4rem; margin-bottom: 22px; color: var(--text-dark); animation: slideUp 0.6s ease forwards; opacity: 0; }
.slide-content p { font-size: 1.25rem; color: var(--text-medium); margin-bottom: 35px; animation: slideUp 0.6s ease 0.2s forwards; opacity: 0; }
@keyframes slideUp { to { opacity: 1; transform: translateY(0); } }
.slider-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.85); border: none; font-size: 1.5rem; padding: 12px; cursor: pointer; z-index: 10; border-radius: 50%; transition: 0.3s; }
.slider-nav.prev { left: 30px; } .slider-nav.next { right: 30px; }
.slider-dots { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); display: flex; gap: 12px; z-index: 10; }
.slider-dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(0,0,0,0.25); border: none; cursor: pointer; transition: 0.3s; }
.slider-dot.active { background: var(--brand-red); transform: scale(1.2); }

/* =========================================
   STATS, PRODUCTS, ABOUT, TESTIMONIALS
   ========================================= */
.stats-section { background: var(--white); padding: 60px 0; border-bottom: 1px solid var(--bg-cream-dark); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; text-align: center; }
.counter { font-family: var(--font-heading); font-size: 2.8rem; color: var(--brand-red); font-weight: 700; display: block; }
.stat-item p { color: var(--text-medium); font-weight: 500; text-transform: uppercase; letter-spacing: 1px; margin-top: 5px; }
.category-grid, .product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-top: 30px; }
.card-image, .product-img { background: var(--bg-cream-dark); height: 220px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 3rem; overflow: hidden; transition: transform 0.4s ease; }
.product-card:hover .product-img { transform: scale(1.05); }
.product-card, .category-card { background: var(--white); border-radius: var(--radius); padding: 25px; box-shadow: var(--shadow); transition: transform 0.3s; border-bottom: 3px solid transparent; }
.product-card:hover, .category-card:hover { transform: translateY(-6px); border-bottom-color: var(--luxury-gold); }
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; margin-top: 30px; }
.testimonial-card { background: var(--white); padding: 30px; border-radius: var(--radius); border-left: 4px solid var(--brand-green); box-shadow: var(--shadow); }

/* =========================================
   CONTACT & FOOTER
   ========================================= */
.contact-cta { background: linear-gradient(135deg, var(--brand-green) 0%, #0F3328 100%); color: var(--white); text-align: center; }
.contact-cta .section-title { color: var(--white); } .contact-cta .section-title::after { background: var(--luxury-gold); }
.inquiry-form { max-width: 650px; margin: 0 auto; display: grid; gap: 16px; }
.inquiry-form input, .inquiry-form textarea { width: 100%; padding: 16px; border: none; border-radius: var(--radius); background: rgba(255,255,255,0.95); }
.main-footer { background: #0C2219; color: #E5E5E5; padding: 70px 0 30px; border-top: 4px solid var(--luxury-gold); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 45px; margin-bottom: 45px; }
.footer-col h4 { color: var(--luxury-gold); font-family: var(--font-heading); font-size: 1.4rem; margin-bottom: 20px; }
.footer-col a { color: #E5E5E5; } .footer-col a:hover { color: var(--luxury-gold); padding-left: 5px; }
.footer-bottom { border-top: 1px solid #153327; padding-top: 24px; text-align: center; font-size: 0.9rem; }
.scroll-top-btn { position: fixed; bottom: 30px; right: 30px; width: 48px; height: 48px; border-radius: 50%; background: var(--brand-red); color: var(--white); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transform: translateY(20px); transition: all 0.3s; z-index: 999; box-shadow: 0 6px 16px rgba(139,26,26,0.35); }
.scroll-top-btn.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top-btn:hover { background: var(--luxury-gold); }

/* Responsive */
@media (max-width: 768px) {
  .mobile-toggle { display: block; position: absolute; right: 20px; top: 22px; }
  .nav-links { flex-direction: column; width: 100%; max-height: 0; overflow: hidden; transition: max-height 0.4s ease; margin-top: 15px; }
  .nav-links.active { max-height: 500px; }
  .dropdown-menu { position: static; box-shadow: none; display: none; background: var(--bg-cream); padding-left: 20px; }
  .dropdown:hover .dropdown-menu { display: block; }
  .slide-content h2 { font-size: 2.2rem; }
  .hero-slider { height: 70vh; min-height: 400px; }
}