/* ============ Ugly Mug Co. ============ */

:root {
    --birch: #e8dcc0;
    --oak: #dccfae;
    --pine: #f1e7cf;
    --ebony: #1c130a;
    --char: #382818;
    --walnut: #2a1810;
    --brass: #b8893a;
    --oxblood: #6e1d18;
    --rust: #8a3a18;
    --grain: #2a1810;
    --shadow: 4px 4px 0 var(--ebony);
    --shadow-lg: 8px 8px 0 var(--ebony);
}

* {
    box-sizing: border-box;
}

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

body {
    background-color: var(--birch);
    color: var(--ebony);
    font-family: "Special Elite", monospace;
    font-size: 16px;
    line-height: 1.55;
}

h1, h2, h3 {
    margin: 0;
    color: var(--ebony);
}

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

a {
    color: inherit;
}

.top-strip {
    background: var(--walnut);
    color: var(--pine);
    overflow: hidden;
    white-space: nowrap;
    border-bottom: 3px solid var(--ebony);
    font-family: "Special Elite", monospace;
    font-size: 0.82rem;
    letter-spacing: 0.12em;
    padding: 8px 0;
    display: flex;
    gap: 60px;
}

.top-strip span {
    display: inline-block;
    flex-shrink: 0;
    animation: marquee 38s linear infinite;
    padding-right: 60px;
}

@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-100%); }
}

.site-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
    padding: 18px clamp(20px, 4vw, 56px);
    border-bottom: 4px double var(--ebony);
    background: var(--pine);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 4px 0 var(--ebony);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.stache {
    width: 64px;
    height: auto;
    display: block;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

#brand-name {
    font-family: "Rye", serif;
    font-size: clamp(1.6rem, 2.6vw, 2rem);
    letter-spacing: 0.02em;
    color: var(--ebony);
    text-shadow: 2px 2px 0 var(--brass);
}

.brand-sub {
    margin: 4px 0 0;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--walnut);
}

.site-nav {
    display: flex;
    justify-content: center;
    gap: 28px;
}

.site-nav a {
    text-decoration: none;
    font-family: "Rye", serif;
    font-size: 0.95rem;
    color: var(--ebony);
    border-bottom: 2px dotted transparent;
    padding-bottom: 4px;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.site-nav a:hover {
    color: var(--oxblood);
    border-bottom-color: var(--oxblood);
}

.cart-btn {
    font-family: "Rye", serif;
    background: var(--ebony);
    color: var(--pine);
    border: 3px solid var(--ebony);
    padding: 10px 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 4px 4px 0 var(--brass);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
}

.cart-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--brass);
}

.cart-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 0 0 0 var(--brass);
}

.cart-count {
    background: var(--oxblood);
    color: var(--pine);
    min-width: 26px;
    height: 26px;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: "Special Elite", monospace;
    font-size: 0.85rem;
    padding: 0 6px;
    border: 2px solid var(--pine);
}

.hero {
    position: relative;
    text-align: center;
    padding: clamp(60px, 10vw, 100px) 24px clamp(60px, 8vw, 80px);
    max-width: 900px;
    margin: 0 auto;
}

.kicker {
    text-transform: uppercase;
    letter-spacing: 0.32em;
    font-size: 0.78rem;
    color: var(--walnut);
    margin: 0 0 18px;
    font-family: "Special Elite", monospace;
}

.hero-title {
    font-family: "Rye", serif;
    font-size: clamp(3rem, 9vw, 6.5rem);
    line-height: 0.95;
    margin: 0 0 18px;
    color: var(--ebony);
    text-shadow: 4px 4px 0 var(--brass), 8px 8px 0 rgba(28, 19, 10, 0.12);
}

.hero-line2 {
    font-family: "Special Elite", monospace;
    display: inline-block;
    font-size: 0.42em;
    letter-spacing: 0.04em;
    margin-top: 18px;
    text-shadow: none;
    color: var(--walnut);
    text-transform: uppercase;
}

.tagline {
    font-style: italic;
    font-size: 1.05rem;
    color: var(--char);
    margin: 24px auto 32px;
    max-width: 620px;
    line-height: 1.6;
}

.hero-stamp {
    position: absolute;
    right: clamp(20px, 5vw, 60px);
    top: 50%;
    transform: translateY(-50%) rotate(-14deg);
    pointer-events: none;
    opacity: 0.85;
}

.stamp {
    width: 140px;
    height: 140px;
    border: 3px solid var(--oxblood);
    border-radius: 50%;
    color: var(--oxblood);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: "Rye", serif;
    text-transform: uppercase;
    font-size: 0.88rem;
    letter-spacing: 0.12em;
    box-shadow: inset 0 0 0 4px var(--birch), inset 0 0 0 6px var(--oxblood);
    background: rgba(241, 231, 207, 0.4);
}

.stamp .big {
    font-size: 1.6rem;
    line-height: 1;
    margin: 4px 0;
}

.catalog {
    padding: 0 clamp(20px, 4vw, 56px) 80px;
    max-width: 1400px;
    margin: 0 auto;
}

.catalog-head {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    padding: 32px 0 24px;
}

.catalog-title h2 {
    font-family: "Rye", serif;
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 8px;
    color: var(--ebony);
}

.category-description {
    margin: 0;
    color: var(--walnut);
    font-style: italic;
    font-size: 1rem;
}

.catalog-rule {
    flex: 1;
    height: 12px;
    background-image:
        repeating-linear-gradient(90deg, var(--ebony) 0 14px, transparent 14px 24px);
    align-self: center;
    opacity: 0.7;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 36px 28px;
}

.item {
    background: var(--pine);
    border: 3px solid var(--ebony);
    box-shadow: var(--shadow);
    padding: 18px 18px 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: box-shadow 0.18s ease;
}

.item:hover {
    box-shadow: var(--shadow-lg);
    z-index: 2;
}

.item-num {
    position: absolute;
    top: -14px;
    left: 14px;
    background: var(--ebony);
    color: var(--brass);
    font-family: "Rye", serif;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    padding: 4px 10px;
    border: 2px solid var(--ebony);
    text-transform: uppercase;
}

.item h3 {
    font-family: "Rye", serif;
    font-size: 1.5rem;
    margin: 6px 0 14px;
    text-align: center;
    letter-spacing: 0.02em;
}

.item figure {
    margin: 0 0 16px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 3px solid var(--ebony);
    background-color: #fff;
    position: relative;
    padding: 14px;
}

.item figure img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.item:hover figure img {
    transform: scale(1.04);
}

.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--ebony);
    color: var(--pine);
    font-family: "Rye", serif;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 10px;
    border: 2px solid var(--pine);
    box-shadow: 0 0 0 2px var(--ebony);
    transform: rotate(6deg);
}

.badge-red {
    background: var(--oxblood);
}

.body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}

.description {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--char);
    border-left: 3px solid var(--ebony);
    padding-left: 12px;
}

.price {
    margin: 0;
    font-family: "Rye", serif;
    font-size: 2.2rem;
    line-height: 1;
    color: var(--ebony);
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.price .dollar {
    font-size: 1.2rem;
    color: var(--oxblood);
    transform: translateY(-6px);
}

.price .unit {
    font-family: "Special Elite", monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--walnut);
    letter-spacing: 0.1em;
    margin-left: 6px;
}

.options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 8px;
    border-top: 2px dashed var(--ebony);
}

.field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 90px;
}

.field.qty {
    flex: 0 1 80px;
}

.field label {
    font-family: "Rye", serif;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: var(--walnut);
    text-transform: uppercase;
}

.field select,
.field input[type="text"] {
    appearance: none;
    -webkit-appearance: none;
    background: var(--birch);
    border: 2px solid var(--ebony);
    border-radius: 0;
    padding: 9px 30px 9px 12px;
    font: inherit;
    font-family: "Special Elite", monospace;
    font-size: 0.95rem;
    color: var(--ebony);
    cursor: pointer;
    transition: background 0.12s ease, box-shadow 0.12s ease;
    width: 100%;
}

.field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg' viewBox%3D'0 0 12 8' fill%3D'none' stroke%3D'%231c130a' stroke-width%3D'2' stroke-linecap%3D'round'%3E%3Cpath d%3D'M1 1l5 5 5-5'%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px;
}

.field input[type="text"] {
    cursor: text;
    padding-right: 12px;
    text-align: center;
    text-transform: uppercase;
    font-family: "Rye", serif;
    font-size: 1.2rem;
}

.field select:focus,
.field input:focus {
    outline: none;
    background-color: var(--pine);
    box-shadow: 3px 3px 0 var(--oxblood);
}

.add {
    font-family: "Rye", serif;
    background: var(--oxblood);
    color: var(--pine);
    border: 3px solid var(--ebony);
    padding: 13px 16px;
    font-size: 1rem;
    letter-spacing: 0.08em;
    cursor: pointer;
    box-shadow: 4px 4px 0 var(--ebony);
    transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease;
}

.add:hover {
    background: #842620;
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--ebony);
}

.add:active {
    transform: translate(2px, 2px);
    box-shadow: 0 0 0 var(--ebony);
}

.creed {
    margin-top: 80px;
    padding: 40px clamp(24px, 4vw, 56px);
    background: var(--ebony);
    color: var(--pine);
    border: 3px solid var(--ebony);
    box-shadow: 8px 8px 0 var(--oxblood);
    position: relative;
}

.creed::before {
    content: "";
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--birch);
    background-image: url("data:image/svg+xml,%3Csvg xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg' viewBox%3D'0 0 512 512' fill%3D'%231c130a'%3E%3Cpath d%3D'M127.1 146.5c1.3 7.7 8 13.5 16 13.5h16.5c9.8 0 17.6-8.5 16.3-18-3.8-28.2-16.4-54.2-36.6-74.7-14.4-14.7-23.6-33.3-26.4-53.5C111.8 5.9 105 0 96.8 0H80.4C70.6 0 63 8.5 64.1 18c3.9 31.9 18 61.3 40.6 84.4 12 12.2 19.7 27.5 22.4 44.1zm112 0c1.3 7.7 8 13.5 16 13.5h16.5c9.8 0 17.6-8.5 16.3-18-3.8-28.2-16.4-54.2-36.6-74.7-14.4-14.7-23.6-33.3-26.4-53.5C223.8 5.9 217 0 208.8 0h-16.4c-9.8 0-17.5 8.5-16.3 18 3.9 31.9 18 61.3 40.6 84.4 12 12.2 19.7 27.5 22.4 44.1zM400 192H32c-17.7 0-32 14.3-32 32v192c0 53 43 96 96 96h192c53 0 96-43 96-96h16c61.8 0 112-50.2 112-112s-50.2-112-112-112zm0 160h-16v-96h16c26.5 0 48 21.5 48 48s-21.5 48-48 48z'%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 60% 60%;
    width: 44px;
    height: 44px;
    border: 3px solid var(--ebony);
}

.creed h3 {
    font-family: "Rye", serif;
    font-size: 1.8rem;
    text-align: center;
    color: var(--brass);
    margin-bottom: 24px;
    letter-spacing: 0.04em;
}

.creed ol {
    max-width: 720px;
    margin: 0 auto;
    padding-left: 24px;
    line-height: 1.8;
    font-size: 1rem;
}

.creed li {
    margin-bottom: 10px;
}

.creed li::marker {
    color: var(--brass);
    font-family: "Rye", serif;
    font-weight: bold;
}

.site-footer {
    text-align: center;
    padding: 32px 24px;
    border-top: 4px double var(--ebony);
    color: var(--walnut);
    background: var(--pine);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
}

.site-footer p {
    margin: 0;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translate(-50%, 20px) rotate(-1deg);
    background: var(--ebony);
    color: var(--pine);
    padding: 14px 22px;
    border: 3px solid var(--ebony);
    box-shadow: 4px 4px 0 var(--brass);
    font-family: "Rye", serif;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 100;
    max-width: 90vw;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0) rotate(-1deg);
}

@media (max-width: 800px) {
    .site-header {
        grid-template-columns: 1fr auto;
        gap: 12px;
    }
    .site-nav {
        display: none;
    }
    .hero-stamp {
        display: none;
    }
    .catalog-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .catalog-rule {
        width: 100%;
    }
}