/*
Theme Name: MS Gourmets RBE
Description: Thème WordPress personnalisé pour MS Gourmets, boutique artisanale de cookies à Valenciennes. Design élégant avec intégration WooCommerce complète.
Author: Riad BELMAHI
Version: 5.1
Tags: ecommerce, food, bakery, woocommerce, french
Text Domain: ms-gourmets
Domain Path: /languages
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables - French Bakery Color Palette */
:root {
  --background: hsl(36, 50%, 96%);
  --foreground: hsl(30, 20%, 15%);
  --card: hsl(36, 40%, 98%);
  --card-foreground: hsl(30, 20%, 15%);
  --primary: hsl(30, 85%, 55%);
  --primary-foreground: hsl(0, 0%, 100%);
  --secondary: hsl(35, 30%, 85%);
  --secondary-foreground: hsl(30, 20%, 25%);
  --muted: hsl(35, 20%, 90%);
  --muted-foreground: hsl(30, 15%, 45%);
  --accent: hsl(30, 85%, 55%);
  --accent-foreground: hsl(0, 0%, 100%);
  --border: hsl(35, 30%, 85%);
  --input: hsl(35, 30%, 85%);
  --ring: hsl(30, 85%, 55%);
  --radius: 0.75rem;
  --font-sans: 'Baloo 2', cursive, sans-serif;
  --font-serif: 'Fredoka One', cursive, sans-serif;
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(242, 140, 40, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(242, 140, 40, 0.03) 0%, transparent 40%);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Typography */
.font-serif {
  font-family: var(--font-serif);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  color: var(--foreground);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  background-color: hsl(30, 85%, 45%);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

/* Cards */
.card {
  background-color: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.15);
}

/* Header Styles */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 240, 230, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo img {
  height: 3rem;
  width: auto;
}

.main-nav {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.main-nav a {
  text-decoration: none;
  color: var(--foreground);
  font-weight: 500;
  transition: color 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Hero Section */
.hero-section {
  padding: 4rem 0;
  text-align: center;
  background: linear-gradient(135deg, var(--card) 0%, var(--background) 100%);
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  font-family: var(--font-serif);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.product-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s ease;
}

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

.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.product-content {
  padding: 1.5rem;
}

.product-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-serif);
}

.product-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin: 1rem 0;
}

/* Category Grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.category-card {
  text-align: center;
  padding: 2rem;
  background: var(--card);
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.15);
}

.category-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Footer */
.site-footer {
  background-color: var(--foreground);
  color: var(--background);
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .main-nav {
    display: none;
  }
  
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
  }
}

/* Cookie texture utility */
.cookie-texture {
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(139, 69, 19, 0.1) 1px, transparent 1px),
    radial-gradient(circle at 75% 75%, rgba(160, 82, 45, 0.08) 1px, transparent 1px);
  background-size: 60px 60px, 40px 40px;
}

/* WordPress specific styles */
.alignleft { float: left; margin-right: 1rem; }
.alignright { float: right; margin-left: 1rem; }
.aligncenter { display: block; margin: 0 auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-style: italic; text-align: center; }
.sticky { position: sticky; top: 0; }
.screen-reader-text { position: absolute; left: -9999px; }
/* =========================
   MS GOURMETS - Boutique
   ========================= */

/* ===== General Variables ===== */
:root {
    --background: hsl(36, 50%, 96%);
    --foreground: hsl(30, 20%, 15%);
    --card: hsl(36, 40%, 98%);
    --primary: hsl(30, 85%, 55%);
    --primary-foreground: hsl(0, 0%, 100%);
    --border: hsl(35, 30%, 85%);
    --radius: 0.75rem;
}

/* ===== Shop Header ===== */
.shop-header {
    background: linear-gradient(135deg, var(--card) 0%, var(--background) 100%);
    padding: 3rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

.woocommerce-products-header__title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--foreground);
}

.woocommerce-products-header .term-description {
    font-size: 1.125rem;
    color: hsl(30, 15%, 45%);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Shop Controls ===== */
.shop-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--card);
    border-radius: var(--radius);
}

.woocommerce-result-count { color: hsl(30, 15%, 45%); font-size: 0.9rem; }

.woocommerce-ordering select {
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
    color: var(--foreground);
}

.woocommerce-ordering select:focus { border-color: var(--primary); outline:none; }

/* ===== Products Grid ===== */
.products-grid,
.related.products,
.upsells.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.products-grid .product,
.related.products .product,
.upsells.products .product {
    text-align: center;
    border-radius: 20px 20px 8px 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.products-grid .product img,
.related.products .product img,
.upsells.products .product img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 20px 20px 8px 8px;
}

.products-grid .product:hover,
.related.products .product:hover,
.upsells.products .product:hover {
    transform: scale(1.03);
}

/* ===== No Products ===== */
.no-products {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--card);
    border-radius: var(--radius);
}

.no-products p { color: hsl(30, 15%, 45%); font-size: 1.125rem; }

/* ===== Pagination ===== */
.woocommerce-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 3rem;
}

.woocommerce-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    margin: 0 0.25rem;
    padding: 0.5rem;
    background: var(--background);
    color: var(--foreground);
    text-decoration: none;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.woocommerce-pagination .page-numbers:hover,
.woocommerce-pagination .page-numbers.current {
    background: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

/* ===== Single Product ===== */
.single-product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
.product-gallery-section img { border-radius: 20px 20px 8px 8px; }
.entry-summary .product_title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
}
.entry-summary .price { font-size: 2rem; font-weight: 700; color: var(--primary); margin-bottom:1.5rem; }
.cart { padding: 2rem; background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); margin-bottom:2rem; }

/* ===== Breadcrumb ===== */
.woocommerce-breadcrumb { font-size: 0.9rem; color: hsl(30, 15%, 45%); margin-bottom:1rem; }
.woocommerce-breadcrumb a { color: var(--primary); text-decoration: none; }
.woocommerce-breadcrumb a:hover { text-decoration: underline; }

/* ===== Product Tabs ===== */
.wc-tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 2rem; list-style: none; padding: 0; }
.wc-tabs li { margin-right: 2rem; }
.wc-tabs li a { display: block; padding: 1rem 0; color: hsl(30, 15%, 45%); text-decoration: none; font-weight:500; transition: color 0.3s ease; border-bottom:2px solid transparent; }
.wc-tabs li.active a, .wc-tabs li a:hover { color: var(--primary); border-bottom-color: var(--primary); }

/* ===== Responsive ===== */
@media(max-width:768px){
    .products-grid,
    .related.products,
    .upsells.products { grid-template-columns: 1fr; gap:1rem; }
    .products-grid .product img,
    .related.products .product img,
    .upsells.products .product img { height: 200px; }

    .single-product-layout { grid-template-columns: 1fr; gap:2rem; }
    .entry-summary .product_title { font-size:2rem; }
    .entry-summary .price { font-size:1.5rem; }
    .cart { padding:1.5rem; }
    .shop-controls { flex-direction: column; text-align: center; gap:1rem; }
    .woocommerce-products-header__title { font-size:2rem; }
}
