/*
Theme Name: Katibenevis
Theme URI: https://katibenevis.ir
Author: Katibenevis
Description: قالب اختصاصی سبک کتیبه نویس
Version: 1.2.0
Text Domain: katibenevis
*/

/* ==================================================
   ROOT / BRAND
================================================== */

:root{
    --kb-red:#AF1616;
    --kb-red-dark:#8F1111;
    --kb-red-light:#FFF3F3;

    --kb-black:#202020;
    --kb-text:#2A2A2A;
    --kb-muted:#777777;

    --kb-bg:#F1F1F1;
    --kb-white:#FFFFFF;
    --kb-border:#E4E4E4;

    --kb-radius-lg:22px;
    --kb-radius-md:16px;
    --kb-radius-sm:12px;

    --kb-container:1280px;
}


/* ==================================================
   RESET
================================================== */

*,
*::before,
*::after{
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    margin:0;
    direction:rtl;

    background:var(--kb-bg);
    color:var(--kb-text);

    font-family:inherit;

    overflow-x:hidden;

    -webkit-font-smoothing:antialiased;
    text-rendering:optimizeLegibility;
}

img{
    max-width:100%;
    height:auto;
    display:block;
}

a{
    color:inherit;
    text-decoration:none;
}

button,
input,
textarea,
select{
    font:inherit;
}

.site-main{
    width:100%;
}


/* ==================================================
   GLOBAL WIDTH
================================================== */

.kb-container,
.kb-section{
    width:min(calc(100% - 40px),var(--kb-container));
    margin-inline:auto;
}

.kb-section{
    margin-top:24px;
    margin-bottom:24px;
}


/* ==================================================
   FORCE BRAND COLORS
================================================== */

.elementor-heading-title{
    color:var(--kb-red) !important;
}

.elementor-button,
.elementor-button:visited{
    background:var(--kb-red) !important;
    color:#fff !important;

    border-radius:12px !important;

    transition:.2s ease !important;
}

.elementor-button:hover{
    background:var(--kb-red-dark) !important;
    color:#fff !important;
}


/* ==================================================
   HEADER
================================================== */

.kb-header{
    width:100%;

    padding:16px 20px 8px;

    background:var(--kb-bg);

    position:relative;
    z-index:9999;
}

.kb-header-inner{
    width:min(100%,var(--kb-container));

    min-height:96px;

    margin:auto;

    padding:9px 20px;

    background:#fff;

    border:1px solid #ececec;
    border-radius:24px;

    display:flex;
    align-items:center;

    gap:22px;

    box-shadow:
        0 1px 0 rgba(0,0,0,.02),
        0 8px 25px rgba(0,0,0,.025);
}


/* ==================================================
   LOGO
================================================== */

.kb-logo{
    flex:0 0 auto;

    display:flex;
    align-items:center;
    justify-content:center;
}

.kb-logo img{
    width:98px;
    height:76px;

    object-fit:contain;
}


/* ==================================================
   NAVIGATION
================================================== */

.kb-main-nav{
    flex:1;

    display:flex;
    align-items:center;
    justify-content:center;

    gap:2px;
}

.kb-main-nav a{
    min-height:50px;

    padding:0 16px;

    position:relative;

    display:flex;
    align-items:center;
    justify-content:center;

    color:#202020;

    font-size:15px;
    font-weight:700;

    white-space:nowrap;

    border-radius:10px;

    transition:.2s ease;
}

.kb-main-nav a:hover{
    color:var(--kb-red);
    background:#fafafa;
}

.kb-main-nav a.active{
    color:#111;
}

.kb-main-nav a.active::after{
    content:"";

    position:absolute;

    right:16px;
    left:16px;

    bottom:0;

    height:3px;

    border-radius:10px;

    background:var(--kb-red);
}


/* ==================================================
   HEADER ACTIONS
================================================== */

.kb-header-actions{
    flex:0 0 auto;

    display:flex;
    align-items:center;

    gap:8px;
}


/* ==================================================
   PHONE
================================================== */

.kb-phone{
    height:58px;

    padding:0 16px;

    display:flex;
    align-items:center;

    gap:10px;

    color:var(--kb-red);

    border:2px solid var(--kb-red);

    border-radius:14px;

    background:#fff;

    transition:.2s ease;
}

.kb-phone:hover{
    background:var(--kb-red-light);
}

.kb-phone-content{
    display:flex;
    align-items:center;
    gap:11px;
}

.kb-phone-content small{
    font-size:12px;
    font-weight:700;
}

.kb-phone-content strong{
    direction:ltr;

    font-size:13px;
    font-weight:800;

    white-space:nowrap;
}


/* ==================================================
   USER / CART BUTTONS
================================================== */

.kb-icon-action{
    min-width:66px;
    height:58px;

    padding:5px 9px;

    position:relative;

    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;

    gap:3px;

    border:1px solid #e1e1e1;
    border-radius:13px;

    background:#fff;

    color:#3b3b3b;

    transition:.2s ease;
}

.kb-icon-action:hover{
    color:var(--kb-red);
    border-color:var(--kb-red);
}

.kb-icon-action span{
    font-size:10px;
    font-weight:700;
}

.kb-cart-count{
    position:absolute;

    top:-6px;
    left:-6px;

    width:20px;
    height:20px;

    border-radius:50%;

    background:var(--kb-red);
    color:#fff;

    display:flex;
    align-items:center;
    justify-content:center;

    font-size:10px;
    font-weight:900;

    border:2px solid #fff;
}


/* ==================================================
   SVG FIX
================================================== */

.kb-header svg{
    width:20px !important;
    height:20px !important;

    min-width:20px !important;
    min-height:20px !important;

    max-width:20px !important;
    max-height:20px !important;

    display:block !important;

    fill:none !important;

    stroke:currentColor !important;
    stroke-width:1.8 !important;

    stroke-linecap:round !important;
    stroke-linejoin:round !important;

    flex:none !important;

    overflow:visible !important;
}

.kb-header svg path,
.kb-header svg circle,
.kb-header svg line,
.kb-header svg polyline,
.kb-header svg rect{
    fill:none !important;
    stroke:currentColor !important;
}

.kb-action-icon{
    width:22px;
    height:22px;

    flex:0 0 22px;

    display:flex;
    align-items:center;
    justify-content:center;

    overflow:hidden;
}


/* ==================================================
   MOBILE MENU
================================================== */

.kb-mobile-toggle,
.kb-mobile-button{
    display:none;
}


/* ==================================================
   HERO / SLIDER PLACEHOLDER
================================================== */

.kb-hero{
    min-height:420px;

    padding:65px 55px !important;

    border-radius:24px;

    background:var(--kb-red);

    position:relative;
    overflow:hidden;

    display:flex !important;
    flex-direction:column;

    justify-content:center;
    align-items:flex-start;

    color:#fff;
}

.kb-hero::before{
    content:"";

    width:420px;
    height:420px;

    position:absolute;

    left:-130px;
    top:-90px;

    border-radius:50%;

    border:1px solid rgba(255,255,255,.15);
}

.kb-hero .elementor-widget{
    position:relative;
    z-index:2;

    max-width:650px;
}

.kb-hero h1,
.kb-hero .elementor-heading-title{
    color:#fff !important;

    font-size:42px !important;
    line-height:1.7 !important;

    margin-bottom:10px !important;
}

.kb-hero p{
    color:rgba(255,255,255,.88);

    font-size:16px;
    line-height:2;
}

.kb-hero .elementor-button{
    background:#fff !important;
    color:var(--kb-red) !important;

    padding:14px 26px !important;

    border-radius:13px !important;

    font-weight:800;
}


/* ==================================================
   QUICK ACCESS
================================================== */

.kb-quick-access{
    padding:26px !important;

    background:#fff;

    border-radius:22px;

    display:grid !important;

    grid-template-columns:repeat(5,minmax(0,1fr));

    gap:14px;
}

.kb-quick-access .elementor-widget-heading{
    grid-column:1/-1;

    text-align:center;

    margin-bottom:5px;
}

.kb-quick-access h2{
    font-size:25px !important;
    color:var(--kb-red) !important;
}

.kb-quick-access .elementor-widget-button{
    width:100%;
}

.kb-quick-access .elementor-button-wrapper{
    width:100%;
}

.kb-quick-access .elementor-button{
    width:100%;

    min-height:95px;

    display:flex !important;
    align-items:center;
    justify-content:center;

    padding:15px !important;

    border-radius:18px !important;

    background:var(--kb-red-light) !important;

    color:var(--kb-red) !important;

    border:1px solid #f2cccc;

    font-weight:800;

    transition:.25s ease !important;
}

.kb-quick-access .elementor-button:hover{
    background:var(--kb-red) !important;
    color:#fff !important;

    transform:translateY(-3px);
}


/* ==================================================
   PRODUCT SECTIONS
================================================== */

.kb-products-section{
    padding:0 24px 28px !important;

    background:#fff;

    border-radius:22px;

    overflow:hidden;
}

.kb-products-section > .elementor-widget-heading:first-child{
    margin-left:-24px;
    margin-right:-24px;
    margin-bottom:24px;

    padding:15px 24px;

    background:var(--kb-red);

    position:relative;
}

.kb-products-section > .elementor-widget-heading:first-child .elementor-heading-title{
    color:#fff !important;

    font-size:23px !important;

    margin:0;
}

.kb-products-section .elementor-widget-text-editor{
    color:var(--kb-muted);
}


/* ==================================================
   WOOCOMMERCE PRODUCTS
================================================== */

.woocommerce ul.products{
    display:grid !important;

    grid-template-columns:repeat(4,minmax(0,1fr));

    gap:18px !important;

    margin:0 !important;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after{
    display:none !important;
}

.woocommerce ul.products li.product{
    width:100% !important;
    float:none !important;

    margin:0 !important;

    padding:10px 10px 15px !important;

    background:#fff;

    border:1px solid var(--kb-border);

    border-radius:17px;

    overflow:hidden;

    transition:.25s ease;
}

.woocommerce ul.products li.product:hover{
    transform:translateY(-4px);

    box-shadow:0 12px 30px rgba(0,0,0,.07);
}

.woocommerce ul.products li.product a img{
    width:100%;

    aspect-ratio:1/1;

    object-fit:cover;

    margin:0 0 11px !important;

    border-radius:13px;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title{
    margin:0 0 7px !important;

    padding:0 4px !important;

    color:#222;

    font-size:14px !important;
    line-height:1.9;

    font-weight:800;
}

.woocommerce ul.products li.product .price{
    display:block;

    padding:0 4px;

    color:var(--kb-red) !important;

    font-size:13px !important;

    font-weight:900;
}

.woocommerce ul.products li.product .button{
    width:100%;

    display:block;

    margin-top:11px !important;

    padding:10px !important;

    text-align:center;

    background:var(--kb-red) !important;

    color:#fff !important;

    border-radius:10px !important;

    font-size:12px;
}

.woocommerce ul.products li.product .button:hover{
    background:var(--kb-red-dark) !important;
}

.woocommerce span.onsale{
    background:var(--kb-red) !important;

    color:#fff !important;

    min-width:auto !important;
    min-height:auto !important;

    padding:8px 10px !important;

    margin:9px !important;

    border-radius:8px !important;

    line-height:1 !important;

    font-size:11px;
}


/* ==================================================
   SEO SECTION
================================================== */

.kb-seo-content{
    padding:32px !important;

    background:#fff;

    border-radius:22px;
}

.kb-seo-content h2{
    color:var(--kb-red) !important;

    font-size:24px !important;
}

.kb-seo-content p{
    color:#666;

    line-height:2.1;
}


/* ==================================================
   DEFAULT FOOTER
================================================== */

.kb-default-footer{
    margin-top:40px;

    padding:35px 20px;

    background:#1B1B1B;

    color:#fff;

    text-align:center;
}


/* ==================================================
   TABLET
================================================== */

@media(max-width:1100px){

    .kb-header-inner{
        gap:12px;
    }

    .kb-main-nav a{
        padding:0 9px;

        font-size:13px;
    }

    .kb-phone-content small{
        display:none;
    }

    .kb-phone{
        padding:0 12px;
    }

    .woocommerce ul.products{
        grid-template-columns:repeat(3,minmax(0,1fr));
    }

    .kb-quick-access{
        grid-template-columns:repeat(3,minmax(0,1fr));
    }

}


/* ==================================================
   MOBILE
================================================== */

@media(max-width:850px){

    .kb-header{
        padding:10px;
    }

    .kb-header-inner{
        min-height:72px;

        padding:7px 10px;

        border-radius:17px;

        gap:7px;
    }


    .kb-logo{
        order:1;
    }

    .kb-logo img{
        width:66px;
        height:54px;
    }


    .kb-mobile-button{
        order:3;

        width:44px;
        height:44px;

        display:flex;

        flex-direction:column;

        align-items:center;
        justify-content:center;

        gap:5px;

        border:1px solid #e0e0e0;

        border-radius:11px;

        cursor:pointer;

        background:#fff;
    }

    .kb-mobile-button span{
        width:20px;
        height:2px;

        background:#222;

        border-radius:4px;
    }


    .kb-main-nav{
        display:none;

        position:absolute;

        top:88px;

        right:10px;
        left:10px;

        padding:10px;

        background:#fff;

        border-radius:15px;

        box-shadow:0 15px 40px rgba(0,0,0,.12);

        flex-direction:column;

        align-items:stretch;

        z-index:99999;
    }

    .kb-mobile-toggle:checked ~ .kb-main-nav{
        display:flex;
    }

    .kb-main-nav a{
        width:100%;

        min-height:48px;

        padding:0 14px;

        justify-content:flex-start;

        border-bottom:1px solid #eee;

        border-radius:0;
    }

    .kb-main-nav a:last-child{
        border-bottom:none;
    }

    .kb-main-nav a.active::after{
        display:none;
    }


    .kb-header-actions{
        order:2;

        margin-right:auto;

        gap:5px;
    }

    .kb-phone{
        width:44px;
        min-width:44px;
        height:44px;

        padding:0;

        justify-content:center;

        border-width:1px;
    }

    .kb-phone-content{
        display:none;
    }

    .kb-icon-action{
        width:44px;
        min-width:44px;
        height:44px;

        padding:0;
    }

    .kb-icon-action span{
        display:none;
    }


    .kb-section{
        width:calc(100% - 20px);

        margin-top:14px;
        margin-bottom:14px;
    }


    .kb-hero{
        min-height:300px;

        padding:32px 20px !important;

        border-radius:18px;

        text-align:center;

        align-items:center;
    }

    .kb-hero h1,
    .kb-hero .elementor-heading-title{
        font-size:26px !important;
    }

    .kb-hero p{
        font-size:14px;
    }


    .kb-quick-access{
        grid-template-columns:repeat(2,minmax(0,1fr));

        gap:10px;

        padding:15px !important;
    }

    .kb-quick-access .elementor-button{
        min-height:78px;

        font-size:12px;
    }


    .kb-products-section{
        padding:0 12px 18px !important;

        border-radius:16px;
    }

    .kb-products-section > .elementor-widget-heading:first-child{
        margin-left:-12px;
        margin-right:-12px;

        padding:13px 15px;
    }

    .woocommerce ul.products{
        grid-template-columns:repeat(2,minmax(0,1fr));

        gap:10px !important;
    }

    .woocommerce ul.products li.product{
        padding:7px 7px 11px !important;
    }

    .woocommerce ul.products li.product .woocommerce-loop-product__title{
        font-size:12px !important;
    }

}


/* ==================================================
   SMALL MOBILE
================================================== */

@media(max-width:420px){

    .kb-logo img{
        width:58px;
        height:48px;
    }

    .kb-icon-action,
    .kb-phone,
    .kb-mobile-button{
        width:40px;
        min-width:40px;
        height:40px;
    }

    .kb-header-actions{
        gap:3px;
    }

}