/*
Theme Name: Tooler Pro
Theme URI: https://tooler.ir
Author: Tooler Design Team
Author URI: https://tooler.ir
Description: تم حرفه‌ای و صنعتی برای فروشگاه ابزارآلات بازرگانی عبادی (tooler.ir). طراحی مدرن، RTL کامل، بهینه‌شده برای ووکامرس و تمرکز بر اعتمادسازی و تماس.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tooler-pro
Tags: e-commerce, rtl-language-support, custom-menu, featured-images, theme-options, woocommerce, translation-ready

Tooler Pro - Industrial Professional WooCommerce Theme
*/

/* ==========================================================================
   CSS Variables - Design System
   ========================================================================== */
:root {
  --primary: #0A2540;
  --primary-dark: #061A2E;
  --primary-light: #1E3A5F;
  --secondary: #F59E0B;
  --secondary-hover: #D97706;
  --secondary-light: #FEF3C7;
  --accent: #059669;
  --accent-light: #D1FAE5;
  --bg: #F8FAFC;
  --bg-card: #FFFFFF;
  --text: #1E293B;
  --text-muted: #64748B;
  --border: #E2E8F0;
  --border-dark: #CBD5E1;
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(10, 37, 64, 0.08);
  --shadow-hover: 0 12px 30px rgba(10, 37, 64, 0.12);
  --transition: all 0.25s ease;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Vazirmatn', 'Tahoma', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--secondary);
}

ul, ol {
  list-style: none;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary);
  margin-bottom: 0.75em;
}

h1 { font-size: 2.5rem; font-weight: 800; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Layout & Container
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 {
  position: relative;
  display: inline-block;
  margin-bottom: 12px;
}

.section-title h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--secondary);
  margin: 12px auto 0;
  border-radius: 2px;
}

/* ==========================================================================
   Top Bar
   ========================================================================== */
.top-bar {
  background: var(--primary-dark);
  color: #fff;
  font-size: 0.875rem;
  padding: 8px 0;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.top-bar a {
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.top-bar a:hover {
  color: var(--secondary);
}

.top-bar-left, .top-bar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  background: var(--bg-card);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 20px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.site-logo span {
  color: var(--secondary);
}

.main-navigation ul {
  display: flex;
  gap: 28px;
  align-items: center;
}

.main-navigation a {
  font-weight: 600;
  color: var(--text);
  position: relative;
  padding: 6px 0;
}

.main-navigation a::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--secondary);
  transition: width 0.3s ease;
}

.main-navigation a:hover::after,
.main-navigation .current-menu-item a::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-actions a,
.header-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--primary);
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}

.header-actions a:hover,
.header-actions button:hover {
  background: var(--secondary);
  color: #fff;
  border-color: var(--secondary);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary);
  cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  color: #fff;
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.05)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.04)"/><circle cx="40" cy="70" r="1" fill="rgba(255,255,255,0.03)"/></svg>');
  opacity: 0.6;
}

.hero .container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-content h1 {
  color: #fff;
  font-size: 3rem;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-content h1 span {
  color: var(--secondary);
}

.hero-content p {
  color: rgba(255,255,255,0.85);
  font-size: 1.2rem;
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--secondary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--secondary-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.6);
}

.btn-outline:hover {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}

.btn-dark {
  background: var(--primary);
  color: #fff;
}

.btn-dark:hover {
  background: var(--primary-dark);
  color: #fff;
}

/* ==========================================================================
   Trust Bar
   ========================================================================== */
.trust-bar {
  background: var(--bg-card);
  padding: 30px 0;
  box-shadow: var(--shadow);
  margin-top: -40px;
  position: relative;
  z-index: 10;
  border-radius: var(--radius);
  margin-left: 20px;
  margin-right: 20px;
}

.trust-items {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 10px;
}

.trust-item .icon {
  width: 56px;
  height: 56px;
  background: var(--secondary-light);
  color: var(--secondary-hover);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.trust-item h4 {
  font-size: 1rem;
  margin: 0;
  color: var(--primary);
}

.trust-item p {
  font-size: 0.85rem;
  margin: 0;
  color: var(--text-muted);
}

/* ==========================================================================
   Product Cards
   ========================================================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

.product-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}

.product-card .product-image {
  position: relative;
  aspect-ratio: 1;
  background: #f1f5f9;
  overflow: hidden;
}

.product-card .product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 20px;
  transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-badges {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-warranty {
  background: var(--accent-light);
  color: var(--accent);
}

.badge-industrial {
  background: var(--secondary-light);
  color: var(--secondary-hover);
}

.product-card .product-info {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-card h3 {
  font-size: 1.05rem;
  margin-bottom: 12px;
  line-height: 1.4;
}

.product-card h3 a {
  color: var(--primary);
}

.product-card h3 a:hover {
  color: var(--secondary);
}

.product-specs {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex-grow: 1;
}

.product-specs li {
  padding: 3px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.product-specs li::before {
  content: '•';
  color: var(--secondary);
  font-weight: bold;
}

.product-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.product-actions .btn {
  flex: 1;
  padding: 12px 16px;
  font-size: 0.9rem;
}

.product-actions .btn-icon {
  width: 44px;
  flex: 0 0 44px;
  padding: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--primary);
}

.product-actions .btn-icon:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ==========================================================================
   Why Us Section
   ========================================================================== */
.why-us {
  background: var(--bg-card);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.feature-item {
  text-align: center;
  padding: 30px 20px;
  border-radius: var(--radius);
  transition: var(--transition);
}

.feature-item:hover {
  background: var(--bg);
}

.feature-item .icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--secondary-light), #fff);
  color: var(--secondary-hover);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 20px;
}

.feature-item h3 {
  margin-bottom: 10px;
}

/* ==========================================================================
   CTA Section
   ========================================================================== */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  text-align: center;
  padding: 70px 0;
}

.cta-section h2 {
  color: #fff;
  margin-bottom: 16px;
}

.cta-section p {
  color: rgba(255,255,255,0.85);
  font-size: 1.15rem;
  margin-bottom: 28px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.8);
  padding: 60px 0 0;
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-widget h4 {
  color: #fff;
  margin-bottom: 20px;
  font-size: 1.15rem;
}

.footer-widget ul li {
  margin-bottom: 10px;
}

.footer-widget a {
  color: rgba(255,255,255,0.75);
}

.footer-widget a:hover {
  color: var(--secondary);
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  text-align: center;
  font-size: 0.9rem;
}

/* ==========================================================================
   Floating Call Button (Mobile)
   ========================================================================== */
.floating-call {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 60px;
  height: 60px;
  background: var(--secondary);
  color: #fff;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.45);
  z-index: 999;
  transition: var(--transition);
  text-decoration: none;
}

.floating-call:hover {
  transform: scale(1.1);
  color: #fff;
  background: var(--secondary-hover);
}

/* ==========================================================================
   WooCommerce Overrides
   ========================================================================== */
.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

.woocommerce ul.products li.product {
  width: 100% !important;
  margin: 0 !important;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
  padding: 0 !important;
}

.woocommerce ul.products li.product:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.woocommerce span.onsale {
  background: var(--secondary);
  color: #fff;
  border-radius: 6px;
  min-height: auto;
  line-height: 1.4;
  padding: 4px 10px;
  font-weight: 700;
}

.woocommerce .price {
  color: var(--primary);
  font-weight: 700;
}

.woocommerce a.button,
.woocommerce button.button {
  background: var(--secondary) !important;
  color: #fff !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 700 !important;
  padding: 12px 24px !important;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover {
  background: var(--secondary-hover) !important;
}

/* Single Product */
.woocommerce div.product {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}

.woocommerce div.product .product_title {
  color: var(--primary);
  font-size: 1.8rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 992px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .trust-items {
    grid-template-columns: repeat(2, 1fr);
  }

  .main-navigation {
    display: none;
  }

  .menu-toggle {
    display: block;
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }

  .hero {
    padding: 70px 0 50px;
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

  .trust-bar {
    margin-top: -20px;
  }

  .trust-items {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .section {
    padding: 40px 0;
  }

  .floating-call {
    display: flex;
  }

  .header-actions a:not(.cart-icon),
  .header-actions button:not(.menu-toggle) {
    display: none;
  }
}

@media (max-width: 480px) {
  .trust-items {
    grid-template-columns: 1fr;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Account Button in Header
   ========================================================================== */
.account-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  width: auto !important;
  height: auto !important;
  padding: 8px 16px !important;
  border-radius: 8px !important;
  background: var(--primary) !important;
  color: #fff !important;
  border: none !important;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}

.account-btn:hover {
  background: var(--primary-dark) !important;
  color: #fff !important;
}

.account-btn .account-text {
  display: inline;
}

/* ==========================================================================
   Hero Improvements
   ========================================================================== */
.hero-badge {
  display: inline-block;
  background: rgba(245, 158, 11, 0.15);
  color: var(--secondary);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 20px;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.hero-meta {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.75);
}

.hero-meta .divider {
  opacity: 0.4;
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-card {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 40px 32px;
  text-align: center;
  max-width: 320px;
}

.hero-card-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.hero-card h3 {
  color: #fff;
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.hero-card p {
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
  margin: 0;
}

/* ==========================================================================
   Categories Section
   ========================================================================== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: var(--transition);
  display: block;
  color: inherit;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--secondary);
  color: inherit;
}

.category-card .cat-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.category-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--primary);
}

.category-card p {
  font-size: 0.9rem;
  margin: 0;
  color: var(--text-muted);
}

/* Trust item improvements */
.trust-item {
  flex-direction: row;
  text-align: right;
  gap: 16px;
  padding: 12px 8px;
}

.trust-item .icon {
  flex-shrink: 0;
}

.trust-text h4 {
  margin: 0 0 4px;
  font-size: 0.95rem;
}

.trust-text p {
  margin: 0;
  font-size: 0.8rem;
}

/* Responsive tweaks for new elements */
@media (max-width: 768px) {
  .account-btn .account-text {
    display: none;
  }
  
  .account-btn {
    width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    justify-content: center;
  }

  .hero-meta {
    justify-content: center;
    flex-wrap: wrap;
  }

  .trust-item {
    flex-direction: column;
    text-align: center;
  }
}
