/* ============================================
   I Never Read, Shop — Stylesheet
   Minimal / brutalist aesthetic
   ============================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: "Times New Roman", Times, serif;
    font-weight: 400;
    line-height: 1.5;
    color: #000;
    background: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

a {
    color: #000;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* --- Header --- */
.site-header {
    padding: 2rem 2rem 1rem;
    margin: 0 auto;
}

.site-title {
    font-size: 42px;
    font-weight: 400;
    letter-spacing: 0.02em;
}

@media (max-width: 767px) {
    .site-title {
        font-size: 28px;
    }
}

.site-title:hover {
    text-decoration: none;
}

/* --- Main --- */
main {
    flex: 1;
    padding: 0 2rem;
}

/* --- Tag Filter --- */
.tag-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.tag-pill {
    font-size: 0.8125rem;
    padding: 0.25rem 0.75rem;
    border: 1px solid #000;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: background 0.15s, color 0.15s;
}

.tag-pill:hover {
    background: #000;
    color: #fff;
    text-decoration: none;
}

.tag-pill--active {
    background: #000;
    color: #fff;
}

/* --- Product List --- */
.product-list {
    max-width: 900px;
}

.product-card {
    padding: 2.5rem 0;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
}

.product-card:last-child {
    border-bottom: none;
}

.product-card__image-wrap {
    margin-bottom: 1rem;
}

.product-card__image {
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
    object-position: left top;
}

.product-card__info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.product-card__title {
    font-size: 1rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.product-card__author {
    font-size: 0.875rem;
    color: #666;
}

.product-card__price {
    font-size: 0.875rem;
}

.product-card__sold-out {
    color: #999;
    font-style: italic;
    margin-left: 0.5rem;
}

.order-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    padding: 0.375rem 1rem;
    border: 1px solid #000;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: background 0.15s, color 0.15s;
}

.order-link:hover {
    background: #000;
    color: #fff;
    text-decoration: none;
}

.empty-message {
    padding: 4rem 0;
    font-size: 0.875rem;
    color: #666;
}

/* --- Footer --- */
.site-footer {
    padding: 2rem;
    margin-top: 2rem;
    border-top: 1px solid #000;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* --- Modal Overlay --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 2rem;
}

.modal-overlay[hidden] {
    display: none;
}

.modal {
    position: relative;
    background: #fff;
    width: 100%;
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
    z-index: 10;
}

.modal-close:hover {
    opacity: 0.6;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* --- Modal Content --- */
.modal-title {
    font-size: 1.25rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.modal-author {
    font-size: 0.875rem;
    color: #666;
}

.modal-price {
    font-size: 1rem;
}

.modal-sold-out {
    color: #999;
    font-style: italic;
}

.modal-description {
    font-size: 0.875rem;
    line-height: 1.6;
    white-space: pre-line;
}

.modal-media {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.modal-media video {
    width: 100%;
    max-height: 70vh;
}

.embed-wrap {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.embed-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #666;
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .site-header,
    main,
    .site-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .modal {
        padding: 1.5rem 1rem;
        margin: 1rem auto;
    }

    .modal-overlay {
        padding: 1rem;
    }
}
