/*
 * Kim Kim Landscapers - Custom CSS Fixes
 * Add this file to fix mobile menu and other styling issues
 */

/* ====================================
   FIX: Mobile Menu Black Background
   ==================================== */

/* Mobile menu container styling */
@media (max-width: 991px) {
    /* Main menu background */
    .header-version2 #menu {
        background-color: #ffffff !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    /* Menu item links */
    .header-version2 #menu li a {
        color: #333333 !important;
        border-bottom: 1px solid #f0f0f0;
    }

    /* Active and hover states */
    .header-version2 #menu li.active > a,
    .header-version2 #menu li:hover > a {
        color: #6ab43e !important;
        background-color: #f5f5f5 !important;
    }

    /* Submenu styling */
    .header-version2 #menu ul {
        background-color: #f9f9f9 !important;
    }

    .header-version2 #menu ul li a {
        color: #666666 !important;
        padding-left: 30px !important;
    }

    .header-version2 #menu ul li a:hover {
        color: #6ab43e !important;
        background-color: #ffffff !important;
    }

    /* Mobile menu toggle button */
    .header-version2 .sm-menu-toggle {
        background-color: #6ab43e !important;
        color: #ffffff !important;
        border: none !important;
    }

    .header-version2 .sm-menu-toggle:hover {
        background-color: #5a9f35 !important;
    }

    /* Menu toggle icon */
    .header-version2 .sm-menu-toggle span {
        background-color: #ffffff !important;
    }
}

/* ====================================
   FIX: Additional Mobile Adjustments
   ==================================== */

/* Ensure header info is readable on mobile */
@media (max-width: 767px) {
    .header-top {
        padding: 10px 0;
    }

    .header-info li {
        font-size: 12px;
        margin-right: 10px;
    }

    .header-info li i {
        margin-right: 5px;
    }
}

/* ====================================
   ENHANCEMENT: Smooth Transitions
   ==================================== */

.header-version2 #menu li a {
    transition: all 0.3s ease;
}

.header-version2 .sm-menu-toggle {
    transition: background-color 0.3s ease;
}

/* ====================================
   FIX: Footer Layout on Mobile
   ==================================== */

@media (max-width: 767px) {
    footer .footer-title {
        margin-top: 30px;
    }

    footer .footer-logo {
        text-align: center;
    }

    footer p,
    footer ul {
        text-align: center;
    }
}

/* ====================================
   ENHANCEMENT: Call-to-Action Buttons
   ==================================== */

.btn-default:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(106, 180, 62, 0.3);
    transition: all 0.3s ease;
}

/* ====================================
   FIX: Table Responsiveness
   ==================================== */

@media (max-width: 767px) {
    .me-table {
        font-size: 13px;
    }

    .me-table td,
    .me-table th {
        padding: 8px 5px;
    }

    .btn-sm {
        padding: 4px 8px;
        font-size: 11px;
    }
}

/* ====================================
   ENHANCEMENT: Image Placeholders
   ==================================== */

/* Style for missing images - shows placeholder */
img[src*="placeholder"],
img[src=""],
img:not([src]) {
    background-color: #f0f0f0;
    border: 2px dashed #cccccc;
    display: inline-block;
    position: relative;
}

img[src*="placeholder"]::after,
img[src=""]::after,
img:not([src])::after {
    content: "Image Coming Soon";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999999;
    font-size: 14px;
}

/* ====================================
   FIX: Service Icons Alignment
   ==================================== */

.icon-shape-circle {
    width: 80px;
    height: 80px;
    line-height: 80px;
    text-align: center;
    border-radius: 50%;
    background-color: #6ab43e;
    color: #ffffff;
    margin-bottom: 20px;
    display: inline-block;
}

.icon-shape-circle i {
    font-size: 32px;
    line-height: 80px;
}

/* ====================================
   ENHANCEMENT: Contact Information
   ==================================== */

.text-color {
    color: #6ab43e !important;
}

.text-color:hover {
    color: #5a9f35 !important;
    text-decoration: underline;
}

/* Phone and email links */
a[href^="tel:"],
a[href^="mailto:"] {
    transition: color 0.3s ease;
}

a[href^="tel:"]:hover,
a[href^="mailto:"]:hover {
    color: #6ab43e !important;
}

/* ====================================
   FIX: Print Styles
   ==================================== */

@media print {
    .header-top,
    .sm-menu-toggle,
    footer,
    .btn,
    .subscribe-form {
        display: none !important;
    }

    body {
        font-size: 12pt;
    }

    a {
        text-decoration: none;
        color: #000000;
    }

    a[href^="tel:"]::after {
        content: " (" attr(href) ")";
    }
}

/* ====================================
   PRODUCT CARDS - UNIFORM LAYOUT
   ==================================== */

/* Product Card Styling */
.product-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background: #fff;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.product-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 15px;
}

.product-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.product-price {
    font-size: 20px;
    color: #6ab43e;
    font-weight: bold;
    margin-bottom: 10px;
}

.product-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
    flex-grow: 1;
}

/* WhatsApp Button Styling */
.btn-whatsapp {
    background-color: #25D366;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    font-weight: bold;
    transition: all 0.3s ease;
    text-align: center;
    border: none;
    cursor: pointer;
}

.btn-whatsapp:hover {
    background-color: #1fb855;
    color: white;
    text-decoration: none;
    transform: scale(1.05);
}

.btn-whatsapp i {
    margin-right: 5px;
    font-size: 16px;
}

/* Product Grid Layout */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-name {
        font-size: 16px;
    }

    .product-price {
        font-size: 18px;
    }

    .product-description {
        font-size: 13px;
    }
}

/* Single Info Box at Bottom */
.info-box-bottom {
    border: 2px solid #6ab43e;
    border-radius: 8px;
    padding: 30px;
    margin-top: 40px;
    background-color: #f9f9f9;
}

.info-box-bottom h4 {
    color: #6ab43e;
    margin-bottom: 20px;
}

.info-box-bottom p {
    line-height: 1.8;
    margin-bottom: 15px;
}

.info-box-bottom strong {
    color: #333;
}

/* ====================================
   FLOATING WHATSAPP BUTTON
   ==================================== */

.floating-whatsapp {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.floating-whatsapp:hover {
    background-color: #1fb855;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.floating-whatsapp i {
    font-size: 32px;
    color: #ffffff;
}

.floating-whatsapp .whatsapp-tooltip {
    position: absolute;
    right: 70px;
    background-color: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 14px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.floating-whatsapp:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Mobile adjustments */
@media (max-width: 576px) {
    .floating-whatsapp {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }

    .floating-whatsapp i {
        font-size: 28px;
    }

    .whatsapp-tooltip {
        display: none;
    }
}

/* ====================================
   AJAX SEARCH RESULTS DROPDOWN
   ==================================== */

.search-results-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 5px;
}

.search-results-header {
    padding: 12px 15px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
    color: #666;
}

.search-result-item {
    display: block;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s ease;
}

.search-result-item:hover {
    background-color: #f9f9f9;
    text-decoration: none;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-title {
    font-weight: 600;
    font-size: 15px;
    color: #333;
    margin-bottom: 4px;
}

.search-result-meta {
    font-size: 13px;
    color: #666;
}

.search-result-category {
    display: inline-block;
    background: #6ab43e;
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    margin-right: 8px;
}

.search-result-price {
    color: #6ab43e;
    font-weight: 600;
}

.search-no-results {
    padding: 20px 15px;
    text-align: center;
    color: #666;
}

.search-no-results p:first-child {
    font-size: 15px;
    margin-bottom: 10px;
}

.search-no-results p:last-child {
    font-size: 13px;
    color: #999;
}

/* Search panel positioning - prevents layout shift */
.search-panel {
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 300px;
    display: none;
    z-index: 9999;
}

.search-panel.active {
    display: block !important;
}

.additional-menu {
    position: relative;
}

/* ====================================
   SEARCH HIGHLIGHT EFFECT
   ==================================== */

.search-highlight {
    animation: highlight-pulse 2s ease-in-out;
    box-shadow: 0 0 0 4px #6ab43e !important;
    border-color: #6ab43e !important;
}

@keyframes highlight-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(106, 180, 62, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(106, 180, 62, 0.3);
    }
    100% {
        box-shadow: 0 0 0 4px rgba(106, 180, 62, 0.5);
    }
}

/* ====================================
   ACCESSIBILITY: Screen Reader Only
   ==================================== */

/* Hide visually but keep accessible for screen readers */
.sr-only {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
