/* =============================================================================
   PRODUCT DETAILS PAGE STYLES
   Moved from inline styles in product.php
   ============================================================================= */

/* License Selection Styles */
.license-info-toggle {
    margin-top: 5px;
}

.license-info-toggle a {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.85rem;
}

.license-info-toggle a:hover {
    color: #007bff;
    text-decoration: underline;
}

.license-info-panel {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.dark-mode .license-info-panel {
    background: #2d3436;
    border-left-color: #66b3ff;
}

/* Compact License Modal Styles */
.mw-380px {
    max-width: 380px;
}

/* License explanations - compact version */
.license-explanations {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.license-explanation {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #007bff;
    transition: all 0.3s ease;
}

.dark-mode .license-explanation {
    background: #2a2a2a;
    border-left-color: #66b3ff;
}

.license-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.dark-mode .license-title {
    color: #fff;
}

.license-description {
    color: #666;
    font-size: 12px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.dark-mode .license-description {
    color: #adb5bd;
}

.license-features {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.license-feature {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}

.license-feature.allowed {
    color: #28a745;
}

.license-feature.restricted {
    color: #dc3545;
}

.license-feature.info {
    color: #007bff;
}

.dark-mode .license-feature.allowed {
    color: #9fdf9f;
}

.dark-mode .license-feature.restricted {
    color: #ff6b6b;
}

.dark-mode .license-feature.info {
    color: #66b3ff;
}

.license-feature i {
    font-size: 10px;
    width: 12px;
}

/* License badges - compact */
.license-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 6px;
}

.license-badge.free {
    background: #28a745;
    color: white;
}

.license-badge.popular {
    background: #ffc107;
    color: #212529;
}

/* Quick price comparison */
.price-comparison-simple {
    margin-bottom: 16px;
    padding: 12px;
    background: #f1f3f4;
    border-radius: 8px;
}

.dark-mode .price-comparison-simple {
    background: #2d3436;
}

.price-comparison-simple h5 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.dark-mode .price-comparison-simple h5 {
    color: #fff;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    margin-bottom: 4px;
    border-radius: 4px;
    font-size: 12px;
}

.price-row.popular {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.dark-mode .price-row.popular {
    background: rgba(255, 193, 7, 0.15);
}

.price-row span:first-child {
    color: #666;
    font-weight: 500;
}

.dark-mode .price-row span:first-child {
    color: #adb5bd;
}

.price-row .price {
    font-weight: 600;
    color: #333;
}

.dark-mode .price-row .price {
    color: #fff;
}

/* Help note */
.help-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: #e3f2fd;
    border-radius: 6px;
    font-size: 12px;
    color: #666;
}

.dark-mode .help-note {
    background: rgba(102, 179, 255, 0.1);
    color: #adb5bd;
}

.help-note i {
    color: #2196f3;
    font-size: 14px;
}

.dark-mode .help-note i {
    color: #66b3ff;
}

/* Mobile responsive adjustments */
@media (max-width: 576px) {
    .mw-380px {
        max-width: calc(100vw - 20px);
        margin: 10px;
    }
    
    .license-explanation {
        padding: 10px;
    }
    
    .license-title {
        font-size: 13px;
    }
    
    .license-description {
        font-size: 11px;
    }
    
    .license-feature {
        font-size: 10px;
    }
    
    .price-comparison-simple {
        padding: 10px;
    }
}

/* Enhanced License Labels */
.custom-control-label {
    position: relative;
    padding-left: 15px !important;
    cursor: pointer;
    display: block;
}

.license-name {
    font-weight: 600;
    display: block;
}

.custom-control-variation input[type="radio"]:checked + .custom-control-label {
    color: #007bff;
}

.dark-mode .custom-control-variation input[type="radio"]:checked + .custom-control-label {
    color: #66b3ff;
}

.custom-control-variation input[type="radio"]:checked + .custom-control-label::before {
    border-color: #007bff;
    background-color: #007bff;
}

/* Animation for info panel */
.license-info-panel {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Price License Indicator */
.price-license-indicator {
    margin-top: 5px;
}

.price-license-indicator small {
    font-style: italic;
}

/* Price Comparison Table */
.price-comparison-table {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.dark-mode .price-comparison-table {
    background: #2d3436;
    border-color: #495057;
}

/* Enhanced price display with animation */
.lbl-price {
    transition: all 0.3s ease;
    display: inline-block;
}

.lbl-price:hover {
    transform: scale(1.02);
}

/* Highlight the price when it changes */
@keyframes priceUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.price-updated {
    animation: priceUpdate 0.4s ease-out;
}

/* Thumbnail Container Styling */
.thumbnails-container {
    display: flex;
    align-items: center;
    margin-top: 15px;
    position: relative;
    gap: 8px;
}

.thumbnails-container.no-scroll .thumbnail-nav {
    display: none;
}

/* Thumbnail Navigation Buttons */
.thumbnail-nav {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    flex-shrink: 0;
}

.thumbnail-nav:hover:not(:disabled) {
    background: var(--bs-primary);
    color: white;
    border-color: var(--bs-primary);
}

.thumbnail-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Thumbnails Wrapper */
.thumbnails-wrapper {
    display: flex;
    gap: 8px;
    overflow-x: hidden;
    scroll-behavior: smooth;
    flex: 1;
    padding: 0 4px;
}

/* Individual Thumbnail Styling */
.thumbnail {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.thumbnail-mobile {
    width: 60px;
    height: 60px;
}

.thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.thumbnail:hover .thumbnail-img {
    transform: scale(1.05);
}

.thumbnail.active {
    border-color: var(--bs-primary);
}

.thumbnail.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(var(--bs-primary-rgb), 0.1);
    pointer-events: none;
}

/* Dark mode adjustments */
.dark-mode .thumbnail-nav {
    background: var(--bs-dark);
    border-color: var(--bs-gray-600);
    color: var(--bs-gray-300);
}

.dark-mode .thumbnail-nav:hover:not(:disabled) {
    background: var(--bs-primary);
    color: white;
    border-color: var(--bs-primary);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .thumbnails-container {
        margin-top: 10px;
        gap: 6px;
    }
    
    .thumbnail-nav {
        width: 32px;
        height: 32px;
    }
    
    .thumbnail-mobile {
        width: 50px;
        height: 50px;
    }
    
    .thumbnails-wrapper {
        gap: 6px;
    }
}

.slide {
    display: none;
    width: 100%;
    height: 100%;
}

.slide.active {
    display: block;
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.main-image:hover {
    transform: scale(1.02);
}

/* Navigation buttons for main slider */
.nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3;
}

.nav-button.prev {
    left: 15px;
}

.nav-button.next {
    right: 15px;
}

.nav-button:hover {
    background: rgba(0, 0, 0, 0.8);
}

@media (max-width: 768px) {
    .nav-button {
        width: 36px;
        height: 36px;
    }
    
    .nav-button.prev {
        left: 10px;
    }
    
    .nav-button.next {
        right: 10px;
    }
}