/**
 * All Styles for DataScience Product Grid
 */

/* 1. The Grid Container */
/* Creates a responsive grid that fits as many columns as possible */
.dspg-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Minimum width 280px */
    gap: 25px; /* Space between cards */
    margin: 20px 0;
}

/* 2. The Product Card */
.dspg-product-card {
    background-color: #ffffff;
    border: 1px solid #e2e2e2;
    border-radius: 10px; /* Rounded corners */
    padding: 20px;
    text-align: center;
    overflow: hidden;

    /* Animation Settings */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* 3. The Hover Effect (Lift Up) */
.dspg-product-card:hover {
    transform: translateY(-7px); /* Moves card up */
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12); /* Soft shadow */
    border-color: #d1d1d1;
}

/* 4. Image Styling */
.dspg-card-image {
    margin-bottom: 15px;
    height: 200px; /* Fixed height for consistency */
    display: flex;
    align-items: center;
    justify-content: center;
}

.dspg-card-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* Ensures image doesn't get distorted */
}

/* Placeholder when no image exists */
.dspg-no-image {
    width: 100%;
    height: 100%;
    background: #f0f0f1;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    border-radius: 4px;
}

/* 5. Title & Details */
.dspg-card-details h3 {
    font-size: 1.25em;
    margin: 0 0 10px;
    color: #2c3338;
    line-height: 1.3;
}

/* 6. Specifications Box */
.dspg-specs {
    background-color: #f7f7f7;
    border: 1px solid #eee;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 6px;
    font-size: 0.9em;
    color: #50575e;
    text-align: left; /* Aligns text inside the box */
}

.dspg-specs span {
    display: block; /* Puts each spec on a new line */
    margin-bottom: 4px;
}

/* 7. Button Styling */
.dspg-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0073aa; /* WordPress Blue */
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.dspg-button:hover {
    background-color: #005177; /* Darker Blue */
    text-decoration: none;
}

/* Search Bar Container */
.dspg-search-wrapper {
    margin-bottom: 30px;
    text-align: center;
}

/* The Input Field */
#dspg-search-input {
    flex: 1; /* Takes available space */
    min-width: 200px;
    max-width: 400px;
    padding: 12px 20px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 50px;
    outline: none;
}

/* Focus State (When typing) */
#dspg-search-input:focus {
    background-color: #fff;
    border-color: #0073aa;
    box-shadow: 0 0 8px rgba(0, 115, 170, 0.2);
}
.dspg-price {
    font-size: 1.2em;
    font-weight: bold;
    color: #2c3338;
    margin: 10px 0 15px 0;
    padding-top: 10px;
    border-top: 1px dashed #ddd; /* Separator line */
}

/* Top Bar Layout */
.dspg-top-bar {
    display: flex;
    justify-content: center;
    gap: 15px; /* Space between input and select */
    margin-bottom: 30px;
    flex-wrap: wrap; /* Wraps on mobile */
}
/* Sort Dropdown (New) */
#dspg-sort-select {
    padding: 12px 20px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 50px;
    background-color: #f9f9f9;
    cursor: pointer;
    outline: none;
}

#dspg-sort-select:hover {
    background-color: #fff;
    border-color: #bbb;
}
/* Style specifically for the "+ VAT" text */
.dspg-vat-text {
    font-size: 0.6em;       /* 60% the size of the main price */
    font-weight: normal;    /* Make it not bold */
    color: #777;            /* Slightly lighter gray */
    vertical-align: top;    /* Aligns it slightly higher (superscript style) */
    margin-left: 3px;
}


/* --- Single Product Page Styles --- */

/* Main Container (Centers content) */
.dspg-single-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Flexbox Layout (Two Columns) */
.dspg-product-layout {
    display: flex;
    gap: 50px;
    flex-wrap: wrap; /* Stacks on mobile */
}

/* Left Column */
.dspg-col-image {
    flex: 1;
    min-width: 300px;
}

.dspg-col-image img {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #eee;
}

/* Right Column */
.dspg-col-info {
    flex: 1;
    min-width: 300px;
}

/* Typography */
.dspg-single-title {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #333;
}

.dspg-single-price {
    font-size: 2em;
    color: #0073aa;
    font-weight: bold;
    margin-bottom: 20px;
}

.dspg-description {
    font-size: 1.1em;
    line-height: 1.6;
    color: #555;
    margin-bottom: 30px;
}

/* Specs Table Look */
.dspg-specs-box {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.dspg-spec-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e5e5e5;
}

.dspg-spec-row:last-child {
    border-bottom: none;
}

.dspg-spec-label {
    font-weight: bold;
    color: #444;
}

/* Large Button */
.dspg-large-btn {
    padding: 15px 30px;
    font-size: 1.2em;
    width: 100%;
    text-align: center;
}

/* --- Installment Plan Card --- */
.dspg-plan-card {
    background: #f0fdf4; /* Very light green background */
    border: 2px solid #22c55e; /* Green Border */
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.dspg-plan-header {
    font-size: 1.1em;
    font-weight: bold;
    color: #15803d; /* Dark Green */
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dspg-plan-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 1em;
    color: #444;
}

/* Make the Monthly row stand out */
.dspg-plan-row.dspg-highlight {
    background: #fff;
    padding: 10px;
    border-radius: 6px;
    border: 1px dashed #22c55e;
    margin-top: 10px;
}

.dspg-plan-row.dspg-highlight .dspg-plan-value {
    font-size: 1.4em; /* Big number */
    font-weight: 800;
    color: #15803d;
}

.dspg-plan-btn {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 15px;
    background-color: #15803d; /* Green Button */
    padding: 12px;
    font-size: 1.1em;
    transition: background 0.2s;
}

.dspg-plan-btn:hover {
    background-color: #14532d; /* Darker Green on hover */
}
/* Subtitle for "Companies & Employees" */
.dspg-plan-sub {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
    font-style: italic;
}

/* Tiny VAT text inside the card */
.dspg-vat-small {
    font-size: 0.6em;
    font-weight: normal;
    color: #888;
    vertical-align: middle;
}

/* Button Wrapper */
.dspg-action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Call Button (Green) */
.dspg-call-btn {
    flex: 1;
    background-color: #15803d;
    text-align: center;
}
.dspg-call-btn:hover {
    background-color: #14532d;
}

/* Visit Button (Blue/Outline) */
.dspg-visit-btn {
    flex: 1;
    background-color: #fff;
    color: #15803d !important;
    border: 2px solid #15803d;
    text-align: center;
}
.dspg-visit-btn:hover {
    background-color: #f0fdf4;
}

/* --- Mini Installment Badge (Grid) --- */
.dspg-grid-installment {
    background-color: #f0fdf4; /* Light Green bg */
    border: 1px solid #bbf7d0;
    color: #15803d; /* Dark Green text */
    padding: 6px 10px;
    border-radius: 20px; /* Pill shape */
    font-size: 0.9em;
    margin-bottom: 15px; /* Space before button */
    display: inline-block; /* Fits text size */
}

.dspg-gi-label {
    font-size: 0.85em;
    opacity: 0.9;
}

/* Optional: Make the button fill width on grid to look uniform */
.dspg-product-card .dspg-button {
    width: 100%; 
    box-sizing: border-box;
}

/* Gallery Row */
.dspg-gallery-row {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center; /* Center them */
}

/* Individual Thumbnail */
.dspg-gallery-thumb {
    width: 60px;
    height: 60px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    opacity: 0.7;
    transition: all 0.2s;
}

.dspg-gallery-thumb:hover {
    opacity: 1;
    border-color: #0073aa; /* Blue border on hover */
}

.dspg-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Crop to square */
}

/* Fix for the Eligibility Button */
.dspg-check-btn {
    background-color: #fff !important;  /* White Background */
    color: #0073aa !important;          /* Blue Text */
    border: 2px solid #0073aa !important;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s ease;
}

.dspg-check-btn:hover {
    background-color: #0073aa !important; /* Blue Background on Hover */
    color: #fff !important;               /* White Text on Hover */
}

/* Fix for the Save Button inside the modal */
.dspg-btn-save {
    background-color: #28a745 !important;
    color: #fff !important;
    border: none;
    cursor: pointer;
}
.dspg-btn-save:disabled {
    background-color: #ccc !important;
    cursor: not-allowed;
}