/* CSS for Premium Herbal Catalogue Widget */
.hc-9840b054-container {
    --hc-green-botanical: #477A45;
    --hc-green-deep: #245C43;
    --hc-green-fresh: #82A95B;
    --hc-teal: #20A6B5;
    --hc-turquoise: #18B6A8;
    --hc-cream: #F7F8F1;
    --hc-white: #FFFFFF;
    --hc-text-main: #242424;
    --hc-text-light: #686868;
    --hc-border: #E3E3E3;
    
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--hc-text-main);
    background: linear-gradient(135deg, #e8f5e9 0%, #e0f2f1 100%); /* Full height gradient */
    position: relative;
    box-sizing: border-box;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Contain floating leaves */
}

/* Admin bar offset for logged-in users */
body.admin-bar .hc-9840b054-container {
    min-height: calc(100vh - var(--wp-admin--admin-bar--height, 32px));
}

@media screen and (max-width: 782px) {
    body.admin-bar .hc-9840b054-container {
        min-height: calc(100vh - 46px);
    }
}

.hc-9840b054-container * {
    box-sizing: border-box;
}

/* Background Botanical Elements (now cover full container) */
.hc-9840b054-botanical-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none; /* Let clicks pass through */
    z-index: 0;
}

.hc-9840b054-leaf {
    position: absolute;
    background-color: var(--hc-green-fresh);
    opacity: 0.15;
    border-radius: 50% 0 50% 0;
    animation: hcFloat 15s infinite ease-in-out alternate;
}

.hc-leaf-1 { width: 80px; height: 80px; top: 5%; left: 10%; animation-delay: 0s; }
.hc-leaf-2 { width: 120px; height: 120px; top: 70%; right: 10%; animation-delay: -5s; border-radius: 0 50% 0 50%; background-color: var(--hc-teal); }
.hc-leaf-3 { width: 60px; height: 60px; top: 30%; right: 40%; animation-delay: -10s; }
.hc-leaf-4 { width: 100px; height: 100px; top: 40%; left: 5%; animation-delay: -7s; border-radius: 0 50% 0 50%; background-color: var(--hc-green-botanical); opacity: 0.1; }
.hc-leaf-5 { width: 70px; height: 70px; bottom: 10%; left: 30%; animation-delay: -3s; }

@keyframes hcFloat {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(30px, -20px) rotate(15deg); }
}

/* Header */
.hc-9840b054-header {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 30px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

body.admin-bar .hc-9840b054-header {
    top: var(--wp-admin--admin-bar--height, 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .hc-9840b054-header {
        top: 46px;
    }
}

.hc-9840b054-header-content {
    width: 100%;
    max-width: 600px;
    position: relative;
    z-index: 2;
}

.hc-9840b054-search-wrapper {
    position: relative;
    width: 100%;
    background: var(--hc-white);
    border-radius: 30px;
    box-shadow: 0 10px 25px rgba(36, 92, 67, 0.1);
    display: flex;
    align-items: center;
    padding: 5px 20px;
    border: 1px solid rgba(130, 169, 91, 0.5); /* Lighter border initially */
    transition: all 0.3s ease;
}

.hc-9840b054-search-wrapper:focus-within {
    box-shadow: 0 10px 30px rgba(36, 92, 67, 0.2);
    border-color: var(--hc-green-botanical);
}

.hc-9840b054-search-icon {
    color: var(--hc-green-botanical);
    margin-right: 15px;
}

.hc-9840b054-search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 15px 0;
    font-size: 16px;
    color: var(--hc-text-main);
    background: transparent;
}

.hc-9840b054-search-input::placeholder {
    color: var(--hc-text-light);
}

.hc-9840b054-search-clear {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--hc-text-light);
    cursor: pointer;
    padding: 0 10px;
    outline: none;
}

/* Body Layout */
.hc-9840b054-body {
    display: flex;
    flex-direction: row;
    gap: 30px;
    padding: 30px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
    position: relative;
    z-index: 10; /* Above background */
}

/* Sidebar A-Z */
.hc-9840b054-az-sidebar {
    flex: 0 0 50px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: sticky;
    top: 140px; /* Offset for header */
    height: max-content;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    padding-right: 5px;
    scrollbar-width: thin;
    scrollbar-color: var(--hc-green-botanical) transparent;
}

.hc-9840b054-az-sidebar::-webkit-scrollbar {
    width: 4px;
}
.hc-9840b054-az-sidebar::-webkit-scrollbar-thumb {
    background-color: var(--hc-green-botanical);
    border-radius: 10px;
}

body.admin-bar .hc-9840b054-az-sidebar {
    top: calc(140px + var(--wp-admin--admin-bar--height, 32px));
    max-height: calc(100vh - 160px - var(--wp-admin--admin-bar--height, 32px));
}

.hc-9840b054-az-btn {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 5px;
    font-size: 14px;
    font-weight: 600;
    color: var(--hc-text-light);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
}

.hc-9840b054-az-btn:hover,
.hc-9840b054-az-btn:focus {
    color: var(--hc-green-botanical);
    background: var(--hc-white);
    border-color: var(--hc-green-botanical);
}

.hc-9840b054-az-btn.active {
    background: var(--hc-green-botanical);
    color: var(--hc-white);
    border-color: var(--hc-green-botanical);
}

.hc-9840b054-az-all {
    margin-bottom: 10px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Product Grid */
.hc-9840b054-grid-container {
    flex: 1;
    min-width: 0;
}

.hc-9840b054-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

/* Pastel logic using CSS nth-child */
.hc-9840b054-card:nth-child(5n+1) .hc-9840b054-card-inner { background: #f2f6ed; }
.hc-9840b054-card:nth-child(5n+2) .hc-9840b054-card-inner { background: #eff3ec; }
.hc-9840b054-card:nth-child(5n+3) .hc-9840b054-card-inner { background: #f7f6ec; }
.hc-9840b054-card:nth-child(5n+4) .hc-9840b054-card-inner { background: #eaf3f0; }
.hc-9840b054-card:nth-child(5n+5) .hc-9840b054-card-inner { background: #f4f6e9; }

.hc-9840b054-card-inner {
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255,255,255,0.8);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.hc-9840b054-card-inner:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(36, 92, 67, 0.12);
}

.hc-9840b054-card-image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    background: var(--hc-white);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hc-9840b054-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hc-9840b054-no-img {
    background: rgba(255,255,255,0.5);
}

.hc-9840b054-card-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    line-height: 1.3;
    color: var(--hc-green-deep);
}

.hc-9840b054-read-more {
    margin-top: auto;
    background: var(--hc-green-botanical);
    color: var(--hc-white);
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    width: 100%;
    max-width: 200px;
}

.hc-9840b054-read-more:hover {
    background: var(--hc-green-deep);
}

.hc-9840b054-no-results {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: var(--hc-text-light);
    width: 100%;
    background: rgba(255,255,255,0.7);
    border-radius: 16px;
    backdrop-filter: blur(5px);
}

/* Modal Popup */
.hc-9840b054-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(36, 92, 67, 0.8);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(6px);
}

.hc-9840b054-modal-container {
    background: var(--hc-white);
    border-radius: 24px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
}

.hc-9840b054-modal-close {
    position: absolute;
    top: 20px; right: 20px;
    background: var(--hc-cream);
    border: none;
    width: 40px; height: 40px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    color: var(--hc-green-deep);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.hc-9840b054-modal-close:hover {
    background: #e5e5e5;
}

.hc-9840b054-modal-content {
    display: flex;
    flex-direction: row;
    padding: 40px;
    gap: 40px;
}

.hc-9840b054-modal-left {
    flex: 0 0 40%;
}

.hc-9840b054-modal-img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.hc-9840b054-modal-right {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hc-9840b054-modal-title {
    font-size: 32px;
    color: var(--hc-green-deep);
    margin: 0 0 24px 0;
    line-height: 1.2;
}

.hc-9840b054-modal-specs {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.hc-9840b054-spec-row {
    font-size: 16px;
    line-height: 1.5;
}

.hc-9840b054-spec-row strong {
    display: block;
    color: var(--hc-text-main);
    margin-bottom: 4px;
}

.hc-9840b054-spec-row span {
    color: var(--hc-text-light);
}

.hc-9840b054-modal-desc-wrap {
    margin-bottom: 32px;
}

.hc-9840b054-modal-desc-wrap strong {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
}

.hc-9840b054-modal-desc {
    color: var(--hc-text-light);
    line-height: 1.6;
}

/* Action Buttons */
.hc-9840b054-modal-actions {
    display: flex;
    gap: 16px;
    margin-top: auto;
}

.hc-9840b054-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    text-align: center;
}

.hc-9840b054-btn-whatsapp {
    background: var(--hc-green-botanical);
    color: var(--hc-white);
}

.hc-9840b054-btn-whatsapp:hover {
    background: var(--hc-green-deep);
}

.hc-9840b054-btn-call {
    background: var(--hc-white);
    color: var(--hc-green-botanical);
    border: 2px solid var(--hc-green-botanical);
}

.hc-9840b054-btn-call:hover {
    background: var(--hc-cream);
}

/* Responsive */
@media screen and (max-width: 991px) {
    .hc-9840b054-modal-content {
        flex-direction: column;
        padding: 24px;
        gap: 24px;
    }
    .hc-9840b054-modal-left {
        flex: none;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
}

@media screen and (max-width: 767px) {
    .hc-9840b054-body {
        flex-direction: column;
    }
    .hc-9840b054-az-sidebar {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        top: 0;
        padding: 10px 0;
        margin-bottom: 10px;
        position: relative;
        max-height: none;
        background: rgba(255,255,255,0.7);
        border-radius: 8px;
        backdrop-filter: blur(5px);
    }
    
    body.admin-bar .hc-9840b054-az-sidebar {
        top: 0; /* Reset for mobile */
    }

    .hc-9840b054-az-all {
        margin-bottom: 0;
        margin-right: 10px;
        display: flex;
        align-items: center;
    }
    .hc-9840b054-az-btn {
        flex: 0 0 auto;
        padding: 8px 12px;
    }
    .hc-9840b054-modal-actions {
        flex-direction: column;
    }
}
