/*
Theme Name: Japon Parça
Theme URI: https://japonparca.com
Description: Japon Parça özel WooCommerce mağaza teması. Storefront alt (child) teması.
Author: Japon Parça
Template: storefront
Version: 1.2.0
Text Domain: japonparca
*/

/* Self-hosted IBM Plex Sans (latin + latin-ext, covers Turkish characters).
   Chosen over Inter/Roboto/Geist-class defaults on purpose: this store
   sells mechanical parts, and Plex's engineering-tool origin (IBM's own
   technical typeface) reads as precise/technical rather than generic
   "AI-app" sans. Downloaded once, served locally — no third-party request,
   no render-blocking external stylesheet. */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/plex-regular-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/plex-regular-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/plex-medium-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/plex-medium-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/plex-semibold-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/plex-semibold-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/plex-bold-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/plex-bold-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --jp-bg: #F5F5F4;
    --jp-surface: #FFFFFF;
    --jp-text: #1A1D21;
    --jp-text-muted: #5B5F66;
    --jp-border: #E2E1DD;
    --jp-accent: #D6401E;
    --jp-accent-dark: #B23417;
    --jp-success: #1F8A55;
    --jp-sale: #C62828;
    --jp-font: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --jp-radius: 8px;
    --jp-radius-sm: 5px;
    --jp-shadow-sm: 0 1px 2px rgba(26,29,33,.06), 0 1px 1px rgba(26,29,33,.04);
    --jp-shadow-md: 0 6px 16px -4px rgba(26,29,33,.14), 0 2px 6px -2px rgba(26,29,33,.08);
    --jp-shadow-lg: 0 20px 40px -12px rgba(26,29,33,.22), 0 4px 10px -4px rgba(26,29,33,.1);
}

body {
    background: var(--jp-bg);
    color: var(--jp-text);
    font-family: var(--jp-font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: var(--jp-accent); }
a:hover, a:focus { color: var(--jp-accent-dark); }
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid var(--jp-accent);
    outline-offset: 2px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--jp-font);
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--jp-text);
    line-height: 1.2;
}
h1 { font-size: 2.25rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }

p { max-width: 68ch; }

/* Header */
#masthead.site-header {
    background: var(--jp-surface);
    border-bottom: 1px solid var(--jp-border);
    position: sticky;
    top: 0;
    z-index: 200;
}
.site-branding .site-title a {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--jp-text);
    letter-spacing: -0.02em;
}
.site-branding .site-description {
    color: var(--jp-text-muted);
    font-size: 0.85rem;
}

.main-navigation ul li a {
    color: var(--jp-text);
    font-weight: 600;
    font-size: 0.95rem;
}
.main-navigation ul li a:hover { color: var(--jp-accent); }

/* Buttons */
.button, button, input[type="submit"],
.woocommerce a.button, .woocommerce button.button,
.woocommerce #respond input#submit {
    background-color: var(--jp-accent);
    border: none;
    color: #fff;
    border-radius: var(--jp-radius-sm);
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 0.75em 1.4em;
    box-shadow: 0 1px 2px rgba(214,64,30,.15);
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.button:hover, button:hover, input[type="submit"]:hover,
.woocommerce a.button:hover, .woocommerce button.button:hover,
.woocommerce #respond input#submit:hover {
    background-color: var(--jp-accent-dark);
    color: #fff;
    box-shadow: 0 4px 10px rgba(214,64,30,.22);
}
.button:active, button:active, input[type="submit"]:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(214,64,30,.15);
}
.button:disabled, button:disabled, .button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}
.button.alt { background-color: var(--jp-text); box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.button.alt:hover { background-color: #000; box-shadow: 0 4px 10px rgba(0,0,0,.22); }

/* Cards / products — applies to every product grid site-wide (shop
   archive, category archive, related/upsells, search results), not just
   the homepage sections. */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    list-style: none;
}
.woocommerce ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    padding: 1rem 1rem 1.2rem !important;
    float: none !important;
    text-align: left;
    background: var(--jp-surface);
    border: 1px solid var(--jp-border);
    border-radius: var(--jp-radius);
    box-shadow: var(--jp-shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.woocommerce ul.products li.product:hover {
    box-shadow: var(--jp-shadow-md);
    transform: translateY(-2px);
    border-color: #D8D6D0;
}
.woocommerce ul.products li.product img {
    border-radius: var(--jp-radius-sm);
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: var(--jp-bg);
}
.woocommerce ul.products li.product h2,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0.8rem 0 0.25rem;
    color: var(--jp-text);
    line-height: 1.35;
}
.woocommerce ul.products li.product .star-rating { margin-bottom: 0.3rem; }

@media (max-width: 900px) {
    .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); }
}

.woocommerce ul.products li.product .price {
    color: var(--jp-text);
    font-weight: 700;
}
.woocommerce ul.products li.product .price ins { color: var(--jp-sale); text-decoration: none; }
.woocommerce ul.products li.product .price del { color: var(--jp-text-muted); font-weight: 400; }

.onsale {
    background: var(--jp-sale) !important;
    color: #fff;
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border-radius: 999px !important;
    min-height: 0 !important;
    min-width: 0 !important;
    height: auto !important;
    line-height: 1 !important;
    padding: 0.45em 0.8em !important;
    top: 0.7em !important;
    left: 0.7em !important;
    box-shadow: 0 2px 6px rgba(198,40,40,.3);
}

/* Breadcrumbs */
.woocommerce-breadcrumb, .storefront-breadcrumb {
    color: var(--jp-text-muted);
    font-size: 0.85rem;
    padding: 0.9rem 0;
}
.woocommerce-breadcrumb a { color: var(--jp-text-muted); text-decoration: none; }
.woocommerce-breadcrumb a:hover { color: var(--jp-accent); }

/* Compatibility badge (custom, added via brand-core) */
.jp-fitment-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    background: #EEF2F1;
    color: var(--jp-success);
    border: 1px solid #CFE8DC;
    padding: 0.3em 0.7em;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.jp-oem-number {
    color: var(--jp-text-muted);
    font-size: 0.85rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Product page compatibility box */
.jp-fitment-box {
    background: var(--jp-bg);
    border: 1px solid var(--jp-border);
    border-radius: 6px;
    padding: 1rem 1.2rem;
    margin: 1.2rem 0;
}
.jp-fitment-box-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--jp-text);
}
.jp-fitment-text {
    margin: 0 0 0.7rem;
    font-size: 0.95rem;
    color: var(--jp-text);
}
.jp-fitment-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}
.jp-fitment-badges .jp-fitment-badge {
    background: var(--jp-surface);
    color: var(--jp-text);
    border: 1px solid var(--jp-border);
}
.jp-fitment-badge-condition {
    background: #EEF2F1 !important;
    color: var(--jp-success) !important;
    border-color: #CFE8DC !important;
}
.jp-fitment-note {
    margin: 0.4rem 0 0;
    font-size: 0.82rem;
    color: var(--jp-text-muted);
}

/* Footer */
#colophon.site-footer {
    background: var(--jp-text);
    color: #C9CBCE;
}
#colophon.site-footer a { color: #E7E7E5; }
#colophon.site-footer .widget-title { color: #fff; }

/* Trust bar */
.jp-trust-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    background: var(--jp-surface);
    border-top: 1px solid var(--jp-border);
    border-bottom: 1px solid var(--jp-border);
    padding: 1rem;
    font-size: 0.9rem;
    color: var(--jp-text-muted);
}
.jp-trust-bar span { display: flex; align-items: center; gap: 0.5em; }
.jp-trust-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: var(--jp-success);
}

/* Homepage hero */
.jp-hero {
    background: linear-gradient(135deg, var(--jp-text) 0%, #2b2f36 100%);
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 5.5rem 1.5rem;
    text-align: center;
}
.jp-hero h1 { color: #fff; font-size: 2.4rem; margin-bottom: 0.6rem; }
.jp-hero p { color: #E5E4E1; font-size: 1.1rem; max-width: 640px; margin: 0 auto 1.6rem; text-shadow: 0 1px 3px rgba(0,0,0,.4); }

@media (max-width: 768px) {
    .jp-hero h1 { font-size: 1.7rem; }
}

/* Shared section title — more space above than below (the heading
   belongs to the content it introduces, not the space before it). */
.jp-section-title {
    font-size: 1.6rem;
    text-align: center;
    margin: 0 0 1.8rem;
}

/* Featured products (grid styling itself comes from the global
   .woocommerce ul.products rules above, so it stays identical to the
   shop archive) */
.jp-featured-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 1.5rem 4.5rem;
}
.jp-featured-cta {
    text-align: center;
    margin-top: 2.5rem;
}
.jp-btn-outline {
    background: transparent !important;
    color: var(--jp-text) !important;
    border: 1px solid var(--jp-text) !important;
    box-shadow: none !important;
}
.jp-btn-outline:hover {
    background: var(--jp-text) !important;
    color: #fff !important;
}

/* Editorial trust banner */
.jp-editorial {
    background: var(--jp-text);
    color: #fff;
    padding: 3.5rem 1.5rem;
    text-align: center;
}
.jp-editorial-inner {
    max-width: 640px;
    margin: 0 auto;
}
.jp-editorial h2 { color: #fff; font-size: 1.7rem; margin-bottom: 0.8rem; }
.jp-editorial p { color: #C9CBCE; font-size: 1.02rem; margin: 0; }

/* Brand story */
.jp-story-wrap {
    background: var(--jp-surface);
    padding: 3.5rem 1.5rem;
}
.jp-story-inner {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}
.jp-story-inner p {
    font-size: 1.02rem;
    color: var(--jp-text-muted);
    line-height: 1.7;
    margin-bottom: 1rem;
}
.jp-text-link {
    color: var(--jp-accent);
    font-weight: 600;
    text-decoration: none;
}
.jp-text-link:hover { color: var(--jp-accent-dark); }

/* Homepage category navigation grid */
.jp-cat-grid-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 1.5rem 1rem;
}
.jp-cat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}
.jp-cat-card {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: var(--jp-radius);
    overflow: hidden;
    background: var(--jp-text);
    text-decoration: none;
    box-shadow: var(--jp-shadow-sm);
    transition: box-shadow 0.2s ease;
}
.jp-cat-card:hover { box-shadow: var(--jp-shadow-md); }
.jp-cat-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.jp-cat-card:hover img { transform: scale(1.05); }
.jp-cat-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.65), rgba(0,0,0,0) 60%);
}
.jp-cat-card-label {
    position: absolute;
    left: 1rem;
    bottom: 0.9rem;
    z-index: 1;
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    text-shadow: 0 1px 3px rgba(0,0,0,.5);
}

@media (max-width: 900px) {
    .jp-cat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .jp-cat-grid { grid-template-columns: 1fr; }
}

/* Single product page */
.woocommerce div.product .product_title {
    font-size: 1.7rem;
    margin-bottom: 0.4rem;
}
.woocommerce div.product p.price,
.woocommerce div.product span.price {
    color: var(--jp-text);
    font-size: 1.3rem;
    font-weight: 700;
}
.woocommerce div.product .woocommerce-product-details__short-description {
    color: var(--jp-text-muted);
}

/* Quantity input + Add to cart row */
.woocommerce div.product form.cart .quantity {
    margin-right: 0.6rem;
}
.woocommerce div.product form.cart .quantity .qty {
    border: 1px solid var(--jp-border);
    border-radius: var(--jp-radius-sm);
    height: 2.9em;
    text-align: center;
    font-weight: 600;
}
.woocommerce div.product form.cart .button {
    height: 2.9em;
}

/* Product data tabs (Description / Additional info / Reviews) */
.woocommerce-tabs ul.tabs {
    border-bottom: 1px solid var(--jp-border);
    display: flex;
    gap: 0.5rem;
}
.woocommerce-tabs ul.tabs li {
    background: transparent !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.woocommerce-tabs ul.tabs li a {
    display: inline-block;
    padding: 0.8em 0.2em;
    margin-right: 1.4rem;
    color: var(--jp-text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    border-bottom: 2px solid transparent;
}
.woocommerce-tabs ul.tabs li.active a {
    color: var(--jp-text);
    border-bottom-color: var(--jp-accent);
}
.woocommerce-tabs .panel { padding-top: 1.4rem; }

/* Product gallery */
.woocommerce div.product div.images .woocommerce-product-gallery__image {
    border-radius: var(--jp-radius);
    overflow: hidden;
    border: 1px solid var(--jp-border);
}
.flex-control-thumbs li img {
    border-radius: var(--jp-radius-sm);
    opacity: 0.65;
    transition: opacity 0.15s ease;
}
.flex-control-thumbs li img.flex-active,
.flex-control-thumbs li img:hover {
    opacity: 1;
}

/* Cart / checkout tables */
.woocommerce table.shop_table {
    border: 1px solid var(--jp-border);
    border-radius: var(--jp-radius);
    overflow: hidden;
}
.woocommerce table.shop_table th {
    background: var(--jp-bg);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--jp-text-muted);
}

/* Coupon field */
.woocommerce form .form-row .input-text,
.woocommerce-cart table.cart td.actions .coupon .input-text {
    border: 1px solid var(--jp-border);
    border-radius: var(--jp-radius-sm);
    padding: 0.7em 0.9em;
}
