
/* =========================================================
   GOOD EARTH MARKET
   Main marketplace layout
   ========================================================= */

.ge-market-wrap {
    direction: rtl;
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 18px 60px;
}


/* Intro text */

.ge-market-wrap > p:first-of-type {
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: 18px;
}


/* Logged-in member greeting */

.ge-market-member {
    margin: 18px 0;
    padding: 14px 18px;
    background: #f5f7f4;
    border-radius: 12px;
}


/* Add advertisement button */

#ge-market-add-button {
    border: 0;
    border-radius: 10px;
    padding: 13px 24px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    background: #245c3a;
    color: #ffffff;
    transition: 0.2s ease;
}

#ge-market-add-button:hover {
    transform: translateY(-1px);
    opacity: 0.92;
}


/* Advertisements heading */

.ge-market-wrap h2 {
    margin-top: 35px;
    margin-bottom: 18px;
    font-size: 26px;
}


/* =========================================================
   SEARCH
   ========================================================= */

.ge-market-search-form {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr) auto;
    gap: 12px;
    align-items: end;

    padding: 18px;
    margin-bottom: 28px;

    background: #ffffff;
    border: 1px solid #e3e7e3;
    border-radius: 16px;

    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}


.ge-market-search-field,
.ge-market-category-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}


.ge-market-search-form label {
    font-size: 14px;
    font-weight: 700;
}


.ge-market-search-form input,
.ge-market-search-form select {
    width: 100%;
    height: 48px;

    padding: 0 14px;

    border: 1px solid #d5dad5;
    border-radius: 10px;

    background: #ffffff;
    font-size: 15px;

    outline: none;
}


.ge-market-search-form input:focus,
.ge-market-search-form select:focus {
    border-color: #245c3a;
}


.ge-market-search-form button {
    height: 48px;
    padding: 0 28px;

    border: 0;
    border-radius: 10px;

    background: #245c3a;
    color: #ffffff;

    font-size: 16px;
    font-weight: 700;

    cursor: pointer;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .ge-market-wrap {
        padding: 16px 12px 40px;
    }

    .ge-market-search-form {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .ge-market-search-form button {
        width: 100%;
    }

    #ge-market-add-button {
        width: 100%;
    }

    .ge-market-wrap h2 {
        font-size: 23px;
    }
    
    /* =========================================================
   PRODUCT CARDS — MOBILE FIRST
   ========================================================= */

.ge-market-listing {
    position: relative;
    overflow: hidden;

    margin: 0 0 20px;
    padding: 0 16px 18px;

    background: #ffffff;
    border: 1px solid #e4e8e4;
    border-radius: 18px;

    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.07);
}

/* Main product photo */

.ge-market-listing-image {
    margin: 0 -16px 16px;
    overflow: hidden;
    background: #f2f3f2;
}

.ge-market-listing-image img {
    display: block;
    width: 100%;
    height: auto;
}


/* Product title */

.ge-market-listing h3 {
    margin: 4px 0 8px;

    font-size: 20px;
    line-height: 1.4;
}

.ge-market-listing h3 a {
    color: #1d2a22;
    text-decoration: none;
}


/* Price */

.ge-market-listing h3 + p {
    margin: 0 0 12px;

    font-size: 21px;
    color: #245c3a;
}

.ge-market-listing h3 + p strong {
    font-weight: 800;
}


/* Listing information */

.ge-market-listing p {
    margin: 8px 0;

    font-size: 15px;
    line-height: 1.7;

    color: #4a514c;
}


/* SOLD badge */

.ge-market-sold-badge {
    position: absolute;
    z-index: 5;

    top: 14px;
    right: 14px;

    padding: 7px 13px;

    border-radius: 999px;

    background: #b42318;
    color: #ffffff;

    font-size: 14px;
    font-weight: 800;

    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.16);
}


/* =========================================================
   BUYER CONTACT BUTTONS
   ========================================================= */

.ge-market-contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;

    margin-top: 17px;
}

.ge-market-contact a {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 48px;

    border-radius: 11px;

    font-size: 16px;
    font-weight: 700;

    text-decoration: none;
}

.ge-market-contact a:first-child {
    background: #245c3a;
    color: #ffffff;
}

.ge-market-contact a:last-child {
    background: #eef7f0;
    color: #245c3a;
    border: 1px solid #cfe3d4;
}


/* =========================================================
   SELLER CONTROLS
   ========================================================= */

.ge-market-owner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin-top: 15px;
    padding-top: 14px;

    border-top: 1px solid #ecefec;
}

.ge-market-owner-actions a,
.ge-market-owner-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 40px;

    padding: 7px 13px;

    border: 1px solid #d9ded9;
    border-radius: 9px;

    background: #f7f8f7;
    color: #303630;

    font-size: 14px;
    font-weight: 700;

    text-decoration: none;
    cursor: pointer;
}

.ge-market-owner-actions form:last-of-type button {
    color: #a21d16;
}


/* =========================================================
   DESKTOP
   ========================================================= */

@media (min-width: 768px) {

    .ge-market-listing {
        max-width: 600px;
    }
    
   }
   
   
   /* =========================================================
   SINGLE LISTING — MOBILE FIRST
   ========================================================= */

.ge-market-single-listing {
    direction: rtl;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 12px 14px 40px;
    box-sizing: border-box;
}


/* Back to market */

.ge-market-single-listing > p:first-child {
    margin: 0 0 14px;
}

.ge-market-single-listing > p:first-child a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    min-height: 44px;
    padding: 9px 17px;

    background: #245c3a;
    color: #ffffff;

    border: 0;
    border-radius: 11px;

    font-size: 15px;
    font-weight: 700;
    text-decoration: none;

    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

/* =========================================================
   PHOTO GALLERY
   Swipe horizontally on mobile
   ========================================================= */

.ge-market-single-images {
    display: flex;
    gap: 10px;

    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;

    margin: 0 0 20px;
    padding: 0 0 8px;

    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;

    scrollbar-width: thin;
}

.ge-market-single-image {
    flex: 0 0 92%;
    scroll-snap-align: start;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    background: #f3f4f3;
    border: 1px solid #e3e6e3;
    border-radius: 16px;
}

.ge-market-single-image img {
    display: block;

    width: 100%;
    height: auto;

    object-fit: contain;
}


/* Listing title */

.ge-market-single-listing h2 {
    margin: 5px 0 8px;

    color: #1d2a22;

    font-size: 25px;
    line-height: 1.4;
}


/* Price */

.ge-market-single-listing h2 + p {
    margin: 0 0 18px;

    color: #245c3a;

    font-size: 24px;
    font-weight: 800;
}


/* General information */

.ge-market-single-listing > p {
    margin: 10px 0;

    color: #454c47;

    font-size: 16px;
    line-height: 1.7;
}


/* Description */

.ge-market-single-description {
    margin: 18px 0;
    padding: 15px;

    background: #f7f8f7;
    border-radius: 12px;

    color: #414842;

    font-size: 16px;
    line-height: 1.8;
}


/* Contact buttons on single listing */

.ge-market-single-listing .ge-market-contact {
    margin-top: 22px;
}

/* =========================================================
   ADD LISTING FORM — MOBILE FIRST
   ========================================================= */

.ge-market-add-form {
    direction: rtl;
    width: 100%;
    margin: 18px 0 28px;
    padding: 18px 15px;

    background: #ffffff;
    border: 1px solid #e2e7e2;
    border-radius: 16px;

    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.06);

    box-sizing: border-box;
}


/* Form heading */

.ge-market-add-form h2 {
    margin: 0 0 8px;

    color: #1d2a22;

    font-size: 22px;
    font-weight: 800;
}


/* Seller + field rows */

.ge-market-add-form p {
    margin: 0 0 17px;

    color: #4b524d;

    font-size: 15px;
    line-height: 1.6;
}


/* Labels */

.ge-market-add-form label {
    display: inline-block;

    margin-bottom: 7px;

    color: #29312b;

    font-size: 15px;
    font-weight: 700;
}


/* Inputs */

.ge-market-add-form input[type="text"],
.ge-market-add-form input[type="number"],
.ge-market-add-form input[type="tel"],
.ge-market-add-form select,
.ge-market-add-form textarea {
    display: block;

    width: 100%;
    min-height: 50px;

    padding: 11px 13px;

    border: 1px solid #d6dcd7;
    border-radius: 11px;

    background: #ffffff;
    color: #252b27;

    font-size: 16px;

    box-sizing: border-box;
    outline: none;
}


/* Description */

.ge-market-add-form textarea {
    min-height: 125px;
    resize: vertical;
    line-height: 1.6;
}


/* Focus */

.ge-market-add-form input:focus,
.ge-market-add-form select:focus,
.ge-market-add-form textarea:focus {
    border-color: #245c3a;
    box-shadow: 0 0 0 3px rgba(36, 92, 58, 0.08);
}


/* =========================================================
   PHOTO UPLOAD
   ========================================================= */

.ge-market-add-form input[type="file"] {
    display: block;

    width: 100%;
    padding: 14px;

    background: #f5f7f5;

    border: 2px dashed #cbd7cd;
    border-radius: 12px;

    color: #4a514c;

    font-size: 14px;

    box-sizing: border-box;
}


/* =========================================================
   PUBLISH BUTTON
   ========================================================= */

.ge-market-add-form button[type="submit"] {
    width: 100%;
    min-height: 54px;

    margin-top: 4px;

    border: 0;
    border-radius: 12px;

    background: #245c3a;
    color: #ffffff;

    font-size: 17px;
    font-weight: 800;

    cursor: pointer;
}


/* Desktop */

@media (min-width: 768px) {

    .ge-market-add-form {
        max-width: 720px;
        padding: 25px;
    }
    
    /* =========================================================
   MEMBER LOGIN — MOBILE FIRST
   ========================================================= */

.ge-market-login-box {
    direction: rtl;
    width: 100%;
    margin: 18px 0 28px;
    padding: 20px 16px;

    background: #ffffff;
    border: 1px solid #e2e7e2;
    border-radius: 18px;

    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.06);

    box-sizing: border-box;
}

.ge-market-login-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;
    margin: 0 auto 12px;

    background: #eef5f0;
    border-radius: 50%;

    font-size: 23px;
}

.ge-market-login-box h3 {
    margin: 0 0 7px;

    text-align: center;
    color: #1d2a22;

    font-size: 20px;
    line-height: 1.5;
}

.ge-market-login-box > p {
    margin: 0 0 20px;

    text-align: center;
    color: #626963;

    font-size: 15px;
}

.ge-market-login-form {
    display: grid;
    gap: 8px;
}

.ge-market-login-form label {
    margin-top: 5px;

    color: #303730;
    font-size: 14px;
    font-weight: 700;
}

.ge-market-login-form input[type="email"],
.ge-market-login-form input[type="password"] {
    width: 100%;
    height: 50px;

    padding: 0 13px;

    background: #ffffff;
    border: 1px solid #d6dcd7;
    border-radius: 11px;

    font-size: 16px;

    box-sizing: border-box;
    outline: none;
}

.ge-market-login-form input:focus {
    border-color: #245c3a;
    box-shadow: 0 0 0 3px rgba(36, 92, 58, 0.08);
}

.ge-market-login-form button {
    width: 100%;
    min-height: 52px;

    margin-top: 10px;

    border: 0;
    border-radius: 11px;

    background: #245c3a;
    color: #ffffff;

    font-size: 17px;
    font-weight: 800;

    cursor: pointer;
}

.ge-market-login-box > small {
    display: block;

    margin-top: 15px;
    padding-top: 14px;

    border-top: 1px solid #edf0ed;

    text-align: center;

    color: #737a74;
    font-size: 13px;
    line-height: 1.7;
}

@media (min-width: 768px) {
        .ge-market-login-box {
            max-width: 560px;
            padding: 25px;
        }
    }
    
    /* =========================================================
   LOGGED-IN MEMBER AREA — MOBILE FIRST
   ========================================================= */

.ge-market-member {
    position: relative;
    width: 100%;
    margin: 18px 0 26px;
    padding: 17px;

    background: #ffffff;
    border: 1px solid #e2e7e2;
    border-radius: 17px;

    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.06);

    box-sizing: border-box;
}


/* Member name */

.ge-market-member > p {
    margin: 0 0 15px;

    color: #4d554f;
    font-size: 15px;
    line-height: 1.7;
}

.ge-market-member > p strong {
    display: block;

    margin-top: 2px;

    color: #1d2a22;
    font-size: 18px;
    font-weight: 800;
}


/* Logout */

.ge-market-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 40px;
    margin-bottom: 15px;
    padding: 7px 15px;

    background: #f6f7f6;
    color: #626963;

    border: 1px solid #dfe3df;
    border-radius: 9px;

    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
}

.ge-market-logout:hover {
    background: #eeeeee;
    color: #333333;
}


/* Add advertisement area */

.ge-market-member .ge-market-add-listing {
    padding-top: 15px;
    border-top: 1px solid #edf0ed;
}

.ge-market-member #ge-market-add-button {
    width: 100%;
    min-height: 52px;

    margin: 0;

    background: #245c3a;
    color: #ffffff;

    border: 0;
    border-radius: 11px;

    font-size: 17px;
    font-weight: 800;

    box-shadow: 0 3px 10px rgba(36, 92, 58, 0.12);
}

/* =========================================================
   EDIT LISTING — MOBILE FIRST
   ========================================================= */

.ge-market-edit-form {
    direction: rtl;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 14px 14px 40px;
    box-sizing: border-box;
}


/* BACK TO LISTING */

.ge-market-edit-form > p:first-child {
    margin: 0 0 18px;
}

.ge-market-edit-form > p:first-child a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;
    padding: 9px 17px;

    background: #245c3a;
    color: #ffffff !important;

    border-radius: 11px;

    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;

    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}


/* TITLE */

.ge-market-edit-form > h2 {
    margin: 0 0 20px;

    color: #1d2a22;

    font-size: 25px;
    font-weight: 800;
}


/* FORM CARD */

.ge-market-edit-form > form {
    width: 100%;
    padding: 17px 15px;

    background: #ffffff;

    border: 1px solid #e2e7e2;
    border-radius: 17px;

    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.06);

    box-sizing: border-box;
}


/* FORM ROWS */

.ge-market-edit-form form > p {
    margin: 0 0 18px;
}


/* LABELS */

.ge-market-edit-form label {
    display: inline-block;
    margin-bottom: 7px;

    color: #29312b;

    font-size: 15px;
    font-weight: 700;
}


/* FIELDS */

.ge-market-edit-form input[type="text"],
.ge-market-edit-form input[type="number"],
.ge-market-edit-form input[type="tel"],
.ge-market-edit-form select,
.ge-market-edit-form textarea {
    display: block;

    width: 100%;
    min-height: 50px;

    padding: 11px 13px;

    background: #ffffff;
    color: #252b27;

    border: 1px solid #d6dcd7;
    border-radius: 11px;

    font-size: 16px;

    box-sizing: border-box;
    outline: none;
}

.ge-market-edit-form textarea {
    min-height: 125px;
    resize: vertical;
    line-height: 1.7;
}

.ge-market-edit-form input:focus,
.ge-market-edit-form select:focus,
.ge-market-edit-form textarea:focus {
    border-color: #245c3a;
    box-shadow: 0 0 0 3px rgba(36, 92, 58, 0.08);
}


/* =========================================================
   CURRENT PHOTOS
   ========================================================= */

.ge-market-edit-images {
    margin: 22px 0;
    padding-top: 20px;

    border-top: 1px solid #e9ede9;
}

.ge-market-edit-images > h3 {
    margin: 0 0 14px;

    color: #1d2a22;

    font-size: 19px;
    font-weight: 800;
}

.ge-market-edit-image {
    display: grid;
    grid-template-columns: 95px 1fr;
    gap: 14px;
    align-items: center;

    margin-bottom: 11px;
    padding: 9px;

    background: #f7f8f7;

    border: 1px solid #e5e9e5;
    border-radius: 12px;
}

.ge-market-edit-image img {
    display: block;

    width: 95px;
    height: 95px;

    object-fit: cover;

    border-radius: 9px;
}

.ge-market-edit-image label {
    display: flex;
    align-items: center;
    gap: 8px;

    margin: 0;

    color: #9e2119;

    font-size: 14px;
    font-weight: 700;
}

.ge-market-edit-image input[type="checkbox"] {
    width: 19px;
    height: 19px;
}


/* =========================================================
   ADD MORE PHOTOS
   ========================================================= */

.ge-market-edit-add-images {
    margin: 22px 0;
    padding: 16px;

    background: #f7f9f7;

    border: 1px solid #e3e8e3;
    border-radius: 13px;
}

.ge-market-edit-add-images h3 {
    margin: 0 0 6px;

    color: #1d2a22;

    font-size: 18px;
    font-weight: 800;
}

.ge-market-edit-add-images p {
    margin: 0 0 13px;

    color: #687069;

    font-size: 14px;
    line-height: 1.6;
}

.ge-market-edit-add-images input[type="file"] {
    display: block;

    width: 100%;
    padding: 14px;

    background: #ffffff;

    border: 2px dashed #cbd7cd;
    border-radius: 11px;

    box-sizing: border-box;
}


/* =========================================================
   SAVE BUTTON
   ========================================================= */

.ge-market-edit-form button[name="ge_market_edit_submit"] {
    width: 100%;
    min-height: 54px;

    margin-top: 5px;

    background: #245c3a;
    color: #ffffff;

    border: 0;
    border-radius: 12px;

    font-size: 17px;
    font-weight: 800;

    cursor: pointer;
}


/* DESKTOP */

@media (min-width: 768px) {

    .ge-market-edit-form {
        padding-top: 25px;
    }

    .ge-market-edit-form > form {
        padding: 25px;
    }

    .ge-market-edit-image {
        grid-template-columns: 120px 1fr;
    }

    .ge-market-edit-image img {
        width: 120px;
        height: 120px;
    }
}


/* Desktop */

@media (min-width: 768px) {

        .ge-market-member {
            max-width: 720px;
            padding: 20px;
        }
    
        .ge-market-member #ge-market-add-button {
            width: auto;
            min-width: 180px;
            padding-left: 25px;
            padding-right: 25px;
        }
    }
}


/* =========================================================
   TABLET / DESKTOP
   ========================================================= */

@media (min-width: 768px) {

        .ge-market-single-listing {
            padding-top: 24px;
        }
    
        .ge-market-single-image {
            flex-basis: 70%;
        }
    }
    
    /* FINAL MEMBER CARD */

.ge-market .ge-market-member {
    width: 100% !important;
    margin: 18px 0 26px !important;
    padding: 18px !important;

    background: #ffffff !important;
    border: 1px solid #e1e7e2 !important;
    border-radius: 18px !important;

    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.07) !important;

    box-sizing: border-box !important;
}

.ge-market .ge-market-member > p {
    margin: 0 0 12px !important;
    padding: 0 !important;
}

.ge-market .ge-market-member > p strong {
    display: block !important;
    margin-top: 3px !important;

    color: #1d2a22 !important;
    font-size: 18px !important;
    font-weight: 800 !important;
}


/* LOGOUT BUTTON */

.ge-market .ge-market-member .ge-market-logout {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    min-height: 40px !important;
    margin: 0 0 16px !important;
    padding: 7px 16px !important;

    background: #f3f5f3 !important;
    color: #5b625c !important;

    border: 1px solid #d9dfda !important;
    border-radius: 10px !important;

    font-size: 14px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}


/* ADD LISTING SECTION */

.ge-market .ge-market-member .ge-market-add-listing {
    margin: 0 !important;
    padding: 16px 0 0 !important;

    border-top: 1px solid #e9ede9 !important;
}


/* ADD BUTTON */

.ge-market .ge-market-member #ge-market-add-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;
    min-height: 52px !important;
    margin: 0 !important;
    padding: 10px 18px !important;

    background: #245c3a !important;
    color: #ffffff !important;

    border: 0 !important;
    border-radius: 11px !important;

    font-size: 17px !important;
    font-weight: 800 !important;

    text-decoration: none !important;
}
    
}