/**
 * Yedek Parçalar - Clean Professional CSS
 */

/* Reset */
.yp-catalog,
.yp-catalog *,
.yp-product-page,
.yp-product-page * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ==========================================
   KATALOG
   ========================================== */
.yp-catalog {
    max-width: 1380px;
    margin: 0;
}

/* Kategoriler */
.yp-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eaeaea;
}

.yp-cat-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #444;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
}

.yp-cat-link:hover {
    border-color: #111;
    color: #111;
}

.yp-cat-link.active {
    background: #111;
    border-color: #111;
    color: #fff;
}

.yp-cat-count {
    font-size: 12px;
    padding: 2px 8px;
    background: #f0f0f0;
    border-radius: 12px;
    color: #666;
}

.yp-cat-link.active .yp-cat-count {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Grid */
.yp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* Kart */
.yp-item {
    background: #fff;
    border: 2px solid #342f2f;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.yp-item:hover {
    border-color: black;
    box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
}

.yp-item>a {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.yp-item-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.yp-item-img {
    aspect-ratio: 1;
    background: white;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yp-item-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.yp-item-info {
    padding: 16px 20px 12px;
    flex-grow: 1;
}

.yp-item-action {
    padding: 0 16px 16px;
}

.yp-item-btn {
    display: block;
    width: 100%;
    padding: 10px 20px;
    background: #111;
    color: #fff;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.yp-item:hover .yp-item-btn {
    background: #333;
}

.yp-item-title {
    font-size: 18px;
    font-weight: 600;
    color: #111;
    line-height: 1.4;
    padding-top: 10px;
    border-top: 1px solid grey;
}

.yp-item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #888;
}

.yp-item-sku {
    font-family: "SF Mono", Monaco, monospace;
    font-size: 12px;
    color: #666;
}

.yp-item-rating span:first-child {
    color: #f59e0b;
}

.yp-stock-badge {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.yp-stock-in_stock {
    background: #d1fae5;
    color: #047857;
}

.yp-stock-out_of_stock {
    background: #fee2e2;
    color: #b91c1c;
}

.yp-stock-on_order {
    background: #fef3c7;
    color: #b45309;
}

.yp-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #888;
    font-size: 16px;
}

/* ==========================================
   ÜRÜN SAYFASI
   ========================================== */
.yp-product-page {
    max-width: 1380px;
    margin: 0 auto;
    padding: 30px 20px 30px;
    color: #333;
}

/* Üst: Galeri + Bilgi */
.yp-product-top {
    display: grid;
    grid-template-columns: 480px 1fr;
    gap: 60px;
    margin-bottom: 48px;
}

/* Galeri */
.yp-gallery {
    position: sticky;
    top: 24px;
    align-self: start;
}

.yp-gallery-main {
    background: white;
    border-radius: 5px;
    border-left: 4px solid black;
    border-top: 4px solid black;
    padding: 32px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
}

.yp-gallery-main img {
    max-width: 100%;
    max-height: 380px;
    object-fit: contain;
}

.yp-gallery-thumbs {
    display: flex;
    gap: 12px;
}

.yp-gallery-thumb {
    width: 72px;
    height: 72px;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 8px;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.yp-gallery-thumb:hover,
.yp-gallery-thumb.active {
    border-color: #111;
}

.yp-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Bilgi */
.yp-product-info {
    padding-top: 8px;
}

.yp-product-cat {
    display: inline-block;
    padding: 6px 14px;
    background: #f0f0f0;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    transition: all 0.15s ease;
}

.yp-product-cat:hover {
    background: #111;
    color: #fff;
}

.yp-product-title {
    font-size: 28px;
    font-weight: 700;
    color: #111;
    line-height: 1.3;
    margin-bottom: 16px;
}

.yp-product-sku {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
}

.yp-product-sku strong {
    font-family: "SF Mono", Monaco, monospace;
    color: #333;
}

.yp-product-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.yp-stars {
    display: flex;
    gap: 2px;
}

.yp-stars .star {
    font-size: 18px;
    color: #ddd;
}

.yp-stars .star.filled {
    color: #f59e0b;
}

.yp-stars .star.half {
    color: #f59e0b;
}

.yp-rating-text {
    font-size: 14px;
    color: #666;
}

.yp-product-price {
    font-size: 28px;
    font-weight: 700;
    color: #111;
    margin-bottom: 20px;
}

.yp-product-stock {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
}

.yp-product-stock .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.yp-product-stock.in_stock {
    background: #d1fae5;
    color: #047857;
}

.yp-product-stock.in_stock .dot {
    background: #10b981;
}

.yp-product-stock.out_of_stock {
    background: #fee2e2;
    color: #b91c1c;
}

.yp-product-stock.out_of_stock .dot {
    background: #ef4444;
}

.yp-product-stock.on_order {
    background: #fef3c7;
    color: #b45309;
}

.yp-product-stock.on_order .dot {
    background: #f59e0b;
}

.yp-product-desc {
    font-size: 15px;
    line-height: 1.7;
    color: #444;
    margin-bottom: 32px;
}

.yp-product-desc p {
    margin: 0 0 12px;
}

.yp-product-desc p:last-child {
    margin-bottom: 0;
}

/* Butonlar */
.yp-product-actions {
    display: flex;
    gap: 12px;
}

.yp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
    border: none;
}

.yp-btn-dark {
    background: #111;
    color: #fff;
}

.yp-btn-dark:hover {
    background: #333;
}

.yp-btn-green {
    background: #25d366;
    color: #fff;
}

.yp-btn-green:hover {
    background: #20bd5a;
}

/* Alt: Detaylar */
.yp-product-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.yp-detail-box {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 24px;
}

.yp-detail-box h3 {
    font-size: 14px;
    font-weight: 700;
    color: #111;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.yp-oem-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.yp-oem-code {
    display: inline-block;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    font-family: "SF Mono", Monaco, monospace;
    font-size: 13px;
    color: #333;
}

.yp-models {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
}

/* Specs Tablosu */
.yp-specs-box {
    grid-column: 1 / -1;
}

.yp-specs-table {
    width: 100%;
    border-collapse: collapse;
}

.yp-specs-table tr:not(:last-child) {
    border-bottom: 1px solid #eee;
}

.yp-specs-table td {
    padding: 14px 0;
    font-size: 14px;
}

.yp-specs-table .spec-label {
    color: #666;
    width: 40%;
}

.yp-specs-table .spec-value {
    color: #111;
    font-weight: 500;
}

/* Benzer Ürünler */
.yp-related {
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.yp-related h2 {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin-bottom: 24px;
}

.yp-related-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.yp-related-item {
    text-decoration: none;
    color: inherit;
    padding: 10px;
    border: 1px solid rgb(233, 233, 233);
    border-radius: 10px;;
}

.yp-related-item:hover {
    box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;
}

.yp-related-img {
    background: white;
    border-radius: 10px;
    margin-bottom: 10px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.yp-related-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.yp-related-title {
    font-size: 14px;
    font-weight: 600;
    color: #111;
    line-height: 1.4;
    margin-left: 7px;
}

/* ==========================================
   RESPONSIVE - MOBİL UYUMLULUK
   ========================================== */

/* Tablet - 1024px */
@media screen and (max-width: 1024px) {
    .yp-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px;
    }

    .yp-product-top {
        grid-template-columns: 400px 1fr;
        gap: 40px;
    }

    .yp-related-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet küçük - 768px */
@media screen and (max-width: 768px) {
    .yp-catalog {
        padding: 16px;
    }

    .yp-categories {
        gap: 8px;
        margin-bottom: 24px;
        padding-bottom: 16px;
    }

    .yp-cat-link {
        padding: 8px 14px;
        font-size: 13px;
    }

    .yp-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .yp-item {
        border-width: 1px;
    }

    .yp-item-img {
        padding: 16px;
    }

    .yp-item-info {
        padding: 12px 14px 10px;
    }

    .yp-item-title {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .yp-item-action {
        padding: 0 12px 12px;
    }

    .yp-item-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    /* Ürün Sayfası */
    .yp-product-page {
        padding: 30px 10px;
    }

    .yp-product-top {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .yp-gallery {
        position: static;
    }

    .yp-gallery-main {
        min-height: 280px;
        padding: 24px;
    }

    .yp-gallery-main img {
        max-height: 240px;
    }

    .yp-product-title {
        font-size: 22px;
    }

    .yp-product-actions {
        flex-direction: column;
    }

    .yp-btn {
        width: 100%;
    }

    .yp-product-details {
        grid-template-columns: 1fr;
    }

    .yp-related-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* Mobil - 576px */
@media screen and (max-width: 576px) {
    .yp-catalog {
        padding: 12px;
    }

    .yp-categories {
        flex-direction: column;
        gap: 6px;
    }

    .yp-cat-link {
        justify-content: space-between;
        width: 100%;
    }

    .yp-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .yp-item {
        border-width: 2px;
    }

    .yp-item-img {
        padding: 24px;
        aspect-ratio: 1;
    }

    .yp-item-info {
        padding: 16px;
    }

    .yp-item-title {
        font-size: 16px;
        line-height: 1.4;
        margin-bottom: 8px;
    }

    .yp-item-meta {
        font-size: 13px;
        gap: 10px;
    }

    .yp-item-sku {
        font-size: 12px;
    }

    .yp-stock-badge {
        font-size: 11px;
        padding: 4px 10px;
        margin-top: 8px;
    }

    .yp-item-action {
        padding: 0 16px 16px;
    }

    .yp-item-btn {
        padding: 10px 20px;
        font-size: 15px;
        border-radius: 8px;
    }

    /* Ürün Sayfası Mobil */
    .yp-product-page {
        padding: 30px 10px;
    }

    .yp-gallery-main {
        min-height: 250px;
        padding: 20px;
        border-left-width: 3px;
        border-top-width: 3px;
    }

    .yp-gallery-main img {
        max-height: 200px;
    }

    .yp-gallery-thumbs {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 8px;
    }

    .yp-gallery-thumb {
        width: 60px;
        height: 60px;
        padding: 6px;
    }

    .yp-product-cat {
        font-size: 11px;
        padding: 5px 12px;
    }

    .yp-product-title {
        font-size: 20px;
    }

    .yp-product-sku {
        font-size: 13px;
    }

    .yp-product-price {
        font-size: 22px;
    }

    .yp-product-stock {
        padding: 8px 14px;
        font-size: 13px;
    }

    .yp-btn {
        padding: 14px 24px;
        font-size: 15px;
    }

    .yp-detail-box {
        padding: 16px;
    }

    .yp-detail-box h3 {
        font-size: 13px;
    }

    .yp-oem-code {
        font-size: 12px;
        padding: 5px 10px;
    }

    .yp-specs-table td {
        padding: 10px 0;
        font-size: 13px;
    }

    .yp-related h2 {
        font-size: 18px;
    }

    .yp-related-list {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    .yp-related-img {
        padding: 20px;
    }

    .yp-related-title {
        font-size: 14px;
    }
}