/**
 * Product List - Complete Styles
 * Combines page layout and component styles for product listing
 */

/* ==========================================
   PAGE LAYOUT STYLES
   ========================================== */

/* Page-specific styles for Product List Page */
.product-list-page-container {
    position: relative;
    z-index: 1;
    background: #ffffff;
}

.product-list-container {
    display: flex;
    gap: 40px;
}

.product-list-page-header {
    position: relative;
}

.product-list-content-section {
    max-width: 1200px;
    margin: auto;
    padding: 0px;
    margin-bottom: 64px;
    margin-top: 64px;
}

.container {
    max-width: 1440px;
    margin: 0;
    padding: 0 20px;
}

.page-intro-content {
    margin-bottom: 30px;
}

.admin-actions {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007cba;
}

.admin-link {
    display: inline-block;
    margin-right: 15px;
    padding: 8px 16px;
    background: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.admin-link:hover {
    background: #005a87;
    color: white;
}

.product-list-additional-content {
    max-width: 1440px;
    margin: auto;
    padding: 40px 20px;
}


.product-list-component {
    max-width: 100%;
    /* 1239px + 40px padding on each side */
}

.product-list-component .product-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 40px;
    gap: 40px;
}

.product-list-search {
    display: flex;
    align-items: center;
    flex: 1;
}

.product-list-component .product-list-header .product-list-section-title {
    margin: 0 !important;
    text-align: left !important;
    display: block;
    width: auto;

    font-weight: 700;
    line-height: 100%;
    width: 280px;
    height: 33px;
    font-size: 28px;
    letter-spacing: 0.04em;
}

.product-list-search input {
    flex: 1;
    height: 72px;
    outline: none;
    border: 1px solid #CACBCC;
    padding: 25.5px 24px;
    font-weight: 400;
    font-size: 18px;
    line-height: 100%;
    color: #242424;
}

.product-list-search input::placeholder {
    color: #C0C0C2;
}

.product-list-search button {
    width: 72px;
    height: 72px;
    cursor: pointer;
    background: var(--primary-color);
    border: none;
}

.section-description {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5em;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

/* Table Design - Exact Figma Specs */
.product-table-wrapper {
    background: #C0C0C2;
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
}

/* Product Total Display */
.product-total-text {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 30px;
}

.product-total-text .product-total-text-label {
    font-weight: 400;
    font-size: 18px;
    line-height: 100%;
    letter-spacing: 0.04em;
    color: #454545;
}

.product-total-text .count-number {
    color: #46B088;
    font-weight: 600;
    font-size: 25px;
    line-height: 100%;
    width: 27px;
    height: 100%;
    display: inline-flex;
    align-items: center;
}

.product-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0px 1px;
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
    table-layout: fixed;
}

/* Table Header - Based on Figma Frame 1948755712 */
.product-table-header {
    background: #F5F5F5;
}

.product-table-header tr {
    background: #F5F5F5;
}

.product-table-header th {
    background: #F5F5F5;
    font-weight: 600;
    font-size: 20px;
    line-height: 1.5em;
    color: #060923;
    padding: 8px;
    text-align: center;
    height: 100px;
    vertical-align: middle;
    margin: 0;
    border: none;
    border-right: 1px solid #C0C0C2;
}

.product-table-header th:last-child {
    border-right: none;
}

/* Header Column Specifications */
.column-number {
    width: 10%;
    padding: 8px;
}

.column-image {
    width: 20%;
    padding: 8px;
}

.column-name {
    width: 70%;
    border-top-right-radius: 12px;
    padding: 8px 24px;
    text-align: left;
}

/* Table Body */
.product-table-body tr {
    background: #FFFFFF;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.product-table-body tr:hover {
    background: #f9f9f9;
}

.product-table-body tr:last-child .column-number {
    border-bottom-left-radius: 12px;
}

.product-table-body tr:last-child .column-name {
    border-bottom-right-radius: 12px;
}

.product-table-body td {
    background: #FFFFFF;
    padding: 8px;
    vertical-align: top;
    border: none;
}

.product-table-body td:last-child {
    border-right: none;
}

.product-table-body .column-number {
    padding: 8px;
    text-align: center;
    vertical-align: middle;
}

.product-table-body .column-image {
    padding: 8px;
    text-align: center;
    vertical-align: middle;
}

.product-table-body .column-name {
    padding: 8px 24px;
}

/* Product Number Styling */
.product-number {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5em;
    color: #383838;
}

.product-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 186px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #F2F3F5;
}

/* Image and Info Styling */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-title {
    font-weight: 600;
    font-size: 24px;
    line-height: 1.5em;
    color: #46B088;
    margin: 0;
}

.product-description {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5em;
    color: #060923;
}

.feature-item {
    margin: 0 0 8px 0;
    padding: 0;
}

/* Empty State */
.product-list-empty {
    text-align: center;
    padding: 80px 20px;
}

.empty-state {
    max-width: 400px;
    margin: 0 auto;
}

.empty-icon {
    color: #d1d5db;
    margin-bottom: 24px;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.empty-state p {
    color: #6b7280;
    margin-bottom: 32px;
}

.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: #46B088;
    color: white;
}

.btn-primary:hover {
    background: #3a8f6e;
    color: white;
}

.btn-secondary {
    background: white;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #f9fafb;
    color: #1a1a1a;
}

/* Modal Styles */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
}

.modal-content {
    position: relative;
    background: white;
    margin: 5% auto;
    max-width: 800px;
    border-radius: 12px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
}

.modal-body {
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.modal-product-image img {
    width: 100%;
    border-radius: 8px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    text-align: right;
}

/* Animation and interactions */
.product-row {
    transition: all 0.2s ease;
}

.product-row:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-image {
    transition: transform 0.3s ease;
}

.product-row:hover .product-image {
    transform: scale(1.02);
}

body.modal-open {
    overflow: hidden;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */


@media (max-width: 767px) {
    .product-list-content-section {
        padding: 10px 15px;
    }

    .container {
        padding: 0 15px;
    }

    .admin-actions {
        text-align: center;
        flex-direction: column;
        align-items: center;
    }

    .admin-link {
        display: block;
        margin: 10px 0;
    }

    /* Component Responsive */

    .section-title {
        font-size: 24px;
    }

    .product-table-wrapper {
        overflow-x: visible;
    }

    .product-table {
        min-width: 100%;
        table-layout: fixed;
    }

    .product-table-header th {
        font-size: 16px;
        height: 80px;
        padding: 6px;
    }

    .column-number {
        width: 15%;
    }

    .column-image {
        width: 25%;
    }

    .column-name {
        width: 60%;
    }

    .product-image-container {
        height: 120px;
        padding: 4px;
    }

    .product-title {
        font-size: 18px;
    }

    .product-description {
        font-size: 14px;
    }

    .modal-body {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .modal-header {
        padding: 16px;
    }
}


/* ==========================================
   VIEW TOGGLE BUTTONS
   ========================================== */

.view-toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #F5F5F5;
    border-radius: 8px;
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-toggle-btn.active {
    background: #FFFFFF;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.view-toggle-btn:hover {
    background: #FFFFFF;
}

.view-toggle-btn svg {
    width: 32px;
    height: 32px;
}

.view-toggle-btn.active svg path {
    fill: #46B088;
    stroke: #46B088;
}

.view-toggle-btn.active svg circle {
    fill: #46B088;
    stroke: #46B088;
}

.view-toggle-btn:not(.active) svg path {
    fill: #5B5B5C;
    stroke: #5B5B5C;
}

.view-toggle-btn:not(.active) svg circle {
    fill: #5B5B5C;
    stroke: #5B5B5C;
}

/* ==========================================
   READ MORE BUTTON
   ========================================== */

.btn-read-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.5em;
    color: #000000;
    margin-top: 8px;
}

.btn-read-more:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: translateX(2px);
}

.btn-read-more span {
    color: #000000;
}

.btn-read-more svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.btn-read-more:hover svg {
    transform: translateX(2px);
}

/* ==========================================
   PRODUCT TITLE COLOR UPDATE
   ========================================== */

.product-title {
    color: #060923 !important;
    font-weight: 700;
    font-size: 20px;
    line-height: 1.5em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

/* ==========================================
   GRID VIEW LAYOUT
   ========================================== */

.product-grid-container {
    width: 100%;
    /* Full viewport width */
    margin: 0;
    max-width: none;
    /* Remove max-width constraint */
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 320px);
    /* Fixed column width for consistency */
    background: transparent;
    width: 100%;
    max-width: 1400px;
    /* Limit max width */
    margin: 0 auto;
    padding: 0 40px;
    justify-content: center;
    /* Center the 4 columns */
    grid-row-gap: 32px;
}

.product-grid-item {
    /* Grid item - auto fits into 4 columns */
    background: #FFFFFF;
    border: 1px solid #F2F3F5;
    display: flex;
    flex-direction: column;
}

.product-grid-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    gap: 20px;
}

.product-grid-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    border: 1px solid #F2F3F5;
    flex-shrink: 0;
    background-color: #f5f5f5;
    padding: 16px;
}

.product-grid-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.product-grid-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
}

.product-grid-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.product-grid-title {
    color: #060923;
    font-weight: 700;
    font-size: 20px;
    line-height: 1.5em;
    text-transform: uppercase;
    margin: 0;
}

.product-grid-description {
    font-weight: 400;
    font-size: 14px;
    line-height: 1.5em;
    flex: 1;
    height: 62px;
    overflow: hidden;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.product-grid-description ul {
    list-style-type: disc !important;
    padding-left: 20px;
    margin: 10px 0;
}

.product-grid-description li {
    margin-bottom: 5px;
    line-height: 1.5;
}

.product-description ul {
    list-style-type: disc !important;
    padding-left: 20px;
    margin: 10px 0;
}

.product-description li {
    margin-bottom: 5px;
    line-height: 1.5;
}

.product-grid-actions {
    display: flex;
    align-items: flex-start;
}

/* ==========================================
   CARD DESIGN STYLES (FROM FIGMA)
   ========================================== */

/* Transform table into card design */
.product-table-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: #FFFFFF;
}

.product-table {
    /* Keep table visible but transform with CSS */
    width: 100%;
}

.product-table-body {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Ensure table rows are visible and styled as cards */
.product-table tbody {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.product-table tr {
    display: flex;
    background: #FFFFFF;
    border: 1px solid #F7F7FD;
    border-radius: 18px;
    box-shadow: 0px 2px 10px 0px rgba(185, 166, 189, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 20px;
    gap: 24px;
}

.product-row {
    display: flex;
    background: #FFFFFF;
    border: 1px solid #F7F7FD;
    border-radius: 18px;
    box-shadow: 0px 2px 10px 0px rgba(185, 166, 189, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 20px;
    gap: 24px;
}

.product-row:hover {
    transform: translateY(-2px);
    box-shadow: 0px 4px 20px 0px rgba(185, 166, 189, 0.15);
}

/* Hide table headers and numbers */
.product-table-header {
    display: none;
    /* Hide table headers */
}

.column-number {
    display: none;
    /* Hide number column */
}

.product-table td.column-number {
    display: none;
    /* Hide number column in table */
}

/* Transform image column into circular image */
.product-table td.column-image {
    flex-shrink: 0;
    width: 217.79px;
    height: 212px;
}

.column-image {
    flex-shrink: 0;
    width: 217.79px;
    height: 212px;
    border: none;
}

.product-image-container {
    width: 100%;
    height: 100%;
    border-radius: 5%;
    overflow: hidden;
    border: 1px solid #F2F3F5;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Transform content column */
.product-table td.column-name {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.column-name {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
}

.product-title {
    font-weight: 700;
    font-size: 20px;
    line-height: 1.5em;
    text-transform: uppercase;
    color: #060923;
    margin: 0;
}

.product-description {
    flex: 1;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5em;
    color: #060923;
}

.feature-item {
    margin: 0 0 8px 0;
    position: relative;
    padding-left: 20px;
}

.feature-item:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #46B088;
    font-weight: bold;
}

.product-actions {
    margin-top: auto;
}

.btn-read-more {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 100px;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.5em;
    color: #000000;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-read-more:hover {
    background-color: #f5f5f5;
}

.btn-read-more svg {
    width: 20px;
    height: 20px;
}

/* Ensure white background for entire page */
html,
body {
    background: #FFFFFF;
}

/* Product Filter Component */
.product-filter-component {
    width: 280px;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.filter-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.filter-clear-btn {
    background: #f5f5f5;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-clear-btn:hover {
    background: #e8e8e8;
    color: #333;
}

/* Accordion Styles */
.filter-accordion {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.filter-accordion-item {
    transition: all 0.3s ease;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    border-bottom: 1px solid #CACBCC;
    padding-bottom: 25.5px;
    padding-top: 1.5px;
    height: 48px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 21px;
}

.category-name {
    font-size: 18px;
    font-weight: 500;
    line-height: 100%;
    letter-spacing: 0.04em;
}

.category-count {
    font-size: 13px;
    color: #666;
    font-weight: 400;
}

.accordion-header.active .category-count {
    color: rgba(255, 255, 255, 0.9);
}

.header-right {
    display: flex;
    align-items: center;
}

.accordion-icon {
    transition: all 0.3s ease;
}

.accordion-icon-down {
    display: block;
}

.accordion-icon-up {
    display: none;
}

.accordion-header.active .accordion-icon-down {
    display: none;
}

.accordion-header.active .accordion-icon-up {
    display: block;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: white;
}

.accordion-content.active {
    max-height: 500px;
}

.posts-list {
    overflow-y: auto;
    max-height: 384px;
}

.post-item {
    padding-top: 12px;
    padding-bottom: 12px;
    font-weight: 400;
    font-size: 16px;
    line-height: 100%;
    display: flex;
}

.post-item:last-child {
    margin-bottom: 0;
}

.post-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}


.post-checkbox {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    margin: 2px;
    border: 1px solid #D0D5DD;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.post-checkbox:checked+.checkbox-custom {
    background: #46B088;
    border-color: #46B088;
}

.post-checkbox:checked+.checkbox-custom::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 3px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.post-titles {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 19px;
}

.post-title {
    display: flex;
    height: 100%;
    font-weight: 400;
    font-size: 16px;
    line-height: 130%;
    color: #454545;
}

.post-title-alt {
    color: #666;
    font-size: 12px;
    font-style: italic;
    opacity: 0.8;
}

.product-child-results {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.product-child-item {
    display: flex;
    background: #F5F5F5;
    padding: 24px;
    gap: 40px;
    cursor: pointer;
}

.product-child-content {
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    width: 100%;
    max-width: 752px;
    transition: box-shadow 0.2s;
    position: relative;
    flex: 1;
    justify-content: center;
}

.product-card-container {
    display: flex;
    align-items: center;
    gap: 24px;
}

.product-thumbnail-container {
    width: 140px;
    height: 100px;
}

.product-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-content-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
    width: 752px;
}

.product-list-card-title {
    font-weight: 500;
    font-size: 24px;
    line-height: 120%;
    padding-bottom: 16px;
    border-bottom: 1px solid #DEDFE0;
}

.product-types {
    font-size: 14px;
    color: #46B088;
    font-weight: 500;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.type-section {
    font-size: 13px;
    margin-top: 2px;
}

.product-list-card-button {
    display: flex;
    align-items: center;
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 40px;
    cursor: pointer;
}

.product-list-card-button-icon {
    width: 40px;
    height: 40px;
    display: block;
}

.product-list-card-button-icon svg {
    width: 40px;
    height: 40px;
}

.type-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    width: 100%;
}

.type-section-inci {
    font-weight: 400;
    font-size: 14px;
    line-height: 150%;
    color: #454545;
    max-width: 40%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.type-section-psd {
    font-weight: 400;
    font-size: 14px;
    line-height: 150%;
    color: #454545;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.type-section-separator {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary-color);
}

.product-child-item:hover {
    background: #E3F3ED;
}

.product-child-item:hover .product-list-card-title {
    color: #268F68;
    border-bottom: 1px solid #46B088;
}

.product-child-item:hover .type-section-inci {
    color: #242424;
}

.product-child-item:hover .type-section-psd {
    color: #242424;
}

.product-child-item:hover .product-list-card-button-icon svg {
    color: #268F68;
}

.product-child-item:hover .product-list-card-button svg path {
    stroke: #268F68 !important;
}


/* @media (max-width: 768px) {
    .product-filter-component {
        padding: 16px;
    }

    .accordion-header {
        padding: 12px 16px;
    }

    .posts-list {
        padding: 12px 16px;
    }

    .filter-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
} */


/* ==========================================
   RESPONSIVE CARD DESIGN
   ========================================== */

@media (max-width: 768px) {
    .product-row {
        flex-direction: column;
        gap: 20px;
    }

    .column-image {
        width: 100%;
        height: 200px;
    }

    .product-image-container {
        border-radius: 12px;
    }
}


/* ==========================================
   RESPONSIVE GRID VIEW
   ========================================== */

/* Medium screens: Still 4 columns but smaller */
@media (max-width: 1320px) and (min-width: 769px) {
    .product-grid {
        grid-template-columns: repeat(4, 280px);
        max-width: 1200px;
        padding: 20px;
    }

    .product-grid-image {
        height: 200px;
    }
}

/* ==========================================
   NEW UTILITY CLASSES FOR INLINE STYLE REPLACEMENT
   ========================================== */

/* Grid view display control */
.product-grid-hidden {
    display: none !important;
}

.product-grid-visible {
    display: block !important;
}

/* Modal display control */
.product-modal-hidden {
    display: none !important;
}

.product-modal-visible {
    display: block !important;
}

/* Product Pagination Styles */
.product-pagination {
    display: flex;
    justify-content: center;
    width: 100%;
}
.pagination-item-first {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.pagination-item-last {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}   
.product-pagination .ajax-product-pagination {
    display: flex;
    list-style: none;
    justify-content: center;
    padding: 0;
    margin: 0;
    width: 100%;
    gap: 24px;
}

.product-pagination .ajax-product-pagination li a,
.product-pagination .ajax-product-pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 14px;
    border: 1px solid transparent;
    transition: 0.2s;

    font-size: 18px;
    line-height: 100%;
    text-align: center;
}
.pagination-container-page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 21px;
    margin-top: 3.5px;
    margin-bottom: 3.5px;
    gap: 4px;
}

.page-numbers-item {
    display: flex;
    width: 32px;
    height: 100%;
    margin: 0 4px;
    align-items: center;
}

.page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Selects .ajax-product-pagination li elements that have a child with class 'prev' */
.ajax-product-pagination li:has(.prev),
.ajax-product-pagination li:has(.next),
.ajax-product-pagination li:has(.go-last),
.ajax-product-pagination li:has(.go-first) {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ajax-product-pagination li:has(.prev) svg,
.ajax-product-pagination li:has(.next) svg,
.ajax-product-pagination li:has(.go-last) svg,
.ajax-product-pagination li:has(.go-first) svg {
    width: 100%;
    height: 100%;
}

.ajax-product-pagination .prev,
.ajax-product-pagination .next,
.ajax-product-pagination .go-last,
.ajax-product-pagination .go-first {
    display: flex;
    width: 100%;
    height: 100%;
}

.product-pagination .ajax-product-pagination li .current {
    font-weight: 600;
    font-size: 18px;
    line-height: 100%;
    text-align: center;
    color: var(--primary-color);
}

.product-pagination .ajax-product-pagination li .disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.product-pagination .ajax-product-pagination li .disabled:hover {
    background: transparent;
}

.product-pagination .ajax-product-pagination li img {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

/* Smooth transitions for product content */
#product-child-results {
    transition: opacity 0.3s ease;
    min-height: 200px;
}

.product-child-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.4s ease forwards;
}

.product-child-item:nth-child(1) {
    animation-delay: 0.1s;
}

.product-child-item:nth-child(2) {
    animation-delay: 0.2s;
}

.product-child-item:nth-child(3) {
    animation-delay: 0.3s;
}

.product-child-item:nth-child(4) {
    animation-delay: 0.4s;
}

.product-child-item:nth-child(5) {
    animation-delay: 0.5s;
}

.product-child-item:nth-child(6) {
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loading-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

.no-products-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}


/* Responsive for product-child-content */
@media (max-width: 1439px) and (min-width: 1024px) {
    .product-list-content-section {
        max-width: 896px;
        margin-top: 56px;
        margin-bottom: 56px;
    }
    .product-list-component .product-list-header .product-list-section-title {
        width: 200px;
        height: 32px;
        font-size: 21px;
        line-height: 150%;
    }
    .posts-list {
        max-height: 288px;
    }
    .product-list-search input {
        height: 64px;
        padding: 22.5px 20px;
        font-size: 16px;
    }
    .product-list-search button {
        width: 64px;
        height: 64px;
    }
    .product-list-component .product-list-header {
        gap: 32px;
    }
    .product-filter-component {
        width: 200px;
    }
    .product-list-container {
        gap: 32px;
    }
    .product-child-item {
        padding: 16px;
        gap: 24px;
    }
    .product-card-container {
        gap: 16px;
    }
    .product-thumbnail-container {
        width: 120px;
        height: 86px;
    }
    .product-list-card-button-icon {
        width: 32px;
        height: 32px;
    }
    .category-name {
        font-weight: 500;
        font-size: 16px;
        line-height: 100%;
        letter-spacing: 0.04em;
    }
    .post-title {
        font-weight: 400;
        font-size: 16px;
        line-height: 100%;
        letter-spacing: 0;

    }
    .product-list-card-title {
        font-size: 20px;
        padding-bottom: 12px;
    }
    .type-section {
        margin-top: 12px;
    }
    .product-content-container {
        width: 440px;
    }
    .header-left {
        height: 19px;
    }
    .product-table-wrapper {
        gap: 20px;
    }
    .product-child-results {
        gap: 20px;
    }
}

@media (max-width: 1023px) and (min-width: 768px)  {
    .product-list-content-section {
        max-width: 688px;
        margin-top: 56px;
        margin-bottom: 56px;
    }
    .product-list-component .product-list-header .product-list-section-title {
        width: 100%;
        height: 32px;
        font-size: 21px;
        padding: 0;
        line-height: 150%;
    }
    .posts-list {
        max-height: 240px;
    }
    .product-list-search {
        width: 100%;
    }
    .product-table-wrapper {
        gap: 20px;
    }
    .product-child-results {
        gap: 20px;
    }
    .product-list-search input {
        height: 64px;
        padding: 22.5px 20px;
        font-size: 16px;
    }
    .product-list-search button {
        width: 64px;
        height: 64px;
    }
    .product-list-component .product-list-header {
        gap: 16px;
        flex-direction: column;
    }
    .product-filter-component {
        width: 100%;
        padding: 0;
    }
    .product-list-container {
        gap: 40px;
        flex-direction: column;
    }
    .product-child-item {
        padding: 16px;
        gap: 24px;
    }
    .product-card-container {
        gap: 16px;
    }
    .product-thumbnail-container {
        width: 120px;
        height: 86px;
    }
    .category-name {
        font-weight: 500;
        font-size: 16px;
        line-height: 100%;
        letter-spacing: 0.04em;
    }
    .post-title {
        font-weight: 400;
        font-size: 16px;
        line-height: 100%;
        letter-spacing: 0;

    }
    .product-list-card-title {
        font-size: 20px;
        padding-bottom: 12px;
    }
    .type-section {
        margin-top: 12px;
    }
    .product-content-container {
        width: 464px;
    }
    .product-total-text {
        height: 25px;
    }
    .product-total-text .product-total-text-label{
        font-weight: 400;
        line-height: 100%;
        letter-spacing: 0.04em;
        font-size: 18px;

    }
    .product-total-text .count-number {
        font-weight: 600;
        line-height: 100%;
        letter-spacing: 0;

        font-size: 21px;
    }
    .product-list-card-button-icon {
        width: 32px;
        height: 32px;
    }
    .header-left {
        height: 19px;
    }
}
@media (max-width: 767px) {
    .product-list-content-section {
        width: 100%;
        padding: 0 16px;
        margin-top: 48px;
        margin-bottom: 48px;
    }
    .product-list-component .product-list-header .product-list-section-title {
        width: 100%;
        height: 24px;
        font-size: 16px;
        line-height: 150%;
        padding: 0;
    }
    .product-list-search {
        width: 100%;
    }
    .product-list-search input {
        height: 52px;
        padding: 17.5px 12px;
        font-size: 14px;
    }
    .product-list-search button {
        width: 52px;
        height: 52px;
    }
    .product-list-component .product-list-header {
        gap: 16px;
        flex-direction: column;
        margin-bottom: 32px;
    }
    .product-filter-component {
        width: 100%;
        padding: 0;
    }
    .product-list-container {
        gap: 40px;
        flex-direction: column;
    }
    .product-child-item {
        padding: 16px;
        gap: 24px;
    }
    .product-card-container {
        gap: 16px;
    }
    .product-thumbnail-container {
        display: none;
    }
    .category-name {
        font-weight: 500;
        font-size: 16px;
        line-height: 100%;
        letter-spacing: 0.04em;
    }
    .post-title {
        font-weight: 400;
        font-size: 16px;
        line-height: 100%;
        letter-spacing: 0;

    }
    .product-table-wrapper {
        gap: 20px;
    }
    .product-child-results {
        gap: 20px;
    }
    .product-list-card-title {
        font-size: 16px;
        padding-bottom: 12px;
    }
    .type-section {
        margin-top: 12px;
    }
    .product-content-container {
        width: 255px;
    }
    .product-total-text {
        height: 23px;
    }
    .product-total-text .product-total-text-label{
        font-weight: 400;
        font-size: 16px;
        line-height: 100%;
        letter-spacing: 0.04em;
    }
    .product-total-text .count-number {
        font-weight: 600;
        font-size: 19px;
        line-height: 100%;
        letter-spacing: 0;

    }
    .type-section-inci {
        max-width: 40%;
    }
    .type-section-psd {
        flex: 1;
    }
    .product-pagination {
        width: 100%;
    }
    .product-pagination .ajax-product-pagination {
        width: 100%;
        justify-content: space-between;
    }
    .posts-list {
        max-height: 192px;
    }
    .product-list-card-button-icon {
        width: 32px;
        height: 32px;
    }
    .pagination-container-page-numbers {
       height: 19px;
       margin-top: 4.5px;
       margin-bottom: 4.5px;
    }
    .page-numbers-item {
        width: 28px;
        margin: 0 4px;
    }
    .product-pagination .ajax-product-pagination li .current {
        font-size: 16px;
    }
    .product-pagination .ajax-product-pagination li a {
        font-size: 16px;
    }
    .product-pagination .ajax-product-pagination {
        gap: 8px;
    }
    .header-left {
        height: 19px;
    }
}
