/* Product Template System Styles */

/* Product count display */
.product-count-info {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.product-count-number,
.count-number {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
}

.total-products-count {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.total-products-count .count-number {
    color: white;
    font-size: 1.5rem;
}

.section-product-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Category count in cards */
.category-card .category-count {
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 600;
}

.category-card .category-count span {
    color: var(--text);
}

/* Product detail badge container */
.product-detail-badge-container {
    margin-bottom: 1rem;
}

.product-detail-badge-container .product-badge {
    display: inline-block;
}

/* Product specs container */
#product-specs-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#product-specs-container .spec-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

#product-specs-container .spec-label {
    font-weight: 600;
    color: var(--text-secondary);
}

#product-specs-container .spec-value {
    color: var(--text);
}

/* Product detail grid */
.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

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

.product-detail-image {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
}

.product-detail-image img {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    display: block;
}

.product-detail-info {
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
}

.product-detail-specs h2 {
    margin-bottom: 1.5rem;
    color: var(--text);
}

/* Related products section */
.related-products {
    padding: 4rem 0;
}

/* Animation for count updates */
@keyframes countUpdate {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.product-count-number.updating,
.count-number.updating {
    animation: countUpdate 0.3s ease-in-out;
}

/* Product category page adjustments */
.category-content .page-header {
    padding-bottom: 2rem;
}

.category-content .section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

@media (max-width: 768px) {
    .category-content .section-title {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ==============================================
   Product Detail Page Styles - Mobile Optimized
   ============================================== */

/* Product detail header */
.product-detail-header {
    padding: 1.5rem 0;
    background: var(--bg-secondary);
}

.product-detail-header .breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.product-detail-header .breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.product-detail-header .breadcrumb a:hover {
    color: var(--accent);
}

/* Product hero section */
.product-hero {
    padding: 3rem 0;
    background: white;
}

.product-hero-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 992px) {
    .product-hero-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Product images container */
.product-images {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Main product image */
.main-image {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.main-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    max-width: 100%;
    max-height: 500px;
    border-radius: 0.5rem;
}

/* Thumbnail images */
.thumbnail-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.thumbnail-images img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 4/3;
    border-radius: 0.5rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.thumbnail-images img:hover {
    border-color: var(--accent);
    transform: scale(1.02);
}

.thumbnail-images img.active {
    border-color: var(--accent);
}

/* Product info */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-tags {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tag {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.tag-primary {
    background: var(--accent);
    color: white;
}

.tag-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.tag-cert {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.product-model {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.product-subtitle {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.product-rating .stars {
    color: var(--warning);
    font-size: 1.125rem;
    letter-spacing: 0.125rem;
}

.product-rating span {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.product-highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 1rem;
}

.highlight-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.highlight-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.highlight-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.product-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.product-actions .btn {
    flex: 1;
    min-width: 150px;
    justify-content: center;
}

/* Product overview section */
.product-overview {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.overview-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.overview-content p {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

/* Product specs section */
.product-specs {
    padding: 4rem 0;
    background: white;
}

.specs-wrapper {
    overflow-x: auto;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table th,
.specs-table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.specs-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

.specs-table td {
    color: var(--text-secondary);
}

/* Product features section */
.product-features {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* Product applications section */
.product-applications {
    padding: 4rem 0;
    background: white;
}

.applications-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.application-card {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.application-card img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.application-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1.5rem 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    color: white;
}

.application-overlay h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.application-overlay p {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Product FAQ section */
.product-faq {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background var(--transition-fast);
}

.faq-question:hover {
    background: var(--bg-secondary);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform var(--transition-fast);
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.75;
}

/* Product inquiry section */
.product-inquiry {
    padding: 4rem 0;
    background: white;
}

.inquiry-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 2.5rem;
    background: var(--bg-secondary);
    border-radius: 1rem;
}

.inquiry-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-group input,
.form-group textarea {
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ==============================================
   Mobile Responsive Styles
   ============================================== */

@media (max-width: 768px) {
    /* Product hero adjustments */
    .product-hero {
        padding: 2rem 0;
    }
    
    .product-hero-wrapper {
        gap: 1.5rem;
    }
    
    /* Product images mobile */
    .main-image {
        padding: 1rem;
    }
    
    .main-image img {
        max-height: 400px;
    }
    
    .thumbnail-images {
        gap: 0.75rem;
    }
    
    /* Product info mobile */
    .product-model {
        font-size: 2rem;
    }
    
    .product-subtitle {
        font-size: 1.125rem;
    }
    
    .product-highlights {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        padding: 1rem;
    }
    
    .highlight-value {
        font-size: 1.25rem;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .product-actions .btn {
        width: 100%;
    }
    
    /* Section padding mobile */
    .product-overview,
    .product-specs,
    .product-features,
    .product-applications,
    .product-faq,
    .product-inquiry {
        padding: 3rem 0;
    }
    
    /* Grids mobile */
    .features-grid,
    .applications-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Form mobile */
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .inquiry-form-wrapper {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    /* Smaller screens adjustments */
    .product-model {
        font-size: 1.75rem;
    }
    
    .product-subtitle {
        font-size: 1rem;
    }
    
    .product-highlights {
        grid-template-columns: 1fr 1fr 1fr;
    }
    
    .thumbnail-images {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* General responsive image fix */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Application card image fix */
.application-card img {
    width: 100%;
    height: auto;
    display: block;
}

/* Product card image fix */
.product-card img {
    width: 100%;
    height: auto;
    display: block;
}

/* Feature card adjustments */
.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.feature-card .feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.7;
}

/* Section title */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-align: center;
}

/* Downloads Page Styles */
.download-list {
    list-style: none;
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.download-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
    flex-wrap: wrap;
    gap: 1rem;
}

.download-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--secondary-light);
}

.download-name {
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    min-width: 200px;
}

.download-size {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    white-space: nowrap;
}

.btn-small {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .download-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .download-name {
        min-width: 100%;
    }
    
    .btn-small {
        width: 100%;
    }
}

/* Download notification */
.download-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    background: var(--primary);
    color: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    z-index: var(--z-modal);
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    padding: 1.5rem;
    border-top: 3px solid var(--primary);
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-banner-text {
    flex: 1;
    min-width: 300px;
}

.cookie-banner-text h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.cookie-banner-text p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.cookie-banner-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    text-decoration: none;
    display: inline-block;
}

.cookie-btn-accept {
    background: var(--primary);
    color: white;
}

.cookie-btn-accept:hover {
    background: var(--primary-dark, #0051a8);
    transform: translateY(-1px);
}

.cookie-btn-reject {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.cookie-btn-reject:hover {
    background: var(--border-color);
}

.cookie-btn-settings {
    background: transparent;
    color: var(--primary);
    text-decoration: underline;
}

.cookie-btn-settings:hover {
    color: var(--primary-dark, #0051a8);
}

@media (max-width: 768px) {
    .cookie-banner {
        padding: 1rem;
    }
    
    .cookie-banner-content {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .cookie-banner-text {
        min-width: 100%;
    }
    
    .cookie-banner-buttons {
        width: 100%;
        justify-content: flex-start;
    }
    
    .cookie-btn {
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
    }
}
