:root {
    --pink: #f3ebde;
    --peach: #ffc6a8;
    --cream: #fff5ec;
    --brown: #5a3e36;
}

html {
    display: flex;
    justify-content: center;
    align-items: center;
    /* background-image: url('img/icon/bodybg.png');
    background-repeat: repeat;
    background-size: f; */
}

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f3ebde, #ffc6a8, #c3f0ff);
    min-height: 100vh;
    max-width: 400px;
    padding-top: 100px;
    /* Adjust if header height changes */
}

.bestSelling {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
    max-width: 400px;
    margin-top: 5px;
    height: 343px;
    animation: highlight 3s infinite;
    /* transform: translateX(-50%); */
    /* animation: highlight 3s infinite; */
}

/* .bestSelling:hover {
    transform: scale(1.05);
} */

#bs_prod {
    background-image: url('img/icon/BestSellingv3.gif');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    cursor: pointer;
    font-size: larger;
    font-weight: bolder;
    margin: 0px 0 5px 0;
    text-align: center;
    font-style: oblique;
    background-color: #f3ebde;
    border-radius: 10px;
    position: fixed;
    top: 100px;
    left: 50%;
    width: 100%;
    height: 40px;
    max-width: 400px;
    z-index: 999;
    animation: highlight 3s infinite;
    transform: translateX(-50%);
}

@keyframes highlight {
    0%, 100% { background-color: var(--peach); color: var(--cream);}
    25%, 75% { background-color: var(--pink); color: var(--brown)}
    50% { background-color: #c3f0ff; color: var(--peach);}}

header {
    display: flex;
    justify-content: center;
    align-items: center;
    /* padding: 20px 40px; */
    background: rgba(255, 255, 255, 0.8);
    background-image: url('img/icon/bgHeader2.png');
    background-repeat: no-repeat;
    background-position: center;
    backdrop-filter: blur(10px);
    max-width: 400px;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    z-index: 1000;
}

header p#header_cap {
    color: var(--brown);
    font-style: italic;
    font-size: small;
    margin: 10px 0 0 0;
    text-align: center;
}

div #header_box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

header p #header_cap {
    font-size: 0.8rem;
    color: #fff5ec;
    font-style: italic;
    margin: 0;
}

h1 {
    color: #5a3e36;
}

#bestSellingHeader {
    position: sticky;
    top: 104px;
    background: linear-gradient(35deg, #c3f0ff, #777, #ffc6a8);
    padding: 2px 10px 2px;
    margin: 0;
    z-index: 999;
    color: #f3ebde;
}

.cart {
    background: #f3ebde;
    padding: 10px 20px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.priceSearch {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 10px 40px 10px 40px;
    position: sticky;
    top: 150px;
    background: linear-gradient(90deg, #ffc6a8, #f3ebde, #c3f0ff);
    z-index: 998;
    cursor: pointer;
    border-radius: 10px;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 40px;
    position: sticky;
    top: 208px;
    background: linear-gradient(90deg, #ffc6a8, #f3ebde, #c3f0ff);
    z-index: 998;
    cursor: pointer;
    border-radius: 10px;
}


#contactUs {
    background: #f3ebde;
    margin: 20px 40px 0 40px;
    padding: 10px 20px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}


input {
    padding: 5px;
    border-radius: 0px;
    border: 1px solid #ddd;
    width: 343px;
    font-size: 16px;
    padding-left: 10px;
}

.filters button {
    padding: 3px 15px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    background: #ffffff;
    transition: 0.3s;
}

.filters button.active,
.filters button:hover {
    background: #f3ebde;
}

.products {
    display: grid;
    /* grid-template-columns: auto auto auto; */
    /* grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); */
    grid-template-columns: repeat(auto-fit, 380px);
    gap: 20px;
    padding: 10px;
}

.card {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 20px;
    padding: 15px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.card:hover {
    transform: scale(1.05);
}

.card h3 {
    margin: 10px 0 5px;
    color: #5a3e36;
}

.card p {
    margin: 0 0 10px;
    color: #777;
}

.card button {
    padding: 6px 12px;
    border: none;
    border-radius: 15px;
    background: #ffc6a8;
    color: var(--brown);
    cursor: pointer;
}

/* Mobile-mode simulator: constrains layout to a narrow viewport */
body.mobile-mode {
    max-width: 420px;
    margin: 0 auto;
}

body.mobile-mode header {
    left: 50%;
    transform: translateX(-50%);
    width: 420px;
}

body.mobile-mode .products {
    grid-template-columns: 1fr;
}

body.mobile-mode .bestSelling,
body.mobile-mode .controls,
body.mobile-mode .priceSearch,
body.mobile-mode .products,
body.mobile-mode footer {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
}

.view-toggle {
    margin-left: 12px;
    padding: 6px 10px;
    border-radius: 12px;
    border: none;
    background: #5a3e36;
    color: var(--cream);
    cursor: pointer;
}

footer {
    text-align: center;
    padding: 20px;
    color: #777;
}

/* Overlay + popup styles */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.popup {
    width: 360px;
    /* height: 600px; */
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    padding: 16px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.popup .popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: #5a3e36;
    color: var(--cream);
    cursor: pointer;
}

/* .popup .popup-content {
    margin-top: 36px;
    flex: 1 1 auto;
    overflow: auto;
} */

#fb_link,
#ig_link,
#tik_link {
    margin-top: 2px;
    margin-bottom: 0;
    width: 30px;
    height: 30px;
}

a {
    text-decoration: none;
}