/* ========================================================= */
/*  PRODUCT DETAIL PAGE (PUBLIC)                             */
/* ========================================================= */

.product-detail-page {
    padding-top: 80px;
    padding-bottom: 40px;
}

/* Flex layout: image left, info right */
.product-detail-main {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: 32px;
    align-items: flex-start;
}

/* Image panel */
.product-detail-media {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.product-detail-media img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
}

/* Info panel */
.product-detail-info {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 20px 18px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

/* Title & tags row */
.product-detail-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.product-detail-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: #111827;
}

/* Price row */
.product-detail-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

/* Short description */
.product-detail-short {
    font-size: 0.98rem;
    color: #374151;
    margin-bottom: 14px;
}

/* Long description (HTML from TinyMCE) */
.product-detail-long {
    font-size: 0.95rem;
    color: #4b5563;
    line-height: 1.6;
}

.product-detail-long p {
    margin-bottom: 0.7em;
}

.product-detail-long ul,
.product-detail-long ol {
    padding-left: 1.2rem;
    margin-bottom: 0.7em;
}

.product-detail-long li {
    margin-bottom: 0.25em;
}

/* Contact / CTA row */
.product-contact-actions {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Special CTA style (telephone / contact) */
.product-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 22px;
    border-radius: 10px;
    border: 2px solid var(--theme-btn-primary, #b91c1c);
    background-color: var(--theme-btn-primary, #b91c1c);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.product-btn-primary:hover {
    background-color: var(--theme-btn-primary-hover, #991b1b);
    border-color: var(--theme-btn-primary-hover, #991b1b);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.25);
}

/* Back link style */
.product-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: #4b5563;
    text-decoration: none;
}

.product-back-btn:hover {
    text-decoration: underline;
}

/* On small screens: stack image & text */
@media (max-width: 900px) {
    .product-detail-main {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ========================================================= */
/*  PRODUCT LIST PAGE (PUBLIC CARDS)                         */
/* ========================================================= */

.product-list-page {
    padding-top: 80px;
    padding-bottom: 40px;
}

/* Filters row (optional, can be simple for now) */
.product-list-header {
    margin-bottom: 18px;
}

.product-list-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.product-list-header .note {
    font-size: 0.9rem;
    color: #6b7280;
}

/* Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

/* Card */
.product-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.product-card-media {
    width: 100%;
    max-height: 200px;
    overflow: hidden;
}

.product-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card-body {
    padding: 12px 12px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #111827;
}

.product-card-short {
    font-size: 0.9rem;
    color: #4b5563;
    margin-bottom: 6px;
    min-height: 2.6em;
}

.product-card-price {
    font-size: 1rem;
    font-weight: 700;
    color: #b91c1c;
    margin-bottom: 8px;
}

/* Card actions (View details, Contact, etc.) */
.product-card-actions {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Buttons reused from global (.button-red / .button-grey), but we can refine */
.product-card-actions .button-red,
.product-card-actions .button-grey {
    font-size: 0.85rem;
    padding: 8px 16px;
}

/* ========================================================= */
/*  ADMIN PRODUCTS TABLE                                     */
/* ========================================================= */

.products-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.products-table thead tr {
    background-color: #f3f4f6;
}

.products-table thead th {
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
}

.products-table tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

.products-table tbody td {
    padding: 8px 10px;
    border-top: 1px solid #e5e7eb;
}

/* Small thumb column */
.products-table .col-thumb {
    width: 70px;
}

.products-table .thumb-img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
}

/* Status badge alignment */
.products-table .status-cell .badge {
    white-space: nowrap;
}

/* Action buttons */
.products-table .actions {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
}

/* ========================================================= */
/*  PRODUCT DETAIL PAGE (ALT VERSIYON - /product?id=...)     */
/* ========================================================= */

.product-detail-page {
    max-width: 1100px;
    margin: 30px auto 40px;
    padding: 0 16px;
}

/* Ana layout: solda media (resim+video), sağda bilgi kartı */
.product-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 24px;
    align-items: flex-start;
}

/* SOL KART: RESİM + VİDEO KUTUSU */
.product-media-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

/* 300x300 ürün resmi */
.product-detail-thumb-wrapper {
    text-align: center;
    margin-bottom: 12px;
}

.product-detail-thumb {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

.product-detail-thumb-caption {
    margin-top: 6px;
    font-size: 0.85rem;
    color: #6b7280;
}

/* 300x300 video kutusu */
.product-video-wrapper {
    margin-top: 16px;
    text-align: center;
}

.product-video-wrapper video {
    width: 300px;
    height: 300px;
    max-width: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.product-video-full-link {
    margin-top: 6px;
    font-size: 0.85rem;
}

/* SAĞ KART: BAŞLIK + FİYAT + BUTONLAR */
.product-info-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.product-detail-title {
    margin: 0 0 10px;
    font-size: 1.4rem;
    color: #111827;
}

.product-detail-price {
    font-size: 1.1rem !important;
    font-weight: 600;
    color: #b91c1c;
    margin-bottom: 4px;
}

.product-detail-price-label {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 12px;
}

.product-detail-short {
    font-size: 0.95rem;
    color: #374151;
    margin-bottom: 18px;
}

/* Buton grubu */
.product-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ALT PANEL: AÇIKLAMA + PDF BLOKU (2 KOLON) */
.product-extra {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    margin-top: 32px;
}

.product-panel {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.product-panel-title {
    margin: 0 0 10px;
    font-size: 1.1rem;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 6px;
}

.product-detail-description {
    font-size: 0.95rem;
    color: #374151;
    line-height: 1.5;
}

/* PDF link listesi */
.product-attachments-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-attachments-list li {
    margin: 6px 0;
}

/* Geri dön linki */
.product-detail-back {
    margin-top: 24px;
    font-size: 0.95rem;
}

/* RESPONSIVE (tablet & mobil için) */
@media (max-width: 900px) {
    .product-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .product-media-card {
        max-width: 360px;
        margin: 0 auto 16px;
    }

    .product-extra {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 600px) {
    .product-detail-page {
        padding: 0 10px;
    }

    .product-detail-thumb,
    .product-video-wrapper video {
        width: 260px;
        height: 260px;
    }
}

/* ========================================================= */
/*  HOME PAGE - MODERN PRODUCT CARDS (NO IMAGES)            */
/*  Customer/Tables style - Modern geometric boxes          */
/*  FINAL CLEAN VERSION - ALL PREVIOUS STYLES REMOVED       */
/* ========================================================= */

/* Section header */
.home-products-section {
    margin-top: 32px !important;
    padding-top: 8px !important;
    border-top: 1px solid var(--theme-border, #e5e7eb) !important;
}

.home-products-title {
    margin: 0 0 20px 0 !important;
    font-size: 1.3rem !important;
    font-weight: 600 !important;
    color: var(--theme-text-primary, #111827) !important;
}

/* Grid layout - EXACTLY like customer/tables page - Chrome & Safari compatible */
.home-products-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 20px !important;
    margin-top: 24px !important;
    width: 100% !important;
}

/* Modern card design - exact same dimensions as .table-card */
.home-product-card {
    background: var(--theme-card-bg, #ffffff) !important;
    border: 1px solid var(--theme-border, #e5e7eb) !important;
    border-radius: 12px !important;
    padding: 20px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 1px 3px var(--theme-card-shadow, rgba(0, 0, 0, 0.06)) !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    text-decoration: none !important;
    color: inherit !important;
    box-sizing: border-box !important;
}

.home-product-card:hover {
    box-shadow: 0 4px 12px var(--theme-card-shadow, rgba(0, 0, 0, 0.12)) !important;
    transform: translateY(-2px) !important;
}

/* Product name - slightly smaller */
.home-product-name {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: var(--theme-text-primary, #111827) !important;
    margin: 0 0 12px 0 !important;
    word-break: break-word !important;
    text-align: left !important;
}

/* Product body with description - 3 lines max, compact like table-card-info */
.home-product-body {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    flex: 0 0 auto !important;
}

.home-product-short {
    margin: 0 !important;
    font-size: 0.875rem !important;
    color: var(--theme-text-secondary, #6b7280) !important;
    line-height: 1.5 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    text-align: left !important;
    max-height: 4.5em !important;
}

/* Footer with More link/button - exactly like table-card-info */
.home-product-footer {
    margin-top: 12px !important;
    padding-top: 12px !important;
    border-top: 1px solid var(--theme-border, #e5e7eb) !important;
    display: block !important;
}

/* More link - grey button style, fully theme-aware, clickable */
.home-product-more-link {
    display: inline-block !important;
    padding: 9px 18px !important;
    font-size: 0.875rem !important;
    background-color: var(--theme-bg-primary, #ffffff) !important;
    color: var(--theme-text-primary, #111827) !important;
    border-radius: 10px !important;
    border: 1.5px solid var(--theme-border-dark, #d1d5db) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 10 !important;
}

.home-product-more-link:hover {
    background-color: var(--theme-bg-tertiary, #f3f4f6) !important;
    border-color: var(--theme-border, #e5e7eb) !important;
    color: var(--theme-text-primary, #111827) !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
}

.home-product-more-link:active {
    transform: translateY(0) !important;
    box-shadow: none !important;
}

/* Remove all image-related styles - images are not used on homepage */
.home-product-thumb,
.home-product-image-wrap,
.home-product-image-shell,
.home-product-image-shell img,
.home-product-card img {
    display: none !important;
}

/* Remove old unused styles */
.home-product-card-header,
.home-product-card-actions,
.home-product-view-btn,
.home-product-more-btn {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .home-products-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    .home-product-card {
        width: 100% !important;
        max-width: 100% !important;
        padding: 16px !important;
    }
}
