/* Custom CSS for Ray Sensor Theme */

/* Additional utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.pt-0 { padding-top: 0; }
.pt-1 { padding-top: 0.5rem; }
.pt-2 { padding-top: 1rem; }
.pt-3 { padding-top: 1.5rem; }
.pt-4 { padding-top: 2rem; }
.pt-5 { padding-top: 3rem; }

.pb-0 { padding-bottom: 0; }
.pb-1 { padding-bottom: 0.5rem; }
.pb-2 { padding-bottom: 1rem; }
.pb-3 { padding-bottom: 1.5rem; }
.pb-4 { padding-bottom: 2rem; }
.pb-5 { padding-bottom: 3rem; }

/* Post Styles */
.post-item {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
}

.post-item:last-child {
    border-bottom: none;
}

.post-thumbnail {
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
}

.post-title {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.post-title a {
    color: var(--text-dark);
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.post-meta span {
    margin-right: 1rem;
}

.post-excerpt {
    color: var(--text-medium);
    margin-bottom: 1.5rem;
}

/* Single Post */
.single-post .post-title {
    font-size: 2.25rem;
}

.single-post .post-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.single-post .post-content h2,
.single-post .post-content h3,
.single-post .post-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.single-post .post-content p {
    margin-bottom: 1.5rem;
}

.single-post .post-content ul,
.single-post .post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.single-post .post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-medium);
}

/* Page Content */
.page-content {
    padding: 2rem 0;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.page-body {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Widget Area */
.widget-area {
    padding-left: 2rem;
}

.widget {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.widget li:last-child {
    border-bottom: none;
}

.widget a {
    color: var(--text-medium);
}

.widget a:hover {
    color: var(--primary-color);
}

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

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-medium);
    transition: var(--transition);
}

.pagination a:hover {
    background-color: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
}

.pagination .current {
    background-color: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
}

/* Comments */
.comments-area {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
}

.comment-meta {
    margin-bottom: 1rem;
}

.comment-author {
    font-weight: 600;
}

.comment-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

.comment-content {
    color: var(--text-medium);
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group {
    margin-bottom: 1.5rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

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

th {
    background-color: var(--bg-light);
    font-weight: 600;
    color: var(--text-dark);
}

tr:hover {
    background-color: var(--bg-light);
}

/* Alignment */
.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5rem;
}

.alignwide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* WordPress Core */
.wp-caption {
    max-width: 100%;
    margin-bottom: 1.5rem;
}

.wp-caption-text {
    font-size: 0.9rem;
    color: var(--text-light);
    text-align: center;
    margin-top: 0.5rem;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.gallery-item {
    margin: 0;
}

.gallery-icon img {
    border-radius: var(--border-radius);
}

/* Screen Reader Text */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--bg-light);
    clip: auto !important;
    clip-path: none;
    color: var(--text-dark);
    display: block;
    font-size: 1rem;
    height: auto;
    left: 5px;
    padding: 15px 23px 14px;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Mega Menu Styles */
.mega-menu {
    position: static;
}

.mega-menu-content {
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    padding: 2rem;
    background-color: var(--bg-white);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: var(--border-radius);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.mega-menu:hover .mega-menu-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu-column {
    flex: 1;
    min-width: 200px;
    padding: 0 1.5rem;
    border-right: 1px solid var(--border-color);
}

.mega-menu-column:last-child {
    border-right: none;
}

.mega-menu-title {
    display: block;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.mega-menu-title:hover {
    color: var(--primary-color);
}

.mega-menu-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-links li {
    margin-bottom: 0.5rem;
}

.mega-menu-links a {
    color: var(--text-medium);
    font-size: 0.95rem;
    transition: var(--transition);
}

.mega-menu-links a:hover {
    color: var(--primary-color);
    padding-left: 0.5rem;
}

/* ========================================
   Products Page - Modern Card Layout
   ======================================== */

/* Hero Section - Support both singular and plural class names */
.products-hero,
.product-hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    color: var(--bg-white);
    padding: 4rem 0;
}

.products-hero-grid,
.product-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.products-hero-badge,
.product-hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.products-hero-title,
.product-hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--bg-white);
}

.products-hero-subtitle,
.product-hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.products-hero-desc,
.product-hero-desc {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.products-hero-buttons,
.product-hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.products-hero-buttons .btn-primary,
.product-hero-buttons .btn-primary {
    background-color: #4a90d9;
    border-color: #4a90d9;
}

.products-hero-buttons .btn-outline,
.product-hero-buttons .btn-outline {
    background-color: transparent;
    border: 2px solid rgba(255,255,255,0.5);
    color: var(--bg-white);
}

.products-hero-buttons .btn-outline:hover,
.product-hero-buttons .btn-outline:hover {
    background-color: rgba(255,255,255,0.1);
    border-color: var(--bg-white);
}

.products-hero-image,
.product-hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-image-placeholder {
    background: rgba(255,255,255,0.1);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.product-image-placeholder img {
    max-width: 100%;
    height: auto;
    margin-bottom: 1rem;
}

.image-label {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Section Title Center */
.section-title-center {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2.5rem;
    color: var(--text-dark);
}

/* Product Models Section */
.product-models-section {
    padding: 4rem 0;
}

.product-models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.product-model-card {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.product-model-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.model-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.model-desc {
    font-size: 0.9rem;
    color: var(--text-medium);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.model-specs {
    list-style: none;
    padding: 0;
    margin: 0;
}

.model-specs li {
    padding: 0.4rem 0;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-color);
}

.model-specs li:last-child {
    border-bottom: none;
}

.spec-label {
    color: var(--primary-color);
    font-weight: 500;
}

.spec-value {
    color: var(--text-medium);
}

/* Technical Specifications Section */
.tech-specs-section {
    padding: 4rem 0;
}

.specs-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.specs-tab {
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-medium);
    transition: var(--transition);
}

.specs-tab:hover {
    background: var(--bg-light);
}

.specs-tab.active {
    background: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
}

.specs-content {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.specs-panel {
    display: none;
}

.specs-panel.active {
    display: block;
}

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

.specs-table thead {
    background: var(--primary-color);
    color: var(--bg-white);
}

.specs-table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 600;
}

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

.specs-table tbody tr:hover {
    background: var(--bg-light);
}

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

/* Applications Section */
.applications-section {
    padding: 4rem 0;
}

.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.application-card {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.application-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

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

.application-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.application-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 992px) {
    .products-hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .products-hero-title {
        font-size: 2rem;
    }
    
    .products-hero-subtitle {
        font-size: 1.25rem;
    }
    
    .product-models-grid {
        grid-template-columns: 1fr;
    }
    
    .specs-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .specs-tab {
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .products-hero {
        padding: 3rem 0;
    }
    
    .products-hero-title {
        font-size: 1.75rem;
    }
    
    .product-model-card,
    .application-card {
        padding: 1.25rem;
    }
    
    .specs-table th,
    .specs-table td {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* ========================================
   Products Page with Sidebar Layout
   ======================================== */
.products-with-sidebar {
    padding: 3rem 0;
}

.products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    align-items: start;
}

/* Sidebar Navigation */
.products-sidebar {
    position: sticky;
    top: 100px;
}

.products-nav {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.products-nav-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
    color: var(--text-dark);
}

.products-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.products-nav-list li {
    margin-bottom: 0.25rem;
}

.products-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: var(--text-medium);
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
}

.products-nav-link:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.products-nav-list li.active .products-nav-link {
    background-color: var(--primary-color);
    color: var(--bg-white);
}

.nav-icon {
    font-size: 1.25rem;
}

/* Sidebar Contact */
.sidebar-contact {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    text-align: center;
}

.sidebar-contact h4 {
    color: var(--bg-white);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.sidebar-contact p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.sidebar-contact .btn {
    width: 100%;
}

/* Products Content Area */
.products-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Product Detail Card */
.product-detail-card {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    scroll-margin-top: 100px;
}

.product-detail-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
}

.product-detail-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4/3;
}

.product-detail-intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-detail-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.product-detail-subtitle {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 1rem;
}

.product-detail-desc {
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* Product Detail Features */
.product-detail-features {
    padding: 2rem;
    border-top: 1px solid var(--border-color);
}

.product-detail-features h3 {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    color: var(--text-dark);
}

.features-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.75rem;
}

.feature-item-small {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.625rem 0;
    color: var(--text-medium);
}

.feature-check {
    color: var(--success-color);
    font-weight: bold;
    flex-shrink: 0;
}

/* Product Detail Types */
.product-detail-types {
    padding: 2rem;
    background-color: var(--bg-light);
    border-top: 1px solid var(--border-color);
}

.product-detail-types h3 {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    color: var(--text-dark);
}

.types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.type-card {
    background: var(--bg-white);
    padding: 1.25rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.type-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.type-card h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.type-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 992px) {
    .products-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .products-sidebar {
        position: static;
        order: -1;
    }
    
    .products-nav {
        padding: 1rem;
    }
    
    .products-nav-list {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .products-nav-list li {
        margin-bottom: 0;
    }
    
    .products-nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .nav-icon {
        display: none;
    }
    
    .product-detail-header {
        grid-template-columns: 1fr;
    }
    
    .product-detail-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .features-list-grid {
        grid-template-columns: 1fr;
    }
    
    .types-grid {
        grid-template-columns: 1fr;
    }
    
    .product-detail-header,
    .product-detail-features,
    .product-detail-types {
        padding: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .sidebar,
    .comments-area,
    .post-navigation,
    .pagination {
        display: none;
    }
    
    .site-main {
        width: 100%;
        max-width: none;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
}
