/* ===== Colors and fonts: change them here ===== */
:root {
    --ink: #1f2933;
    --red: #cf1b21; /* main brand color, from the label */
    --red-dark: #a8141a;
    --green: #0e7c3a; /* second brand color, from the label */
    --green-dark: #08512a;
    --yellow: #ffd60a; /* "It's power strong" tagline color */
    --bg: #f4f5f7;
    --white: #ffffff;
    --line: #dfe3e8;
    --muted: #5f6b76;
    --good: #1a7f4b;
    --warn: #b45309;
    --bad: #b42318;
    --radius: 10px;
    --heading: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
    --body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* {
    box-sizing: border-box;
}
body {
    margin: 0;
    font-family: var(--body);
    font-size: 17px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
}
h1,
h2,
h3,
h4 {
    font-family: var(--heading);
    line-height: 1.1;
    margin: 0 0 0.5rem;
    letter-spacing: 0.01em;
}
h1 {
    font-size: clamp(2.4rem, 6vw, 4.2rem);
}
h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}
h3 {
    font-size: 1.45rem;
}
a {
    color: inherit;
}
img {
    max-width: 100%;
    display: block;
}
:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 2px;
}
.container {
    width: min(1120px, 92%);
    margin: 0 auto;
}
.muted {
    color: var(--muted);
}
.section {
    padding: 3.5rem 0;
}
.section-title {
    margin-bottom: 1.5rem;
}

/* ----- Buttons ----- */
.button {
    display: inline-block;
    background: var(--red);
    color: var(--white);
    font: 700 1rem var(--body);
    padding: 0.7rem 1.2rem;
    border: 2px solid var(--red);
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
}
.button:hover {
    background: var(--red-dark);
    border-color: var(--red-dark);
}
.button-light {
    background: var(--white);
    color: var(--ink);
    border-color: var(--ink);
}
.button-light:hover {
    background: var(--ink);
    color: var(--white);
    border-color: var(--ink);
}
.button:disabled {
    background: var(--line);
    border-color: var(--line);
    color: var(--muted);
    cursor: not-allowed;
}
.link-button {
    background: none;
    border: 0;
    color: var(--bad);
    cursor: pointer;
    font: inherit;
    text-decoration: underline;
}

/* ----- Header ----- */
.site-header {
    background: var(--white);
    color: var(--ink);
    border-bottom: 4px solid var(--red);
    position: sticky;
    top: 0;
    z-index: 10;
}
.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font: 700 1.6rem var(--heading);
    text-decoration: none;
    color: var(--ink);
}
.logo img {
    height: 46px;
    width: auto;
}
.main-nav {
    display: flex;
    gap: 1.6rem;
    align-items: center;
}
.main-nav a {
    text-decoration: none;
    padding: 0.3rem 0;
    border-bottom: 3px solid transparent;
}
.main-nav a:hover,
.main-nav a.active {
    border-bottom-color: var(--red);
}
.cart-count {
    background: var(--red);
    color: var(--white);
    border-radius: 99px;
    padding: 0 0.5rem;
    font-weight: 700;
    font-size: 0.85rem;
}
.menu-button {
    display: none;
    background: none;
    border: 0;
    color: var(--ink);
    font-size: 1.8rem;
    cursor: pointer;
}

/* ----- Hero: the one bold moment ----- */
.hero {
    background: var(--red);
    color: var(--white);
    padding: 4rem 0 5rem;
    overflow: hidden;
}
.hero-inner {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 2rem;
    align-items: center;
}
.hero h1 {
    color: var(--white);
}
.hero p {
    max-width: 34rem;
    color: #ffe9ea;
    font-size: 1.15rem;
}
.hero .button-light {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}
.hero .button-light:hover {
    background: var(--white);
    color: var(--ink);
}
.hero-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}
.hero .hero-tagline {
    font: 700 1.5rem var(--heading);
    color: var(--yellow);
    margin: 0 0 0.4rem;
    letter-spacing: 0.03em;
}
.hero .button {
    background: var(--white);
    color: var(--red);
    border-color: var(--white);
}
.hero .button:hover {
    background: var(--yellow);
    border-color: var(--yellow);
    color: var(--ink);
}
.hero-label {
    justify-self: center;
    width: min(360px, 72vw);
    aspect-ratio: 1;
    border-radius: 50%;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

/* Caution-tape stripe, used as a divider */
.tape-strip {
    height: 16px;
    background: repeating-linear-gradient(
        -45deg,
        var(--red) 0 18px,
        var(--white) 18px 27px,
        var(--green) 27px 45px,
        var(--white) 45px 54px
    );
}

/* Tape roll drawn with CSS (shown when a product has no image) */
.tape-roll {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        var(--bg) 0 24%,
        #444 24% 27%,
        #151515 27% 100%
    );
    box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.08);
}
.card-image .tape-roll {
    width: 55%;
    margin: 0 auto;
}

/* ----- Product cards ----- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.4rem;
}
.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.card-image {
    display: block;
    background: #eceef1;
    padding: 1.2rem;
    border-bottom: 3px solid var(--red);
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.card-body {
    padding: 1rem 1.1rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}
.card-body h3 {
    margin: 0;
}
.card-body p {
    margin: 0;
}
.price {
    font: 700 1.5rem var(--heading);
}
.price.big {
    font-size: 2.4rem;
}
.card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.7rem;
}
.card-actions .button {
    flex: 1;
    text-align: center;
    padding: 0.6rem 0.5rem;
    font-size: 0.95rem;
}
.stock {
    font-weight: 600;
    font-size: 0.95rem;
}
.stock.in {
    color: var(--good);
}
.stock.low {
    color: var(--warn);
}
.stock.out {
    color: var(--bad);
}

/* ----- Filters ----- */
.filters {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 0.8rem;
    margin-bottom: 1rem;
}
input,
select,
textarea {
    width: 100%;
    font: inherit;
    padding: 0.65rem 0.8rem;
    border: 1px solid #b8c0c8;
    border-radius: 8px;
    background: var(--white);
    color: var(--ink);
}
label {
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

/* ----- States ----- */
.state {
    text-align: center;
    padding: 2.5rem 1rem;
    grid-column: 1 / -1;
    color: var(--muted);
}
.state.error {
    color: var(--bad);
}
.state .button {
    margin-top: 0.8rem;
}

/* ----- Product details ----- */
.detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}
.detail-image {
    background: #eceef1;
    border-radius: var(--radius);
    padding: 2rem;
}
.detail-image img {
    width: 100%;
    max-height: 460px;
    object-fit: contain;
}
.detail-image .tape-roll {
    width: 70%;
    margin: 0 auto;
}
.specs {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: var(--white);
}
.specs th,
.specs td {
    text-align: left;
    padding: 0.5rem 0.8rem;
    border: 1px solid var(--line);
}
.specs th {
    width: 40%;
    background: #f0f2f4;
}
.buy-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin: 1.2rem 0;
}
.qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid #b8c0c8;
    border-radius: 8px;
    background: var(--white);
}
.qty button {
    width: 40px;
    height: 40px;
    border: 0;
    background: none;
    font-size: 1.3rem;
    cursor: pointer;
}
.qty input {
    width: 56px;
    text-align: center;
    border: 0;
    padding: 0.4rem 0;
}
.qty-number {
    min-width: 36px;
    text-align: center;
    font-weight: 700;
}
.back-link {
    display: inline-block;
    margin-top: 0.5rem;
}

/* ----- Cart and checkout ----- */
.panel {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.4rem;
}
.cart-row {
    display: grid;
    grid-template-columns: 1fr auto 100px auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
}
.cart-name {
    display: flex;
    flex-direction: column;
}
.cart-subtotal {
    text-align: right;
    font-weight: 700;
}
.cart-total {
    display: flex;
    justify-content: space-between;
    font: 700 1.8rem var(--heading);
    padding: 1.2rem 0;
}
.cart-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
}
.checkout-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.6rem;
    align-items: start;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.form-grid .full {
    grid-column: 1 / -1;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--line);
}
.summary-row.total {
    font-weight: 700;
    border: 0;
    font-size: 1.2rem;
}
.form-message {
    margin-top: 1rem;
    font-weight: 600;
}
.form-message.error {
    color: var(--bad);
}
.form-message.ok {
    color: var(--good);
}

/* ----- About / contact / why-us ----- */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem;
}
.why-grid div {
    border-left: 5px solid var(--red);
    padding-left: 1rem;
}
.why-grid p {
    margin: 0;
    color: var(--muted);
}
.page-title {
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 2rem 0 1.5rem;
}
.page-title h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin: 0;
}

/* ----- Footer ----- */
.site-footer {
    background: var(--green-dark);
    color: #d6ecdf;
    padding-top: 2.5rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.4fr;
    gap: 2rem;
}
.site-footer h3 {
    color: var(--yellow);
}
.site-footer h4 {
    color: var(--white);
}
.site-footer a {
    display: block;
    text-decoration: none;
    padding: 0.1rem 0;
}
.site-footer a:hover {
    color: var(--yellow);
}
.site-footer p {
    margin: 0 0 0.3rem;
}
.copyright {
    text-align: center;
    padding: 1.5rem 1rem;
    margin-top: 1.5rem !important;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
}

/* ----- Small message at the bottom of the screen ----- */
#toast {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    transform: translate(-50%, 20px);
    background: var(--ink);
    color: var(--white);
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    transition: 0.2s;
    z-index: 50;
}
#toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ===== Mobile and tablet ===== */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }
    .menu-button {
        display: block;
    }
    .main-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 4%;
        border-top: 1px solid var(--line);
        box-shadow: 0 8px 12px rgba(0, 0, 0, 0.08);
    }
    .main-nav.open {
        display: flex;
    }
    .main-nav a {
        padding: 0.9rem 0;
        border-bottom: 1px solid var(--line);
    }
    .hero {
        padding: 2.5rem 0 3rem;
    }
    .hero-inner,
    .detail,
    .two-col,
    .checkout-grid,
    .why-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .hero-label {
        width: 200px;
        order: -1;
        justify-self: start;
    }
    .filters {
        grid-template-columns: 1fr 1fr;
    }
    .filters input {
        grid-column: 1 / -1;
    }
    .cart-row {
        grid-template-columns: 1fr auto;
    }
    .cart-subtotal {
        text-align: left;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .section {
        padding: 2.5rem 0;
    }
}
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

/* Hero buttons: white main button, outlined second button */
.hero .button.button-light {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}
.hero .button.button-light:hover {
    background: var(--white);
    color: var(--red);
}
