/*
Theme Name: SourcingMart
Theme URI: https://sourcingmart.com
Author: SourcingMart
Author URI: https://sourcingmart.com
Description: Standalone B2B Textile and Home Furnishing Marketplace Theme
Version: 1.0.0
Text Domain: sourcingmart
*/

/* =========================================================
   SOURCINGMART — GLOBAL FOUNDATION
========================================================= */

:root {

    --sm-primary: #173f35;
    --sm-primary-dark: #0f2d26;
    --sm-primary-light: #245b4d;

    --sm-accent: #c99a4a;
    --sm-accent-dark: #a97932;

    --sm-dark: #17211e;
    --sm-text: #303936;
    --sm-muted: #6d7773;

    --sm-white: #ffffff;
    --sm-light: #f6f7f5;
    --sm-border: #e3e7e4;

    --sm-container: 1380px;

    --sm-radius: 4px;

    --sm-transition: 0.25s ease;
}


/* =========================================================
   RESET
========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    width: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-width: 320px;

    background: var(--sm-white);

    color: var(--sm-text);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 16px;
    line-height: 1.6;

    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}


/* =========================================================
   WORDPRESS FOUNDATION
========================================================= */

#page,
#site,
.site,
.site-content,
.site-main,
#primary,
.content-area,
main {
    width: 100%;
    max-width: none;
    margin: 0;
}

.site-content {
    padding: 0;
}

#primary {
    padding: 0;
}


/* =========================================================
   ACCESSIBILITY
========================================================= */

.screen-reader-text {
    position: absolute !important;

    width: 1px;
    height: 1px;

    padding: 0;
    margin: -1px;

    overflow: hidden;

    clip: rect(0, 0, 0, 0);

    white-space: nowrap;

    border: 0;
}


/* =========================================================
   HEADER
========================================================= */

.sm-header {
    width: 100%;
    background: var(--sm-white);
    position: relative;
    z-index: 1000;
}


/* =========================================================
   TOP BAR
========================================================= */

.sm-topbar {
    width: 100%;
    background: var(--sm-primary);
    color: rgba(255,255,255,0.92);

    font-size: 13px;
}

.sm-topbar-inner {
    width: 100%;
    max-width: var(--sm-container);

    margin: 0 auto;
    padding: 8px 28px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

.sm-topbar-left {
    white-space: nowrap;
}

.sm-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;

    white-space: nowrap;
}

.sm-topbar-right a {
    transition: var(--sm-transition);
}

.sm-topbar-right a:hover {
    color: var(--sm-accent);
}

.sm-topbar-divider {
    opacity: 0.4;
}


/* =========================================================
   MAIN HEADER
========================================================= */

.sm-main-header {
    width: 100%;
    background: var(--sm-white);

    border-bottom: 1px solid var(--sm-border);
}

.sm-header-inner {
    width: 100%;
    max-width: var(--sm-container);

    margin: 0 auto;

    padding: 20px 28px;

    display: flex;
    align-items: center;

    gap: 35px;
}


/* =========================================================
   LOGO
========================================================= */

.sm-logo {
    flex: 0 0 auto;
}

.sm-logo a {
    display: inline-flex;
    align-items: center;
}

.sm-logo-text {
    display: inline-flex;
    align-items: baseline;

    font-weight: 800;
    letter-spacing: -1px;

    font-size: 25px;
}

.sm-logo-sourcing {
    color: var(--sm-dark);
}

.sm-logo-mart {
    color: var(--sm-accent);
}


/* Custom WordPress logo */

.sm-logo .custom-logo-link {
    display: block;
}

.sm-logo .custom-logo {
    max-height: 55px;
    width: auto;
}


/* =========================================================
   SEARCH
========================================================= */

.sm-search {
    flex: 1 1 auto;
    min-width: 250px;
}

.sm-search form {
    width: 100%;

    display: flex;

    border: 1px solid #ccd4d0;
    border-radius: var(--sm-radius);

    overflow: hidden;

    background: var(--sm-white);
}

.sm-search input {
    flex: 1;

    width: 100%;

    min-height: 46px;

    padding: 0 17px;

    border: 0;
    outline: 0;

    color: var(--sm-dark);

    background: transparent;

    font-size: 14px;
}

.sm-search input::placeholder {
    color: #8a9490;
}

.sm-search button {
    min-width: 100px;

    padding: 0 20px;

    border: 0;

    background: var(--sm-primary);
    color: var(--sm-white);

    cursor: pointer;

    font-weight: 600;

    transition: var(--sm-transition);
}

.sm-search button:hover {
    background: var(--sm-primary-dark);
}


/* =========================================================
   HEADER ACTIONS
========================================================= */

.sm-header-actions {
    flex: 0 0 auto;

    display: flex;
    align-items: center;

    gap: 20px;
}

.sm-header-action {
    display: flex;
    align-items: center;
    gap: 7px;

    color: var(--sm-dark);

    font-size: 14px;
    font-weight: 600;

    transition: var(--sm-transition);
}

.sm-header-action:hover {
    color: var(--sm-accent-dark);
}

.sm-action-icon {
    color: var(--sm-accent);
    font-size: 12px;
}

.sm-login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 40px;

    padding: 0 18px;

    border: 1px solid var(--sm-primary);

    background: var(--sm-primary);
    color: var(--sm-white);

    border-radius: var(--sm-radius);

    font-size: 14px;
    font-weight: 600;

    transition: var(--sm-transition);
}

.sm-login-button:hover {
    background: var(--sm-primary-dark);
    border-color: var(--sm-primary-dark);
    color: var(--sm-white);
}


/* =========================================================
   NAVIGATION
========================================================= */

.sm-navigation {
    width: 100%;

    background: var(--sm-white);

    border-bottom: 1px solid var(--sm-border);
}

.sm-nav-inner {
    width: 100%;
    max-width: var(--sm-container);

    margin: 0 auto;

    padding: 0 28px;

    min-height: 54px;

    display: flex;
    align-items: center;
}

.sm-primary-menu {
    width: 100%;
}

.sm-menu {
    list-style: none;

    padding: 0;
    margin: 0;

    display: flex;
    align-items: center;

    gap: 0;
}

.sm-menu li {
    margin: 0;
    padding: 0;
}

.sm-menu li a {
    display: flex;
    align-items: center;

    min-height: 54px;

    padding: 0 21px;

    color: var(--sm-dark);

    font-size: 14px;
    font-weight: 600;

    position: relative;

    transition: var(--sm-transition);
}

.sm-menu li a::after {
    content: "";

    position: absolute;

    left: 21px;
    right: 21px;
    bottom: 0;

    height: 2px;

    background: var(--sm-accent);

    transform: scaleX(0);

    transform-origin: center;

    transition: transform var(--sm-transition);
}

.sm-menu li a:hover {
    color: var(--sm-primary);
}

.sm-menu li a:hover::after {
    transform: scaleX(1);
}


/* =========================================================
   MOBILE MENU BUTTON
========================================================= */

.sm-mobile-menu-button {
    display: none;

    width: 44px;
    height: 42px;

    padding: 8px;

    border: 1px solid var(--sm-border);

    background: var(--sm-white);

    cursor: pointer;
}

.sm-mobile-menu-button span {
    display: block;

    width: 100%;
    height: 2px;

    margin: 5px 0;

    background: var(--sm-dark);
}


/* =========================================================
   MAIN CONTENT
========================================================= */

.sm-site-content {
    width: 100%;
    max-width: none;

    margin: 0;
    padding: 0;
}


/* =========================================================
   GENERIC PAGE
========================================================= */

.sm-page {
    width: 100%;

    margin: 0;
    padding: 60px 28px;
}

.sm-page article {
    width: 100%;
    max-width: 1200px;

    margin: 0 auto;
}

.sm-page-header {
    margin-bottom: 30px;
}

.sm-page-header h1 {
    margin: 0;

    color: var(--sm-dark);

    font-size: 38px;
    line-height: 1.2;
}

.sm-page-content {
    color: var(--sm-text);
}


/* =========================================================
   FOOTER
========================================================= */

.sm-footer {
    width: 100%;

    background: var(--sm-primary-dark);

    color: rgba(255,255,255,0.85);
}


/* Footer main */

.sm-footer-main {
    width: 100%;
    max-width: var(--sm-container);

    margin: 0 auto;

    padding: 65px 28px;

    display: grid;

    grid-template-columns:
        1.7fr
        1fr
        1fr
        1fr;

    gap: 60px;
}


/* Footer brand */

.sm-footer-brand {
    max-width: 390px;
}

.sm-footer-logo {
    display: inline-flex;

    align-items: baseline;

    margin-bottom: 18px;

    font-size: 25px;
    font-weight: 800;

    letter-spacing: -1px;
}

.sm-footer-logo-sourcing {
    color: var(--sm-white);
}

.sm-footer-logo-mart {
    color: var(--sm-accent);
}

.sm-footer-brand p {
    margin: 0 0 14px;

    color: rgba(255,255,255,0.72);

    font-size: 14px;

    line-height: 1.8;
}

.sm-footer-location {
    color: rgba(255,255,255,0.55) !important;
}


/* Footer columns */

.sm-footer-column {
    display: flex;
    flex-direction: column;

    align-items: flex-start;
}

.sm-footer-column h4 {
    margin: 0 0 20px;

    color: var(--sm-white);

    font-size: 15px;

    font-weight: 700;
}

.sm-footer-column > a {
    margin-bottom: 11px;

    color: rgba(255,255,255,0.68);

    font-size: 14px;

    transition: var(--sm-transition);
}

.sm-footer-column > a:hover {
    color: var(--sm-accent);
}


/* Footer bottom */

.sm-footer-bottom {
    width: 100%;

    border-top: 1px solid rgba(255,255,255,0.1);
}

.sm-footer-bottom-inner {
    width: 100%;
    max-width: var(--sm-container);

    margin: 0 auto;

    padding: 20px 28px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

.sm-footer-bottom p {
    margin: 0;

    color: rgba(255,255,255,0.5);

    font-size: 13px;
}

.sm-footer-bottom-links {
    display: flex;
    align-items: center;

    gap: 10px;

    color: rgba(255,255,255,0.5);

    font-size: 13px;
}

.sm-footer-bottom-links a:hover {
    color: var(--sm-accent);
}


/* =========================================================
   1024px
========================================================= */

@media (max-width: 1100px) {

    .sm-header-inner {
        gap: 20px;
    }

    .sm-header-actions {
        gap: 12px;
    }

    .sm-header-action {
        font-size: 13px;
    }

    .sm-menu li a {
        padding-left: 13px;
        padding-right: 13px;
    }

    .sm-menu li a::after {
        left: 13px;
        right: 13px;
    }

    .sm-footer-main {
        gap: 35px;
    }

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    .sm-topbar-inner {
        padding-left: 20px;
        padding-right: 20px;
    }

    .sm-header-inner {
        padding: 18px 20px;

        flex-wrap: wrap;
    }

    .sm-logo {
        order: 1;
    }

    .sm-header-actions {
        order: 2;
        margin-left: auto;
    }

    .sm-search {
        order: 3;

        flex: 1 1 100%;

        min-width: 100%;
    }

    .sm-nav-inner {
        padding-left: 20px;
        padding-right: 20px;
    }

    .sm-footer-main {
        grid-template-columns: 1fr 1fr;

        gap: 45px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .sm-topbar-inner {
        padding: 8px 16px;

        justify-content: center;
    }

    .sm-topbar-left {
        display: none;
    }

    .sm-topbar-right {
        font-size: 12px;
    }


    /* Header */

    .sm-header-inner {
        padding: 15px 16px;

        gap: 14px;
    }

    .sm-logo-text {
        font-size: 21px;
    }

    .sm-logo .custom-logo {
        max-height: 42px;
    }


    /* Header actions */

    .sm-header-actions {
        gap: 8px;
    }

    .sm-header-action {
        display: none;
    }

    .sm-login-button {
        min-height: 36px;

        padding: 0 12px;

        font-size: 12px;
    }


    /* Search */

    .sm-search {
        flex-basis: 100%;
    }

    .sm-search input {
        min-height: 43px;

        padding-left: 13px;

        font-size: 13px;
    }

    .sm-search button {
        min-width: 75px;

        padding: 0 12px;

        font-size: 13px;
    }


    /* Navigation */

    .sm-nav-inner {
        min-height: 52px;

        padding: 0 16px;

        position: relative;
    }

    .sm-mobile-menu-button {
        display: block;
    }

    .sm-primary-menu {
        display: none;

        position: absolute;

        top: 52px;
        left: 0;
        right: 0;

        background: var(--sm-white);

        border-bottom: 1px solid var(--sm-border);

        box-shadow: 0 10px 25px rgba(0,0,0,0.08);

        z-index: 999;
    }

    .sm-primary-menu.sm-menu-open {
        display: block;
    }

    .sm-menu {
        display: flex;

        flex-direction: column;

        align-items: stretch;
    }

    .sm-menu li a {
        min-height: 48px;

        padding: 0 20px;

        border-bottom: 1px solid var(--sm-border);
    }

    .sm-menu li a::after {
        display: none;
    }


    /* Page */

    .sm-page {
        padding: 40px 18px;
    }

    .sm-page-header h1 {
        font-size: 30px;
    }


    /* Footer */

    .sm-footer-main {
        grid-template-columns: 1fr;

        padding: 45px 20px;

        gap: 35px;
    }

    .sm-footer-brand {
        max-width: none;
    }

    .sm-footer-bottom-inner {
        padding: 18px 20px;

        flex-direction: column;

        align-items: flex-start;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 400px) {

    .sm-topbar-right {
        gap: 7px;
    }

    .sm-login-button {
        padding: 0 9px;
    }

    .sm-search button {
        min-width: 68px;
    }

}
/* =========================================================
   NAVIGATION CLICK FIX
========================================================= */

.sm-navigation,
.sm-nav-inner,
.sm-primary-menu,
.sm-menu {
    position: relative;
}

.sm-navigation {
    z-index: 1000;
}

.sm-primary-menu {
    z-index: 1001;
    pointer-events: auto;
}

.sm-menu {
    pointer-events: auto;
}

.sm-menu li,
.sm-menu li a {
    pointer-events: auto;
}

.sm-menu li a {
    position: relative;
    z-index: 1002;
    cursor: pointer;
}
/* =========================================================
   CATEGORY CARDS WITH SUBCATEGORIES
========================================================= */

.sm-category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.sm-category-card {
    position: relative;
    overflow: hidden;

    background: #ffffff;

    border: 1px solid #e8e4dc;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;

    display: flex;
    flex-direction: column;
}

.sm-category-card:hover {
    transform: translateY(-4px);

    box-shadow:
        0 15px 40px rgba(0,0,0,0.08);
}


/* IMAGE */

.sm-category-image-link {
    display: block;

    height: 210px;

    position: relative;

    overflow: hidden;
}

.sm-category-image {
    position: absolute;
    inset: 0;

    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;

    transition: transform 0.5s ease;
}

.sm-category-card:hover .sm-category-image {
    transform: scale(1.06);
}

.sm-category-overlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            to top,
            rgba(0,0,0,0.35),
            rgba(0,0,0,0)
        );
}


/* CONTENT */

.sm-category-content {
    padding: 22px;
}

.sm-category-title {
    text-decoration: none;
}

.sm-category-title h3 {
    margin: 0 0 5px;

    color: #17352d;

    font-size: 21px;
    line-height: 1.2;
}

.sm-category-title:hover h3 {
    color: #b18a4a;
}

.sm-category-count {
    display: block;

    margin-bottom: 15px;

    color: #777;

    font-size: 12px;
}


/* SUBCATEGORIES */

.sm-subcategories {
    display: flex;

    flex-wrap: wrap;

    gap: 7px;

    margin-bottom: 18px;
}

.sm-subcategory-link {
    display: inline-block;

    padding: 7px 10px;

    background: #f5f3ef;

    color: #3d4c47;

    font-size: 11px;

    line-height: 1.2;

    text-decoration: none;

    border-radius: 2px;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.sm-subcategory-link:hover {
    background: #17352d;

    color: #ffffff;
}


/* VIEW CATEGORY */

.sm-category-view {
    display: inline-block;

    color: #b18a4a;

    font-size: 12px;

    font-weight: 700;

    text-decoration: none;
}

.sm-category-view:hover {
    color: #17352d;
}


/* TABLET */

@media (max-width: 1000px) {

    .sm-category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}


/* MOBILE */

@media (max-width: 600px) {

    .sm-category-grid {
        grid-template-columns: 1fr;
    }

    .sm-category-image-link {
        height: 220px;
    }

}
/* =========================================================
   SOURCINGMART SHOP
========================================================= */

.sm-shop-page {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 40px 30px 80px;
    box-sizing: border-box;
}


/* SHOP HEADER */

.sm-shop-header {
    margin-bottom: 35px;
}

.sm-shop-header h1 {
    margin: 0 0 15px;
    font-size: 38px;
    line-height: 1.15;
    font-weight: 700;
}


/* REMOVE UNWANTED SIDEBAR CONTENT */

.sm-shop-page + aside,
.sm-shop-page ~ aside,
.woocommerce-shop aside,
body.woocommerce-shop aside,
body.post-type-archive-product aside {
    display: none !important;
}


/* PRODUCT GRID */

.woocommerce ul.products {
    display: grid !important;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 28px;

    margin: 0 !important;
    padding: 0 !important;

    list-style: none !important;
}


/* PRODUCT CARD */

.woocommerce ul.products li.product {
    width: auto !important;
    float: none !important;

    margin: 0 !important;
    padding: 0 !important;

    background: #fff;

    border: 1px solid #e8e8e8;

    border-radius: 12px;

    overflow: hidden;

    box-sizing: border-box;

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}


.woocommerce ul.products li.product:hover {
    transform: translateY(-3px);

    box-shadow:
        0 10px 30px rgba(0,0,0,.08);
}


/* PRODUCT IMAGE */

.woocommerce ul.products li.product a img {
    display: block;

    width: 100% !important;

    height: 300px !important;

    object-fit: contain;

    object-position: center;

    margin: 0 !important;

    padding: 12px;

    box-sizing: border-box;

    image-rendering: auto;
}


/* PRODUCT INFORMATION */

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    padding: 16px 18px 5px;

    margin: 0;

    font-size: 17px;

    line-height: 1.4;

    font-weight: 600;
}


/* PRICE */

.woocommerce ul.products li.product .price {
    padding: 0 18px 18px;

    margin: 0;

    font-size: 16px;
}


/* HIDE DEFAULT SHOP DESCRIPTION ELEMENTS IF PRESENT */

.woocommerce-shop .widget-area,
.post-type-archive-product .widget-area {
    display: none !important;
}


/* TABLET */

@media (max-width: 1100px) {

    .woocommerce ul.products {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

}


/* MOBILE */

@media (max-width: 750px) {

    .sm-shop-page {
        padding: 25px 15px 50px;
    }

    .woocommerce ul.products {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 15px;
    }

    .woocommerce ul.products li.product a img {
        height: 220px !important;
    }

}


@media (max-width: 480px) {

    .woocommerce ul.products {
        grid-template-columns:
            1fr;
    }

    .woocommerce ul.products li.product a img {
        height: 280px !important;
    }

}