.cart-icon-custom {
    margin-left: 10px;
}

#menu-btn {
    display: none !important;
}

/* Menu Button Text Styling - matches language switcher button style */
#menu-btn-text {
    display: none;
    float: right;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Vazirmatn', 'Tahoma', 'Arial', sans-serif !important;
    margin-top: 0px;
    margin-left: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

#menu-btn-text:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

#menu-btn-text.menu-open {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
}

/* Show menu button text on mobile */
@media (max-width: 1199px) {
    #menu-btn-text {
        display: block;
    }
}

@media (max-width: 1300px) {
    .cart-icon-custom {
        width: 40px !important;
    }

    #mainmenu > li {
        margin-right: 15px !important;
    }
}

header.header-mobile {
    padding: 0;
}

@media only screen and (max-width: 1200px) {
    .sm-pt10 {
        padding: 0;
    }
}

@media (max-width: 1200px) {
    header.header-mobile {
        padding: 0 !important;
    }
}

@media only screen and (max-width: 800px) {
    #logo, #logo .inner {
        vertical-align: middle;
        height: auto;
        width: 130px;
        padding: 0.5rem !important;
    }

    .custom-menu-style {
        align-items: center !important;
        flex-wrap: nowrap !important;
    }
}

@media (max-width: 768px) {
    header.header-light .de-flex-col:first-child {
        width: 32% !important;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }


    .cart-icon-custom {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    #menu-btn-text {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .product-search-wrapper.position-relative {
        display: none !important;
    }
}

@media (min-width: 768px)and (max-width: 1200px) {
    #content {
        margin-top: 0 !important;
    }

    #mainmenu {
        display: none;
    }
}

/* ============================================
   CKEditor Content Styles
   Styles to match CKEditor admin appearance
   ============================================ */

/* Base CKEditor content container */
.ckeditor-content,
.dropcap-text {
    line-height: 1.8;
    color: inherit;
    font-size: inherit;
}

/* Paragraphs */
.ckeditor-content p,
.dropcap-text p {
    margin: 1em 0;
}

.ckeditor-content p:first-child,
.dropcap-text p:first-child {
    margin-top: 0;
}

.ckeditor-content p:last-child,
.dropcap-text p:last-child {
    margin-bottom: 0;
}

/* Headings */
.ckeditor-content h1,
.ckeditor-content h2,
.ckeditor-content h3,
.ckeditor-content h4,
.ckeditor-content h5,
.ckeditor-content h6,
.dropcap-text h1,
.dropcap-text h2,
.dropcap-text h3,
.dropcap-text h4,
.dropcap-text h5,
.dropcap-text h6 {
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    font-weight: bold;
    line-height: 1.3;
}

.ckeditor-content h1:first-child,
.ckeditor-content h2:first-child,
.ckeditor-content h3:first-child,
.ckeditor-content h4:first-child,
.ckeditor-content h5:first-child,
.ckeditor-content h6:first-child,
.dropcap-text h1:first-child,
.dropcap-text h2:first-child,
.dropcap-text h3:first-child,
.dropcap-text h4:first-child,
.dropcap-text h5:first-child,
.dropcap-text h6:first-child {
    margin-top: 0;
}

.ckeditor-content h1,
.dropcap-text h1 {
    font-size: 2.5em;
}

.ckeditor-content h2,
.dropcap-text h2 {
    font-size: 2em;
}

.ckeditor-content h3,
.dropcap-text h3 {
    font-size: 1.75em;
}

.ckeditor-content h4,
.dropcap-text h4 {
    font-size: 1.5em;
}

.ckeditor-content h5,
.dropcap-text h5 {
    font-size: 1.25em;
}

.ckeditor-content h6,
.dropcap-text h6 {
    font-size: 1.1em;
}

/* Images - Match CKEditor styling */
.ckeditor-content img,
.dropcap-text img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5em auto;
    border-radius: 4px;
}

/* CKEditor 5 Image Style Classes - These are the classes CKEditor outputs */
/* Side image style - floats to the side with text wrapping */
.ckeditor-content .image-style-side,
.ckeditor-content figure.image-style-side,
.dropcap-text .image-style-side,
.dropcap-text figure.image-style-side {
    float: right;
    width: 50%;
    margin: 1em 0 1em 1.5em;
    max-width: 50%;
}

[dir="rtl"] .ckeditor-content .image-style-side,
[dir="rtl"] .ckeditor-content figure.image-style-side,
[dir="rtl"] .dropcap-text .image-style-side,
[dir="rtl"] .dropcap-text figure.image-style-side {
    float: left;
    margin: 1em 1.5em 1em 0;
}

.ckeditor-content .image-style-side img,
.ckeditor-content figure.image-style-side img,
.dropcap-text .image-style-side img,
.dropcap-text figure.image-style-side img {
    width: 100%;
    margin: 0;
    display: block;
}

/* Align left - floats left */
.ckeditor-content .image-style-align-left,
.ckeditor-content figure.image-style-align-left,
.dropcap-text .image-style-align-left,
.dropcap-text figure.image-style-align-left {
    float: left;
    margin: 0.5em 1.5em 0.5em 0;
    max-width: 50%;
}

[dir="rtl"] .ckeditor-content .image-style-align-left,
[dir="rtl"] .ckeditor-content figure.image-style-align-left,
[dir="rtl"] .dropcap-text .image-style-align-left,
[dir="rtl"] .dropcap-text figure.image-style-align-left {
    float: right;
    margin: 0.5em 0 0.5em 1.5em;
}

.ckeditor-content .image-style-align-left img,
.ckeditor-content figure.image-style-align-left img,
.dropcap-text .image-style-align-left img,
.dropcap-text figure.image-style-align-left img {
    width: 100%;
    margin: 0;
    display: block;
}

/* Align right - floats right */
.ckeditor-content .image-style-align-right,
.ckeditor-content figure.image-style-align-right,
.dropcap-text .image-style-align-right,
.dropcap-text figure.image-style-align-right {
    float: right;
    margin: 0.5em 0 0.5em 1.5em;
    max-width: 50%;
}

[dir="rtl"] .ckeditor-content .image-style-align-right,
[dir="rtl"] .ckeditor-content figure.image-style-align-right,
[dir="rtl"] .dropcap-text .image-style-align-right,
[dir="rtl"] .dropcap-text figure.image-style-align-right {
    float: left;
    margin: 0.5em 1.5em 0.5em 0;
}

.ckeditor-content .image-style-align-right img,
.ckeditor-content figure.image-style-align-right img,
.dropcap-text .image-style-align-right img,
.dropcap-text figure.image-style-align-right img {
    width: 100%;
    margin: 0;
    display: block;
}

/* Align center - centered block */
.ckeditor-content .image-style-align-center,
.ckeditor-content figure.image-style-align-center,
.dropcap-text .image-style-align-center,
.dropcap-text figure.image-style-align-center {
    margin: 1.5em auto;
    text-align: center;
    max-width: 100%;
    display: block;
    clear: both;
}

.ckeditor-content .image-style-align-center img,
.ckeditor-content figure.image-style-align-center img,
.dropcap-text .image-style-align-center img,
.dropcap-text figure.image-style-align-center img {
    margin: 0 auto;
    display: block;
}

/* Full width image */
.ckeditor-content .image-style-full,
.ckeditor-content figure.image-style-full,
.dropcap-text .image-style-full,
.dropcap-text figure.image-style-full {
    width: 100%;
    margin: 1.5em 0;
    clear: both;
}

.ckeditor-content .image-style-full img,
.ckeditor-content figure.image-style-full img,
.dropcap-text .image-style-full img,
.dropcap-text figure.image-style-full img {
    width: 100%;
    margin: 0;
    display: block;
}

/* Fallback: Image alignment styles from inline styles (for backwards compatibility) */
.ckeditor-content img[style*="float: left"],
.ckeditor-content img[style*="float:left"],
.dropcap-text img[style*="float: left"],
.dropcap-text img[style*="float:left"] {
    float: left;
    margin: 0.5em 1.5em 0.5em 0;
    display: inline-block;
}

[dir="rtl"] .ckeditor-content img[style*="float: left"],
[dir="rtl"] .ckeditor-content img[style*="float:left"],
[dir="rtl"] .dropcap-text img[style*="float: left"],
[dir="rtl"] .dropcap-text img[style*="float:left"] {
    float: right;
    margin: 0.5em 0 0.5em 1.5em;
}

.ckeditor-content img[style*="float: right"],
.ckeditor-content img[style*="float:right"],
.dropcap-text img[style*="float: right"],
.dropcap-text img[style*="float:right"] {
    float: right;
    margin: 0.5em 0 0.5em 1.5em;
    display: inline-block;
}

[dir="rtl"] .ckeditor-content img[style*="float: right"],
[dir="rtl"] .ckeditor-content img[style*="float:right"],
[dir="rtl"] .dropcap-text img[style*="float: right"],
[dir="rtl"] .dropcap-text img[style*="float:right"] {
    float: left;
    margin: 0.5em 1.5em 0.5em 0;
}

.ckeditor-content img[style*="text-align: center"],
.ckeditor-content img[style*="text-align:center"],
.ckeditor-content img[style*="margin-left: auto"],
.ckeditor-content img[style*="margin-left:auto"],
.ckeditor-content img[style*="margin-right: auto"],
.ckeditor-content img[style*="margin-right:auto"],
.dropcap-text img[style*="text-align: center"],
.dropcap-text img[style*="text-align:center"],
.dropcap-text img[style*="margin-left: auto"],
.dropcap-text img[style*="margin-left:auto"],
.dropcap-text img[style*="margin-right: auto"],
.dropcap-text img[style*="margin-right:auto"] {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Preserve inline width/height styles from CKEditor */
.ckeditor-content img[style*="width"],
.ckeditor-content img[style*="height"],
.dropcap-text img[style*="width"],
.dropcap-text img[style*="height"] {
    /* Inline styles are preserved by |safe filter */
}

/* Figure elements (for images with captions) */
.ckeditor-content figure,
.dropcap-text figure {
    margin: 1.5em auto;
    text-align: center;
    max-width: 100%;
}

/* CKEditor wraps styled images in figure elements */
.ckeditor-content figure.image-style-side,
.ckeditor-content figure.image-style-align-left,
.ckeditor-content figure.image-style-align-right,
.ckeditor-content figure.image-style-align-center,
.ckeditor-content figure.image-style-full,
.dropcap-text figure.image-style-side,
.dropcap-text figure.image-style-align-left,
.dropcap-text figure.image-style-align-right,
.dropcap-text figure.image-style-align-center,
.dropcap-text figure.image-style-full {
    text-align: inherit;
}

.ckeditor-content figure img,
.dropcap-text figure img {
    margin: 0;
    display: block;
    width: 100%;
    height: auto;
}

.ckeditor-content figcaption,
.dropcap-text figcaption {
    font-size: 0.9em;
    color: #666;
    margin-top: 0.75em;
    text-align: center;
    font-style: italic;
    line-height: 1.4;
}

/* Support for images wrapped in spans (CKEditor sometimes does this) */
.ckeditor-content span.image-style-side,
.ckeditor-content span.image-style-align-left,
.ckeditor-content span.image-style-align-right,
.ckeditor-content span.image-style-align-center,
.ckeditor-content span.image-style-full,
.dropcap-text span.image-style-side,
.dropcap-text span.image-style-align-left,
.dropcap-text span.image-style-align-right,
.dropcap-text span.image-style-align-center,
.dropcap-text span.image-style-full {
    display: block;
}

.ckeditor-content span.image-style-side img,
.ckeditor-content span.image-style-align-left img,
.ckeditor-content span.image-style-align-right img,
.ckeditor-content span.image-style-align-center img,
.ckeditor-content span.image-style-full img,
.dropcap-text span.image-style-side img,
.dropcap-text span.image-style-align-left img,
.dropcap-text span.image-style-align-right img,
.dropcap-text span.image-style-align-center img,
.dropcap-text span.image-style-full img {
    width: 100%;
    margin: 0;
    display: block;
}

/* Tables - Match CKEditor table styling */
.ckeditor-content table,
.dropcap-text table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.5em 0;
    border: 1px solid #ddd;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ckeditor-content table td,
.ckeditor-content table th,
.dropcap-text table td,
.dropcap-text table th {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: left;
    vertical-align: top;
}

[dir="rtl"] .ckeditor-content table td,
[dir="rtl"] .ckeditor-content table th,
[dir="rtl"] .dropcap-text table td,
[dir="rtl"] .dropcap-text table th {
    text-align: right;
}

.ckeditor-content table th,
.dropcap-text table th {
    background-color: #f5f5f5;
    font-weight: bold;
    color: #333;
}

.ckeditor-content table tbody tr:nth-child(even),
.dropcap-text table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

.ckeditor-content table tbody tr:hover,
.dropcap-text table tbody tr:hover {
    background-color: #f0f0f0;
}

/* Table caption */
.ckeditor-content table caption,
.dropcap-text table caption {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 0.5em;
    text-align: center;
    font-style: italic;
}

/* Lists */
.ckeditor-content ul,
.ckeditor-content ol,
.dropcap-text ul,
.dropcap-text ol {
    margin: 1em 0;
    padding-left: 2.5em;
}

[dir="rtl"] .ckeditor-content ul,
[dir="rtl"] .ckeditor-content ol,
[dir="rtl"] .dropcap-text ul,
[dir="rtl"] .dropcap-text ol {
    padding-left: 0;
    padding-right: 2.5em;
}

.ckeditor-content ul li,
.ckeditor-content ol li,
.dropcap-text ul li,
.dropcap-text ol li {
    margin: 0.5em 0;
    line-height: 1.6;
}

.ckeditor-content ul ul,
.ckeditor-content ol ol,
.ckeditor-content ul ol,
.ckeditor-content ol ul,
.dropcap-text ul ul,
.dropcap-text ol ol,
.dropcap-text ul ol,
.dropcap-text ol ul {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

/* Blockquotes */
.ckeditor-content blockquote,
.dropcap-text blockquote {
    margin: 1.5em 0;
    padding: 1em 1.5em;
    padding-left: 2em;
    border-left: 4px solid #ddd;
    background-color: #f9f9f9;
    font-style: italic;
    color: #555;
}

[dir="rtl"] .ckeditor-content blockquote,
[dir="rtl"] .dropcap-text blockquote {
    padding-left: 1.5em;
    padding-right: 2em;
    border-left: none;
    border-right: 4px solid #ddd;
}

.ckeditor-content blockquote p:first-child,
.dropcap-text blockquote p:first-child {
    margin-top: 0;
}

.ckeditor-content blockquote p:last-child,
.dropcap-text blockquote p:last-child {
    margin-bottom: 0;
}

/* Code blocks */
.ckeditor-content code,
.dropcap-text code {
    background-color: #f5f5f5;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    color: #d63384;
}

.ckeditor-content pre,
.dropcap-text pre {
    background-color: #f5f5f5;
    padding: 1em;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1.5em 0;
    border: 1px solid #e0e0e0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    line-height: 1.5;
}

.ckeditor-content pre code,
.dropcap-text pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* Links */
.ckeditor-content a,
.dropcap-text a {
    color: inherit;
    text-decoration: underline;
    transition: opacity 0.2s;
}

.ckeditor-content a:hover,
.dropcap-text a:hover {
    opacity: 0.8;
}

/* Horizontal rules */
.ckeditor-content hr,
.dropcap-text hr {
    border: none;
    border-top: 2px solid #ddd;
    margin: 2em 0;
}

/* Text alignment */
.ckeditor-content [style*="text-align: left"],
.ckeditor-content [style*="text-align:left"],
.dropcap-text [style*="text-align: left"],
.dropcap-text [style*="text-align:left"] {
    text-align: left;
}

.ckeditor-content [style*="text-align: center"],
.ckeditor-content [style*="text-align:center"],
.dropcap-text [style*="text-align: center"],
.dropcap-text [style*="text-align:center"] {
    text-align: center;
}

.ckeditor-content [style*="text-align: right"],
.ckeditor-content [style*="text-align:right"],
.dropcap-text [style*="text-align: right"],
.dropcap-text [style*="text-align:right"] {
    text-align: right;
}

[dir="rtl"] .ckeditor-content [style*="text-align: left"],
[dir="rtl"] .ckeditor-content [style*="text-align:left"],
[dir="rtl"] .dropcap-text [style*="text-align: left"],
[dir="rtl"] .dropcap-text [style*="text-align:left"] {
    text-align: right;
}

[dir="rtl"] .ckeditor-content [style*="text-align: right"],
[dir="rtl"] .ckeditor-content [style*="text-align:right"],
[dir="rtl"] .dropcap-text [style*="text-align: right"],
[dir="rtl"] .dropcap-text [style*="text-align:right"] {
    text-align: left;
}

/* Font sizes and colors (preserved from inline styles via |safe) */
.ckeditor-content [style*="font-size"],
.ckeditor-content [style*="color"],
.ckeditor-content [style*="background-color"],
.dropcap-text [style*="font-size"],
.dropcap-text [style*="color"],
.dropcap-text [style*="background-color"] {
    /* Inline styles are preserved by |safe filter */
}

/* Media embeds (videos, iframes) */
.ckeditor-content iframe,
.ckeditor-content video,
.ckeditor-content embed,
.ckeditor-content object,
.dropcap-text iframe,
.dropcap-text video,
.dropcap-text embed,
.dropcap-text object {
    max-width: 100%;
    display: block;
    margin: 1.5em auto;
}

/* Responsive table handling */
@media (max-width: 768px) {
    .ckeditor-content table,
    .dropcap-text table {
        font-size: 0.9em;
    }

    .ckeditor-content table td,
    .ckeditor-content table th,
    .dropcap-text table td,
    .dropcap-text table th {
        padding: 8px 10px;
    }
}


.rtl #menu-btn-text {
    float: left;
    margin-left: 0;
    margin-right: 20px;
}

/* Footer sections with vertical dividers */
footer .footer-section {
    position: relative;
    padding-left: 30px;
    padding-right: 30px;
}

footer .footer-section:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
}


/* Responsive: Remove dividers on smaller screens */
@media (max-width: 991px) {
    footer .footer-section {
        padding-left: 0;
        padding-right: 0;
        margin-bottom: 30px;
    }

    footer .footer-section::after {
        display: none;
    }
}


/* Center align footer elements in all columns for all display sizes */
footer .container .row > div {
    text-align: center !important;
}

footer .widget {
    text-align: center !important;
}

footer .widget ul {
    text-align: center !important;
    list-style-position: inside;
    padding-left: 0;
}

footer .widget ul li {
    text-align: center !important;
}

footer .widget h5 {
    text-align: center !important;
}

footer .social-icons {
    justify-content: center !important;
    display: flex !important;
}

footer p {
    text-align: center !important;
}

/* Reduce all footer font sizes to half */
footer {
    font-size: 12px !important;
}

footer * {
    font-size: inherit;
}

/* Override specific font sizes that are set in style.css */
footer h5,
.de_light footer h5 {
    font-size: 14px !important; /* 18px / 2 */
}

footer .widget h5 {
    font-size: 14px !important;
}

footer .subfooter {
    font-size: 12px !important;
}

/* RTL/LTL direction for articles and quick link sections based on language (only for > mobile screens) */
/* Mobile keeps centered style (default), only screens > mobile get direction changes */
@media (min-width: 768px) {
    /* Persian (RTL) - for articles and quick links only */
    [dir="rtl"] .footer-quick-links,
    [dir="rtl"] .footer-articles {
        direction: rtl !important;
        text-align: right !important;
    }
    
    [dir="rtl"] .footer-quick-links ul,
    [dir="rtl"] .footer-articles ul {
        text-align: right !important;
        padding-right: 0;
        padding-left: 0;
    }
    
    [dir="rtl"] .footer-quick-links ul li,
    [dir="rtl"] .footer-articles ul li {
        text-align: right !important;
    }
    
    /* English (LTL) - for articles and quick links only */
    [dir="ltr"] .footer-quick-links,
    [dir="ltr"] .footer-articles {
        direction: ltr !important;
        text-align: left !important;
    }
    
    [dir="ltr"] .footer-quick-links ul,
    [dir="ltr"] .footer-articles ul {
        text-align: left !important;
        padding-left: 0;
        padding-right: 0;
    }
    
    [dir="ltr"] .footer-quick-links ul li,
    [dir="ltr"] .footer-articles ul li {
        text-align: left !important;
    }
    
    /* Persian (RTL) - for footer contact items */
    [dir="rtl"] .footer-contact-items {
        direction: rtl !important;
        text-align: right !important;
    }
    
    [dir="rtl"] .footer-contact-items .row {
        direction: rtl !important;
    }
    
    [dir="rtl"] .footer-contact-items .col-6 {
        text-align: right !important;
    }
    
    [dir="rtl"] .footer-contact-items .fw-bold,
    [dir="rtl"] .footer-contact-items a,
    [dir="rtl"] .footer-contact-items .text-white {
        text-align: right !important;
    }
    
    [dir="rtl"] .footer-contact-items .me-2 {
        margin-right: 0 !important;
        margin-left: 0.5rem !important;
    }
    
    /* English (LTL) - for footer contact items */
    [dir="ltr"] .footer-contact-items {
        direction: ltr !important;
        text-align: left !important;
    }
    
    [dir="ltr"] .footer-contact-items .row {
        direction: ltr !important;
    }
    
    [dir="ltr"] .footer-contact-items .col-6 {
        text-align: left !important;
    }
    
    [dir="ltr"] .footer-contact-items .fw-bold,
    [dir="ltr"] .footer-contact-items a,
    [dir="ltr"] .footer-contact-items .text-white {
        text-align: left !important;
    }
    
    [dir="ltr"] .footer-contact-items .me-2 {
        margin-right: 0.5rem !important;
        margin-left: 0 !important;
    }
}