/**
 * Print Stylesheet for Souk Tunisia
 * Optimized for SEO and accessibility
 */

/* Reset and base */
* {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

body {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 12pt;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
}

/* Hide non-essential elements */
header,
footer,
nav,
.site-header,
.site-footer,
.promo-bar,
.menu-overlay,
.social-share,
.trust-badges,
.related-products,
.author-box,
.comments-area,
.sidebar,
.widget-area,
.woocommerce-cart-form,
.woocommerce-checkout,
.add-to-cart,
.product-gallery-thumbs,
button,
.btn,
.button,
input,
select,
textarea,
form,
iframe,
video,
audio,
.youtube-facade,
.amp-indicator,
.admin-bar,
#wpadminbar,
.skip-link,
.screen-reader-text,
.mobile-menu-toggle,
.cart-icon,
.search-toggle,
.back-to-top {
    display: none !important;
}

/* Page layout */
.site-content,
.entry-content,
.product-content,
main {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    page-break-inside: avoid;
    font-family: 'Noto Sans JP', sans-serif;
}

h1 {
    font-size: 24pt;
    margin-bottom: 10pt;
}

h2 {
    font-size: 18pt;
    margin-top: 20pt;
    margin-bottom: 10pt;
    border-bottom: 1pt solid #000;
    padding-bottom: 5pt;
}

h3 {
    font-size: 14pt;
    margin-top: 15pt;
    margin-bottom: 8pt;
}

p {
    orphans: 3;
    widows: 3;
    margin-bottom: 10pt;
}

/* Links */
a {
    text-decoration: underline;
}

a[href^="http"]:after,
a[href^="https"]:after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    word-wrap: break-word;
}

a[href^="/"]:after {
    content: " (https://suuku.jp" attr(href) ")";
    font-size: 9pt;
}

a[href^="#"]:after,
a[href^="javascript"]:after,
a[href^="mailto"]:after,
a[href^="tel"]:after {
    content: "";
}

/* Images */
img {
    max-width: 100% !important;
    height: auto !important;
    page-break-inside: avoid;
}

.product-image,
.entry-thumbnail,
.wp-post-image {
    max-width: 300pt !important;
    margin: 10pt auto;
    display: block;
}

/* Tables */
table {
    border-collapse: collapse;
    width: 100%;
    margin: 15pt 0;
}

th, td {
    border: 1pt solid #000;
    padding: 8pt;
    text-align: left;
}

th {
    background: #f0f0f0 !important;
    font-weight: bold;
}

/* Lists */
ul, ol {
    margin-left: 20pt;
    padding-left: 0;
}

li {
    margin-bottom: 5pt;
}

/* Blockquotes */
blockquote {
    margin: 15pt 20pt;
    padding: 10pt;
    border-left: 3pt solid #000;
    font-style: italic;
}

/* Product specific */
.product-title,
.entry-title {
    font-size: 20pt;
    font-weight: bold;
    margin-bottom: 15pt;
}

.product-price,
.price {
    font-size: 16pt;
    font-weight: bold;
    margin: 10pt 0;
}

.product-description,
.woocommerce-product-details__short-description {
    margin: 15pt 0;
}

/* Breadcrumbs */
.breadcrumbs,
.woocommerce-breadcrumb {
    font-size: 10pt;
    margin-bottom: 15pt;
    border-bottom: 1pt dotted #ccc;
    padding-bottom: 10pt;
}

/* Table of contents */
.table-of-contents {
    border: 1pt solid #000;
    padding: 15pt;
    margin: 20pt 0;
    page-break-inside: avoid;
}

.table-of-contents h4 {
    margin-top: 0;
    font-size: 12pt;
}

/* Meta information */
.entry-meta,
.post-meta,
.article-meta {
    font-size: 10pt;
    color: #666 !important;
    margin-bottom: 15pt;
    border-bottom: 1pt solid #ccc;
    padding-bottom: 10pt;
}

/* Page breaks */
.page-break {
    page-break-before: always;
}

article,
.product,
.post {
    page-break-inside: avoid;
}

/* Footer for print */
@page {
    margin: 2cm;
}

@page :first {
    margin-top: 3cm;
}

/* Print header/footer */
@media print {
    body::before {
        content: "Suuku - チュニジア手工芸品 | https://suuku.jp";
        display: block;
        text-align: center;
        font-size: 10pt;
        margin-bottom: 20pt;
        padding-bottom: 10pt;
        border-bottom: 1pt solid #000;
    }
    
    body::after {
        content: "印刷日: " attr(data-print-date) " | © Suuku. All rights reserved.";
        display: block;
        text-align: center;
        font-size: 9pt;
        margin-top: 20pt;
        padding-top: 10pt;
        border-top: 1pt solid #000;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
    }
}

/* QR Code for print (if generated) */
.print-qr-code {
    display: block !important;
    text-align: right;
    margin-top: 20pt;
}

.print-qr-code img {
    width: 80pt !important;
    height: 80pt !important;
}

/* Coupon/discount codes - make visible */
.coupon-code,
.discount-code {
    border: 2pt dashed #000;
    padding: 10pt;
    text-align: center;
    font-size: 14pt;
    font-weight: bold;
    margin: 15pt 0;
}

/* Product SKU */
.product-sku,
.sku {
    font-size: 10pt;
    color: #666 !important;
}

/* Specifications table */
.specifications-table,
.product-attributes {
    margin: 20pt 0;
}

.specifications-table th {
    width: 30%;
}

/* Order/Invoice specific */
.order-details,
.invoice-details {
    margin: 20pt 0;
}

.order-total {
    font-size: 14pt;
    font-weight: bold;
    text-align: right;
    margin-top: 15pt;
    padding-top: 10pt;
    border-top: 2pt solid #000;
}
