/* Skin Detail Page Styles */
.skin-detail-container {
    padding: 30px;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
}

.skin-detail-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 50px;
}

.skin-image-container {
    flex: 1;
    min-width: 350px;
    max-width: 500px;
    display: flex;
    flex-direction: column;
}

.skin-main-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    background-color: #f9f9f9;
    padding: 10px;
}

.dark-theme .skin-main-image {
    background-color: #2a2a2a;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.skin-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px;
}

.skin-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.skin-thumbnail:hover {
    transform: translateY(-3px);
}

.skin-thumbnail.active {
    border-color: var(--primary-color);
}

.skin-info-container {
    flex: 1;
    min-width: 300px;
}

.skin-title {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.skin-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    color: #777;
}

.dark-theme .skin-meta {
    color: #aaa;
}

.skin-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.skin-meta i {
    color: var(--primary-color);
}

.skin-description {
    margin-bottom: 20px;
    line-height: 1.6;
}

.skin-specs {
    margin-bottom: 30px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
}

.skin-specs-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.skin-specs-label {
    font-weight: bold;
    color: var(--text-color);
}

.skin-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.skin-actions .btn {
    min-width: 180px;
}

/* Related skins */
.related-skins-section {
    margin-top: 50px;
}

.related-skins-section h2 {
    margin-bottom: 20px;
    font-size: 1.8rem;
    color: var(--text-color);
}

.related-skins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Shimmer effect */
@keyframes shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}
.shimmer-detail {
    margin-bottom: 2rem;
}
.shimmer-detail-content {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    min-height: 370px;
}
.shimmer-image {
    width: 320px;
    height: 370px;
    border-radius: 16px;
    background: #e0e0e0;
    background-image: linear-gradient(90deg, #e0e0e0 0px, #f5f5f5 40px, #e0e0e0 80px);
    background-size: 600px 100%;
    animation: shimmer 1.2s infinite linear;
    flex-shrink: 0;
}
.shimmer-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    min-width: 0;
}
.shimmer-title {
    width: 60%;
    height: 36px;
    border-radius: 8px;
    background: #e0e0e0;
    background-image: linear-gradient(90deg, #e0e0e0 0px, #f5f5f5 40px, #e0e0e0 80px);
    background-size: 600px 100%;
    animation: shimmer 1.2s infinite linear;
}
.shimmer-meta {
    width: 40%;
    height: 20px;
    border-radius: 8px;
    background: #e0e0e0;
    background-image: linear-gradient(90deg, #e0e0e0 0px, #f5f5f5 40px, #e0e0e0 80px);
    background-size: 600px 100%;
    animation: shimmer 1.2s infinite linear;
}
.shimmer-desc {
    width: 95%;
    height: 18px;
    border-radius: 8px;
    background: #e0e0e0;
    background-image: linear-gradient(90deg, #e0e0e0 0px, #f5f5f5 40px, #e0e0e0 80px);
    background-size: 600px 100%;
    animation: shimmer 1.2s infinite linear;
}
.shimmer-spec {
    width: 60%;
    height: 18px;
    border-radius: 8px;
    background: #e0e0e0;
    background-image: linear-gradient(90deg, #e0e0e0 0px, #f5f5f5 40px, #e0e0e0 80px);
    background-size: 600px 100%;
    animation: shimmer 1.2s infinite linear;
}
.shimmer-actions {
    display: flex;
    gap: 1.2rem;
    margin-top: 1.2rem;
}
.shimmer-btn {
    width: 170px;
    height: 48px;
    border-radius: 8px;
    background: #e0e0e0;
    background-image: linear-gradient(90deg, #e0e0e0 0px, #f5f5f5 40px, #e0e0e0 80px);
    background-size: 600px 100%;
    animation: shimmer 1.2s infinite linear;
}

/* Related shimmer */
.shimmer-related {
    max-width: 1100px;
    margin: 0 auto 2rem auto;
}
.shimmer-related .shimmer-title {
    width: 220px;
    height: 28px;
    margin-bottom: 1.2rem;
}
.shimmer-related-grid {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}
.shimmer-related-card {
    width: 220px;
    height: 270px;
    border-radius: 14px;
    background: #e0e0e0;
    background-image: linear-gradient(90deg, #e0e0e0 0px, #f5f5f5 40px, #e0e0e0 80px);
    background-size: 600px 100%;
    animation: shimmer 1.2s infinite linear;
}

/* Improved Button Styles */
.btn.primary {
    background: linear-gradient(90deg, #ff9800 0%, #ffc107 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 168, 0, 0.15);
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.btn.primary:hover, .btn.primary:focus {
    background: linear-gradient(90deg, #ffc107 0%, #ff9800 100%);
    transform: translateY(-2px) scale(1.03);
}
.btn.secondary {
    background: #fff;
    color: #ff9800;
    border: 2px solid #ff9800;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.btn.secondary:hover, .btn.secondary:focus {
    background: #ff9800;
    color: #fff;
    transform: translateY(-2px) scale(1.03);
    border-color: #ff9800;
}

/* Add to Favourites button: red heart */
.btn.secondary i.fa-heart {
    color: #e53935;
    transition: color 0.2s;
}
.btn.secondary:hover i.fa-heart,
.btn.secondary:focus i.fa-heart {
    color: #fff;
}

/* Header favourite button - improved design */
/* .header-actions {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-left: auto;
} */

.header-fav-btn {
    position: relative;
    background: #fff;
    border: none;
    color: #e53935;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(229,57,53,0.15);
    transition: all 0.2s ease;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(229,57,53,0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(229,57,53,0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(229,57,53,0);
    }
}

.header-fav-btn:hover, .header-fav-btn:focus {
    background: #e53935;
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 4px 12px rgba(229,57,53,0.3);
}

.header-fav-btn.active {
    background: #e53935;
    color: white;
}

.header-fav-btn::after {
    content: attr(data-count);
    position: absolute;
    top: -5px;
    right: -5px;
    background: #4caf50;
    color: white;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s;
}

.header-fav-btn[data-count]:not([data-count="0"])::after {
    opacity: 1;
    transform: scale(1);
}

/* Dark theme adjustments */
.dark-theme .header-fav-btn {
    background: #333;
    box-shadow: 0 2px 10px rgba(255,99,71,0.2);
}

.dark-theme .header-fav-btn:hover, 
.dark-theme .header-fav-btn:focus {
    background: #e53935;
    box-shadow: 0 4px 12px rgba(229,57,53,0.4);
}

/* Icon-only favorite button */
.fav-icon-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #e0e0e0;
    color: #bdbdbd;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Active state - when marked as favorite */
.fav-icon-btn.active {
    color: white;
    background-color: #e53935;
    border-color: #e53935;
}

/* Explicitly disable all hover effects ONLY for favorite icon button */
.fav-icon-btn:hover,
.fav-icon-btn:focus,
.fav-icon-btn:active {
    transform: none;
    background: inherit;
    color: inherit;
    border-color: inherit;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.fav-icon-btn.active:hover,
.fav-icon-btn.active:focus,
.fav-icon-btn.active:active {
    background-color: #e53935;
    color: white;
    border-color: #e53935;
}

/* Fix for skin detail responsive layout */
@media (max-width: 768px) {
    .skin-detail-container .skin-detail {
        flex-direction: column;
        align-items: center;
    }

    .skin-detail-container .skin-image {
        width: 100%;
        margin-bottom: 20px;
    }

    .skin-detail-container .skin-info {
        width: 100%;
        
    }
    
    /* Fix the overlapping content issue */
    .skin-detail-content {
        flex-direction: column;
        align-items: center;
    }
    
    .skin-image-container {
        max-width: 100%;
        min-width: unset; /* Remove the minimum width constraint */
        margin-bottom: 30px;
        display: block; /* Ensure proper display */
        position: relative;
        z-index: 1;
    }
    
    .skin-info-container {
        width: 100%;
        position: relative;
        z-index: 2;
        margin-top: 20px; /* Additional spacing between image and info */
    }
    
    /* Ensure image doesn't overflow its container */
    .skin-main-image {
        max-width: 100%;
        height: auto;
    }
}

/* Ensure proper spacing in detail view when stacked */
@media (max-width: 576px) {
    .skin-detail-container .skin-detail {
        gap: 30px;
    }
    
    .skin-detail-container .skin-image {
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .related-skins-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}
