/* ============================================
   Union Commodities - Premium Wood Range Widget
   ============================================ */

/* Section Styles */
.uc-wood-range-section {
    padding: 6rem 0;
    background-color: #f9fafb;
}

.uc-wood-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Section Header */
.uc-section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.uc-section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #1B2240;
    margin-bottom: 1rem;
}

.uc-title-underline {
    width: 6rem;
    height: 4px;
    background-color: #C5A065;
    margin: 0 auto 1.5rem;
}

.uc-section-description {
    font-size: 1rem;
    color: #6b7280;
    max-width: 42rem;
    margin: 0 auto;
    line-height: 1.6;
}

/* Grid Layout */
.uc-wood-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

@media (max-width: 1280px) {
    .uc-wood-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .uc-wood-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .uc-wood-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Card Styles */
.uc-wood-card {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.uc-wood-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-4px);
}

/* Card Header */
.uc-card-header {
    position: relative;
    height: 12rem;
    overflow: hidden;
}

.uc-wood-texture {
    position: absolute;
    inset: 0;
    opacity: 0.2;
    background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="%23000"/><path d="M0 0 L100 100 M100 0 L0 100" stroke="%23fff" stroke-width="0.5" opacity="0.1"/></svg>');
    background-size: 20px 20px;
}

.uc-card-header-content {
    position: relative;
    z-index: 1;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
}

.uc-wood-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.25rem 0;
}

.uc-scientific-name {
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
    font-size: 0.875rem;
    margin: 0;
}

/* Card Body */
.uc-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.uc-description {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.uc-applications-preview {
    margin-bottom: 1rem;
}

.uc-apps-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.uc-apps-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.uc-apps-list li {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 0.25rem;
    padding-left: 1.25rem;
    position: relative;
}

.uc-apps-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 0.875rem;
    height: 0.875rem;
    border-radius: 50%;
    border: 2px solid #C5A065;
    background-image: url('data:image/svg+xml;utf8,<svg width="14" height="14" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><polyline points="20 6 9 17 4 12" stroke="%23C5A065" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-size: 10px;
    background-repeat: no-repeat;
    background-position: center;
}

.uc-more-apps {
    color: #9ca3af;
    font-size: 0.75rem;
    padding-left: 1.5rem;
}

.uc-more-apps::before {
    display: none;
}

/* Card Footer */
.uc-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
    color: #1B2240;
    font-weight: 700;
    transition: color 0.3s ease;
}

.uc-wood-card:hover .uc-card-footer {
    color: #C5A065;
}

.uc-card-footer svg {
    transition: transform 0.3s ease;
}

.uc-wood-card:hover .uc-card-footer svg {
    transform: translateX(0.5rem);
}

/* Modal Styles */
.uc-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    padding: 1rem;
    align-items: center;
    justify-content: center;
}

.uc-modal.uc-modal-active {
    display: flex;
}

.uc-modal-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.uc-modal-content {
    position: relative;
    background: white;
    border-radius: 1rem;
    width: 100%;
    max-width: 56rem;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(2rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.uc-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.uc-modal-close:hover {
    background: #e5e7eb;
}

.uc-modal-layout {
    display: flex;
    flex-direction: row;
}

@media (max-width: 768px) {
    .uc-modal-layout {
        flex-direction: column;
    }
}

/* Modal Image Side */
.uc-modal-image-side {
    width: 33.333%;
    min-height: 25rem;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 2rem;
}

@media (max-width: 768px) {
    .uc-modal-image-side {
        width: 100%;
        min-height: 12.5rem;
    }
}

.uc-modal-wood-info {
    position: relative;
    z-index: 2;
}

.uc-modal-wood-info h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.25rem 0;
}

.uc-modal-wood-info p {
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
    font-size: 1rem;
    margin: 0;
}

/* Modal Content Side */
.uc-modal-content-side {
    width: 66.667%;
    padding: 2rem 3rem;
}

@media (max-width: 768px) {
    .uc-modal-content-side {
        width: 100%;
        padding: 1.5rem;
    }
}

.uc-modal-section {
    margin-bottom: 2rem;
}

.uc-modal-section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1B2240;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
}

.uc-modal-section p {
    color: #6b7280;
    line-height: 1.6;
}

.uc-modal-two-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .uc-modal-two-columns {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Features List */
.uc-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.uc-features-list li {
    margin-bottom: 1rem;
}

.uc-feature-label {
    display: block;
    font-weight: 700;
    color: #374151;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.uc-features-list li span:not(.uc-feature-label) {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Applications List */
.uc-applications-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.uc-applications-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    color: #374151;
    font-size: 0.875rem;
    padding-left: 1.5rem;
    position: relative;
}

.uc-applications-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.25rem;
    width: 1rem;
    height: 1rem;
    background-image: url('data:image/svg+xml;utf8,<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><polyline points="20 6 9 17 4 12" stroke="%23C5A065" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
}

/* Modal Footer */
.uc-modal-footer {
    padding-top: 1.5rem;
    border-top: 1px solid #f3f4f6;
    display: flex;
    justify-content: flex-end;
}

.uc-enquire-btn {
    background-color: #1B2240;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.uc-enquire-btn:hover {
    background-color: #2a3558;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Smooth scrolling */
body.uc-modal-open {
    overflow: hidden;
}

/* Accessibility */
.uc-modal-close:focus,
.uc-enquire-btn:focus {
    outline: 2px solid #C5A065;
    outline-offset: 2px;
}

.uc-wood-card:focus {
    outline: 2px solid #C5A065;
    outline-offset: 2px;
}

/* Loading States */
.uc-wood-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Additional responsive adjustments */
@media (max-width: 480px) {
    .uc-wood-range-section {
        padding: 4rem 0;
    }
    
    .uc-section-header {
        margin-bottom: 2.5rem;
    }
    
    .uc-card-header {
        height: 10rem;
    }
    
    .uc-modal-wood-info h2 {
        font-size: 2rem;
    }
    
    .uc-modal-content-side {
        padding: 1rem;
    }
}

/* Print styles */
@media print {
    .uc-modal,
    .uc-card-footer {
        display: none !important;
    }
    
    .uc-wood-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .uc-wood-card {
        border: 2px solid #000;
    }
    
    .uc-card-footer {
        border-top: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .uc-wood-card,
    .uc-card-footer svg,
    .uc-modal-content,
    .uc-enquire-btn {
        transition: none;
        animation: none;
    }
    
    .uc-wood-card:hover {
        transform: none;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .uc-wood-range-section {
        background-color: #1f2937;
    }
    
    .uc-section-title {
        color: #f9fafb;
    }
    
    .uc-section-description {
        color: #d1d5db;
    }
    
    .uc-wood-card {
        background: #374151;
        border-color: #4b5563;
    }
    
    .uc-description {
        color: #d1d5db;
    }
    
    .uc-modal-content {
        background: #374151;
    }
    
    .uc-modal-section p {
        color: #d1d5db;
    }
}