/*-----------------------------------------------------------------*/
/*  Universal Product Description Modal Styles                    */
/*  Shared styling that can be customized per product type        */
/*-----------------------------------------------------------------*/

/* Base Modal Styles */
.universal-desc-modal,
.ar-desc-modal,
.glock-desc-modal,
.bolt-action-desc-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

/* Modal Content Container */
.universal-desc-modal-content,
.ar-desc-modal-content,
.glock-desc-modal-content,
.bolt-action-desc-modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    margin: 2% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
    animation: slideInUp 0.3s ease-out;
}

/* Modal Header */
.universal-desc-header,
.ar-desc-header,
.glock-desc-header,
.bolt-action-desc-header {
    background: linear-gradient(90deg, #faf100 0%, #e6d900 100%);
    color: #000;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #444;
}

/* Product-specific header colors */
.glock-desc-header {
    background: linear-gradient(90deg, #4285f4 0%, #3367d6 100%);
    color: #fff;
}

.bolt-action-desc-header {
    background: linear-gradient(90deg, #34a853 0%, #2d7d32 100%);
    color: #fff;
}

.universal-desc-title,
.ar-desc-title,
.glock-desc-title,
.bolt-action-desc-title {
    font-size: 24px;
    font-weight: 900;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.universal-desc-close,
.ar-desc-close,
.glock-desc-close,
.bolt-action-desc-close {
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.universal-desc-close:hover,
.ar-desc-close:hover {
    color: #666;
}

.glock-desc-close:hover {
    color: #ddd;
}

.bolt-action-desc-close:hover {
    color: #ddd;
}

/* Modal Body */
.universal-desc-body,
.ar-desc-body,
.glock-desc-body,
.bolt-action-desc-body {
    display: flex;
    padding: 0;
    max-height: calc(90vh - 120px);
    overflow: hidden;
}

/* Images Section */
.universal-desc-images,
.ar-desc-images,
.glock-desc-images,
.bolt-action-desc-images {
    flex: 0 0 40%;
    background: #000;
    display: flex;
    flex-direction: column;
    border-right: 2px solid #444;
}

.universal-desc-main-image,
.ar-desc-main-image,
.glock-desc-main-image,
.bolt-action-desc-main-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #111;
}

.universal-main-img,
.ar-main-img,
.glock-main-img,
.bolt-action-main-img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.universal-main-img:hover,
.ar-main-img:hover,
.glock-main-img:hover,
.bolt-action-main-img:hover {
    transform: scale(1.05);
}

.universal-desc-image-gallery,
.ar-desc-image-gallery,
.glock-desc-image-gallery,
.bolt-action-desc-image-gallery {
    display: flex;
    flex-wrap: wrap;
    padding: 15px;
    gap: 10px;
    background: #1a1a1a;
    max-height: 120px;
    overflow-y: auto;
}

.universal-gallery-item,
.ar-gallery-item,
.glock-gallery-item,
.bolt-action-gallery-item {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.universal-gallery-item:hover,
.universal-gallery-item.active,
.ar-gallery-item:hover,
.ar-gallery-item.active {
    border-color: #faf100;
}

.glock-gallery-item:hover,
.glock-gallery-item.active {
    border-color: #4285f4;
}

.bolt-action-gallery-item:hover,
.bolt-action-gallery-item.active {
    border-color: #34a853;
}

.universal-gallery-img,
.ar-gallery-img,
.glock-gallery-img,
.bolt-action-gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.universal-gallery-img:hover,
.ar-gallery-img:hover,
.glock-gallery-img:hover,
.bolt-action-gallery-img:hover {
    transform: scale(1.1);
}

/* Content Section */
.universal-desc-content,
.ar-desc-content,
.glock-desc-content,
.bolt-action-desc-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background: #1a1a1a;
    color: #fff;
}

.universal-desc-text,
.ar-desc-text,
.glock-desc-text,
.bolt-action-desc-text {
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.6;
    color: #ddd;
}

.universal-desc-text h3,
.ar-desc-text h3 {
    color: #faf100;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-size: 18px;
}

.glock-desc-text h3 {
    color: #4285f4;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-size: 18px;
}

.bolt-action-desc-text h3 {
    color: #34a853;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-size: 18px;
}

/* Specifications */
.universal-desc-specs,
.ar-desc-specs,
.glock-desc-specs,
.bolt-action-desc-specs {
    margin-bottom: 30px;
}

.universal-desc-specs h3,
.ar-desc-specs h3 {
    color: #faf100;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-size: 18px;
    border-bottom: 2px solid #444;
    padding-bottom: 10px;
}

.glock-desc-specs h3 {
    color: #4285f4;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-size: 18px;
    border-bottom: 2px solid #444;
    padding-bottom: 10px;
}

.bolt-action-desc-specs h3 {
    color: #34a853;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-size: 18px;
    border-bottom: 2px solid #444;
    padding-bottom: 10px;
}

.universal-spec-grid,
.ar-spec-grid,
.glock-spec-grid,
.bolt-action-spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.universal-spec-item,
.ar-spec-item,
.glock-spec-item,
.bolt-action-spec-item {
    background: #2d2d2d;
    padding: 15px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.universal-spec-item,
.ar-spec-item {
    border-left: 4px solid #faf100;
}

.glock-spec-item {
    border-left: 4px solid #4285f4;
}

.bolt-action-spec-item {
    border-left: 4px solid #34a853;
}

.universal-spec-item:hover,
.ar-spec-item:hover,
.glock-spec-item:hover,
.bolt-action-spec-item:hover {
    background: #3d3d3d;
}

.universal-spec-label,
.ar-spec-label,
.glock-spec-label,
.bolt-action-spec-label {
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-size: 14px;
}

.universal-spec-label,
.ar-spec-label {
    color: #faf100;
}

.glock-spec-label {
    color: #4285f4;
}

.bolt-action-spec-label {
    color: #34a853;
}

.universal-spec-value,
.ar-spec-value,
.glock-spec-value,
.bolt-action-spec-value {
    color: #ddd;
    font-size: 16px;
}

/* Features */
.universal-desc-features h3,
.ar-desc-features h3 {
    color: #faf100;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-size: 18px;
    border-bottom: 2px solid #444;
    padding-bottom: 10px;
}

.glock-desc-features h3 {
    color: #4285f4;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-size: 18px;
    border-bottom: 2px solid #444;
    padding-bottom: 10px;
}

.bolt-action-desc-features h3 {
    color: #34a853;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-size: 18px;
    border-bottom: 2px solid #444;
    padding-bottom: 10px;
}

.universal-feature-list,
.ar-feature-list,
.glock-feature-list,
.bolt-action-feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.universal-feature-item,
.ar-feature-item,
.glock-feature-item,
.bolt-action-feature-item {
    background: #2d2d2d;
    padding: 12px 20px;
    margin-bottom: 10px;
    border-radius: 6px;
    color: #ddd;
    font-size: 15px;
    transition: all 0.3s ease;
    position: relative;
}

.universal-feature-item,
.ar-feature-item {
    border-left: 4px solid #faf100;
}

.glock-feature-item {
    border-left: 4px solid #4285f4;
}

.bolt-action-feature-item {
    border-left: 4px solid #34a853;
}

.universal-feature-item:hover,
.ar-feature-item:hover,
.glock-feature-item:hover,
.bolt-action-feature-item:hover {
    background: #3d3d3d;
    transform: translateX(5px);
}

/* Footer */
.universal-desc-footer,
.ar-desc-footer,
.glock-desc-footer,
.bolt-action-desc-footer {
    background: #111;
    padding: 20px 30px;
    border-top: 2px solid #444;
}

.universal-desc-categories,
.ar-desc-categories,
.glock-desc-categories,
.bolt-action-desc-categories {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.universal-category-tag,
.ar-category-tag {
    background: #faf100;
    color: #000;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.glock-category-tag {
    background: #4285f4;
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bolt-action-category-tag {
    background: #34a853;
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Body class when modal is open */
body.universal-modal-open,
body.ar-modal-open,
body.glock-modal-open,
body.bolt-action-modal-open {
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    .universal-desc-modal-content,
    .ar-desc-modal-content,
    .glock-desc-modal-content,
    .bolt-action-desc-modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 90vh;
    }
    
    .universal-desc-body,
    .ar-desc-body,
    .glock-desc-body,
    .bolt-action-desc-body {
        flex-direction: column;
    }
    
    .universal-desc-images,
    .ar-desc-images,
    .glock-desc-images,
    .bolt-action-desc-images {
        flex: 0 0 300px;
        border-right: none;
        border-bottom: 2px solid #444;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Scrollbar Styling */
.universal-desc-content::-webkit-scrollbar,
.ar-desc-content::-webkit-scrollbar,
.glock-desc-content::-webkit-scrollbar,
.bolt-action-desc-content::-webkit-scrollbar {
    width: 8px;
}

.universal-desc-content::-webkit-scrollbar-track,
.ar-desc-content::-webkit-scrollbar-track,
.glock-desc-content::-webkit-scrollbar-track,
.bolt-action-desc-content::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.universal-desc-content::-webkit-scrollbar-thumb,
.ar-desc-content::-webkit-scrollbar-thumb {
    background: #faf100;
    border-radius: 4px;
}

.glock-desc-content::-webkit-scrollbar-thumb {
    background: #4285f4;
    border-radius: 4px;
}

.bolt-action-desc-content::-webkit-scrollbar-thumb {
    background: #34a853;
    border-radius: 4px;
}