/* Custom Styles - Additional styles for Elegance Green Theme */

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(27, 67, 50, 0.97);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-content {
    width: 100%;
    max-width: 700px;
    padding: 0 20px;
}

.search-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 10px;
    transition: transform 0.3s ease;
}

.search-close:hover {
    transform: rotate(90deg);
}

.search-form-overlay {
    display: flex;
    border-bottom: 2px solid rgba(255,255,255,0.3);
}

.search-input-overlay {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2rem;
    padding: 20px 0;
    outline: none;
}

.search-input-overlay::placeholder {
    color: rgba(255,255,255,0.5);
}

.search-submit-overlay {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 20px;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100%;
    background: #fff;
    z-index: 10001;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.mobile-menu-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-nav {
    padding: 20px;
}

.mobile-nav-menu li {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-menu li a {
    display: block;
    padding: 15px 0;
    color: #2d2d2d;
    font-weight: 500;
}

.mobile-nav-menu li a:hover {
    color: #2D6A4F;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Header Top */
.header-top-left {
    display: flex;
    gap: 25px;
}

.header-contact {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Row Layout */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.content-area {
    flex: 1;
    padding: 0 15px;
}

.content-area.has-sidebar {
    flex: 0 0 70%;
    max-width: 70%;
}

.sidebar {
    flex: 0 0 30%;
    max-width: 30%;
    padding: 0 15px;
}

@media (max-width: 992px) {
    .content-area.has-sidebar,
    .sidebar {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Posts Grid */
.posts-grid {
    display: grid;
    gap: 30px;
}

/* WooCommerce Product Enhancements */
.woocommerce ul.products li.product {
    position: relative;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(27, 67, 50, 0.05);
    transition: all 0.3s ease;
    padding-bottom: 20px;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(27, 67, 50, 0.15);
}

.woocommerce ul.products li.product .woocommerce-loop-product__link {
    display: block;
}

.woocommerce ul.products li.product img {
    border-radius: 12px 12px 0 0;
    margin-bottom: 15px;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .price,
.woocommerce ul.products li.product .button {
    padding-left: 20px;
    padding-right: 20px;
}

/* Product Badges Position */
.woocommerce ul.products li.product .product-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
}

/* Quick View Modal */
.quick-view-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.quick-view-modal.active {
    opacity: 1;
    visibility: visible;
}

.quick-view-content {
    background: #fff;
    border-radius: 12px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

/* Loading Button State */
.button.loading {
    opacity: 0.7;
    pointer-events: none;
}

.button.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

.button.added {
    background: #40916C !important;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: 60px 20px;
}

.no-posts h2 {
    margin-bottom: 15px;
}

.no-posts p {
    margin-bottom: 25px;
    color: #6b6b6b;
}

/* WooCommerce Cart Widget */
.widget_shopping_cart_content {
    padding: 15px;
}

/* Product Rating Stars */
.woocommerce .star-rating span::before,
.woocommerce .star-rating::before {
    color: #E9C46A;
}

/* Quantity Wrapper */
.quantity-wrapper {
    display: flex;
    align-items: center;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e5e5e5;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: #2D6A4F;
    color: #fff;
    border-color: #2D6A4F;
}

.quantity-btn.minus {
    border-radius: 4px 0 0 4px;
}

.quantity-btn.plus {
    border-radius: 0 4px 4px 0;
}

/* Animation Delays */
.woocommerce ul.products li.product:nth-child(1) { animation-delay: 0s; }
.woocommerce ul.products li.product:nth-child(2) { animation-delay: 0.1s; }
.woocommerce ul.products li.product:nth-child(3) { animation-delay: 0.2s; }
.woocommerce ul.products li.product:nth-child(4) { animation-delay: 0.3s; }

/* Page Header Spacing */
.page-header + .section {
    padding-top: 60px;
}

/* Category Cards Hover Effect */
.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(27, 67, 50, 0.8), transparent);
    opacity: 0.7;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.category-card:hover::before {
    opacity: 1;
}

.category-overlay {
    z-index: 2;
}

/* Better Focus States */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #2D6A4F;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .back-to-top,
    .mobile-menu,
    .search-overlay {
        display: none !important;
    }
    
    .site-content {
        margin: 0;
        padding: 0;
    }
}
