/**
 * DentalTutor Box Builder
 * Frontend Styles
 * Version: 1.0.5
 */
/* Box Builder Container */
.dt-box-builder {
    --dt-button-bg-color: #14A5F5;
    --dt-button-text-color: #ffffff;
    --dt-button-border-radius: 25px;
    
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #333;
    box-sizing: border-box;
}
.dt-box-builder *,
.dt-box-builder *:before,
.dt-box-builder *:after {
    box-sizing: border-box;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}
/* Header */
.dt-box-builder-header {
    background: linear-gradient(135deg, #14A5F5 0%, #1399e6 100%);
    padding: 40px 20px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(20, 165, 245, 0.2);
    color: #fff;
}

.dt-header-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.dt-box-builder-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.dt-box-builder-title {
    font-size: 40px;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.dt-box-builder-subtitle {
    font-size: 24px;
    color: #fff;
    margin: 0 0 30px 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Promo Badge */
.dt-box-builder-promo {
    margin: 25px auto;
}

.dt-promo-badge {
    display: inline-block;
    background-color: #fff;
    color: var(--dt-button-bg-color);
    font-size: 32px;
    font-weight: 700;
    padding: 15px 60px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    letter-spacing: 1px;
}

/* Progress Steps */
.dt-progress-steps {
    display: flex;
    justify-content: space-between;
    margin: 30px auto 0;
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.dt-progress-step {
    flex: 1;
    padding: 0 10px;
    position: relative;
    text-align: center;
}

.dt-step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #fff;
    color: var(--dt-button-bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dt-step-text {
    font-size: 14px;
    color: #fff;
    margin: 0;
    line-height: 1.4;
}

.dt-progress-step.dt-complete .dt-step-number {
    background-color: #4CD964;
    color: #fff;
}

/* Tabs */
.dt-box-builder-tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 20px;
}
.dt-tab-button {
    padding: 12px 20px;
    font-weight: 600;
    font-size: 15px;
    color: #718096;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}
.dt-tab-button:hover {
    color: var(--dt-button-bg-color);
}
.dt-tab-button.dt-tab-active {
    color: var(--dt-button-bg-color);
    border-bottom-color: var(--dt-button-bg-color);
}
.dt-tab-button span {
    margin-right: 8px;
}
/* Filters */
.dt-box-builder-filters {
    margin-bottom: 25px;
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.dt-filter-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}
.dt-filter-search-container {
    flex-grow: 1;
    position: relative;
}
/* Fixed search input padding to prevent text overlapping icon */
.dt-filter-search {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    text-indent: 5px;
}
.dt-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 18px;
    z-index: 1;
    pointer-events: none;
}
.dt-filter-search:focus {
    outline: none;
    border-color: var(--dt-button-bg-color);
    box-shadow: 0 0 0 2px rgba(20, 165, 245, 0.2);
}
.dt-filter-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}
.dt-filter-section-title {
    font-size: 14px;
    font-weight: 600;
    margin: 15px 0 8px;
    color: #4a5568;
}
.dt-filter-button {
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 13px;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
}
.dt-filter-button:hover {
    background-color: #ebf4ff;
    border-color: #bee3f8;
    color: var(--dt-button-bg-color);
}
.dt-filter-button.dt-filter-active {
    background-color: var(--dt-button-bg-color);
    border-color: var(--dt-button-bg-color);
    color: #fff;
}
/* Products Grid */
.dt-box-builder-products {
    margin-bottom: 30px;
}
/* Grid columns based on admin settings */
.dt-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.dt-products-grid.dt-grid-2-columns {
    grid-template-columns: repeat(2, 1fr);
}
.dt-products-grid.dt-grid-3-columns {
    grid-template-columns: repeat(3, 1fr);
}
.dt-products-grid.dt-grid-4-columns {
    grid-template-columns: repeat(4, 1fr);
}
/* Product Card */
.dt-product-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    border: 1px solid #e2e8f0;
}
.dt-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.08);
}
.dt-product-card.dt-selected {
    border: 2px solid var(--dt-button-bg-color);
    box-shadow: 0 5px 15px rgba(20, 165, 245, 0.2);
}
.dt-product-image {
    height: 180px;
    overflow: hidden;
    position: relative;
}
.dt-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.dt-product-card:hover .dt-product-image img {
    transform: scale(1.05);
}
.dt-live-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #e53e3e;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
}
.dt-live-badge::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #fff;
    border-radius: 50%;
    margin-right: 4px;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0% {
        opacity: 0.5;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
    100% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}
.dt-product-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.dt-product-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #2d3748;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 45px;
}
.dt-product-title-link {
    color: #2d3748;
    text-decoration: none;
    transition: color 0.2s ease;
}
.dt-product-title-link:hover {
    color: var(--dt-button-bg-color);
    text-decoration: underline;
}
.dt-product-expert {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
    color: #4a5568;
}
.dt-expert-icon {
    margin-right: 6px;
    opacity: 0.7;
}
.dt-product-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}
.dt-detail-item {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #718096;
}
.dt-detail-icon {
    margin-right: 4px;
    opacity: 0.7;
}
.dt-product-description {
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.dt-product-features {
    margin-bottom: 15px;
}
.dt-feature-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 6px;
    font-size: 13px;
    color: #4a5568;
}
.dt-feature-check {
    color: #38a169;
    margin-right: 6px;
    font-weight: bold;
    flex-shrink: 0;
}
.dt-product-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f0f4f8;
}
.dt-product-price {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
}
.dt-product-price del {
    font-size: 14px;
    color: #a0aec0;
    margin-right: 6px;
    font-weight: normal;
}
.dt-product-price ins {
    text-decoration: none;
}
/* Updated button styles */
.dt-add-to-box {
    background-color: var(--dt-button-bg-color);
    color: var(--dt-button-text-color);
    border: none;
    border-radius: var(--dt-button-border-radius);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.dt-add-to-box:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}
.dt-remove-from-box {
    background-color: #fff5f5;
    color: #e53e3e;
    border: 1px solid #fed7d7;
    border-radius: var(--dt-button-border-radius);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.dt-remove-from-box:hover {
    background-color: #e53e3e;
    color: #fff;
    border-color: #e53e3e;
}
/* Cart */
.dt-box-builder-cart {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 30px;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.dt-cart-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #2d3748;
    display: flex;
    align-items: center;
}
.dt-cart-title::before {
    content: '🛒';
    margin-right: 8px;
}
.dt-cart-empty {
    text-align: center;
    padding: 30px 15px;
    color: #a0aec0;
}
.dt-cart-icon {
    font-size: 30px;
    margin-bottom: 10px;
    display: block;
    opacity: 0.3;
}
.dt-cart-hint {
    font-size: 13px;
    margin-top: 5px;
}
.dt-cart-items {
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
}
.dt-cart-item {
    display: flex;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f4f8;
    position: relative;
}
.dt-cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 12px;
    flex-shrink: 0;
}
.dt-cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.dt-cart-item-content {
    flex-grow: 1;
}
.dt-cart-item-title {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 4px 0;
    color: #2d3748;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.dt-cart-item-title a {
    color: #2d3748;
    text-decoration: none;
}
.dt-cart-item-title a:hover {
    color: var(--dt-button-bg-color);
    text-decoration: underline;
}
.dt-cart-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.dt-cart-item-expert {
    font-size: 12px;
    color: #718096;
}
.dt-cart-item-price {
    font-size: 14px;
    font-weight: 500;
    color: #2d3748;
}
.dt-cart-item-remove {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    color: #cbd5e0;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 2px;
    font-size: 16px;
}
.dt-cart-item-remove:hover {
    color: #e53e3e;
}
.dt-cart-promotion {
    font-size: 12px;
    color: #38a169;
    font-weight: 500;
    display: flex;
    align-items: center;
    margin-top: 4px;
}
/* Removed the check mark from free course tag */
.dt-cart-promotion::before {
    content: none;
}
.dt-cart-discount {
    color: #e53e3e;
}
.dt-cart-summary {
    margin-bottom: 20px;
    border-top: 1px solid #edf2f7;
    padding-top: 15px;
}
.dt-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}
.dt-summary-label {
    color: #4a5568;
}
.dt-summary-value {
    font-weight: 500;
    color: #2d3748;
}
.dt-discount .dt-summary-value {
    color: #38a169;
}
.dt-total {
    font-size: 16px;
    font-weight: 600;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #edf2f7;
}
.dt-promotion-info {
    background-color: #f0fff4;
    border: 1px solid #c6f6d5;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #2f855a;
}
.dt-promotion-info-title {
    font-weight: 600;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}
.dt-promotion-info-title::before {
    content: '✓';
    margin-right: 5px;
    background-color: #c6f6d5;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}
.dt-promotion-saving {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-weight: 500;
}
/* Updated checkout button */
.dt-checkout-button {
    background-color: var(--dt-button-bg-color);
    color: var(--dt-button-text-color);
    border: none;
    border-radius: var(--dt-button-border-radius);
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dt-checkout-button:hover {
    opacity: 0.9;
}
.dt-checkout-button:disabled {
    background-color: #cbd5e0;
    cursor: not-allowed;
}
.dt-checkout-button::after {
    content: '→';
    margin-left: 8px;
    font-weight: bold;
}
/* Social Proof */
.dt-social-proof {
    background-color: #ebf8ff;
    border: 1px solid #bee3f8;
    border-radius: 6px;
    padding: 15px;
    margin-top: 20px;
    color: #2c5282;
    font-family: 'Poppins', sans-serif;
}
.dt-social-proof-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
}
.dt-social-proof-title::before {
    content: '👥';
    margin-right: 8px;
}
.dt-social-proof p {
    margin: 0 0 10px 0;
    font-size: 14px;
    line-height: 1.5;
}
.dt-social-proof-count {
    font-weight: 700;
    color: var(--dt-button-bg-color);
}
.dt-fomo-tag {
    display: inline-block;
    background-color: #fed7d7;
    color: #e53e3e;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}
.dt-social-proof p:last-child {
    margin-bottom: 0;
}
/* Free course tag - Removed check mark */
.dt-free-course-tag {
    background-color: #c6f6d5;
    color: #2f855a;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}
.dt-free-course-tag::before {
    content: '🎁';
    margin-right: 4px;
}
.dt-savings-tag {
    display: inline-block;
    margin-left: 6px;
    font-size: 11px;
    color: #4a5568;
}
/* No results message */
.dt-no-results {
    padding: 30px;
    text-align: center;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.dt-no-results-icon {
    font-size: 40px;
    color: #cbd5e0;
    margin-bottom: 15px;
    display: block;
}
.dt-no-results-title {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
}
.dt-no-results-text {
    font-size: 14px;
    color: #718096;
    margin-bottom: 20px;
}
.dt-clear-filters {
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    color: var(--dt-button-bg-color);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.dt-clear-filters::before {
    content: '×';
    margin-right: 5px;
    font-weight: bold;
}

/* Mobile cart button - NEW */
.dt-mobile-cart-button {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--dt-button-bg-color);
    color: var(--dt-button-text-color);
    border: none;
    border-radius: 50px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(20, 165, 245, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.dt-mobile-cart-button:active {
    transform: translateX(-50%) scale(0.98);
}

.dt-mobile-cart-button-icon {
    margin-right: 10px;
    font-size: 18px;
}

.dt-mobile-cart-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 12px;
    margin-left: 8px;
}

/* Animation effects */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUpFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) translateX(-50%);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateX(-50%);
    }
}

.dt-product-card {
    animation: fadeIn 0.5s ease-out;
}
.dt-cart-item {
    animation: fadeIn 0.3s ease-out;
}
.dt-promotion-info {
    animation: fadeIn 0.4s ease-out;
}
.dt-mobile-cart-button.dt-show {
    display: flex;
    animation: slideUpFadeIn 0.4s ease-out;
}

/* Woocommerce integration */
.woocommerce-cart .dt-cart-item-promotion {
    margin-top: 5px;
    font-size: 13px;
}
.woocommerce-cart .dt-promotion-badge {
    display: inline-block;
    background-color: #c6f6d5;
    color: #2f855a;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
    margin-right: 5px;
}
.woocommerce-cart .dt-promotion-discount {
    color: #38a169;
    font-size: 12px;
    font-weight: 500;
}

/* Responsiveness */
@media (max-width: 992px) {
    .dt-products-grid:not(.dt-grid-1-columns):not(.dt-grid-2-columns) {
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    }
    
    .dt-tab-button {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .dt-box-builder-title {
        font-size: 32px;
    }
    
    .dt-box-builder-subtitle {
        font-size: 20px;
    }

    .dt-promo-badge {
        font-size: 28px;
        padding: 12px 50px;
    }
}

@media (max-width: 768px) {
    .dt-box-builder-title {
        font-size: 28px;
    }
    
    .dt-box-builder-subtitle {
        font-size: 18px;
    }
    
    .dt-promo-badge {
        font-size: 24px;
        padding: 10px 40px;
    }
    
    .dt-progress-steps {
        flex-direction: column;
        gap: 20px;
    }
    
    .dt-progress-step {
        display: flex;
        align-items: center;
        text-align: left;
    }
    
    .dt-step-number {
        margin: 0 15px 0 0;
    }
    
    .dt-box-builder-cart {
        position: static;
        max-height: none;
    }
    
    .dt-products-grid.dt-grid-4-columns,
    .dt-products-grid.dt-grid-3-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .dt-products-grid:not(.dt-grid-1-columns):not(.dt-grid-2-columns) {
        grid-template-columns: 1fr;
    }
    
    .dt-box-builder-title {
        font-size: 24px;
    }
    
    .dt-box-builder-subtitle {
        font-size: 16px;
    }
    
    .dt-promo-badge {
        font-size: 20px;
        padding: 8px 30px;
    }
    
    .dt-product-footer {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .dt-add-to-box,
    .dt-remove-from-box {
        width: 100%;
        text-align: center;
    }
    
    .dt-tab-button {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .dt-tab-button span {
        margin-right: 4px;
    }
    
    .dt-products-grid.dt-grid-2-columns {
        grid-template-columns: 1fr;
    }
}