/*
Theme Name: Mercatino De Marco Theme
Theme URI: https://www.giuseppedemarco.it
Author: Giuseppe De Marco
Author URI: https://www.giuseppedemarco.it
Description: Tema su misura che replica esattamente l'esperienza grafica del sito statico con WooCommerce.
Version: 4.1.0
Requires at least: 6.0
*/

/* --- 1. RESET GENERALE E VARIABILI GRAFICHE --- */
:root {
--primary: #0066cc;
--primary-dark: #0052a3;
--accent: #ff9900;
--bg-light: #f8fafc;
--card-bg: #ffffff;
--text-dark: #0f172a;
--text-muted: #64748b;
--border: #e2e8f0;
--radius-sm: 8px;
--radius-md: 12px;
--radius-lg: 16px;
--shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
--shadow-hover: 0 10px 25px rgba(0,0,0,0.08);
}

{
box-sizing: border-box;
margin: 0;
padding: 0;
}

body, html {
background-color: var(--bg-light) !important;
color: var(--text-dark) !important;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
line-height: 1.5;
width: 100% !important;
overflow-x: hidden !important;
-webkit-font-smoothing: antialiased;
}

/* --- 2. HEADER NORMALE (SCORRE VIA ED ELEMINA L'EFFETTO FISSO) --- */
header,
.site-header,
#masthead,
.sticky-header {
position: relative !important;
top: auto !important;
bottom: auto !important;
left: auto !important;
right: auto !important;
transform: none !important;
background: #ffffff !important;
border-bottom: 1px solid var(--border) !important;
padding: 14px 0 !important;
width: 100% !important;
box-shadow: 0 2px 10px rgba(0,0,0,0.03) !important;
z-index: 10 !important;
}

/* Garanzia che nessun sotto-elemento rimanga bloccato a schermo */
.site-header *,
.header-container *,
.custom-logo-link,
.custom-logo-link img {
position: static !important;
float: none !important;
}

.header-container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 15px;
}

.site-title a {
font-size: 1.4rem;
font-weight: 800;
color: var(--primary);
text-decoration: none;
letter-spacing: -0.5px;
}

.custom-logo-link img {
max-height: 55px !important;
width: auto !important;
max-width: 220px !important;
object-fit: contain !important;
display: block !important;
}

/* Navigazione */
.main-navigation {
display: flex;
align-items: center;
gap: 20px;
}

.main-navigation ul {
display: flex;
list-style: none;
gap: 18px;
margin: 0;
padding: 0;
}

.main-navigation a {
color: var(--text-dark);
font-weight: 600;
font-size: 0.95rem;
text-decoration: none;
transition: color 0.2s;
}

.main-navigation a:hover {
color: var(--primary);
}

.cart-btn-link {
background: #eff6ff;
color: var(--primary) !important;
padding: 8px 16px;
border-radius: var(--radius-sm);
font-weight: 700;
font-size: 0.9rem;
}

/* --- 3. HERO BANNER BLU --- */
.hero-banner {
background: linear-gradient(135deg, #0052a3 0%, #0066cc 100%);
color: #ffffff;
padding: 60px 20px;
text-align: center;
}

.hero-content {
max-width: 800px;
margin: 0 auto;
}

.hero-badge {
background: rgba(255, 255, 255, 0.18);
color: #ffffff;
padding: 6px 16px;
border-radius: 20px;
font-size: 0.85rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
display: inline-block;
margin-bottom: 16px;
}

.hero-banner h1 {
font-size: 2.5rem;
font-weight: 900;
margin-bottom: 6px;
color: #ffffff;
}

.hero-sub {
font-size: 1.1rem;
opacity: 0.9;
margin-bottom: 16px;
font-weight: 500;
}

.hero-desc {
font-size: 1.05rem;
opacity: 0.95;
line-height: 1.6;
margin-bottom: 28px;
}

.hero-actions {
display: flex;
justify-content: center;
gap: 14px;
flex-wrap: wrap;
}

.btn-primary {
background: #ffffff;
color: var(--primary);
font-weight: 700;
padding: 12px 26px;
border-radius: var(--radius-sm);
text-decoration: none;
transition: all 0.2s;
}

.btn-primary:hover {
background: #f1f5f9;
transform: translateY(-2px);
}

.btn-outline {
background: transparent;
color: #ffffff;
border: 2px solid rgba(255, 255, 255, 0.4);
font-weight: 600;
padding: 10px 24px;
border-radius: var(--radius-sm);
text-decoration: none;
transition: all 0.2s;
}

.btn-outline:hover {
border-color: #ffffff;
background: rgba(255, 255, 255, 0.1);
}

/* --- 4. SEZIONE GARANZIE / FEATURES --- */
.features-grid {
max-width: 1200px;
margin: -30px auto 50px auto;
padding: 0 20px;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 20px;
position: relative;
z-index: 5;
}

.feature-card {
background: #ffffff;
padding: 24px;
border-radius: var(--radius-md);
box-shadow: var(--shadow-sm);
border: 1px solid var(--border);
text-align: center;
}

.feature-icon {
font-size: 2rem;
margin-bottom: 12px;
}

.feature-card h3 {
font-size: 1.15rem;
font-weight: 700;
margin-bottom: 8px;
color: var(--text-dark);
}

.feature-card p {
color: var(--text-muted);
font-size: 0.92rem;
}

/* --- 5. STORE SECTION & SCHEDE PRODOTTI WOOCOMMERCE --- */
.store-section {
max-width: 1200px;
margin: 0 auto;
padding: 20px 20px 60px 20px;
}

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

.section-title h2 {
font-size: 1.85rem;
font-weight: 800;
color: var(--text-dark);
}

.section-title p {
color: var(--text-muted);
font-size: 1rem;
margin-top: 6px;
}

.custom-products-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
gap: 24px;
list-style: none;
padding: 0;
margin: 0;
}

.custom-product-card {
background: #ffffff;
border: 1px solid var(--border);
border-radius: var(--radius-lg);
padding: 18px;
position: relative;
display: flex;
flex-direction: column;
justify-content: space-between;
transition: all 0.3s ease;
box-shadow: var(--shadow-sm);
}

.custom-product-card:hover {
transform: translateY(-5px);
box-shadow: var(--shadow-hover);
border-color: #cbd5e1;
}

.product-badge {
position: absolute;
top: 14px;
right: 14px;
background: #e2e8f0;
color: var(--text-dark);
font-size: 0.72rem;
font-weight: 700;
padding: 4px 10px;
border-radius: 12px;
z-index: 2;
}

.product-badge.sale {
background: #ef4444;
color: #ffffff;
}

.product-img-box {
width: 100%;
height: 200px;
background: #f8fafc;
border-radius: var(--radius-md);
overflow: hidden;
margin-bottom: 14px;
display: flex;
align-items: center;
justify-content: center;
}

.product-img-box img {
max-height: 100%;
width: auto;
max-width: 100%;
object-fit: contain;
padding: 10px;
}

.product-condition {
font-size: 0.78rem;
color: var(--primary);
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.5px;
display: block;
margin-bottom: 4px;
}

.product-title {
font-size: 1.05rem;
font-weight: 700;
line-height: 1.35;
margin-bottom: 10px;
}

.product-title a {
color: var(--text-dark);
text-decoration: none;
}

.product-title a:hover {
color: var(--primary);
}

.product-price-row {
font-size: 1.25rem;
font-weight: 800;
color: var(--primary);
margin-bottom: 14px;
}

.product-price-row del {
color: var(--text-muted);
font-size: 0.9rem;
margin-right: 6px;
font-weight: 500;
}

.product-action .button {
width: 100%;
background: var(--primary) !important;
color: #ffffff !important;
text-align: center;
padding: 10px 16px !important;
border-radius: var(--radius-sm) !important;
font-weight: 700 !important;
font-size: 0.9rem !important;
text-decoration: none !important;
display: block !important;
border: none !important;
transition: background 0.2s !important;
}

.product-action .button:hover {
background: var(--primary-dark) !important;
}

/* --- 6. FAQ SECTION --- */
.faq-section {
background: #ffffff;
border-top: 1px solid var(--border);
padding: 60px 20px;
}

.faq-container {
max-width: 760px;
margin: 0 auto;
display: flex;
flex-direction: column;
gap: 14px;
}

.faq-item {
border: 1px solid var(--border);
border-radius: var(--radius-md);
padding: 16px 20px;
background: var(--bg-light);
}

.faq-item summary {
font-weight: 700;
font-size: 1rem;
cursor: pointer;
color: var(--text-dark);
}

.faq-item p {
margin-top: 10px;
color: var(--text-muted);
font-size: 0.95rem;
line-height: 1.5;
}

/* --- 7. FOOTER SCURO --- */
.site-footer {
background: #0f172a;
color: #94a3b8;
padding: 40px 20px;
text-align: center;
font-size: 0.9rem;
}

.footer-container p {
margin-bottom: 6px;
}

.footer-container strong {
color: #ffffff;
}

/* --- 8. ADATTAMENTO MOBILE --- */
@media (max-width: 768px) {
.header-container {
flex-direction: column;
text-align: center;
}

.hero-banner h1 {
    font-size: 1.85rem;
}

.features-grid {
    margin-top: 20px;
}


}