.icon-img {
	width: 32px;
	height: 32px;
	object-fit: contain;
	margin-bottom: 2px;
}
@media (max-width: 600px) {
	.icon-img {
		width: 28px;
		height: 28px;
	}
}
/* Keep scrollbar gutter stable to avoid layout shift when scrollbars appear/disappear */
html { scrollbar-gutter: stable; }
.icon-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: absolute;
    /* use fixed pixel offset to avoid layout shifts when scrollbars appear */
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.icon-link {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-decoration: none;
	color: #222;
	font-size: 0.95rem;
	font-weight: 500;
	transition: color 0.2s;
}
.icon-link svg {
	width: 32px;
	height: 32px;
	margin-bottom: 2px;
}
.icon-link span {
	font-size: 0.85rem;
	margin-top: 2px;
}
.icon-link:hover {
	color: #2a9d8f;
}

.icon-nav-mobile {
	display: none;
}

@media (max-width: 600px) {
	.icon-nav {
		display: none;
	}
    .site-header {
        padding: 0.75rem 0;
    }
    .logo {
        max-height: 50px;
    }
    body {
        padding-bottom: 70px; /* Space for mobile navigation */
    }
    .mobile-cart-icon .cart-count {
        top: -4px;
        right: -4px;
        font-size: 10px;
        padding: 1px 5px;
    }
    .toast-message {
        bottom: 80px; /* Above mobile nav */
        width: 90%;
    }
	.icon-nav-mobile {
        display: flex;
        position: fixed;
        left: 0;
        bottom: 0;
        width: 100%;
        background: #fff;
        border-top: 2px solid #2a9d8f;
        justify-content: space-around;
        align-items: center;
        padding: 8px 0;
        z-index: 2000;
        box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
        margin: 0;
	}
	.icon-link svg {
		width: 28px;
		height: 28px;
	}
	.icon-link span {
		font-size: 0.8rem;
	}
}

/* Reset some default styles */
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	overflow-x: hidden;
}

/* Toast Notification */
.toast-message {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #fff;
    border-radius: 8px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 3000;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast-message.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-icon {
    background: #4ade80;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.toast-content {
    min-width: 200px;
}

.toast-title {
    color: #111827;
    font-weight: 500;
    font-size: 0.95rem;
}

.toast-subtitle {
    color: #6b7280;
    font-size: 0.85rem;
}

/* Cart Count Badge */
.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    display: none;
}

body {
	font-family: 'Segoe UI', Arial, sans-serif;
	background: #ffffff;
	color: #222;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	overflow-x: hidden;
	padding-top: 80px;
}

.site-header {
	background: #fff;
	box-shadow: 0 2px 8px rgba(0,0,0,0.04);
	border-bottom: 2px solid lch(92.75% 1.41 199.75);
	padding: 0.5rem 0;
	position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
}
.site-nav {
	position: fixed;
	top: 70px; /* Adjust if header height changes */
	left: 0;
	width: 100vw;
	background: #f8f8f8;
	z-index: 999;
}

.logo-title {
	display: flex;
	align-items: center;
	justify-content: flex-start;
    margin-left: 24px;
}

.logo {
	height: 80px;
	width: 80px;
	object-fit: contain;
}

.site-title {
	font-size: 2rem;
	font-weight: 700;
	margin-left: 12px;
	letter-spacing: 2px;
	color: #2a9d8f;
}

main {
	flex: 1;
	padding: 2rem 1rem;
	max-width: 1200px;
	margin: 0 auto;
	box-sizing: border-box;
	width: 100%;
}

.site-footer {
	background: #222;
	color: #fff;
	text-align: center;
	padding: 1rem 0;
	font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 600px) {
       .site-title {
	       font-size: 1.3rem;
	       margin-left: 8px;
       }
       .logo {
	       height: 54px;
	       width: 54px;
       }
       main {
	       padding: 1rem 0.5rem;
       }
}

@media (min-width: 601px) and (max-width: 1024px) {
       .site-title {
	       font-size: 1.7rem;
       }
       .logo {
	       height: 63px;
	       width: 63px;
       }
}

/* Desktop-only: reduce header height and adjust offsets for large screens */
@media (min-width: 1025px) {
    .site-header {
        padding: 0.125rem 0; /* reduce header total height by 4px */
    }
    /* match page top padding so content doesn't sit under smaller header */
    body {
        padding-top: 68px; /* 4px less than before (72px -> 68px) */
    }
    /* adjust site-nav position relative to header height change */
    .site-nav {
        top: 60px; /* 4px less than before (64px -> 60px) */
    }
}

/* iOS Safari specific tweaks */
@supports (-webkit-touch-callout: none) {
	body {
		min-height: -webkit-fill-available;
	}
}

/* Cart styles: e-commerce-ready */
.cart-page{
	max-width:1300px;
	margin:20px auto 60px;
	padding:20px;
	width: 100%;
	box-sizing: border-box;
}
.cart-grid{
	display:grid;
	grid-template-columns:1fr 360px;
	gap:24px;
	width: 100%;
}
.cart-panel{background:#fff;padding:20px;border-radius:10px;border:1px solid #f0f0f0}
.cart-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.cart-item{display:flex;gap:12px;padding:14px 0;border-bottom:1px solid #f5f5f5}
.cart-item:last-child{border-bottom:none}
.thumb{width:96px;height:96px;border-radius:8px;overflow:hidden;display:flex;align-items:center;justify-content:center;background:#fff}
.thumb img{width:100%;height:100%;object-fit:contain}
.item-info{flex:1}
.item-title{font-weight:700;color:#0f5132}
.item-sub{color:#6b7280;font-size:0.95rem;margin-top:6px}
.qty-box{display:flex;align-items:center;gap:8px;margin-top:10px}
.qty-btn{width:36px;height:32px;border-radius:6px;border:1px solid #e6e6e6;background:#fff;cursor:pointer}
.qty-input{width:52px;text-align:center;border:1px solid #e6e6e6;border-radius:6px;padding:6px}
.item-price{font-weight:800;color:#e76f51}
.summary{background:#fff;padding:18px;border-radius:8px;border:1px solid #f0f0f0}
.summary h3{margin:0 0 10px 0}
.summary-row{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px dashed #eee}
.summary-row.total{font-weight:800;border-top:1px solid #eee;margin-top:12px;padding-top:12px}
.checkout-btn{display:block;width:100%;padding:12px;border-radius:8px;background:#5b21b6;color:#fff;border:none;font-weight:800;cursor:pointer}
.continue-shop{color:#6b46c1;text-decoration:none;display:inline-block;margin-top:12px}
@media(max-width:900px){
	.cart-grid{grid-template-columns:1fr}
}

/* Search styles */
.search-section {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.search-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 600px;
    background: white;
    border: 2px solid #2a9d8f;
    border-radius: 50px;
    padding: 8px 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.search-box input {
    flex: 1;
    border: none;
    padding: 8px;
    font-size: 16px;
    background: transparent;
    outline: none;
}

.search-box button {
    background: none;
    border: none;
    padding: 8px;
    color: #2a9d8f;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.search-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.search-results.show {
    max-height: 2000px;
}

.search-result-item {
    background: white;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
}

.search-result-item img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

.search-result-item h3 {
    margin: 0;
    color: #111827;
    font-size: 1rem;
}

.search-result-item .price {
    color: #2a9d8f;
    font-weight: 600;
}

.search-result-item .category {
    font-size: 0.85rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 4px 8px;
    border-radius: 4px;
}

@media (max-width: 600px) {
    .search-section {
        padding: 0 12px;
        margin: 12px auto;
    }
    
    .search-box {
        padding: 4px 12px;
    }
    
    .search-box input {
        font-size: 14px;
    }
    
    .search-results {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
        padding: 12px;
    }
    
    .search-result-item {
        padding: 12px;
    }
    
    .search-result-item img {
        width: 100px;
        height: 100px;
    }
}

/* Banner styles */
.main-banner {
    width: 90%;
    max-width: 1200px;
    margin: 90px auto 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
.banner-img {
    width: 100%;
    max-width: 1100px;
    height: 390px;
    object-fit: contain;
    border-radius: 18px;
    display: block;
}
@media (max-width: 700px) {
    .banner-img {
        height: 180px;
        max-width: 100vw;
        object-fit: cover;
    }
    .main-banner {
        border-radius: 18px;
        margin-top: 1px; /* Reduced from 80px to 75px */
    }
}

/* Featured Products section styles */
.featured-products {
    padding: 20px 20px;
    max-width: 1200px;
    
     margin: -48px auto 0; /* Shift up -30px to overlap banner slightly */
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2rem;
    color: #2a9d8f;
    margin: 0 0 8px 0;
}

.section-header p {
    color: #6b7280;
    font-size: 1.1rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Exactly 3 columns for desktop */
    gap: 24px;
    padding: 0 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.product-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #f0f0f0;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #2a9d8f;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 16px;
}

.product-info {
    padding: 0 8px;
}

.product-info h3 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: #111827;
}

.product-category {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0 0 12px 0;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.price {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2a9d8f;
}

.add-to-cart {
    background: #2a9d8f;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.add-to-cart:hover {
    background: #238b7e;
}

/* Tablet view */
@media (min-width: 769px) and (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr); /* Keep 3 columns for tablet */
        gap: 20px;
        padding: 0 12px;
    }
    
    .product-image {
        height: 180px;
    }
}

/* Mobile view */
@media (max-width: 768px) {
    .featured-products {
        padding: 24px 12px;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .section-header p {
        font-size: 1rem;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr); /* Exactly 2 columns for mobile */
        gap: 12px;
        padding: 0 8px;
    }

    .product-image {
        height: 160px;
    }

    .product-info h3 {
        font-size: 1rem;
    }

    .price {
        font-size: 1.1rem;
    }

    .add-to-cart {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
}

/* Feature Product section styles */
.feature-product-section {
    margin: 10px auto 0 auto;
    max-width: 1100px;
    text-align: center;
    padding: 0 12px;
}
.feature-product-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 18px;
    color: #16a34a;
    letter-spacing: 1px;
}
.feature-product-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    min-height: 80px;
}
@media (max-width: 900px) {
    .feature-product-title { font-size: 1.5rem; }
    .feature-product-list { gap: 12px; }
}
@media (max-width: 600px) {
    .feature-product-section { padding: 0 4px; }
    .feature-product-title { font-size: 1.2rem; }
    .feature-product-list { gap: 8px; }
}

/* Dairy e-commerce product card styles */
.dairy-products {
	display: flex;
	gap: 42px; /* increased ~30% */
	justify-content: center;
	flex-wrap: wrap;
	margin: 92px auto 0 auto;
}
.sweet-products {
  display: flex;
  gap: 42px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 92px auto 0 auto;
}
.product-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
	padding: 23px 28px; /* increased padding ~30% */
	text-align: center;
	max-width: 286px; /* 220 * 1.3 */
	min-width: 234px; /* 180 * 1.3 */
	flex: 1 1 234px;
  transition: box-shadow 0.2s;
}
.product-card:hover {
  box-shadow: 0 6px 24px rgba(22,163,74,0.12);
}
.product-img {
	width: 211px;   /* increased ~30% from 162px */
	height: 211px;
  object-fit: contain;
  margin-bottom: 12px;
  border-radius: 8px;
  background: #f3f4f6;
}
.product-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.product-price {
  font-size: 1.15rem;
  color: #16a34a;
  font-weight: 700;
  margin-bottom: 10px;
}
.add-cart-btn {
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.2s;
}
.add-cart-btn:active {
  background: #15803d;
}
@media (max-width: 700px) {
	.dairy-products {
		flex-direction: column;
		gap: 18px;
		margin-top: 70px;
		align-items: center;
	}
	.sweet-products {
		flex-direction: column;
		gap: 18px;
		margin-top: 70px;
		align-items: center;
	}
	.product-card {
		max-width: 90vw;
		min-width: 0;
		width: 100%;
		margin: 0 auto;
	}
	.product-img { width: 108px; height: 108px; } /* original 80px * 1.35 */
}
@media (max-width: 400px) {
  .product-card { 
    padding: 8px 2px;
    margin-bottom: 10px;
  }
  .product-img { 
    width: 81px; 
    height: 81px; 
  }
  .sweet-products {
    margin-top: 55px !important;
  }
}
