/* ========================================
   Peptides Page Styles
   ======================================== */

.peptides-main {
    padding-bottom: 4rem;
}

.peptides-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1rem;
    display: flex;
    gap: 2rem;
}

@media (min-width: 768px) {
    .peptides-container {
        padding-left: var(--header-padding);
        padding-right: var(--header-padding);
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

@media (max-width: 768px) {
    .peptides-container {
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* Sidebar */
.peptides-sidebar {
    width: 200px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .peptides-sidebar {
        width: 100%;
        order: 2;
    }
}

.filter-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid var(--border-gray);
    padding: 1rem 1.25rem;
}

.category-btn {
    display: block;
    width: 100%;
    padding: 0.625rem 0;
    text-align: left;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 16px;
    color: var(--primary-color);
    cursor: pointer;
    transition: color 0.2s ease;
    text-decoration: none;
}

.category-btn:hover {
    color: var(--text-light);
}

.category-btn.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Content */
.peptides-content {
    flex: 1;
}

@media (max-width: 768px) {
    .peptides-content {
        order: 1;
    }
}

/* Top Bar */
.products-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.products-count {
    font-size: 14px;
    color: var(--text-gray);
}

.products-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sort-wrapper {
    position: relative;
}

.sort-select {
    padding: 0.5rem 1rem;
    padding-right: 1.75rem;
    font-family: inherit;
    font-size: 13px;
    color: var(--text-light);
    border: 1px solid var(--border-gray);
    border-radius: 4px;
    background-color: var(--white);
    cursor: pointer;
    appearance: none;
    min-width: 160px;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.sort-wrapper::after {
    content: '';
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid var(--text-gray);
    pointer-events: none;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-gray);
    background-color: var(--white);
    cursor: pointer;
    color: var(--text-gray);
    transition: all 0.2s ease;
    border-radius: 4px;
}

.view-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.view-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.view-btn .icon {
    width: 18px;
    height: 18px;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border-top: 1px solid var(--border-gray);
    border-left: 1px solid var(--border-gray);
}

@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0;
    }
}

@media (min-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0;
    }
}

/* Product Card */
.products-grid .product-card {
    background-color: var(--white);
    border-right: 1px solid var(--border-gray);
    border-bottom: 1px solid var(--border-gray);
    border-radius: 0;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    flex-shrink: initial;
    width: auto;
    height: auto;
    scroll-snap-align: none;
    scroll-snap-stop: normal;
}

.products-grid .product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 1;
}

.products-grid .product-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 8px 10px 12px;
}

.products-grid .product-card-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.products-grid .product-card-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.products-grid .product-card-title {
    font-size: 15px;
    font-weight: 400;
    color: var(--primary-color);
    margin: 0;
    line-height: 1.4;
    padding-bottom: 20px;
}

/* List View */
.products-grid.list-view {
    grid-template-columns: 1fr;
    gap: 0;
    border: 1px solid var(--border-gray);
}

.products-grid.list-view .product-card {
    border: none;
    border-bottom: 1px solid var(--border-gray);
}

.products-grid.list-view .product-card:last-child {
    border-bottom: none;
}

.products-grid.list-view .product-card-link {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem 1.25rem;
}

.products-grid.list-view .product-card-img-wrapper {
    width: 120px;
    height: 80px;
    flex-shrink: 0;
    margin-bottom: 0;
    aspect-ratio: auto;
}

.products-grid.list-view .product-card-title {
    flex: 1;
    font-size: 18px;
    padding-bottom: 0;
    font-weight: 400;
}

@media (max-width: 768px) {
    .products-grid.list-view .product-card-link {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .products-grid.list-view .product-card-img-wrapper {
        width: 100%;
        height: auto;
        margin-bottom: 0.75rem;
        aspect-ratio: 1;
    }
    
    .products-grid.list-view .product-card-title {
        padding: 0.75rem 0;
    }
}

/* Category Filter Animation */
.products-grid .product-card {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.products-grid .product-card.hidden {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

/* Breadcrumb for Peptides */
.breadcrumb-current {
    color: var(--primary-color);
    font-weight: 600;
}

/* Pagination */
.pagination-section {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border: 1px solid var(--border-gray);
    border-radius: 4px;
    background-color: var(--white);
    color: var(--text-light);
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.page-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.page-link .icon {
    width: 16px;
    height: 16px;
}

.page-dots {
    padding: 0 0.5rem;
    color: var(--text-gray);
    font-size: 14px;
}

/* Product Detail Page Styles
   ======================================== */

.product-detail-main {
    padding-bottom: 3rem;
}

.product-detail-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1rem;
    display: flex;
    gap: 3rem;
}

@media (min-width: 768px) {
    .product-detail-container {
        padding-left: var(--header-padding);
        padding-right: var(--header-padding);
        padding-top: 3rem;
    }
}

@media (max-width: 1024px) {
    .product-detail-container {
        flex-direction: column;
        gap: 2rem;
    }
}

/* Left Column */
.product-detail-left {
    width: 50%;
    flex-shrink: 0;
}

@media (max-width: 1024px) {
    .product-detail-left {
        width: 100%;
    }
}

/* Product Gallery */
.product-detail-gallery {
    display: flex;
    gap: 0;
    height: 400px;
}

@media (max-width: 1024px) {
    .product-detail-gallery {
        flex-direction: column-reverse;
        height: auto;
    }
}

.product-thumbnails-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 80px;
    height: 100%;
}

.thumbnail-scroll-btn {
    width: 80px;
    height: 40px;
    border: none;
    background-color: var(--bg-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.thumbnail-scroll-btn:hover:not(:disabled) {
    color: var(--primary-color);
    background-color: #f0f0f0;
}

.thumbnail-scroll-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.product-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem 0;
    overflow-y: auto;
    flex: 1;
}

.product-thumbnails::-webkit-scrollbar {
    width: 0;
}

@media (max-width: 1024px) {
    .product-thumbnails {
        flex-direction: row;
        justify-content: center;
        overflow-x: auto;
        flex: none;
    }
    
    .thumbnail-scroll-btn {
        display: none;
    }
    
    .product-thumbnails-container {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
}

.thumbnail-btn {
    width: 80px;
    height: 80px;
    border: 1px solid var(--border-gray);
    background-color: var(--white);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.thumbnail-btn:hover {
    border-color: var(--primary-color);
}

.thumbnail-btn.active {
    border-color: var(--primary-color);
    border-width: 2px;
    box-shadow: 0 0 0 1px var(--primary-color);
}

.thumbnail-btn img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-main-image {
    flex: 1;
    min-width: 300px;
    height: 400px;
    border: 1px solid var(--border-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: var(--white);
}

@media (max-width: 1024px) {
    .product-main-image {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
        min-width: auto;
    }
}

.product-main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.15s ease;
}

/* Important Notice */
.important-notice {
    background-color: #FFF9E6;
    border-left: 4px solid #FFD700;
    padding: 1rem 1.25rem;
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.notice-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.notice-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.25rem;
}

.notice-text {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Product Info */
.product-detail-right {
    flex: 1;
}

.product-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 1rem;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .product-title {
        font-size: 1.5rem;
    }
}

.product-description {
    color: var(--text-light);
    line-height: 1.6;
}

.product-intro {
    font-size: 16px;
    margin: 0 0 1rem;
    font-weight: 500;
}

.product-detail-text {
    font-size: 15px;
    margin: 0 0 1rem;
}

/* R&D Applications Section */
.rd-applications-section {
    padding: 2rem 0;
    margin-top: 1rem;
}

.rd-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 1.5rem;
}

@media (max-width: 768px) {
    .rd-section-title {
        font-size: 1.125rem;
    }
}

.rd-applications-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.rd-application-card {
    display: flex;
    flex-direction: column;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-gray);
    gap: 0.5rem;
}

.rd-application-card:last-child {
    border-bottom: none;
}

.rd-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.rd-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.rd-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

.rd-card-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.rd-card-list li {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 0.25rem;
}