/* --- CSS VARIABLES --- */
:root {
    --primary-dark: #37474F;   /* Dark Slate Grey */
    --primary-light: #CFD8DC;  /* Light Grey */
    --accent-blue: #78909C;    /* Muted Light Blue */
    --bg-white: #FFFFFF;
    --bg-offwhite: #F9FAFB;
    --text-main: #263238;
    --text-muted: #607D8B;
    --border-color: #ECEFF1;
    --max-width: 1200px;
}

/* --- RESET & BASE --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { 
    font-family: 'Inter', sans-serif; 
    color: var(--text-main); 
    background-color: var(--bg-white); 
    line-height: 1.6; 
    border-top: 8px solid var(--primary-dark); 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; 
    margin: 0;
}
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; padding: 0; }
img { max-width: 100%; display: block; }

/* --- HEADER --- */
header { background: var(--bg-white); padding: 20px 20px 40px; text-align: center; border-bottom: 1px solid var(--border-color); position: relative; }

.logo-container { margin-bottom: 20px; display: flex; justify-content: center; align-items: center; }
.site-logo { max-width: 300px; width: 100%; height: auto; display: block; }

nav ul { display: flex; justify-content: center; gap: 20px; margin-top: 20px; flex-wrap: wrap; }
nav a { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 1px; padding-bottom: 5px; }
nav a:hover, nav a.active { color: var(--primary-dark); border-bottom: 2px solid var(--accent-blue); }

/* --- HEADER ICONS --- */
.header-actions { position: absolute; top: 30px; right: 40px; display: flex; gap: 20px; align-items: center; }
.snipcart-checkout { cursor: pointer; color: var(--primary-dark); font-size: 1.2rem; position: relative; display: flex; align-items: center; }
.snipcart-items-count { background: var(--accent-blue); color: white; font-size: 0.7rem; padding: 2px 6px; border-radius: 50%; position: absolute; top: -8px; right: -8px; }
.trade-link { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; border-bottom: 1px dotted var(--text-muted); }

/* --- HERO SECTION --- */
.hero { text-align: center; padding: 80px 20px; background-color: var(--bg-offwhite); }
.hero h1 { font-size: 2.5rem; font-weight: 300; color: var(--primary-dark); margin-bottom: 20px; }
.hero p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 40px; max-width: 600px; margin: 0 auto 40px; }
.hero-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; max-width: var(--max-width); margin: 0 auto; }

.feature-box { background: var(--bg-white); border: 1px solid var(--border-color); padding: 30px; transition: transform 0.3s ease, box-shadow 0.3s ease; cursor: pointer; }
.feature-box:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); border-color: var(--accent-blue); }
.feature-box h3 { font-weight: 500; color: var(--primary-dark); }

/* --- PRODUCTS GRID (Standard) --- */
.section-container { max-width: var(--max-width); margin: 80px auto; padding: 0 20px; flex: 1; }
.section-title { display: table; margin: 0 auto 50px auto; font-size: 2rem; font-weight: 300; color: var(--primary-dark); position: relative; text-align: center; }
.section-title::after { content: ''; display: block; width: 60px; height: 2px; background: var(--accent-blue); margin: 15px auto 0; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 40px; }
.product-card { background: var(--bg-white); border: 1px solid var(--border-color); transition: 0.3s; display: flex; flex-direction: column; }
.product-card:hover { box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
.product-image-placeholder { width: 100%; height: 250px; background-color: var(--primary-light); display: flex; align-items: center; justify-content: center; color: var(--primary-dark); font-size: 0.9rem; opacity: 0.5; }
.product-info { padding: 25px; text-align: center; display: flex; flex-direction: column; flex-grow: 1; }
.product-name { font-size: 1.1rem; font-weight: 500; margin-bottom: 10px; color: var(--primary-dark); }
.product-desc { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 15px; flex-grow: 1; }
.product-price { display: block; font-weight: 600; margin-bottom: 15px; color: var(--accent-blue); }

/* --- FEATURED PRODUCT (Pack Layout) --- */
.featured-product { display: flex; flex-wrap: wrap; gap: 40px; background: #fff; border: 1px solid var(--border-color); padding: 40px; margin-bottom: 60px; align-items: flex-start; }
.featured-image { flex: 1 1 400px; padding: 10px; border: 1px solid #f5f5f5; }
.featured-details { flex: 1 1 400px; }
.featured-title { font-size: 1.8rem; color: var(--primary-dark); margin-bottom: 10px; }
.featured-price { font-size: 1.5rem; color: var(--accent-blue); font-weight: 600; margin-bottom: 20px; display: block; }
.content-list { margin-bottom: 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.content-list li { font-size: 0.9rem; color: var(--text-muted); display: flex; align-items: center; }
.content-list li i { color: #27ae60; margin-right: 8px; font-size: 0.8rem; }
.stock-badge { background: #E8F5E9; color: #2E7D32; padding: 4px 12px; font-size: 0.75rem; font-weight: 600; border-radius: 50px; text-transform: uppercase; letter-spacing: 1px; display: inline-block; margin-bottom: 15px; }

/* --- GALLERY STYLES (For Caskets) --- */
.gallery-container { display: flex; flex-direction: column; gap: 15px; }
.main-image-frame { width: 100%; height: 400px; border: 1px solid #eee; display: flex; align-items: center; justify-content: center; background: #f9f9f9; overflow: hidden; }
.main-image-frame img { max-width: 100%; max-height: 100%; object-fit: contain; }
.thumbnails { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.thumb { width: 100%; height: 80px; object-fit: cover; border: 2px solid transparent; cursor: pointer; opacity: 0.7; transition: 0.3s; }
.thumb:hover, .thumb.active { border-color: var(--accent-blue); opacity: 1; }

/* --- PARTNERS PAGE --- */
.partners-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px; margin-top: 40px; }
.partner-card { background: #fff; border: 1px solid var(--border-color); border-radius: 8px; padding: 30px; height: 200px; display: flex; align-items: center; justify-content: center; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.partner-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.08); border-color: var(--accent-blue); }
.partner-card img { max-width: 100%; max-height: 100%; object-fit: contain; filter: grayscale(100%); opacity: 0.8; transition: 0.3s; }
.partner-card:hover img { filter: grayscale(0%); opacity: 1; }

/* --- ACTIONS --- */
.qty-wrapper { display: flex; align-items: center; justify-content: flex-start; gap: 10px; margin-top: auto; margin-bottom: 15px; }
.qty-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.qty-input { width: 60px; padding: 8px; text-align: center; border: 1px solid var(--primary-light); font-size: 1rem; color: var(--primary-dark); }
.action-row { display: flex; flex-direction: column; gap: 10px; }
.btn-buy { width: 100%; padding: 12px; background-color: var(--primary-dark); color: white; border: 1px solid var(--primary-dark); text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; cursor: pointer; transition: 0.3s; }
.btn-buy:hover { background-color: var(--accent-blue); border-color: var(--accent-blue); }
.btn-trade { width: 100%; padding: 10px; background-color: transparent; color: var(--text-muted); border: 1px solid var(--primary-light); text-transform: uppercase; font-size: 0.75rem; letter-spacing: 1px; cursor: pointer; transition: 0.3s; }
.btn-trade:hover { border-color: var(--primary-dark); color: var(--primary-dark); }

/* --- CONTENT --- */
.contact-form-container, .about-content { max-width: 600px; margin: 0 auto; }
.about-content { text-align: center; max-width: 800px; }
.about-content p { margin-bottom: 20px; color: var(--text-muted); font-size: 1.05rem; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 0.9rem; color: var(--primary-dark); }
.form-group input, .form-group textarea { width: 100%; padding: 12px; border: 1px solid var(--primary-light); background: var(--bg-offwhite); font-family: inherit; font-size: 1rem; outline: none; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent-blue); }
.submit-btn { width: 100%; padding: 15px; background-color: var(--primary-dark); color: white; border: none; font-size: 1rem; cursor: pointer; text-transform: uppercase; letter-spacing: 1px; transition: 0.3s; }
.submit-btn:hover { background-color: var(--accent-blue); }
.contact-details { text-align: center; margin-top: 40px; color: var(--text-muted); }

/* --- FOOTER --- */
footer { background-color: var(--primary-dark); color: var(--bg-white); padding: 60px 20px 20px; width: 100%; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; max-width: var(--max-width); margin: 0 auto; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 40px; }
.footer-col h4 { margin-bottom: 20px; font-weight: 500; letter-spacing: 1px; color: var(--accent-blue); }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: #B0BEC5; font-size: 0.9rem; }
.footer-col ul li a:hover { color: var(--bg-white); }
.bottom-bar { text-align: center; padding-top: 20px; font-size: 0.8rem; color: #B0BEC5; }

/* --- RESPONSIVE --- */
@media (min-width: 768px) { .action-row { flex-direction: row; } }
@media (max-width: 768px) { 
    nav ul { flex-direction: column; gap: 10px; } 
    .header-actions { position: relative; top: auto; right: auto; justify-content: center; margin-bottom: 20px; }
    .site-logo { max-width: 200px; }
}
