/* =========================================
   Pakeshti Shop - Blog Sidebar (FIXED)
   Woodmart Child Theme
   ========================================= */


/* ---------- Sidebar Container ---------- */

.widget-area {
    direction: rtl;
    font-family: inherit;
    overflow: visible !important; /* جلوگیری از بریده شدن محتوای درون ستون */
}


/* ---------- Individual Widgets ---------- */

.widget-area .wd-widget {
    background: #111111;
    border: 1px solid #2b2b2b !important;
    border-radius: 12px !important;
    padding: 22px !important;
    margin-bottom: 25px !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
    transition: border-color 0.25s ease, transform 0.25s ease;
    
    /* حل مشکل اصلی: کشیدن لایه به بیرون و باز کردن فضای پایین */
    box-sizing: border-box !important;
    overflow: visible !important;
    display: block !important;
    height: auto !important;
    max-height: none !important;
}

.widget-area .wd-widget:hover {
    border-color: #e30613 !important;
}


/* ---------- Widget Titles ---------- */

.widget-area .wp-block-heading {
    position: relative;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.6;
    margin: 0 0 18px !important;
    padding: 0 14px 12px 0 !important;
    border-bottom: 1px solid #2d2d2d !important;
}


/* Red line beside title */

.widget-area .wp-block-heading::before {
    content: "";
    position: absolute;
    right: 0;
    top: 4px;
    width: 4px;
    height: 24px;
    background: #e30613;
    border-radius: 4px;
}


/* ---------- Search Widget ---------- */

.widget-area .widget_search {
    padding: 20px !important;
}

.widget-area .wp-block-search__label {
    display: block;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
}

.widget-area .wp-block-search__inside-wrapper {
    display: flex;
    gap: 8px;
    border: 0 !important;
}

.widget-area .wp-block-search__input {
    min-width: 0;
    width: 100%;
    height: 46px;
    background: #191919;
    color: #ffffff;
    border: 1px solid #333333;
    border-radius: 8px;
    padding: 0 14px;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.widget-area .wp-block-search__input::placeholder {
    color: #777777;
}

.widget-area .wp-block-search__input:focus {
    border-color: #e30613;
    box-shadow: 0 0 0 2px rgba(227, 6, 19, 0.12);
}

.widget-area .wp-block-search__button {
    height: 46px;
    background: #e30613 !important;
    color: #ffffff !important;
    border: 0 !important;
    border-radius: 8px;
    padding: 0 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

.widget-area .wp-block-search__button:hover {
    background: #ff1a27 !important;
    transform: translateY(-1px);
}


/* ---------- Lists ---------- */

.widget-area ul,
.widget-area ol,
.widget-area .wp-block-categories-list,
.widget-area .wp-block-archives-list {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
}


/* ---------- Latest Posts / Archives / Categories ---------- */

.widget-area li {
    position: relative;
    padding: 10px 16px 10px 0 !important;
    border-bottom: 1px solid #242424 !important;
}

.widget-area li:last-child {
    border-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.widget-area li::before {
    content: "";
    position: absolute;
    right: 0;
    top: 18px;
    width: 5px;
    height: 5px;
    background: #e30613;
    border-radius: 50%;
}


/* ---------- Links ---------- */

.widget-area a {
    color: #d6d6d6;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.9;
    transition: color 0.2s ease, padding-right 0.2s ease;
}

.widget-area a:hover {
    color: #e30613;
    padding-right: 4px;
}


/* ---------- Latest Posts ---------- */

.widget-area .wp-block-latest-posts__post-title {
    display: block;
    color: #e0e0e0;
}

.widget-area .wp-block-latest-posts__post-title:hover {
    color: #e30613;
}


/* ---------- Comments ---------- */

.widget-area .no-comments {
    color: #777777;
    font-size: 14px;
    line-height: 1.9;
    padding: 5px 0 0;
}


/* ---------- Categories & Archives ---------- */

.widget-area .wp-block-categories-list a,
.widget-area .wp-block-archives-list a {
    display: block;
}


/* ---------- Inner WordPress Group ---------- */

.widget-area .wp-block-group {
    margin: 0 !important;
    padding: 0 !important;
}


/* ---------- Mobile ---------- */

@media (max-width: 767px) {

    .widget-area .wd-widget {
        padding: 18px !important;
        margin-bottom: 15px !important;
        border-radius: 10px !important;
    }

    .widget-area .wp-block-heading {
        font-size: 17px;
    }

    .widget-area .wp-block-search__inside-wrapper {
        gap: 6px;
    }

    .widget-area .wp-block-search__button {
        padding: 0 14px;
    }

}