﻿.am-product-detail {
    padding: 24px 16px;
}

.am-pd-layout {
    display: grid;
    grid-template-columns: 400px 1fr 280px;
    gap: 32px;
    margin-top: 20px;
}

.am-pd-gallery {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 12px;
}

.am-pd-thumbs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.am-pd-thumb {
    width: 80px;
    height: 80px;
    border: 2px solid #e6e6e6;
    border-radius: 8px;
    padding: 4px;
    background: #fff;
    cursor: pointer;
    transition: all .2s ease;
}

    .am-pd-thumb img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .am-pd-thumb:hover,
    .am-pd-thumb.active {
        border-color: var(--am-red);
    }

.am-pd-main-img {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3; 
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    padding: 0;
    background: #fff;
    overflow: hidden;
}

    .am-pd-main-img img {
        width: 100%;
        height: 100%;
        object-fit: contain; 
        object-position: center;
        transition: transform .3s ease; 
    }

    .am-pd-main-img:hover img {
        transform: none;
    }
    .am-pd-main-img a {
        display: block;
        width: 100%;
        height: 100%;
    }


.am-pd-info {
    padding: 0 16px;
}

.am-pd-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 16px;
    line-height: 1.3;
}

.am-pd-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.am-pd-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.am-pd-meta-label {
    color: var(--am-muted);
}

.am-pd-meta-link {
    color: var(--am-red);
    text-decoration: none;
    font-weight: 600;
}

    .am-pd-meta-link:hover {
        text-decoration: underline;
    }

.am-pd-stock {
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
}

    .am-pd-stock.in-stock {
        color: #059669;
        background: #d1fae5;
    }

    .am-pd-stock.out-stock {
        color: #dc2626;
        background: #fee2e2;
    }

.am-pd-rating {
    color: #f59e0b;
    font-weight: 600;
}

.am-pd-price {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 24px;
}

.am-pd-price-now {
    font-size: 32px;
    font-weight: 800;
    color: var(--am-red);
}

.am-pd-price-old {
    font-size: 18px;
    color: #999;
    text-decoration: line-through;
}

.am-pd-variants {
    margin-bottom: 20px;
}

.am-pd-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.am-pd-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
    cursor: pointer;
}

.am-pd-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.am-pd-qty {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.am-pd-qty-btn {
    width: 44px;
    height: 48px;
    border: 0;
    background: #f5f5f5;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s ease;
}

    .am-pd-qty-btn:hover {
        background: #e0e0e0;
    }

.am-pd-qty-input {
    width: 60px;
    border: 0;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

    .am-pd-qty-input::-webkit-inner-spin-button,
    .am-pd-qty-input::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

.am-pd-add-cart {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--am-red);
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s ease;
}

    .am-pd-add-cart svg {
        width: 20px;
        height: 20px;
    }

    .am-pd-add-cart:hover:not(:disabled) {
        background: #0C3F4D;
        transform: translateY(-2px);
    }

    .am-pd-add-cart:disabled {
        background: #ccc;
        cursor: not-allowed;
    }

.am-pd-short-desc {
    margin-bottom: 20px;
    padding: 16px;
    background: #f9f9f9;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
}

.am-pd-extra {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 14px;
}

.am-pd-extra-item strong {
    color: var(--am-muted);
    font-weight: 600;
}

.am-pd-extra-item a {
    color: var(--am-red);
    text-decoration: none;
}

    .am-pd-extra-item a:hover {
        text-decoration: underline;
    }

.am-pd-related {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px;
}

.am-pd-related-title {
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--am-red);
}

.am-pd-related-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.am-pd-related-loading {
    text-align: center;
    color: var(--am-muted);
    padding: 20px 0;
}

.am-pd-related-card {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 12px;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    text-decoration: none;
    transition: all .2s ease;
}

    .am-pd-related-card:hover {
        border-color: var(--am-red);
        box-shadow: 0 4px 12px rgba(0,0,0,.08);
    }

.am-pd-related-card__img {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
}

    .am-pd-related-card__img img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.am-pd-related-card__info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.am-pd-related-card__name {
    font-size: 13px;
    font-weight: 600;
    color: var(--am-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}

.am-pd-related-card__price {
    font-size: 15px;
    font-weight: 700;
    color: var(--am-red);
}

.am-pd-tabs {
    margin-top: 40px;
}

.am-pd-tabs-nav {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #eee;
}

.am-pd-tab-btn {
    padding: 14px 28px;
    background: transparent;
    border: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--am-muted);
    cursor: pointer;
    position: relative;
    transition: color .2s ease;
}

    .am-pd-tab-btn::after {
        content: "";
        position: absolute;
        bottom: -2px;
        left: 0;
        right: 0;
        height: 2px;
        background: var(--am-red);
        transform: scaleX(0);
        transition: transform .2s ease;
    }

    .am-pd-tab-btn:hover,
    .am-pd-tab-btn.active {
        color: var(--am-red);
    }

        .am-pd-tab-btn.active::after {
            transform: scaleX(1);
        }

.am-pd-tabs-content {
    padding: 24px 0;
}

.am-pd-tab-pane {
    display: none;
}

    .am-pd-tab-pane.active {
        display: block;
    }

.am-pd-description {
    line-height: 1.8;
}

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

    .am-pd-specs-table tr:nth-child(even) {
        background: #f9f9f9;
    }

    .am-pd-specs-table th,
    .am-pd-specs-table td {
        padding: 12px 16px;
        text-align: left;
        border-bottom: 1px solid #eee;
    }

    .am-pd-specs-table th {
        font-weight: 600;
        color: var(--am-muted);
        width: 200px;
    }

@media (max-width: 1024px) {
    .am-pd-layout {
        grid-template-columns: 1fr;
    }

    .am-pd-related {
        display: none;
    }
}

@media (max-width: 768px) {
    .am-pd-gallery {
        grid-template-columns: 1fr;
    }

    .am-pd-thumbs {
        flex-direction: row;
        overflow-x: auto;
    }

    .am-pd-thumb {
        width: 70px;
        height: 70px;
        flex-shrink: 0;
    }

    .am-pd-title {
        font-size: 20px;
    }

    .am-pd-price-now {
        font-size: 24px;
    }

    .am-pd-actions {
        flex-direction: column;
    }
}

.am-pd-tabs-nav.is-single {
    justify-content: flex-start;
}

    .am-pd-tabs-nav.is-single .am-pd-tab-btn {
        cursor: default;
    }

/* --- AutoMarket Comments --- */
.am-comments {
    margin-top: 40px;
}

.am-comments-title {
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 16px;
}

.am-comments-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
}

.am-comment {
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 14px;
    background: #fff;
}

.am-comment-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.am-comment-author {
    font-weight: 800;
    font-size: 14px;
}

.am-comment-stars {
    color: #f59e0b;
    font-weight: 800;
    margin-top: 4px;
}

.am-comment-date {
    color: var(--am-muted);
    font-size: 12px;
    white-space: nowrap;
}

.am-comment-text {
    margin-top: 10px;
    line-height: 1.7;
    font-size: 14px;
}

.am-comments-empty {
    color: var(--am-muted);
    padding: 8px 0;
}

.am-alert {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
}

.am-alert-success {
    background: #d1fae5;
    color: #065f46;
}

.am-alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.am-alert-warn {
    background: #fff7ed;
    color: #9a3412;
}

/* cbox içindeki butonlara AutoMarket fallback */
.cbox .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #ddd;
    background: #fff;
    font-weight: 800;
    cursor: pointer;
}

.cbox .btn-primary {
    background: var(--am-red);
    border-color: var(--am-red);
    color: #fff;
}

    .cbox .btn-primary:hover {
        background: #0C3F4D;
    }

.cbox .btn-soft {
    background: #f5f5f5;
    border-color: #e5e5e5;
}

.cbox .link {
    color: var(--am-red);
    font-weight: 800;
    text-decoration: none;
    margin-left: 8px;
}

    .cbox .link:hover {
        text-decoration: underline;
    }

.am-pd-tab-pane .am-comments {
    margin-top: 0;
}

.lb {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0,0,0,.75);
    z-index: 999999;
}

    .lb[aria-hidden="false"] {
        display: flex !important;
    }

.lb-dialog {
    position: relative;
    width: min(980px, 96vw);
    max-height: 90vh;
}

    .lb-dialog img {
        width: 100%;
        height: auto;
        max-height: 90vh;
        object-fit: contain;
        border-radius: 14px;
        background: #fff;
    }

.lb-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    font-size: 28px;
    line-height: 40px;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0,0,0,.25);
}

.lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.9);
    font-size: 32px;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0,0,0,.25);
}

.lb-prev {
    left: -56px;
}

.lb-next {
    right: -56px;
}

.lb-count {
    margin-top: 10px;
    text-align: center;
    color: #fff;
    font-weight: 800;
}

@media (max-width: 768px) {
    .lb {
        padding: 12px;
    }

    .lb-prev {
        left: 8px;
    }

    .lb-next {
        right: 8px;
    }

    .lb-nav {
        background: rgba(0,0,0,.35);
        color: #fff;
        box-shadow: none;
    }

    .lb-close {
        top: 8px;
        right: 8px;
    }
}
.am-pd-cta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .am-pd-cta .am-pd-add-cart {
        flex: 0 0 auto;
        width: 100%;
    }

.am-pd-compare {
    align-self: flex-end;
    padding: 6px 10px;
    border: 1px solid #ddd;
    background: transparent;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    color: var(--am-muted);
    cursor: pointer;
    transition: all .15s ease;
}

    .am-pd-compare:hover {
        border-color: var(--am-red);
        color: var(--am-red);
    }

    .am-pd-compare.is-active,
    .am-pd-compare.is-selected,
    .am-pd-compare.is-on {
        border-color: var(--am-red);
        color: var(--am-red);
    }
.am-pd-actions {
    align-items: flex-start;
}

.am-pd-qty {
    height: 48px; 
    align-self: flex-start; 
}

.am-pd-qty-input {
    height: 48px; 
    line-height: 48px;
}
.am-pd-main-img a {
    cursor: zoom-in;
}
#pdLightbox .lb-dialog {
    width: auto !important;
    max-width: 96vw;
    display: flex;
    align-items: center;
    justify-content: center;
}

#pdLightbox #pdLbImg {
    width: auto !important;
    height: auto !important;
    max-width: 96vw;
    max-height: 90vh;
    display: block;
    object-fit: contain;
    background: transparent; 
}
