/* SRL Products Manager Frontend CSS */

/* --- Layout --- */
.srl-single-container,
.srl-products-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: inherit;
    /* Inherit theme font */
    box-sizing: border-box;
}

/* --- Search & Grid --- */
.srl-search-bar {
    margin-bottom: 30px;
    display: flex;
    justify-content: flex-end;
}

/* Active Search Filter Indicator */
.srl-active-filter {
    margin-bottom: 20px;
    padding: 12px 20px;
    background: #F9F9F9;
    border-left: 4px solid #1A1A1A;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.srl-filter-label {
    font-size: 1.2rem;
    color: #1A1A1A;
    flex: 1;
}

.srl-filter-label strong {
    color: #1A1A1A;
}

.srl-clear-filter {
    background: #1A1A1A;
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.srl-search-form {
    display: flex;
    gap: 10px;
}

.srl-products-search input {
    background-color: #F3F3F5;
    border: none;
    border-radius: 10px;
    height: 40px;
    padding: 0 10px;
    min-width: 250px;
    outline: none;
}

.srl-products-search input::placeholder {
    font-size: 1.2rem;
    font-weight: 400;
}

.srl-products-search input::-webkit-input-placeholder {
    font-size: 1.2rem;
    font-weight: 400;
}

.srl-products-search input:-ms-input-placeholder {
    font-size: 1.2rem;
    font-weight: 400;
}

.srl-products-search input::placeholder {
    font-size: 1.2rem;
    font-weight: 400;
}

.srl-products-search button {
    padding: 0 14px;
    border-radius: 10px;
    border: none;
    background: #E6A819;
    font-size: 1.2rem;
    color: #1A1A1A;
    cursor: pointer;
}

/* Grid Layout */
.srl-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2 Columns Desktop */
    gap: 30px;
    margin-bottom: 40px;
    overflow: visible;
    /* Ensure shadow is not clipped */
}

/* --- Product Card --- */
/* --- Product Card --- */
.srl-product-card-wrapper {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    /* default shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
    overflow: visible;
    /* allow shadow to render outside */
    height: 100%;
}

.srl-product-card-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    /* stronger on hover */
}

.srl-product-card {
    background: #fff;
    border: 0.8px solid #E5E7EB;
    /* Keep border if needed, or move to wrapper */
    border-radius: 8px;
    overflow: hidden;
    /* transition: transform 0.3s ease, box-shadow 0.3s ease; */
    /* Moved to wrapper */
    display: flex;
    flex-direction: row;
    /* Horizontal split */
    align-items: stretch;
    height: 100%;
}

/* 
.srl-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
} 
*/

/* Left Section (Image) */
.srl-card-image-wrapper {
    flex: 0 0 50%;
    width: 50%;
    position: relative;
    overflow: hidden;
    display: flex;
    /* Ensure it behaves as a flex item container */
    height: 100%;
    /* Fill parent height */
}

.srl-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Right Section (Content) */
.srl-card-content {
    flex: 0 0 50%;
    width: 50%;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-sizing: border-box;
}

.srl-card-title {
    margin: 0 0 12px 0;
    font-size: 1.8rem;
    color: #1A1A1A;
    line-height: 1.3;
}

.srl-card-excerpt {
    margin-bottom: 10px;
    color: #555;
    font-size: 1.3rem;
    line-height: 1.6;
    flex-grow: 1;
    /* Pushes content down if needed, but spacing is consistent */
}

/* --- Chips --- */
.srl-card-apps {
    margin-bottom: 24px;
}

.srl-apps-label {
    display: block;
    width: 100%;
    font-size: 1.2rem;
    font-weight: 500;
    color: #1A1A1A;
    margin-bottom: 8px;
}

.srl-chips-wrapper-card {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.srl-chip {
    background: #FFF3EB;
    color: #FA7319;
    padding: 3px 10px;
    border-radius: 50px;
    /* Pill style */
    font-size: 1.1rem;
    display: inline-block;
    line-height: 1.4;
}

/* --- Buttons --- */
.srl-view-details,
.srl-view-details:visited,
.srl-view-details:active,
.srl-view-details:focus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #E6A819;
    color: #1A1A1A !important;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 400;
    transition: background 0.2s ease;
    border: none;
    cursor: pointer;
    align-self: flex-start;
    /* Align left */
}

.srl-view-details:hover {
    background: #d49a15;
    color: #1A1A1A !important;
}

.srl-view-details::after {
    content: '>';
    color: #1A1A1A;
    font-weight: normal;
    margin-left: 8px;
    font-size: 1em;
    line-height: 1;
}

/* --- Pagination --- */
.srl-pagination {
    text-align: center;
    margin-top: 40px;
}

.srl-pagination .page-numbers {
    display: inline-block;
    padding: 8px 8px;
    margin: 0 4px;
    background: #fff;
    border: 1px solid #ddd;
    color: #1A1A1A;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1rem;
}

.srl-pagination .page-numbers.current {
    background: #E6A819;
    color: #fff;
    border-color: #E6A819;
}

/* --- Single Product Page (Keep existing styles mostly) --- */
.srl-single-header {
    margin-bottom: 30px;
}

.srl-title {
    font-size: 2.5rem;
    color: #1A1A1A;
    margin: 0;
}

.srl-single-banner {
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
}

.srl-single-banner img {
    width: 100%;
    height: auto;
    display: block;
}

.srl-single-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
}

.srl-description {
    margin-bottom: 40px;
    line-height: 1.8;
}

.srl-description h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.srl-features-list {
    list-style: none;
    padding: 0;
}

.srl-features-list li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 10px;
}

.srl-features-list li::before {
    content: "✔";
    color: #FA7319;
    position: absolute;
    left: 0;
    top: 0;
}

.srl-side-col>div {
    margin-bottom: 40px;
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.srl-side-col h3 {
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #E6A819;
    padding-bottom: 10px;
    display: inline-block;
}

.srl-specs-table {
    width: 100%;
    border-collapse: collapse;
}

.srl-specs-table th,
.srl-specs-table td {
    border-bottom: 1px solid #eee;
    padding: 10px 0;
    text-align: left;
}

.srl-specs-table th {
    color: #555;
    font-weight: 600;
    width: 40%;
}

.srl-download-btn {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    display: inline-block;
    background: #E6A819;
    color: #1A1A1A;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
}

.srl-chips-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* --- Responsive Media Queries --- */

/* Tablet (max-width: 1024px) -> 1 Card per row, Stack content vertically */
@media (max-width: 1024px) {
    .srl-products-grid {
        grid-template-columns: 1fr;
        /* 1 Column */
    }

    .srl-product-card {
        flex-direction: column;
    }

    .srl-card-image-wrapper,
    .srl-card-content {
        flex: auto;
        width: 100%;
    }

    .srl-card-image-wrapper {
        height: 250px;
        /* Fixed height for tablet/mobile image */
    }
}

/* Mobile (max-width: 768px) -> Stack card vertically (Already handled by 1024px, just need single grid) */
@media (max-width: 768px) {
    .srl-single-content-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Hero Header Section --- */
.srl-hero-header {
    position: relative;
    width: 100%;
    min-height: 40vh;
    /* 40% of viewport height for desktop */
    min-height: 350px;
    /* Minimum fallback */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    margin-bottom: 40px;
    border-radius: 8px;
    /* Optional rounded corners if boxed */
    overflow: hidden;
}

.srl-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
}

.srl-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 30px;
    box-sizing: border-box;
    text-align: center;
    /* Centered content */
}

.srl-hero-title {
    color: #ffffff;
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Ensure existing single container respects new layout */
.srl-product-detail-wrapper .srl-single-container {
    padding-top: 0;
    /* Remove top padding if present */
}

/* Responsive Hero */
@media (max-width: 768px) {
    .srl-hero-header {
        min-height: 20vh;
        min-height: 180px;
        margin-bottom: 30px;
    }

    .srl-hero-title {
        font-size: 1.8rem;
    }

    .srl-hero-content {
        padding: 15px 20px;
    }
}

/* --- Single Column Layout Adjustments --- */
.srl-single-column-layout .srl-single-content-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Remove border radius for full width hero if it touches edges */
.srl-hero-header {
    border-radius: 0;
}

.srl-section {
    margin-bottom: 50px;
}

.srl-section h2,
.srl-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #1A1A1A;
}

.srl-section h3 {
    font-size: 1.8rem;
    font-weight: 700;
}

/* Title highlighting */
.srl-highlight {
    color: #E6A819;
}

/* Description */
.srl-description h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.srl-description {
    line-height: 1.6;
    color: #555;
}

/* Specs Section */
.srl-specs-container {
    background: #FAFAFA;
    /* Light grey container */
    padding: 20px;
    border-radius: 8px;
}

.srl-specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.srl-specs-table th {
    text-align: left;
    padding: 15px 10px;
    /* Increased padding */
    border-bottom: 2px solid #E6A819;
    /* Orange underline */
    color: #333;
    font-weight: 700;
    font-size: 1.1rem;
    width: 30%;
}

.srl-specs-table td {
    padding: 15px 10px;
    /* Increased padding */
    border-bottom: 1px solid #EAEAEA;
    color: #555;
    font-size: 1.1rem;
    vertical-align: middle;
}

.srl-specs-table tr:last-child td {
    border-bottom: none;
}

/* Download Button inside Specs */
.srl-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Center text/icon */
    background: #E6A819;
    color: #1A1A1A;
    padding: 10px 30px;
    /* Bit more padding */
    border-radius: 6px;
    text-decoration: none;
    font-size: 1.1rem;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
    width: auto;
    /* Desktop: Auto width */
    max-width: 100%;
}

.srl-download-btn:visited,
.srl-download-btn:active,
.srl-download-btn:focus {
    color: #1A1A1A;
}

.srl-download-btn:hover {
    background: #d49a15;
    color: #1A1A1A;
    /* Ensure color stays same */
}

@media (max-width: 768px) {
    .srl-download-btn {
        width: auto;
        /* Mobile: Reduced width (auto), centered */
        display: inline-flex;
        margin: 0 auto;
        /* Center it */
    }

    .srl-specs-download {
        text-align: center;
        /* Helper for container centering */
    }
}

/* Applications Section - Full Width Wrapper */
.srl-applications-section-full-width {
    background: #F9F9F9;
    width: 100%;
    padding: 60px 0;
    /* Add vertical padding for the section */
    margin-bottom: 50px;
}

/* Inner Applications Section (Header + Grid) */
.srl-applications-section {
    /* Background moved to wrapper */
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.srl-applications-section-full-width .srl-section {
    margin-bottom: 0;
}

.srl-apps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.srl-app-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Align icon left like screenshot */
    justify-content: flex-start;
    text-align: left;
    min-height: 80px;
    color: #1A1A1A;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.srl-app-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.srl-app-icon {
    margin-bottom: 10px;
    color: #FA7319;
    display: flex;
    align-items: center;
}

.srl-app-name {
    font-size: 1.1rem;
    line-height: 1.3;
}

/* Response: 2 items per row on mobile for Apps */
@media (max-width: 768px) {
    .srl-apps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Response: 2 items per row on mobile for Features (was 1) */
@media (max-width: 768px) {
    .srl-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Very small screens: 1 column */
@media (max-width: 400px) {

    .srl-apps-grid,
    .srl-features-grid {
        grid-template-columns: 1fr;
    }
}

/* Key Features Section */
.srl-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.srl-feature-item {
    background: #FAFAFA;
    /* Light grey item background */
    padding: 15px 20px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    color: #333;
    font-size: 1.1rem;
}

.srl-feature-bullet {
    color: #FA7319;
    /* Orange bullet */
    font-size: 2.0rem;
    line-height: 0;
    margin-right: 12px;
    position: relative;
    top: -1px;
}

/* Cleanup */
.srl-single-column-layout .srl-single-content-grid,
.srl-single-column-layout .srl-side-col,
.srl-single-column-layout .srl-main-col {
    display: block;
    width: auto;
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
}

/* --- Random Products Shortcode --- */
.srl-random-products-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.srl-random-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.srl-random-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.09) !important;
}

.srl-random-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.srl-random-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.srl-random-card-no-image {
    background: #e5e5e5;
    color: #999;
    font-size: 0.9rem;
}

.srl-random-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.srl-random-card-title {
    margin: 0 0 10px 0;
    font-size: 1.6rem;
    color: #1A1A1A;
    line-height: 1.3;
    /* Limit to 2 lines for equal height */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.6rem;
    /* 2 lines minimum */
}

.srl-random-card-description {
    margin: 0;
    font-size: 1.3rem;
    color: #666;
    line-height: 1.5;
    flex-grow: 1;
    /* Limit to 3 lines for equal height */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.srl-no-products {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    padding: 40px 20px;
}

/* Random Products Pagination */
.srl-random-pagination {
    text-align: center;
    margin-top: 40px;
}

.srl-random-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    background: #fff;
    border: 1px solid #ddd;
    color: #1A1A1A;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.srl-random-pagination .page-numbers:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.srl-random-pagination .page-numbers.current {
    background: #E6A819;
    color: #fff;
    border-color: #E6A819;
}

.srl-random-pagination .page-numbers.dots {
    border: none;
    background: transparent;
}


/* Tablet: 2 cards per row */
@media (max-width: 1024px) {
    .srl-random-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: 2 cards per row */
@media (max-width: 768px) {
    .srl-random-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .srl-random-card-image {
        height: 150px;
    }

    .srl-random-card-content {
        padding: 15px;
    }

    .srl-random-card-title {
        font-size: 1.1rem;
        min-height: 2.2rem;
    }

    .srl-random-card-description {
        font-size: 0.95rem;
    }
}

/* Very small screens: Still 2 cards but smaller */
@media (max-width: 480px) {
    .srl-random-products-grid {
        gap: 10px;
    }

    .srl-random-card-image {
        height: 120px;
    }

    .srl-random-card-content {
        padding: 12px;
    }

    .srl-random-card-title {
        font-size: 1rem;
    }

    .srl-random-card-description {
        font-size: 0.9rem;
        -webkit-line-clamp: 2;
        /* Reduce to 2 lines on very small screens */
        line-clamp: 2;
    }
}