* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: #213128; font-family: Arial, Helvetica, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
img { max-width: 100%; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

/* Header */
.main-header { position: sticky; top: 0; z-index: 50; min-height: 75px; border-bottom: 1px solid #e1e8e3; background: rgba(255,255,255,.97); box-shadow: 0 3px 16px rgba(21,55,34,.06); }
.header-content { min-height: 75px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { color: #163624; font-size: 1.65rem; font-weight: 800; white-space: nowrap; }
.logo span { color: #078447; }
.main-navigation, .account-navigation { display: flex; align-items: center; gap: 18px; }
.main-navigation a, .account-navigation a { color: #35483b; font-size: .94rem; font-weight: 700; transition: color .2s; }
.main-navigation a:hover, .account-navigation a:hover { color: #006633; }
.header-link { padding: 10px 18px; border-radius: 8px; background: #006633; color: #fff !important; }
.logout-button { padding: 10px 16px; border: 0; border-radius: 8px; background: #173b25; color: #fff; font-weight: 700; cursor: pointer; }

/* Hero */
.hero-section { padding: 82px 0; background: linear-gradient(135deg,#eef9f2 0%,#fffbe9 100%); }
.hero-content { display: grid; grid-template-columns: 1.35fr .65fr; align-items: center; gap: 55px; }
.section-label { margin: 0 0 12px; color: #078447 !important; font-size: .78rem; font-weight: 800; letter-spacing: 1.5px; }
.hero-text h1 { max-width: 720px; margin: 0; color: #123721; font-size: clamp(2.35rem,5vw,4.35rem); line-height: 1.08; }
.hero-text > p:not(.section-label) { max-width: 650px; margin: 24px 0; color: #5b6d61; font-size: 1.08rem; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.primary-link, .secondary-link { display: inline-flex; min-height: 48px; padding: 12px 20px; align-items: center; justify-content: center; border-radius: 9px; font-weight: 800; transition: transform .2s, box-shadow .2s; }
.primary-link { background: #006633; color: #fff; box-shadow: 0 8px 18px rgba(0,102,51,.18); }
.secondary-link { border: 1px solid #b8cbbf; background: #fff; color: #164029; }
.primary-link:hover, .secondary-link:hover { transform: translateY(-2px); }
.hero-card { padding: 38px; border: 1px solid #dce9df; border-radius: 22px; background: #fff; box-shadow: 0 20px 45px rgba(0,72,36,.12); text-align: center; }
.hero-icon { font-size: 4rem; }
.hero-card h2 { margin: 16px 0 10px; color: #163b25; font-size: 1.7rem; }
.hero-card p { margin: 0; color: #65736a; line-height: 1.65; }

/* Search */
.search-section { padding: 34px 0; border-bottom: 1px solid #e5ece7; background: #f7faf8; }
.search-box { display: flex; max-width: 780px; margin: 0 auto; gap: 10px; }
.search-box input { flex: 1; min-width: 0; min-height: 48px; padding: 12px 16px; border: 1px solid #c8d5cc; border-radius: 9px; outline: none; }
.search-box input:focus { border-color: #078447; box-shadow: 0 0 0 3px rgba(7,132,71,.12); }
.search-box button, #useLocationButton { min-height: 44px; padding: 10px 18px; border: 0; border-radius: 8px; background: #006633; color: #fff; font-weight: 700; cursor: pointer; }
.location-filter { display: flex; max-width: 780px; margin: 20px auto 0; padding: 16px; align-items: flex-end; flex-wrap: wrap; gap: 14px; border: 1px solid #dce7df; border-radius: 12px; background: #fff; }
.location-filter > div { flex: 1; min-width: 190px; }
.location-filter label { display: block; margin-bottom: 7px; color: #294132; font-weight: 700; }
.location-filter select { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid #c8d5cc; border-radius: 8px; background: #fff; }
#useLocationButton:disabled { background: #86958b; cursor: not-allowed; }
.location-message { flex: 0 0 100%; margin: 0; color: #647169; font-size: .88rem; }
.location-message.success { color: #006633; }
.location-message.error { color: #a42222; }

/* Sections and grids */
.content-section { padding: 72px 0; }
.light-section { background: #f6faf7; }
.section-heading { max-width: 650px; margin: 0 auto 38px; text-align: center; }
.section-heading h2 { margin: 0 0 12px; color: #173b25; font-size: clamp(1.8rem,4vw,2.55rem); }
.section-heading > p:last-child { margin: 0; color: #68766d; line-height: 1.65; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(175px,1fr)); gap: 18px; }
.supplier-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(245px,1fr)); gap: 24px; }
.loading-message { grid-column: 1/-1; padding: 30px; color: #6b786f; text-align: center; }
.product-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: -10px 0 24px; padding: 14px 16px; border: 1px solid #dce6df; border-radius: 12px; background: #f8fbf9; }
.product-results-count { margin: 0; color: #294132; font-weight: 800; }
.product-toolbar-actions { display: flex; align-items: center; gap: 10px; }
.product-toolbar-actions label { color: #526158; font-size: .88rem; font-weight: 700; }
.product-toolbar-actions select { min-height: 42px; padding: 8px 36px 8px 11px; border: 1px solid #c8d5cc; border-radius: 8px; background: #fff; color: #263e2f; }
.clear-filter-button { min-height: 42px; padding: 8px 14px; border: 1px solid #b8cbbf; border-radius: 8px; background: #fff; color: #164029; font-weight: 700; cursor: pointer; }
.clear-filter-button:hover { border-color: #006633; background: #eaf7ee; }

/* Marketplace cards */
.public-category-card { min-height: 130px; padding: 20px; border: 1px solid #dce6df; border-radius: 14px; background: #fff; color: #263e2f; cursor: pointer; transition: .2s ease; }
.public-category-card:hover, .public-category-card.active { border-color: #006633; background: #eaf7ee; transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,102,51,.09); }
.public-category-card span, .public-category-card strong { display: block; }
.public-category-card span { margin-bottom: 10px; font-size: 2.5rem; }
.public-supplier-card { display: flex; gap: 18px; padding: 22px; border: 1px solid #dce6df; border-radius: 14px; background: #fff; box-shadow: 0 7px 22px rgba(0,70,35,.06); }
.public-supplier-logo { display: grid; flex: 0 0 75px; width: 75px; height: 75px; overflow: hidden; place-items: center; border-radius: 50%; background: #edf4ef; font-size: 2rem; }
.public-supplier-logo img { width: 100%; height: 100%; object-fit: cover; }
.public-supplier-card h3 { margin: 5px 0; color: #173b25; }
.public-supplier-card p { color: #647168; line-height: 1.5; }
.approved-label { margin: 0 !important; color: #006633 !important; font-size: .76rem; font-weight: 800; }
.public-shop-status { display: inline-block; margin: 7px 0; padding: 5px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.public-shop-status.open { color: #075d2c; background: #d9f7e6; }
.public-shop-status.closed { color: #8b241c; background: #fee4e2; }
.public-product-card { overflow: hidden; border: 1px solid #dce5df; border-radius: 15px; background: #fff; box-shadow: 0 8px 25px rgba(0,70,35,.08); transition: transform .2s,box-shadow .2s; }
.public-product-card:hover { transform: translateY(-4px); box-shadow: 0 15px 32px rgba(0,70,35,.13); }
.public-product-card.shop-closed { opacity: .78; }
.public-product-image { position: relative; height: 230px; overflow: hidden; background: #edf3ef; }
.public-product-image img { width: 100%; height: 100%; object-fit: cover; }
.public-missing-image { display: grid; width: 100%; height: 100%; place-items: center; font-size: 4rem; }
.public-offer-badge, .public-closed-badge { position: absolute; top: 12px; padding: 7px 11px; border-radius: 20px; color: #fff; font-size: .75rem; font-weight: 800; z-index: 2; }
.public-offer-badge { right: 12px; background: #c84a20; }
.public-closed-badge { left: 12px; background: #b42318; }
.public-product-information { padding: 20px; }
.public-product-category { margin: 0 0 7px; color: #006633; font-size: .76rem; font-weight: 800; text-transform: uppercase; }
.public-product-information h3 { margin: 0 0 8px; color: #173b25; font-size: 1.25rem; }
.public-supplier-name, .public-stock { color: #68756d; font-size: .88rem; }
.public-product-description {
    display: -webkit-box;
    min-height: 42px;
    margin: 12px 0 0;
    overflow: hidden;
    color: #56645b;
    font-size: 0.9rem;
    line-height: 1.5;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.public-stock.low-stock { color: #a04416; font-weight: 800; }
.public-product-price { display: flex; align-items: center; gap: 10px; margin: 16px 0; }
.public-product-price span { color: #878e89; text-decoration: line-through; }
.public-product-price strong { color: #006633; font-size: 1.35rem; }
.public-distance { margin: 8px 0 15px; color: #006633; font-size: .9rem; font-weight: 700; }
.public-distance.unavailable { color: #78847c; font-weight: 500; }
.public-cart-button { width: 100%; min-height: 45px; border: 0; border-radius: 8px; background: #006633; color: #fff; font-weight: 700; cursor: pointer; }
.public-cart-button:hover { background: #004f28; }
.public-cart-button.closed, .public-cart-button:disabled { color: #666; background: #d8d8d8; cursor: not-allowed; }

/* Steps and footer */
.how-it-works { background: #123721; color: #fff; }
.how-it-works .section-heading h2 { color: #fff; }
.steps-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.step-card { padding: 30px; border: 1px solid rgba(255,255,255,.14); border-radius: 15px; background: rgba(255,255,255,.07); text-align: center; }
.step-card span { display: grid; width: 48px; height: 48px; margin: 0 auto 18px; place-items: center; border-radius: 50%; background: #ffd54f; color: #173b25; font-size: 1.2rem; font-weight: 800; }
.step-card h3 { margin: 0 0 10px; font-size: 1.3rem; }
.step-card p { margin: 0; color: #d5e2d9; line-height: 1.6; }
.main-footer { padding: 55px 0 18px; background: #0d2918; color: #d6e2d9; }
.footer-content { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 45px; }
.footer-logo { display: inline-block; margin-bottom: 10px; color: #fff; }
.footer-content p { max-width: 390px; color: #aebdb3; line-height: 1.6; }
.footer-content h3 { margin: 0 0 16px; color: #fff; }
.footer-content > div > a:not(.logo) { display: block; margin: 10px 0; color: #b8c7bd; }
.footer-content > div > a:hover { color: #ffd54f; }
.copyright { margin: 38px 0 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); color: #94a69a; text-align: center; font-size: .88rem; }

@media (max-width: 900px) {
  .header-content { padding: 14px 0; flex-wrap: wrap; }
  .main-navigation { order: 3; width: 100%; overflow-x: auto; padding: 9px 0 3px; }
  .main-navigation a { white-space: nowrap; }
  .hero-content { grid-template-columns: 1fr; }
  .hero-card { max-width: 600px; }
  .supplier-grid { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  .container { width: min(100% - 24px,1120px); }
  .main-header { position: static; }
  .account-navigation { gap: 10px; }
  .hero-section { padding: 55px 0; }
  .hero-actions, .search-box { flex-direction: column; }
  .primary-link, .secondary-link, .search-box button { width: 100%; }
  .content-section { padding: 55px 0; }
  .steps-grid, .footer-content { grid-template-columns: 1fr; }
  .public-supplier-card { flex-direction: column; }
  .product-grid { grid-template-columns: 1fr; }
  .product-toolbar, .product-toolbar-actions { align-items: stretch; flex-direction: column; }
  .product-toolbar-actions label { margin-bottom: -4px; }
  .product-toolbar-actions select, .clear-filter-button { width: 100%; }
}

.public-slideshow-image {
    transition: opacity 0.18s ease;
}

.public-slideshow-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 20px;
    background: rgba(0, 102, 51, 0.92);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
}
/* =====================================================
   CONNECME NOTIFICATION CONTROLS
===================================================== */

#connecmeNotificationCard {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    margin: 24px 0;
    padding: 24px;
    border: 1px solid #d7e8dd;
    border-left: 5px solid #006633;
    border-radius: 14px;
    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f2faf5 100%
        );
    box-shadow:
        0 8px 24px
        rgba(0, 70, 35, 0.08);
}


#connecmeNotificationCard > div {
    flex: 1;
}


#connecmeNotificationCard h2 {
    margin: 0 0 8px;
    color: #006633;
    font-size: 1.3rem;
}


#connecmeNotificationCard p {
    margin: 0;
    color: #526158;
    line-height: 1.6;
}


#enableConnecMeNotifications,
#enableNearbyPromotions {
    min-height: 46px;
    padding: 11px 18px;
    border: none;
    border-radius: 9px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


#enableConnecMeNotifications {
    color: #ffffff;
    background: #006633;
}


#enableNearbyPromotions {
    color: #3d3100;
    background: #ffd54f;
}


#enableConnecMeNotifications:hover,
#enableNearbyPromotions:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 16px
        rgba(0, 70, 35, 0.15);
}


#enableConnecMeNotifications:disabled,
#enableNearbyPromotions:disabled {
    color: #ffffff;
    background: #789185;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}


/* =====================================================
   MOBILE NOTIFICATION CONTROLS
===================================================== */

@media (max-width: 760px) {

    #connecmeNotificationCard {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        margin: 18px 0;
        padding: 20px 16px;
        text-align: left;
    }


    #connecmeNotificationCard h2 {
        font-size: 1.15rem;
    }


    #enableConnecMeNotifications,
    #enableNearbyPromotions {
        width: 100%;
        min-height: 48px;
    }

}
/* =====================================================
   CONNECME LOGO
===================================================== */

.logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin: 0;
    padding: 4px 0;
    line-height: 0;
    text-decoration: none;
}

.connecme-logo {
    display: block;
    width: 180px;
    max-width: 100%;
    height: 70px;
    object-fit: contain;
    object-position: center;
    margin: 0;
    padding: 0;
}

/* Tablet */
@media (max-width: 768px) {
    .connecme-logo {
        width: 150px;
        height: 60px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .logo {
        padding: 2px 0;
    }

    .connecme-logo {
        width: 125px;
        height: 50px;
    }
}