/**
 * Product Catalog - Frontend Styles
 * 
 * Responsive CSS matching the React component designs
 * Brand Colors: #35ACB8 (Turkuaz), #0067AF (Blue), #435058 (Dark), #DA0040 (Red), #96C710 (Green)
 * 
 * @package ProductCatalog
 */

/* ================================================
   CONTAINER & LAYOUT
   ================================================ */

.product-category-archive,
.single-product {
    max-width: 1280px;
    margin: 0 auto;
    padding: 64px 32px;
}

.container {
    width: 100%;
}

/* ================================================
   CATEGORY ARCHIVE HEADER
   ================================================ */

.category-header {
    text-align: center;
    margin-bottom: 48px;
}

.category-title {
    font-size: 36px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
}

.category-title .highlight {
    color: #35ACB8;
}

.title-underline {
    width: 96px;
    height: 6px;
    background: linear-gradient(to right, #35ACB8, #0067AF);
    border-radius: 9999px;
    margin: 0 auto 24px;
}

.category-description {
    color: #64748b;
    max-width: 640px;
    margin: 0 auto;
    font-size: 14px;
    line-height: 1.6;
}

/* ================================================
   PRODUCTS GRID
   ================================================ */

.products-grid,
.product-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

@media (max-width: 1024px) {
    .products-grid,
    .product-catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 767px) {
    .products-grid,
    .product-catalog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.no-products {
    text-align: center;
    color: #94a3b8;
    padding: 64px 20px;
    font-size: 16px;
}

/* ================================================
   PRODUCT CARD
   ================================================ */

.product-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    transition: all 300ms ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: rgba(53, 172, 184, 0.3);
}

.product-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-card-image img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform 300ms ease;
}

.product-card:hover .product-card-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(53, 172, 184, 0.9);
    color: white;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 9999px;
    letter-spacing: 0.05em;
}

.product-card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-category-tag {
    display: inline-block;
    background: rgba(53, 172, 184, 0.05);
    border: 1px solid rgba(53, 172, 184, 0.3);
    color: #35ACB8;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 9999px;
    margin-bottom: 12px;
    align-self: flex-start;
    letter-spacing: 0.1em;
}

.product-title {
    font-size: 20px;
    font-weight: 700;
    color: #0067AF;
    margin: 0 0 12px 0;
    line-height: 1.2;
    min-height: 48px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 300ms ease;
}

.product-card:hover .product-title {
    color: #35ACB8;
}

.product-description {
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 20px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 300ms ease;
    align-self: flex-start;
    margin-top: auto;
}

.product-card:hover .product-button {
    background: #35ACB8;
    color: white;
    border-color: #35ACB8;
}

.product-button svg {
    width: 12px;
    height: 12px;
    transition: transform 300ms ease;
}

.product-card:hover .product-button svg {
    transform: translateX(4px);
}

/* ================================================
   CATEGORY TABS (for Elementor Widget)
   ================================================ */

.product-catalog-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    overflow-x: auto;
    padding-bottom: 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.product-catalog-tabs::-webkit-scrollbar {
    display: none;
}

.category-tab {
    position: relative;
    background: #ffffff;
    color: #64748b;
    border: 1px solid #e2e8f0;
    padding: 10px 24px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    overflow: hidden;
    transition: all 300ms ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.tab-gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #35ACB8 0%, #0067AF 100%);
    opacity: 0;
    transition: opacity 300ms ease;
    pointer-events: none;
    z-index: 1;
    border-radius: 9999px;
}

.category-tab.active .tab-gradient-overlay,
.category-tab:hover .tab-gradient-overlay {
    opacity: 1;
}

.category-tab.active {
    color: white;
    box-shadow: 0 6px 16px rgba(53, 172, 184, 0.4);
}

.category-tab:hover {
    color: white;
}

.tab-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg) translateY(100%);
    transition: transform 800ms ease-in-out;
    pointer-events: none;
    z-index: 2;
}

.category-tab:hover .tab-shine {
    transform: rotate(45deg) translateY(-100%);
}

.tab-text {
    position: relative;
    z-index: 10;
}

/* ================================================
   SINGLE PRODUCT PAGE
   ================================================ */

.product-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
    font-size: 14px;
}

.product-breadcrumb a {
    color: #35ACB8;
    text-decoration: none;
    transition: color 200ms ease;
}

.product-breadcrumb a:hover {
    color: #0067AF;
}

.product-breadcrumb .separator {
    color: #cbd5e1;
}

.product-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
    align-items: center;
}

@media (max-width: 768px) {
    .product-header {
        grid-template-columns: 1fr;
    }
}

.product-badge-large {
    display: inline-block;
    background: rgba(53, 172, 184, 0.1);
    border: 1px solid rgba(53, 172, 184, 0.3);
    color: #35ACB8;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 9999px;
    margin-bottom: 16px;
}

.product-title-large {
    font-size: 40px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 16px 0;
    line-height: 1.2;
}

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

.product-meta {
    display: flex;
    gap: 24px;
    color: #64748b;
    font-size: 14px;
    margin-top: 12px;
}

.product-meta .meta-item strong {
    color: #1e293b;
    margin-right: 4px;
}

.product-header-image img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.product-content {
    background: #f9fafb;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 48px;
    line-height: 1.8;
    color: #475569;
}

/* ================================================
   PRODUCT IMAGES GALLERY
   ================================================ */

.product-images-gallery {
    margin-bottom: 48px;
}

.product-images-gallery h3 {
    font-size: 24px;
    color: #1e293b;
    margin-bottom: 24px;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.gallery-item {
    background: #f1f5f9;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

/* ================================================
   TECHNICAL SPECIFICATIONS
   ================================================ */

.product-specs-section {
    margin-bottom: 48px;
}

.specs-title {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
    margin-bottom: 12px;
}

.specs-title .highlight {
    color: #35ACB8;
}

.specs-accordion {
    margin-top: 32px;
}

.accordion-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 300ms ease;
}

.accordion-item.active {
    box-shadow: 0 4px 16px rgba(53, 172, 184, 0.15);
    border-color: rgba(53, 172, 184, 0.3);
}

.accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 200ms ease;
}

.accordion-header:hover {
    background: #f9fafb;
}

.accordion-header-content {
    flex: 1;
}

.accordion-badge {
    display: inline-block;
    background: rgba(53, 172, 184, 0.05);
    border: 1px solid rgba(53, 172, 184, 0.3);
    color: #35ACB8;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 9999px;
    margin-bottom: 12px;
}

.accordion-header-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: #0067AF;
    margin: 0 0 8px 0;
}

.accordion-header-content p {
    color: #64748b;
    font-size: 14px;
    margin: 0;
}

.accordion-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    transition: all 300ms ease;
}

.accordion-item.active .accordion-toggle {
    background: #35ACB8;
    border-color: #35ACB8;
    transform: rotate(180deg);
}

.accordion-item.active .accordion-toggle svg {
    stroke: white;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 500ms ease;
}

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

/* ================================================
   SPECIFICATIONS TABLE
   ================================================ */

.specs-table-container {
    padding: 0 24px 24px;
    overflow-x: auto;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.specs-table thead {
    background: #1e293b;
    color: white;
}

.specs-table thead th {
    padding: 16px 24px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.specs-table thead th:last-child {
    border-right: none;
}

.specs-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 200ms ease;
}

.specs-table tbody tr:hover {
    background: rgba(53, 172, 184, 0.05);
}

.specs-table tbody td {
    padding: 16px 24px;
    font-size: 14px;
    color: #475569;
    border-right: 1px solid #f1f5f9;
}

.specs-table tbody td:last-child {
    border-right: none;
}

.specs-table tbody td:first-child {
    font-weight: 700;
    color: #0067AF;
}

.spec-image {
    width: 80px;
    height: 40px;
    object-fit: contain;
}

/* ================================================
   RESPONSIVE ADJUSTMENTS
   ================================================ */

@media (max-width: 768px) {
    .product-category-archive,
    .single-product {
        padding: 32px 16px;
    }

    .category-title,
    .specs-title {
        font-size: 28px;
    }

    .specs-table-container {
        padding: 0 16px 16px;
    }

    .specs-table thead th,
    .specs-table tbody td {
        padding: 12px;
        font-size: 12px;
    }
}

/* ================================================
   ANIMATIONS
   ================================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeIn 500ms ease-out;
}
