/* ==========================================================================
   ATLAS PCR Production Collection Isolated CSS
   ========================================================================== */

/* Tabs Navigation Styling */
.atlas-pcr-collection-tabs {
    display: flex;
    gap: 12px;
    border-bottom: 2px solid #edf2f7;
    margin-bottom: 28px;
    padding-bottom: 2px;
}

.atlas-tab-btn {
    background: transparent;
    border: none;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #718096;
    padding: 10px 16px;
    cursor: pointer;
    position: relative;
    transition: color 0.2s, border-color 0.2s;
    outline: none;
}

.atlas-tab-btn:hover {
    color: #1e3a5f;
}

.atlas-tab-btn.active {
    color: #1e3a5f;
}

.atlas-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #b97a22;
    border-radius: 2px;
}

.atlas-pcr-collection-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.atlas-pcr-collection-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.atlas-pcr-collection-stat-num {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: #1e3a5f;
}

.atlas-pcr-collection-stat-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #718096;
    margin-top: 4px;
    letter-spacing: 0.5px;
}

/* Filter bar styling */
.atlas-pcr-filter-bar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.atlas-pcr-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.atlas-pcr-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.atlas-pcr-filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: #4a5568;
}

.atlas-pcr-filter-group input,
.atlas-pcr-filter-group select {
    padding: 8px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 14px;
    color: #2d3748;
    background-color: #fff;
    outline: none;
    transition: border-color 0.2s;
}

.atlas-pcr-filter-group input:focus,
.atlas-pcr-filter-group select:focus {
    border-color: #b97a22;
}

/* Product grid */
.atlas-pcr-collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* Product cards styling */
.atlas-pcr-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 5px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}

.atlas-pcr-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
}

.atlas-pcr-card-img-wrap {
    background: #f8fafc;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    position: relative;
    border-bottom: 1px solid #edf2f7;
}

.atlas-pcr-card-img-wrap img {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
    transition: transform 0.3s;
}

.atlas-pcr-card:hover .atlas-pcr-card-img-wrap img {
    transform: scale(1.03);
}

.atlas-pcr-card-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.atlas-pcr-card-name {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #1e3a5f;
    margin-bottom: 8px;
}

.atlas-pcr-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.atlas-pcr-card-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 12px;
    background: #edf2f7;
    color: #4a5568;
}

.atlas-pcr-card-badge.season-summer { background-color: #fee2e2; color: #991b1b; }
.atlas-pcr-card-badge.season-all-season { background-color: #dcfce7; color: #166534; }
.atlas-pcr-card-badge.season-winter { background-color: #e0f2fe; color: #075985; }

.atlas-pcr-card-feats {
    list-style: disc;
    margin-left: 18px;
    font-size: 12px;
    color: #4a5568;
    margin-bottom: 16px;
    line-height: 1.5;
}

.atlas-pcr-card-sizes-count {
    font-size: 12px;
    font-weight: 600;
    color: #718096;
    margin-bottom: 20px;
    margin-top: auto;
}

.atlas-pcr-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.atlas-pcr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s, opacity 0.2s;
    outline: none;
}

.atlas-pcr-btn-details {
    background-color: #1e3a5f;
    color: #ffffff;
}

.atlas-pcr-btn-details:hover {
    background-color: #11253f;
}

.atlas-pcr-btn-wa {
    background-color: #16a34a;
    color: #ffffff;
}

.atlas-pcr-btn-wa:hover {
    background-color: #15803d;
}

/* Modal Drawer / Backdrop */
.atlas-pcr-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.atlas-pcr-drawer-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.atlas-pcr-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 680px;
    height: 100vh;
    background: #ffffff;
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
}

.atlas-pcr-drawer.active {
    transform: translateX(0);
}

.atlas-pcr-drawer-header {
    padding: 20px 24px;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.atlas-pcr-drawer-title {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #1e3a5f;
}

.atlas-pcr-drawer-close {
    background: transparent;
    border: none;
    font-size: 28px;
    color: #a0aec0;
    cursor: pointer;
    outline: none;
}

.atlas-pcr-drawer-close:hover {
    color: #4a5568;
}

.atlas-pcr-drawer-content {
    padding: 24px;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Detail columns */
.atlas-pcr-detail-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 20px;
}

.atlas-pcr-detail-img-area {
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.atlas-pcr-detail-img-area img {
    width: auto !important;
    height: auto !important;
    max-width: 90% !important;
    max-height: 90% !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
    cursor: zoom-in;
}

/* Magnifier / Lens */
.atlas-pcr-zoom-lens {
    position: absolute;
    border: 1px solid #dcdcdc;
    background: rgba(255, 255, 255, 0.4);
    cursor: crosshair;
    width: 60px;
    height: 60px;
    display: none;
    pointer-events: none;
}

.atlas-pcr-zoom-result {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    display: none;
    z-index: 10;
    pointer-events: none;
}

.atlas-pcr-detail-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.atlas-pcr-detail-subtitle {
    font-size: 14px;
    font-style: italic;
    color: #718096;
}

.atlas-pcr-detail-meta {
    font-size: 13px;
    color: #4a5568;
}

.atlas-pcr-detail-meta strong {
    color: #1e3a5f;
}

/* Size Table Styling in Drawer */
.atlas-pcr-drawer-table-wrap {
    margin-top: 16px;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    overflow: hidden;
}

.atlas-pcr-table-search-wrap {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.atlas-pcr-table-search-wrap input {
    flex-grow: 1;
    padding: 8px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 13px;
}

.atlas-pcr-table-search-wrap input:focus {
    border-color: #b97a22;
    outline: none;
}

.atlas-pcr-spec-table-container {
    max-height: 320px;
    overflow-y: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.atlas-pcr-spec-table {
    width: 100%;
    min-width: 500px;
    border-collapse: collapse;
    font-size: 12px;
    text-align: left;
}

.atlas-pcr-spec-table th {
    background: #1e3a5f;
    color: #ffffff;
    padding: 8px 10px;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.atlas-pcr-spec-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #edf2f7;
    color: #2d3748;
}

.atlas-pcr-spec-table tbody tr {
    cursor: pointer;
    transition: background-color 0.15s;
}

.atlas-pcr-spec-table tbody tr:hover {
    background-color: #f7fafc;
}

.atlas-pcr-spec-table tbody tr.selected {
    background-color: #fef3c7 !important;
    border-left: 4px solid #b97a22;
}

.atlas-pcr-table-expand-btn-wrap {
    text-align: center;
    padding: 12px;
    background: #f8fafc;
    border-top: 1px solid #edf2f7;
}

/* Lightbox Modal Zoom for Mobile */
.atlas-pcr-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s;
}

.atlas-pcr-lightbox.active {
    display: flex;
    opacity: 1;
}

.atlas-pcr-lightbox img {
    max-width: 95%;
    max-height: 85%;
    object-fit: contain;
}

.atlas-pcr-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #ffffff;
    font-size: 36px;
    cursor: pointer;
    background: transparent;
    border: none;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .atlas-pcr-drawer {
        width: 100% !important;
        max-width: 100% !important;
    }
    .atlas-pcr-drawer-header {
        padding: 16px;
    }
    .atlas-pcr-drawer-title {
        font-size: 18px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 80%;
    }
    .atlas-pcr-drawer-content {
        padding: 16px;
        padding-bottom: 120px; /* Extra bottom padding to clear mobile keyboard / floating widgets */
    }
    .atlas-pcr-detail-grid {
        grid-template-columns: 1fr;
    }
    .atlas-pcr-detail-img-area {
        height: 200px;
    }
}
