/**
 * Product Details - Product Cards
 * Contains: Ultimate product card styling with animations, badges, and interactions
 * Part of modular product-details.css split
 */

/* Card Description for Ultimate Card */
.card-description {
    margin: 0.75rem 0;
    padding: 0 0.5rem;
}

.card-description .description-text {
    font-size: 0.875rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 0;
}

/* Read More Link */
.product-card .read-more-link,
.product-card-ultimate .read-more-link {
    font-size: 0.875rem;
    color: #666 !important;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
    margin-left: 5px;
}

.product-card .read-more-link:hover,
.product-card-ultimate .read-more-link:hover {
    color: #333 !important;
    text-decoration: underline;
}

/* Product Name Truncation */
.product-card .product-name {
    min-height: 3rem;
    display: flex;
    align-items: center;
}

.product-card .product-name a {
    display: block;
    width: 100%;
}

/* Product Description */
.product-card .product-description {
    line-height: 1.6;
    color: #666;
    margin-bottom: 1rem;
    min-height: 4rem;
}

/* Product Card Ultimate Styles */
.product-card-ultimate {
    position: relative;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #eee;
    height: auto;
    min-height: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.product-card-ultimate:hover {
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    border-color: #eee;
}

.card-image-container {
    position: relative;
    height: 300px;
    overflow: hidden;
    background: #f8f9fa;
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card-ultimate:hover .card-image {
    transform: scale(1.15);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: flex-end;
    padding: 24px;
}

.product-card-ultimate:hover .image-overlay {
    opacity: 0;
}

.overlay-content {
    color: white;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card-ultimate:hover .overlay-content {
    transform: translateY(0);
}

.overlay-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.overlay-description {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.5;
}

.card-badges {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    z-index: 10;
}

.badge {
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.badge-sale {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

.badge-new {
    background: rgba(34, 197, 94, 0.9);
    color: white;
}

.badge-featured {
    background: rgba(0, 0, 0, 0.9);
    color: white;
}

.quick-actions {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.quick-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateX(10px);
}

.product-card-ultimate:hover .quick-action-btn {
    opacity: 0;
    transform: translateX(10px);
}

.product-card-ultimate:hover .quick-action-btn:nth-child(1) {
    transition-delay: 0.1s;
}

.product-card-ultimate:hover .quick-action-btn:nth-child(2) {
    transition-delay: 0.2s;
}

.product-card-ultimate:hover .quick-action-btn:nth-child(3) {
    transition-delay: 0.3s;
}

.quick-action-btn:hover {
    background: #2ec5d9;
    color: white;
    transform: scale(1.1);
}

.quick-action-btn.active {
    background: #2ec5d9;
    color: white;
}

.card-content {
    padding: 24px;
}

.card-category {
    font-size: 12px;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 8px;
    text-decoration: none !important;
}

.card-category:hover,
.card-category:active,
.card-category:focus {
    color: #000000 !important;
    text-decoration: none !important;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1.4;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-title a {
    color: inherit;
    text-decoration: none;
}

.card-title a:hover {
    color: #000000;
}

.card-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.rating-stars {
    display: flex;
    gap: 2px;
}

.rating-stars i {
    font-size: 14px;
    color: #d1d5db;
}

.rating-count {
    font-size: 12px;
    color: #6b7280;
}

.card-price-section {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 20px;
}

.price-current {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
}

.price-original {
    font-size: 18px;
    color: #6b7280;
    text-decoration: line-through;
}

.price-discount {
    font-size: 14px;
    color: #ef4444;
    font-weight: 600;
}

.card-action {
    position: relative;
    overflow: hidden;
}

.add-to-cart-btn {
    width: 100%;
    padding: 14px 24px;
    background: #2ec5d9;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.add-to-cart-btn:hover {
    background: #1ea7b5;
    transform: translateY(0);
    box-shadow: none;
}

.add-to-cart-btn:active {
    transform: translateY(0);
}

.add-to-cart-btn.loading {
    color: transparent;
}

.add-to-cart-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid white;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

.out-of-stock-btn {
    width: 100%;
    padding: 14px 24px;
    background: #e5e7eb;
    color: #9ca3af;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: not-allowed;
}

.notify-me-btn {
    width: 100%;
    padding: 10px 20px;
    background: transparent;
    color: #2ec5d9;
    border: 2px solid #2ec5d9;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.notify-me-btn:hover {
    background: #2ec5d9;
    color: white;
}

.product-card-ultimate.list-view {
    display: flex;
    height: auto;
    margin-bottom: 24px;
}

.list-view .card-image-container {
    width: 300px;
    height: 300px;
    flex-shrink: 0;
}

.list-view .card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.list-view .card-description {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 20px;
}

.list-view .card-features {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6b7280;
}

.feature-item i {
    color: #10b981;
    font-size: 12px;
}

.list-view .card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.list-view .card-price-section {
    margin-bottom: 0;
}

.list-view .card-actions {
    display: flex;
    gap: 12px;
}

.list-view .add-to-cart-btn {
    width: auto;
    padding: 12px 32px;
}

.view-details-btn {
    padding: 12px 24px;
    background: transparent;
    color: #2ec5d9;
    border: 2px solid #2ec5d9;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.view-details-btn:hover {
    background: #2ec5d9;
    color: white;
    transform: translateY(0);
}

.card-skeleton {
    background: #f3f4f6;
    border-radius: 24px;
    overflow: hidden;
    height: 100%;
}

.skeleton-image {
    height: 300px;
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.skeleton-content {
    padding: 24px;
}

.skeleton-line {
    height: 16px;
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    margin-bottom: 12px;
    border-radius: 4px;
}

.skeleton-line.short {
    width: 60%;
}

.skeleton-line.medium {
    width: 80%;
}

.skeleton-button {
    height: 48px;
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 12px;
    margin-top: 20px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}
