* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    font-family: "Google Sans Code", "Courier New", monospace;
    background-color: #f0f0f0;
    position: relative;
    padding: 20px;
}

p {
    font-size: 12px;
    text-align: justify;
}
a {
    text-decoration: none;
    color: #d62f2f;
    font-size: 12px;    
}

.website a {
    font-size: 16px !important;
}

.card {
    --card-width: 390px;
    --teeth: 20;
    --height: 15px;
    width: var(--card-width);
    max-width: 100vw;
    background: #ffffff;
    padding: 24px;
    margin: auto;
    animation: fadePop 0.6s ease-out forwards;
    background-image: url(/files/main/texture.jpg);
    position: relative;
    overflow: hidden;
    clip-path: polygon(
        /* بالا: از چپ به راست */ 0% var(--height),
        calc(1 * (100% / var(--teeth))) 0%,
        calc(2 * (100% / var(--teeth))) var(--height),
        calc(3 * (100% / var(--teeth))) 0%,
        calc(4 * (100% / var(--teeth))) var(--height),
        calc(5 * (100% / var(--teeth))) 0%,
        calc(6 * (100% / var(--teeth))) var(--height),
        calc(7 * (100% / var(--teeth))) 0%,
        calc(8 * (100% / var(--teeth))) var(--height),
        calc(9 * (100% / var(--teeth))) 0%,
        calc(10 * (100% / var(--teeth))) var(--height),
        calc(11 * (100% / var(--teeth))) 0%,
        calc(12 * (100% / var(--teeth))) var(--height),
        calc(13 * (100% / var(--teeth))) 0%,
        calc(14 * (100% / var(--teeth))) var(--height),
        calc(15 * (100% / var(--teeth))) 0%,
        calc(16 * (100% / var(--teeth))) var(--height),
        calc(17 * (100% / var(--teeth))) 0%,
        calc(18 * (100% / var(--teeth))) var(--height),
        calc(19 * (100% / var(--teeth))) 0%,
        100% var(--height),
        /* پایین: از راست به چپ */ 100% calc(100% - var(--height)),
        calc(19 * (100% / var(--teeth))) 100%,
        calc(18 * (100% / var(--teeth))) calc(100% - var(--height)),
        calc(17 * (100% / var(--teeth))) 100%,
        calc(16 * (100% / var(--teeth))) calc(100% - var(--height)),
        calc(15 * (100% / var(--teeth))) 100%,
        calc(14 * (100% / var(--teeth))) calc(100% - var(--height)),
        calc(13 * (100% / var(--teeth))) 100%,
        calc(12 * (100% / var(--teeth))) calc(100% - var(--height)),
        calc(11 * (100% / var(--teeth))) 100%,
        calc(10 * (100% / var(--teeth))) calc(100% - var(--height)),
        calc(9 * (100% / var(--teeth))) 100%,
        calc(8 * (100% / var(--teeth))) calc(100% - var(--height)),
        calc(7 * (100% / var(--teeth))) 100%,
        calc(6 * (100% / var(--teeth))) calc(100% - var(--height)),
        calc(5 * (100% / var(--teeth))) 100%,
        calc(4 * (100% / var(--teeth))) calc(100% - var(--height)),
        calc(3 * (100% / var(--teeth))) 100%,
        calc(2 * (100% / var(--teeth))) calc(100% - var(--height)),
        calc(1 * (100% / var(--teeth))) 100%,
        0% calc(100% - var(--height)),
        /* بستن پلی‌گون */ 0% var(--height)
    );
}

@keyframes fadePop {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    font-family: "Zalando Sans Expanded", sans-serif;
    font-weight: bold;
    font-size: 36px;
    color: #000000;
    text-align: center;
    margin-bottom: 8px;
}

hr {
    border: 0;
    border-top: 1px dashed #8d8d8d;
    margin: 12px 0;
}

.order-info,
.item-row,
.product-details,
.signature-barcode {
    margin-right: 5px;
    margin-left: 5px;
}

.order-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.order-info .order-number,
.order-info .date {
    font-family: "Google Sans Code", "Courier New", monospace;
    font-size: 14px;
    color: #000000;
}

.order-info .website {
    font-family: "Zalando Sans Expanded", sans-serif;
    font-size: 16px;
    font-weight: bold;
    color: #d62f2f;
}

.item-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.item-left {
    width: 60%;
}

.item-right {
    width: 40%;
}

.item-text {
    font-family: "Google Sans Code", "Courier New", monospace;
    font-size: 15px;
    color: #000000;
}

.profile-img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    mix-blend-mode: multiply;
    margin-top: 8px;
    display: block;
}

.traits {
    font-family: "Google Sans Code", "Courier New", monospace;
    font-size: 15px;
    color: #000000;
    line-height: 1.6;
    margin-top: 4px;
}

.trait-item {
    display: flex;
    align-items: center;
}

.bullet {
    color: #d62f2f;
    font-size: 14px;
    margin-right: 4px;
}

.tap-info {
    font-family: "Google Sans Code", "Courier New", monospace;
    font-style: italic;
    font-size: 12px;
    color: #d62f2f;
    text-align: right;
    margin-top: 12px;
}

.link-container {
    display: block;
    text-align: right;
    margin-top: 8px;
}

.link {
    color: #d62f2f;
    font-weight: bold;
    text-decoration: underline;
    font-size: 15px;
    transition: text-decoration-thickness 0.2s;
}

.link:hover {
    text-decoration-thickness: 2px;
}

.product-details {
    font-family: "Google Sans Code", "Courier New", monospace;
    font-size: 14px;
    line-height: 1.65;
    color: #000000;
    margin-bottom: 20px;
}

.product-title {
    font-weight: bold;
}

.description {
    margin-left: 8px;
}

.signature-barcode {
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin-top: 16px;
    margin-bottom: 15px;
}

.signature-img {
    width: 110px;
    height: auto;
    margin-bottom: 4px;
    mix-blend-mode: multiply;
}

.barcode-img {
    width: 120px;
    height: auto;
    mix-blend-mode: multiply;
    vertical-align: bottom;
}

.stamp {
    mix-blend-mode: multiply;
    position: absolute;
    z-index: 2;
    rotate: -12deg;
    right: 278px;
    top: 339px;
    width: 207px;
}
.btn {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 5px;
    justify-content: space-evenly;
}
a.req-btn {
    background: #f0f0f0;
    color: #8d8d8d;
    padding: 5px 22px;
}
a.req-btn:hover {
    background: #a1a1aa;
    color: #ffffff;
}


@media (max-width: 720px) {
    .card {
        max-width: 100%;
    }

    body {
        padding: 16px;
    }

    .stamp {
        right: 5vw;
        top: 55vh;
        width: 30%;
    }
}
