:root {
    --primary: #5d4037;
    --primary-dark: #3e2723;
    --primary-light: #8d6e63;
    --accent: #d4a373;
    --accent-light: #faedcd;
    --bg: #fefae0;
    --text: #283618;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.85);
    --shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    --radius: 16px;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, .logo {
    font-family: 'Playfair Display', serif;
    color: var(--primary-dark);
}

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

/* --- SVGs e Iconos (Fix de Emergencia para Iconos Gigantes) --- */
svg {
    width: 20px !important;
    height: 20px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

/* Permitir excepciones para el logo o banners si fuera necesario */
.logo svg {
    width: auto !important;
    height: 32px !important;
    max-width: none !important;
}

/* --- Paginación de Laravel (Limpieza Total) --- */
.pagination-wrapper nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination-wrapper a, .pagination-wrapper span {
    padding: 10px 18px !important;
    border-radius: 8px !important;
    background: var(--white) !important;
    color: var(--primary) !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
    text-decoration: none !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.pagination-wrapper .active span {
    background: var(--primary) !important;
    color: white !important;
}

.pagination-wrapper svg {
    margin: 0 !important;
}

/* --- Header & Nav --- */
.main-header {
    background: var(--glass);
    backdrop-filter: blur(15px);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
}

.main-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: 900;
    text-decoration: none;
    color: var(--primary);
    letter-spacing: -1px;
}

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

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 10px 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a:hover {
    background: var(--accent-light);
    color: var(--primary-dark);
}

.nav-links li.active a {
    background: var(--accent);
    color: white;
}

/* --- Dropdowns --- */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 200px;
    box-shadow: var(--shadow);
    border-radius: 12px;
    list-style: none;
    padding: 15px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    padding: 10px 20px;
    display: block;
    width: 100%;
}

.dropdown-menu li a:hover {
    background: var(--accent-light);
}

/* --- Mega Dropdowns --- */
.mega-menu {
    display: flex !important;
    gap: 40px !important;
    padding: 30px !important;
    min-width: 550px !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(10px) !important;
    border-radius: 24px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid rgba(0,0,0,0.05) !important;
}

.dropdown:hover .dropdown-menu,
.dropdown:hover .mega-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
    pointer-events: auto;
}

.mega-column {
    flex: 1;
    min-width: 180px;
    list-style: none;
    display: flex;
    flex-direction: column;
}

.mega-title {
    display: block;
    font-weight: 800;
    color: var(--primary-dark);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-light);
}

.mega-column li {
    margin: 0;
}

.mega-column li a {
    padding: 8px 0 !important;
    font-size: 0.9rem !important;
    color: #555 !important;
    background: transparent !important;
    display: block !important;
    border-radius: 0 !important;
}

.mega-column li a:hover {
    color: var(--accent) !important;
    padding-left: 5px !important;
}

@media (max-width: 1024px) {
    .mega-menu {
        min-width: 90vw !important;
        flex-direction: column;
        gap: 20px !important;
        max-height: 80vh;
        overflow-y: auto;
    }
}

/* --- Hero Sections --- */
.category-hero {
    padding: 100px 0;
    text-align: center;
    color: white;
    margin-bottom: 50px;
    border-radius: 0 0 50px 50px;
    position: relative;
    overflow: hidden;
}

.category-hero h1 {
    font-size: 4rem;
    color: white;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* --- Grid & Cards --- */
.grid {
    display: grid;
    gap: 30px;
}

.grid-3 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

.post-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.post-image {
    height: 240px;
    overflow: hidden;
    position: relative;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-content h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

.post-content p {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 20px;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    text-align: center;
}

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

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

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

/* --- Pagination Styling --- */
.pagination-wrapper {
    margin: 60px 0;
    display: flex;
    justify-content: center;
}

nav[role="navigation"] {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pagination-wrapper .flex.justify-between {
    display: none; /* Ocultar versión mobile de Laravel si estorba */
}

.pagination-wrapper span, .pagination-wrapper a {
    padding: 10px 20px;
    background: white;
    border: 1px solid #ddd;
    margin: 0 5px;
    border-radius: 8px;
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s;
}

.pagination-wrapper .active span {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* --- Amazon CTA & Premium Buttons --- */
.btn-amazon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #f3a847 0%, #e77600 100%);
    color: #111;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(231, 118, 0, 0.3);
    transition: all 0.3s ease;
    border: 1px solid #e77600;
    margin: 20px 0;
}

.btn-amazon:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(231, 118, 0, 0.4);
    background: linear-gradient(135deg, #f4b45d 0%, #e77600 100%);
}

.btn-amazon svg {
    width: 24px !important;
    height: 24px !important;
}

/* --- Premium Glassmorphism --- */
.glass-premium {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    border-radius: 20px;
}

/* --- Typography & Reading Experience --- */
.product-content h2 {
    font-size: 2.2rem;
    color: var(--primary-dark);
    margin: 40px 0 20px 0;
    font-family: 'Playfair Display', serif;
    position: relative;
    padding-bottom: 10px;
}

.product-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

.product-content h3 {
    font-size: 1.6rem;
    color: var(--primary);
    margin: 30px 0 15px 0;
}

.product-content p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #4a4a4a;
    margin-bottom: 25px;
}

.product-content ul {
    margin-bottom: 25px;
    padding-left: 20px;
}

.product-content li {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #4a4a4a;
    margin-bottom: 10px;
    position: relative;
    list-style: none;
}

.product-content li::before {
    content: '✓';
    color: var(--accent);
    font-weight: bold;
    position: absolute;
    left: -20px;
}

/* --- Footer --- */
.main-footer {
    background: #1a120f;
    color: #a0a0a0;
    padding: 80px 0 30px;
    margin-top: 100px;
    position: relative;
    overflow: hidden;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--primary-light));
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-col h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 25px;
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.footer-col p {
    font-size: 0.95rem;
    line-height: 1.8;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #a0a0a0;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.social-links {
    display: none; /* Oculto temporalmente hasta tener URLs reales */
    gap: 15px;
}

.social-links a {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

/* --- Back to Top Button --- */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

/* --- Post Featured Image Fix --- */
.featured-image {
    width: 100%;
    max-height: 500px;
    object-fit: contain; /* Prevent cutting off */
    border-radius: 20px;
    margin-bottom: 30px;
    background: #fdfaf7; /* Fallback background */
}

/* --- Responsive --- */

/* --- Breadcrumbs --- */
.breadcrumbs {
    background: white;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 40px;
}

.breadcrumbs ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #888;
}

.breadcrumbs li::after {
    content: '/';
    margin-left: 10px;
}

.breadcrumbs li:last-child::after {
    content: none;
}

.breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumbs a:hover {
    color: var(--accent);
}

.breadcrumbs li.active {
    color: var(--primary-dark);
    font-weight: 700;
}

