/* Shop Page Product Wrapper Styles */
.products .product {
    position: relative;
    overflow: hidden;
}

/* General Button Styles */
.jwlear-tryon-button {
    padding: 12px 25px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border: none;
    cursor: pointer;
    box-sizing: border-box;
    display: inline-block;
    width: auto;
    min-width: 180px;
}

.jwlear-tryon-button:hover {
    transform: scale(1.02);
    text-decoration: none;
}

/* Shop page specific button positioning and visibility */
.jwlear-shop-button-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 5;
}

.products .product:hover .jwlear-shop-button-wrapper {
    opacity: 1;
    visibility: visible;
}

.jwlear-shop-button {
    background: black;
    color: white;
    z-index: 10;
}

/* Single Product Page Button Specific Styling */
.jwlear-single-button {
    margin-top: 15px;
    margin-bottom: 20px;
    background-color: black !important;
    color: white !important;
}

.jwlear-single-button:hover {
    background-color: #333 !important;
    color: white !important;
    transform: scale(1.02);
}

/* Frontend Notice */
.jwlear-front-notice {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 99999;
    max-width: 360px;
    padding: 14px 18px;
    border-radius: 12px;
    background: #111827;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 16px 40px rgba(0,0,0,0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s ease;
}

.jwlear-front-notice.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* General Body and Container Styles */
body {
    font-family: 'Poppins', sans-serif;
    background: #f8f9fa;
    margin: 0;
    padding: 0;
    color: #343a40;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Tabs Styling */
.tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 20px 0;
    background-color: #ffffff;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-radius: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-button {
    background: #f0f2f5;
    color: #495057;
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-button:hover {
    background: #e2e6ea;
    color: #212529;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.tab-button.active {
    background: #007bff;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    transform: translateY(-2px);
}

/* Section General Styles */
.section {
    display: none;
    padding: 40px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    margin-top: 20px;
}

.section.section-active {
    display: block;
}

.section h1,
.section h2 {
    color: #212529;
    margin-bottom: 25px;
    font-weight: 600;
    font-size: 2em;
    text-align: center;
}

/* Upload Section */
.upload-section {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
    align-items: flex-start;
}

.upload-video,
.upload-text {
    flex: 1;
    min-width: 300px;
}

.upload-video iframe {
    width: 100%;
    max-width: 1920px;
    height: 315px;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    display: block;
    margin: 0 auto;
    background: #f2f2f2;
}

.upload-text ul {
    padding-left: 25px;
    line-height: 1.8;
    font-size: 16px;
    color: #495057;
    list-style: disc;
}

.upload-text li {
    margin-bottom: 12px;
}

.upload-text a {
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.go-dash-btn {
    margin-top: 30px;
    background: black;
    padding: 15px 30px;
    color: white;
    border-radius: 40px;
    font-weight: 600;
    font-size: 17px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    border: none;
    cursor: pointer;
}

/* API Integration Section */
.api-modern h2 {
    margin-bottom: 40px;
}

.method-box {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.method-box:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.method-box h3 {
    color: #007bff;
    margin-top: 0;
    margin-bottom: 25px;
    font-weight: 600;
    font-size: 1.5em;
}

.step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 15px;
}

.step-number {
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    flex-shrink: 0;
    font-size: 0.9em;
}

.step p {
    margin: 0;
    font-size: 16px;
    color: #495057;
}

/* Pricing Section */
.pricing-section h2 {
    margin-bottom: 40px;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    justify-content: center;
}

.card {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    padding: 35px 25px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.card h3 {
    color: #007bff;
    font-size: 1.8em;
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 700;
}

.card .price {
    font-size: 2.5em;
    font-weight: 700;
    color: #212529;
    margin-bottom: 25px;
}

.card ul {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
    flex-grow: 1;
}

.card li {
    font-size: 16px;
    color: #495057;
    margin-bottom: 12px;
    position: relative;
    padding-left: 25px;
    text-align: left;
}

.card li::before {
    content: "✔";
    color: #28a745;
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 700;
}

/* Contact Section */
.contact-section {
    padding: 60px 20px;
    text-align: center;
    background: #f9fafb;
    border-radius: 18px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.contact-section h2 {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #111827;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.contact-card {
    display: inline-block;
    background: white;
    padding: 30px 40px;
    border-radius: 16px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
}

.contact-card p {
    font-size: 16px;
    color: #374151;
    margin-bottom: 20px;
}

.contact-card a {
    color: #2563eb;
    text-decoration: none;
}

.contact-card strong {
    color: #111827;
}

.contact-btn {
    display: inline-block;
    margin-top: 10px;
    background-color: #000;
    color: #fff !important;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.contact-btn:hover {
    background-color: #1f2937;
}

/* Footer Styling */
.footer {
    text-align: center;
    padding: 25px 20px;
    margin-top: 50px;
    color: #6c757d;
    font-size: 14px;
    background-color: #ffffff;
    border-top: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.03);
}

.footer strong {
    color: #343a40;
}

/* Product Sync */
.jwlear-sync-header {
    text-align: center;
    margin-bottom: 24px;
}

.jwlear-sync-header p {
    margin: 0;
    color: #6b7280;
    font-size: 15px;
}

.jwlear-sync-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.jwlear-stat-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.jwlear-stat-number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #111827;
}

.jwlear-stat-label {
    display: block;
    margin-top: 6px;
    color: #6b7280;
    font-size: 14px;
}

.jwlear-sync-toolbar,
.jwlear-sync-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.jwlear-sync-toolbar {
    margin-bottom: 20px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
}

.jwlear-toolbar-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.jwlear-search-input,
.jwlear-filter-select,
.jwlear-ar-link-input,
.jwlear-settings-field input[type="text"],
.jwlear-settings-field textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    min-height: 42px;
    padding: 10px 14px;
    box-shadow: none;
    outline: none;
}

.jwlear-settings-field textarea {
    min-height: 160px;
    resize: vertical;
}

.jwlear-search-input {
    min-width: 280px;
}

.jwlear-filter-select {
    min-width: 180px;
}

.jwlear-fetch-button {
    min-height: 42px;
}

.jwlear-sync-actions {
    margin-bottom: 18px;
}

.bottom-actions {
    margin-top: 18px;
    margin-bottom: 0;
}

.jwlear-sync-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.jwlear-sync-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.jwlear-sync-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
}

.jwlear-sync-card-top {
    display: grid;
    grid-template-columns: 82px 1fr auto;
    gap: 16px;
    align-items: start;
}

.jwlear-product-thumb {
    width: 82px;
    height: 82px;
    border-radius: 14px;
    overflow: hidden;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jwlear-product-thumb img,
.jwlear-product-thumb .jwlear-product-thumb-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.jwlear-product-thumb-placeholder {
    font-size: 12px;
    color: #6b7280;
    text-align: center;
    padding: 8px;
}

.jwlear-product-meta h3 {
    margin: 0 0 6px;
    font-size: 18px;
    line-height: 1.35;
}

.jwlear-product-meta h3 a {
    color: #111827;
    text-decoration: none;
}

.jwlear-product-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    color: #6b7280;
    font-size: 13px;
}

.jwlear-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.jwlear-status-enabled {
    background: #dcfce7;
    color: #166534;
}

.jwlear-status-disabled {
    background: #e5e7eb;
    color: #374151;
}

.jwlear-status-missing {
    background: #fef3c7;
    color: #92400e;
}

.jwlear-toggle-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 74px;
}

.jwlear-toggle-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
}

.jwlear-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 30px;
}

.jwlear-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.jwlear-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #d1d5db;
    transition: .3s;
    border-radius: 999px;
}

.jwlear-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    top: 4px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.jwlear-switch input:checked + .jwlear-slider {
    background-color: #111827;
}

.jwlear-switch input:checked + .jwlear-slider:before {
    transform: translateX(22px);
}

.jwlear-sync-card-body {
    margin-top: 16px;
}

.jwlear-field-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.jwlear-empty-state {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    padding: 32px 20px;
    text-align: center;
    color: #475569;
}

/* Settings */
.jwlear-settings-wrap {
    max-width: 1200px;
    margin: 0 auto;
}

.jwlear-settings-header {
    text-align: center;
    margin-bottom: 24px;
}

.jwlear-settings-header p {
    margin: 0;
    color: #6b7280;
    font-size: 15px;
}

.jwlear-settings-form {
    margin-top: 10px;
}

.jwlear-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.jwlear-settings-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.jwlear-settings-card h3 {
    margin: 0 0 18px;
    font-size: 20px;
    color: #111827;
}

.jwlear-settings-field {
    margin-bottom: 18px;
}

.jwlear-settings-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.jwlear-settings-field .description {
    margin-top: 8px;
    color: #6b7280;
    font-size: 13px;
}

.jwlear-settings-switch-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 16px 0;
    border-top: 1px solid #f1f5f9;
}

.jwlear-settings-switch-row:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.jwlear-settings-switch-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.jwlear-settings-switch-copy strong {
    color: #111827;
    font-size: 14px;
}

.jwlear-settings-switch-copy span {
    color: #6b7280;
    font-size: 13px;
}

.jwlear-settings-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

.jwlear-settings-preview {
    margin-top: 24px;
    padding: 18px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    text-align: center;
}

.jwlear-settings-preview h4 {
    margin: 0 0 14px;
    font-size: 15px;
    color: #111827;
}

.jwlear-settings-preview-button {
    pointer-events: none;
    background: black;
    color: white;
}

/* Analytics */
.jwlear-analytics-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.jwlear-analytics-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #eef2f7;
}

.jwlear-analytics-list li:last-child {
    border-bottom: 0;
}

.jwlear-analytics-title {
    color: #111827;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    word-break: break-word;
}

.jwlear-analytics-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

/* Diagnostics */
.jwlear-log-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.jwlear-log-item {
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f8fafc;
}

.jwlear-log-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

.jwlear-log-level {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}

.jwlear-log-level-info {
    background: #2563eb;
}

.jwlear-log-level-error {
    background: #dc2626;
}

.jwlear-log-level-warning {
    background: #d97706;
}

.jwlear-log-time {
    color: #6b7280;
    font-size: 12px;
}

.jwlear-log-message {
    color: #111827;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.jwlear-log-context {
    display: block;
    white-space: pre-wrap;
    word-break: break-word;
    padding: 10px 12px;
    border-radius: 10px;
    background: #111827;
    color: #f9fafb;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 992px) {
    .pricing-cards {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .jwlear-sync-stats,
    .jwlear-settings-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .jwlear-sync-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .jwlear-tryon-button {
        font-size: 13px;
        padding: 8px 16px;
    }

    .jwlear-shop-button-wrapper {
        opacity: 1;
        visibility: visible;
        position: static;
        height: auto;
        background-color: transparent;
        margin-top: 10px;
    }

    .jwlear-shop-button {
        display: block;
        width: 100% !important;
        min-width: unset !important;
        margin: 0 auto;
    }

    .jwlear-single-button {
        width: 100% !important;
        min-width: unset !important;
        display: block !important;
        padding: 10px 20px !important;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .tabs {
        padding: 15px;
        gap: 8px;
    }

    .tab-button {
        padding: 10px 18px;
        font-size: 14px;
        flex-grow: 1;
        justify-content: center;
    }

    .section {
        padding: 25px;
        margin: 20px auto;
    }

    .upload-section {
        flex-direction: column;
        align-items: center;
    }

    .upload-video iframe {
        height: 250px;
    }

    .upload-text ul {
        font-size: 15px;
    }

    .go-dash-btn {
        padding: 12px 25px;
        font-size: 16px;
    }

    .method-box {
        padding: 20px;
    }

    .pricing-cards {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 30px 20px;
    }

    .jwlear-sync-toolbar,
    .jwlear-sync-actions,
    .jwlear-settings-switch-row,
    .jwlear-analytics-list li,
    .jwlear-log-top {
        flex-direction: column;
        align-items: stretch;
    }

    .jwlear-search-input,
    .jwlear-filter-select {
        min-width: 100%;
    }

    .jwlear-sync-card-top {
        grid-template-columns: 68px 1fr;
    }

    .jwlear-toggle-wrap {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: flex-start;
        min-width: auto;
    }

    .jwlear-settings-grid,
    .jwlear-sync-stats {
        grid-template-columns: 1fr;
    }

    .jwlear-analytics-value {
        min-width: auto;
    }

    .jwlear-front-notice {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .tab-button {
        font-size: 13px;
        padding: 8px 15px;
    }

    .go-dash-btn,
    .contact-btn {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }
}