/*
Theme Name: Restora Comfort
Theme URI: https://restoracomfort.com
Description: Premium natural latex pillows & mattresses theme - Rediscover Your Peace
Author: Restora Comfort
Version: 1.0
Text Domain: restora-comfort
*/

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    overflow-x: hidden;
    margin: 0 !important;
    padding: 0 !important;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fdfdf9;
    width: 100%;
    overflow-x: hidden;
    margin: 0 !important;
    padding: 0 !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: transparent;
    box-shadow: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    width: 100%;
    margin: 0;
    transition: all 0.3s ease;
}

.navbar.fixed {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: rgba(255, 255, 255, 0.98) !important;
    animation: slideDown 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1) !important;
}

/* Navbar text colors for transparent nav */
.navbar .nav-menu li a {
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.navbar.fixed .nav-menu li a {
    color: #555;
    text-shadow: none;
}

.navbar .nav-brand h2 a {
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.navbar.fixed .nav-brand h2 a {
    color: #ab7534;
    text-shadow: none;
}

.navbar .cart-icon {
    color: white;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.5));
}

.navbar.fixed .cart-icon {
    color: #ab7534;
    filter: none;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Hide View Cart Button on Product Cards */
.added_to_cart {
    display: none !important;
}

/* Cart Sidebar */
.cart-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100%;
    background: white;
    z-index: 9999;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid #e0e0e0;
    background: #f9f9f9;
}

.cart-sidebar-header h3 {
    margin: 0;
    color: #6d4423;
    font-size: 1.5rem;
}

.close-cart-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-cart-btn:hover {
    background: #e0e0e0;
    color: #6d4423;
}

.cart-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 2rem;
}

.empty-cart-message {
    text-align: center;
    color: #999;
    font-size: 1.1rem;
    margin-top: 3rem;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cart-sidebar-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
    position: relative;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-details h4 {
    margin: 0 0 0.5rem 0;
    color: #6d4423;
    font-size: 1rem;
    line-height: 1.3;
}

.cart-item-price {
    color: #666;
    font-size: 0.9rem;
    margin: 0.3rem 0;
}

.cart-item-subtotal {
    color: #ab7534;
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0.3rem 0 0 0;
}

.remove-item {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 25px;
    height: 25px;
    background: #f44336;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.2rem;
    line-height: 1;
    transition: all 0.3s ease;
}

.remove-item:hover {
    background: #d32f2f;
    transform: scale(1.1);
}

.cart-sidebar-footer {
    padding: 1.5rem 2rem;
    border-top: 2px solid #e0e0e0;
    background: #f9f9f9;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.cart-total span {
    color: #666;
}

.cart-total strong {
    color: #ab7534;
    font-size: 1.5rem;
}

.btn-view-cart,
.btn-checkout {
    display: block;
    width: 100%;
    padding: 1rem;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    margin-bottom: 0.8rem;
}

.btn-view-cart {
    background: white;
    color: #ab7534;
    border: 2px solid #ab7534;
}

.btn-view-cart:hover {
    background: #f0f0f0;
}

.btn-checkout {
    background: #ab7534;
    color: white;
    border: 2px solid #ab7534;
    box-shadow: 0 4px 15px rgba(74, 124, 89, 0.3);
}

.btn-checkout:hover {
    background: #8d5e2a;
    border-color: #8d5e2a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(61, 101, 73, 0.4);
}

@media (max-width: 768px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}

/* Product card button wrapper */
.product-ctas {
    display: flex !important;
    gap: 1rem !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Ensure buttons in product cards look good together */
.product-card .product-ctas a {
    flex: 1 1 auto !important;
    min-width: fit-content !important;
    text-align: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

/* Cart Icon */
.cart-icon-wrapper {
    display: flex;
    align-items: center;
    margin-left: 1rem;
}

.cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    color: #ab7534;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.cart-icon:hover {
    background: rgba(74, 124, 89, 0.1);
    transform: scale(1.05);
}

.cart-icon svg {
    display: block;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #f44336;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.2rem 0.45rem;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    animation: cartPulse 0.3s ease;
}

@keyframes cartPulse {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.nav-brand h2 {
    color: #ab7534;
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
}

.nav-brand .custom-logo {
    max-height: 55px !important;
    max-width: 280px !important;
    width: auto !important;
    height: auto !important;
    display: block;
}

.nav-brand .custom-logo-link {
    display: block;
    line-height: 0;
}

.nav-brand .tagline {
    font-size: 0.85rem;
    color: #7a9985;
    font-style: italic;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu li a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu li a:hover {
    color: #ab7534;
}

.btn-cta {
    background: #ab7534;
    color: white !important;
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
}

.btn-cta:hover {
    background: #8d5e2a;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    overflow: hidden;
}

/* Hero Slider */
.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    color: white;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.hero-subtitle {
    font-size: 1.3rem;
    color: white;
    margin-bottom: 1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

.hero-supporting {
    font-size: 1.1rem;
    color: #f5d99f;
    margin-bottom: 2rem;
    font-style: italic;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

.hero-ctas {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.btn-primary {
    background: #ab7534;
    color: white;
}

.btn-primary:hover {
    background: #8d5e2a;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 124, 89, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #ab7534;
}

.btn-outline {
    background: transparent;
    color: #ab7534;
    border: 2px solid #ab7534;
    padding: 0.7rem 1.5rem;
}

.btn-outline:hover {
    background: #ab7534;
    color: white;
}

.btn-large {
    padding: 1.2rem 3rem;
    font-size: 1.1rem;
}

/* Animations */
.fade-in {
    animation: fadeIn 1s ease-in;
}

.fade-in-delay-1 {
    animation: fadeIn 1s ease-in 0.3s both;
}

.fade-in-delay-2 {
    animation: fadeIn 1s ease-in 0.6s both;
}

.fade-in-delay-3 {
    animation: fadeIn 1s ease-in 0.9s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Headings */
.section-heading {
    text-align: center;
    font-size: 2.5rem;
    color: #6d4423;
    margin-bottom: 3rem;
    font-weight: 700;
}

/* Why Section */
.why-section {
    padding: 5rem 2rem;
    background: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 15px;
    background: #f9fdf9;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(74, 124, 89, 0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: #6d4423;
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* Products Section */
.products-section {
    padding: 5rem 2rem;
    background: linear-gradient(to bottom, #fdfdf9, #f5f9f6);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}

.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(74, 124, 89, 0.2);
}

.product-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 2rem;
}

.product-info h3 {
    color: #6d4423;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.product-info p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.product-info .price {
    font-size: 1.3rem;
    color: #ab7534;
    font-weight: 700;
    margin-bottom: 1rem;
}

.product-info .price del {
    color: #999;
    font-size: 1rem;
    margin-right: 0.5rem;
}

.product-info .price ins {
    text-decoration: none;
}

.product-ctas {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.product-ctas a {
    flex: 1;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Problem-Solution Section */
.problem-solution {
    padding: 5rem 2rem;
    background: white;
}

.problems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.problem-item {
    text-align: center;
    padding: 1.5rem;
    background: #fff5f5;
    border-radius: 15px;
}

.problem-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.8rem;
}

.solution-statement {
    text-align: center;
    max-width: 700px;
    margin: 3rem auto 0;
    padding: 2rem;
}

.solution-statement p {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* Lifestyle Section */
.lifestyle-section {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('images/lifestyle-bg.jpg') center/cover;
    text-align: center;
    color: white;
}

.lifestyle-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 74, 53, 0.75);
}

.lifestyle-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    padding: 2rem;
}

.lifestyle-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.lifestyle-content p {
    font-size: 1.2rem;
    font-style: italic;
}

/* Reviews Section */
.reviews-section {
    padding: 5rem 2rem;
    background: #f9fdf9;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.review-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.stars {
    color: #ffa500;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.review-text {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 1rem;
    font-style: italic;
}

.reviewer {
    color: #ab7534;
    font-weight: 600;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.badge {
    text-align: center;
}

.badge-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* Comparison Section */
.comparison-section {
    padding: 5rem 2rem;
    background: white;
}

.comparison-table {
    max-width: 800px;
    margin: 0 auto;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

thead {
    background: #ab7534;
    color: white;
}

th, td {
    padding: 1.2rem;
    text-align: center;
}

tbody tr {
    border-bottom: 1px solid #eee;
}

tbody tr:hover {
    background: #f9fdf9;
}

th.highlight, td.highlight {
    background: #e8f5e9;
    font-weight: 600;
    color: #6d4423;
}

/* Final CTA Section */
.final-cta {
    padding: 5rem 2rem;
    background: linear-gradient(135deg, #ab7534 0%, #8d5e2a 100%);
    color: white;
    text-align: center;
}

.final-cta h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.final-cta .btn-primary {
    background: white;
    color: #ab7534;
}

.final-cta .btn-primary:hover {
    background: #f1f8f4;
}

.final-cta .btn-secondary {
    border-color: white;
    color: white;
}

.final-cta .btn-secondary:hover {
    background: white;
    color: #ab7534;
}

/* Footer */
.footer {
    background: #6d4423;
    color: white;
    padding: 3rem 0 1.5rem;
    width: 100%;
    margin: 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    color: #a8d5ba;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    font-style: italic;
    opacity: 0.9;
}

.footer-links h4,
.footer-contact h4 {
    color: #a8d5ba;
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-contact .btn-outline {
    border-color: white;
    color: white;
    margin-top: 1rem;
}

.footer-contact .btn-outline:hover {
    background: white;
    color: #6d4423;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-heading {
        font-size: 1.8rem;
    }
    
    .hero-ctas {
        flex-direction: column;
        align-items: center;
    }
    
    .products-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .product-ctas {
        flex-direction: column;
    }
}

/* Full Width Fix for All Pages */
html, body {
    max-width: 100% !important;
    width: 100% !important;
}

body > * {
    max-width: 100% !important;
}

.woocommerce-page {
    width: 100% !important;
    max-width: 100% !important;
}

.navbar, .footer {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

#page, #content, .site, .site-content {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Force remove WordPress/WooCommerce default spacing */
body.woocommerce-page,
body.woocommerce-checkout,
body.woocommerce-cart {
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure navbar and footer touch edges */
nav.navbar {
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
}

nav.navbar.fixed {
    left: 0 !important;
    right: 0 !important;
}

footer.footer {
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    left: 0 !important;
    right: 0 !important;
    position: relative !important;
}
