/* by default, 1rem is equal to 16px */


*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #222;
    background-color: #0f292d;
    /* outer background */
    line-height: 1.5;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Core column: hero, main, footer all share width rules */

.hero,
main,
.site-footer {
    width: 100%;
    /*max-width: 960px; */
    /* grows on desktop, full width on phones */
    margin: 0 auto;
}

/* Main content area */

main {
    padding: 1.5rem 1rem 2rem;
    background-color: #fdfdfd;
}

section {
    margin-bottom: 3rem;
}

h1,
h2,
h3 {
    margin: 0 0 0.75rem;
    font-weight: 600;
}

/* Hero header */

.hero {
    position: relative;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    color: #fff;
    background-color: #555;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero-overlay {
    position: relative;
    padding: 2rem 1.5rem;
    text-align: center;
}

.hero-title {
    font-size: 1.75rem;
    letter-spacing: 0.04em;
}

/* Feature block: image left, text right (as in mock) */

.feature {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: center;
    margin-top: 2rem;
}

.feature-image {
    display: flex;
    justify-content: center;
}

.feature-text p {
    margin: 0;
    font-size: 1.05rem;
}

/* Section headers */

.products h2,
.about h2,
.media h2,
.contact h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

/* Products: 2x2 grid even on phone */

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.product-card {
    /* border: 1px solid #dddddd; */
    padding: 1rem;
    background-color: #ffffff;
}

.product-image {
    width: 100%;
}

.product-name {
    margin-top: 0.75rem;
    font-size: 1rem;
}

.product-price {
    margin: 0.25rem 0 0.75rem;
    font-weight: 600;
}

.product-buy {
    display: inline-block;
    border-radius: 999px;
    /* border: 1px solid #555555; */
    padding: 0.4rem 1.1rem;
    font-size: 0.9rem;
    background: transparent;
    cursor: pointer;
}

.product-buy:hover {
    background-color: #eeeeee;
}

/* Media: 2-column stack */

.media-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.media-item img {
    width: 100%;
}

/* Generic boxed text for About and Contact */

.boxed-text {
    padding: 1rem;
    /* border: 1px solid #dddddd; */
    background-color: #ffffff;
}

/* Footer */

.site-footer {
    border-top: 1px solid #dddddd;
    padding: 1.5rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fdfdfd;
}

.site-footer img {
    max-height: 40px;
}

/* Image modal */

.image-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.image-modal.is-open {
    display: flex;
}

.image-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
}

.image-modal-content {
    position: relative;
    z-index: 1;

    /* phone: nearly full width, desktop: capped */
    width: 90vw;
    max-width: 600px;
    max-height: 80vh;
}

.image-modal-content img {
    width: 100%;
    max-height: 80vh;
    height: auto;
    border-radius: 4px;
    background: #ffffff;
    object-fit: contain;
}

.image-modal-close {
    position: absolute;
    top: -32px;
    right: -8px;
    border: none;
    background: transparent;
    color: #ffffff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}