/*
Theme Name: Dinam
Theme URI: https://example.com/dinam
Author: Dinam Team
Author URI: https://example.com
Description: Thème e-commerce moderne avec support WooCommerce, système de catégories et design épuré
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.4
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: dinam
Tags: e-commerce, woocommerce, shop, modern, clean, white, responsive, categories
*/

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #fff;
  color: #333;
  line-height: 1.6;
}

/* Header */
header.site-header {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}

.site-logo {
  font-size: 2em;
  font-weight: 700;
  color: #667eea;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo img {
  height: 50px;
  width: auto;
}

.main-navigation ul {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-navigation a {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  transition: color 0.3s;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
  color: #667eea;
}

.header-actions {
  display: flex;
  gap: 20px;
  align-items: center;
}

.user-icon, .cart-icon {
  position: relative;
  cursor: pointer;
  font-size: 1.5em;
  transition: color 0.3s;
  text-decoration: none;
  color: #333;
}

.user-icon:hover, .cart-icon:hover {
  color: #667eea;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #e74c3c;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7em;
  font-weight: 700;
}

/* Main Content */
.main-content {
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 40px;
}

/* Sidebar Catégories */
.categories-sidebar {
  background: #f8f8f8;
  padding: 25px;
  border-radius: 10px;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.categories-sidebar h3 {
  font-size: 1.3em;
  margin-bottom: 20px;
  color: #333;
}

.product-categories {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
  padding: 0;
}

.product-categories li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-categories input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.product-categories label {
  cursor: pointer;
  font-size: 1em;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.product-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s;
}

.product-card:hover {
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  transform: translateY(-5px);
}

.product-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  background: #f5f5f5;
}

.product-info {
  padding: 20px;
}

.product-category-tag {
  font-size: 0.85em;
  color: #999;
  margin-bottom: 5px;
}

.product-name {
  font-size: 1.3em;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}

.product-description {
  color: #666;
  font-size: 0.9em;
  margin-bottom: 15px;
  line-height: 1.5;
}

.product-price {
  font-size: 1.5em;
  font-weight: 700;
  color: #667eea;
  margin-bottom: 15px;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.qty-btn {
  width: 35px;
  height: 35px;
  border: 2px solid #667eea;
  background: white;
  color: #667eea;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.2em;
  font-weight: 700;
  transition: all 0.3s;
}

.qty-btn:hover {
  background: #667eea;
  color: white;
}

.qty-display {
  font-weight: 600;
  font-size: 1.1em;
}

.btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1em;
  text-align: center;
  text-decoration: none;
  display: inline-block;
}

.btn-cart {
  background: #667eea;
  color: white;
  margin-bottom: 10px;
}

.btn-cart:hover {
  background: #5568d3;
}

.btn-buy {
  background: #2ecc71;
  color: white;
}

.btn-buy:hover {
  background: #27ae60;
}

/* Footer */
footer.site-footer {
  background: #333;
  color: white;
  text-align: center;
  padding: 30px 20px;
  margin-top: 50px;
}

/* Responsive */
@media (max-width: 968px) {
  .main-content {
    grid-template-columns: 1fr;
  }
  
  .categories-sidebar {
    position: static;
  }
  
  .main-navigation ul {
    display: none;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
  }
}

/* WooCommerce Compatibility */
.woocommerce .product {
  margin-bottom: 30px;
}

.woocommerce-page .content-area {
  width: 100%;
}