/* =========================================================
   Product (JI-TECH inspired) — Updated Design
   ========================================================= */
:root {
    --jitech-blue: #004c98;
    --jitech-dark: #1a2b4b;
    --jitech-gray: #f4f7f9;
    --jitech-border: #e1e8ed;
    --jitech-text: #333333;
    --jitech-muted: #666666;
    --jitech-white: #ffffff;
}

.prd-wrap {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    color: var(--jitech-text);
    background-color: var(--jitech-white);
}

.prd-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

/* Breadcrumbs */
.prd-breadcrumb {
    padding: 20px 0;
    font-size: 13px;
    color: var(--jitech-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}
.prd-breadcrumb span {
    display: flex;
    align-items: center;
    gap: 8px;
}
.prd-breadcrumb span:after {
    content: '>';
    font-size: 10px;
}
.prd-breadcrumb span:last-child:after {
    content: none;
}
.prd-breadcrumb a {
    color: var(--jitech-muted);
    text-decoration: none;
}
.prd-breadcrumb a:hover {
    text-decoration: underline;
}

/* Hero Section */
.prd-header-title {
    padding: 40px 0;
    border-bottom: 2px solid var(--jitech-dark);
    margin-bottom: 40px;
}
.prd-header-title h1 {
    font-size: 36px;
    font-weight: 700;
    color: var(--jitech-dark);
    margin: 0;
    text-transform: uppercase;
}
.prd-header-title .sub-title {
    font-size: 18px;
    color: var(--jitech-blue);
    margin-top: 10px;
    font-weight: 500;
}

/* Layout with Sidebar */
.prd-main-layout {
    display: flex;
    gap: 40px;
}

.prd-sidebar {
    width: 240px;
    flex-shrink: 0;
}
.prd-sidebar h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--jitech-dark);
    padding-bottom: 15px;
    border-bottom: 1px solid var(--jitech-dark);
    margin-bottom: 0;
    text-transform: uppercase;
}
.prd-side-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}
.prd-side-menu li a {
    display: block;
    padding: 15px 0;
    border-bottom: 1px solid var(--jitech-border);
    color: #555;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}
.prd-side-menu li a:hover,
.prd-side-menu li a.active {
    color: var(--jitech-blue);
    font-weight: 700;
}

.prd-content {
    flex-grow: 1;
}

/* Search Bar */
.prd-search-box {
    margin-bottom: 30px;
    display: flex;
    justify-content: flex-end;
}
.prd-search-box form {
    display: flex;
    border: 1px solid var(--jitech-border);
    border-radius: 4px;
    overflow: hidden;
}
.prd-search-box input {
    border: none;
    padding: 8px 15px;
    width: 200px;
    outline: none;
}
.prd-search-box button {
    background: var(--jitech-dark);
    color: white;
    border: none;
    padding: 0 15px;
    cursor: pointer;
}

/* Grid Layout */
.prd-list-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.prd-item-card {
    border: 1px solid var(--jitech-border);
    transition: border-color 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}
.prd-item-card:hover {
    border-color: var(--jitech-blue);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.prd-item-img {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
}
.prd-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.prd-item-card:hover .prd-item-img img {
    transform: scale(1.05);
}
.prd-item-info {
    padding: 20px;
    flex-grow: 1;
}
.prd-item-code {
    display: block;
    font-size: 13px;
    color: var(--jitech-blue);
    margin-bottom: 5px;
    font-weight: 600;
}
.prd-item-name {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--jitech-dark);
    margin-bottom: 10px;
}
.prd-item-summary {
    font-size: 14px;
    color: var(--jitech-muted);
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* View Page Styling */
.prd-view-top {
    display: flex;
    gap: 40px;
    margin-bottom: 50px;
}
.prd-view-image {
    width: 450px;
    flex-shrink: 0;
}
.prd-view-image .main-img {
    border: 1px solid var(--jitech-border);
    margin-bottom: 15px;
}
.prd-view-image .main-img img {
    width: 100%;
    display: block;
}
.prd-view-info {
    flex-grow: 1;
}
.prd-view-info h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--jitech-dark);
    margin: 0 0 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--jitech-border);
}

.prd-view-table {
    width: 100%;
    border-top: 2px solid var(--jitech-dark);
    border-collapse: collapse;
}
.prd-view-table th, .prd-view-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--jitech-border);
    font-size: 14px;
}
.prd-view-table th {
    background: #f8f9fa;
    width: 140px;
    text-align: left;
    color: #555;
}

.prd-section {
    margin-top: 60px;
}
.prd-section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--jitech-dark);
    margin-bottom: 20px;
    padding-left: 15px;
    border-left: 4px solid var(--jitech-blue);
}
.prd-description {
    line-height: 1.8;
    color: #444;
}

.prd-bottom-btns {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 15px;
}
.prd-btn-list {
    display: inline-block;
    padding: 12px 40px;
    background: var(--jitech-dark);
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
}

/* Gallery Styling */
.prd-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.prd-gallery a {
    display: block;
    border: 1px solid var(--jitech-border);
    overflow: hidden;
    aspect-ratio: 1;
}
.prd-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.prd-gallery a:hover img {
    transform: scale(1.1);
}

/* Gallery Modal */
body.prd-gallery-lock {
    overflow: hidden;
}

.prd-gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.prd-gallery-modal.is-open {
    display: flex;
}

.prd-gallery-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.prd-gallery-modal.is-open .prd-gallery-modal-backdrop {
    opacity: 1;
}

.prd-gallery-modal-inner {
    position: relative;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    transform: scale(0.95) translateY(10px);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
    z-index: 1;
}

.prd-gallery-modal.is-open .prd-gallery-modal-inner {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.prd-gallery-modal-imgwrap {
    width: 100%;
    max-height: 90vh;
}

.prd-gallery-modal-imgwrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.prd-gallery-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 16px;
    border: none;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 20px;
    line-height: 32px;
    text-align: center;
    cursor: pointer;
}

.prd-gallery-modal-close:hover {
    background: rgba(0,0,0,0.85);
}

/* Responsive */
@media (max-width: 1024px) {
    .prd-main-layout {
        flex-direction: column;
    }
    .prd-sidebar {
        width: 100%;
    }
    .prd-side-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 15px;
    }
    .prd-side-menu li {
        flex: 1 1 calc(50% - 10px);
    }
    .prd-side-menu li a {
        padding: 10px 15px;
        border: 1px solid var(--jitech-border);
        background: #fdfdfd;
        text-align: center;
    }
    .prd-side-menu li a.active {
        background: var(--jitech-blue);
        color: white;
        border-color: var(--jitech-blue);
    }
    .prd-list-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .prd-view-top {
        flex-direction: column;
    }
    .prd-view-image {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .prd-list-grid {
        grid-template-columns: 1fr;
    }
    .prd-side-menu li {
        flex: 1 1 100%;
    }
    .prd-header-title h1 {
        font-size: 28px;
    }
}
