/**
 * Dynamic Product Card Styles - Matching Your Existing Design
 * Path: app/design/frontend/Devji/Theme/web/css/dynamic-product-card.css
 */

/* Products Grid Container */
.products-grid-container {
    width: 100%;
    margin: 20px 0;
}

.products-grid {
    display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
}

/* Product Card - Matching your existing structure */
.product-card {
    background: transparent;
    border-radius: 0;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
}

.page-layout-2columns-left .column.main{
    width: 82% !important;
}
.product-card a {
    font-size: 14px;
    margin-bottom: 0;
    font-family: 'Mulish';
    font-weight: 500;
    line-height: normal;
    color: #333;
    margin: 0;
}

/* Product Image Container */
.product-image {
    position: relative;
    height: 370px;
    overflow: hidden;
    background: #f8f8f8;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
}

.product-image .main-image {
    display: block;
}

.product-image .hover-image {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transform: scale(1.05);
}

.product-card:hover .main-image {
    opacity: 0;
    transform: scale(1.05);
}

.product-card:hover .hover-image {
    opacity: 1;
    transform: scale(1);
}

/* Product Badge */
.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 12px;
    background: #2196F3;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 4px;
    text-transform: uppercase;
    z-index: 5;
}

.product-badge.sale {
    background: #FF5722;
}

/* Wishlist Button */
.wishlist-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    border: none !important;
    backdrop-filter: blur(10px);
}
.wishlist-btn .outline-heart {
    opacity: 1;
}

/* Hide the solid heart by default */
.wishlist-btn .solid-heart {
    opacity: 0;
    color: #FF0000; /* Pre-set color for the solid heart */
}

/* ⭐ CRITICAL FIX: Active State Icon Toggle */
.wishlist-btn.active .outline-heart {
    opacity: 0; /* Hide the outline heart */
}

.wishlist-btn.active .solid-heart {
    opacity: 1; /* Show the solid heart */
    color: #FF0000; /* Red Heart when active */
}
.product-card:hover .wishlist-btn {
    opacity: 1;
    transform: translateY(0);
}

.wishlist-btn:hover {
    background: #fff;
    transform: scale(1.1) translateY(0);
}

.wishlist-btn svg {
    color: #666;
    transition: color 0.3s ease;
}

.wishlist-btn:hover svg {
    color: #e91e63;
}

/* Color Options */
.color-options {
    position: absolute;
    bottom: 15px;
    right: 0%;
    display: flex;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 5;
}

.product-card:hover .color-options {
    opacity: 1;
}

.color-option-btn {
    padding: 0;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.color-option-btn:hover,
.color-option-btn.active {
    border: 1px solid #fff;
}



/* Color Variations */
.color-gold {
    background: linear-gradient(45deg, #FFD700, #FFA500);
}

.color-silver {
    background: linear-gradient(45deg, #C0C0C0, #E5E5E5);
}

.color-rose-gold {
    background: linear-gradient(45deg, #E8B4A0, #D4A574);
}

.color-white {
    background: #ffffff;
    border-color: #ddd;
}

.color-black {
    background: #333333;
}

/* Product Info */
.product-info {
    padding: 0px;
}

.product-title {
    font-size: 14px;
    margin-bottom: 0;
    font-family: 'Mulish';
    font-weight: 500;
    line-height: normal;
    color: #333;
    margin: 0;
}

.product-card:hover .product-title {
    color: #000;
}

.product-price {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    padding-top: 6px;
}

/* Magento Price Structure */
.product-price .price-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-price .old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
    font-weight: 400;
}

.product-price .special-price {
    color: #e91e63;
}

/* Product Actions */
.product-actions {
    padding: 0 20px 20px;
}

.btn-add-to-cart,
.btn-choose-options {
    width: 100%;
    padding: 12px 20px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-add-to-cart:hover,
.btn-choose-options:hover {
    background: #2196F3;
    transform: translateY(-1px);
}

/* JavaScript Interaction Classes */
.product-card.loading {
    pointer-events: none;
    opacity: 0.7;
}

.product-card.add-to-cart-success .btn-add-to-cart {
    background: #4CAF50;
}

@keyframes addToCartSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.product-card.add-to-cart-success {
    animation: addToCartSuccess 0.6s ease;
}

/* Debug Info Styling */
.debug-info {
    background: #f0f0f0;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: monospace;
}

/* Responsive Design */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .product-info {
        padding: 15px;
    }
    
    .product-actions {
        padding: 0 15px 15px;
    }
    
    .product-badge {
        top: 10px;
        left: 10px;
        font-size: 10px;
        padding: 4px 8px;
    }
    
    .wishlist-btn {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
    }
    
    .color-options {
        bottom: 10px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 10px;
    }
    
    .product-card {
        border-radius: 6px;
    }
    
    .product-info {
        padding: 12px;
    }
    
    .product-actions {
        padding: 0 12px 12px;
    }
    
    .product-title {
        font-size: 14px;
    }
    
    .product-price {
        font-size: 16px;
    }
    
    .btn-add-to-cart,
    .btn-choose-options {
        padding: 10px 16px;
        font-size: 13px;
    }
}

.load-more-container {
    margin: 40px 0;
    padding: 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Products Count Info */
.products-count-info {
    display: flex;
    align-items: center;
    padding: 0;
    justify-content: center;
    margin-bottom: 0;
}

.count-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.showing-info {
    font-size: 14px;
    color: #737373;
    font-weight: 300;
}

.remaining-info {
    font-size: 14px;
    color: #999;
    margin-top: 2px;
}

/* Items Per Page Control */
.items-per-page-control {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
}

.per-page-label {
    color: #4a5568;
    margin: 0;
}

.select-wrapper {
    position: relative;
}

.per-page-select {
    appearance: none;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 35px 10px 15px;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    cursor: pointer;
    min-width: 70px;
    transition: all 0.3s ease;
}

.per-page-select:hover {
    border-color: #cbd5e0;
    background: #f7fafc;
}

.per-page-select:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.select-arrow-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #718096;
    transition: transform 0.2s ease;
}

.per-page-select:focus + .select-arrow-icon {
    transform: translateY(-50%) rotate(180deg);
}

/* Load More Actions */
.load-more-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 0;
    margin-top: 20px;
}

.load-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 40px;
    background: #000;
    color: white;
    border: none;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.load-more-btn:hover {
    background: #000;
    color: #fff;
}

.load-more-btn:active {
    transform: translateY(0);
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.load-more-btn .btn-text {
    font-size: 14px;
}

.load-more-btn .btn-icon {
    transition: transform 0.3s ease;
    width: 16px;
    height: 16px;
}

.load-more-btn .btn-icon svg {
    width: 16px;
    height: 16px;
}



.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e0;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
    background-color: #4299e1;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-label {
    font-size: 14px;
    color: #4a5568;
    font-weight: 500;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    margin: 30px 0;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loading-spinner {
    position: relative;
    width: 60px;
    height: 60px;
    border: none !important;
}

.spinner-logo {
    width: 100%;
    height: 100%;
    animation: spin 500s linear infinite;
}

.spinner-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.loading-message {
    font-size: 16px;
    color: #4a5568;
    font-weight: 500;
    margin: 0;
}
/* All Loaded Message */
.all-loaded-message {
    text-align: center;
    padding: 40px 20px;
    background: #f0fff4;
    border: 2px solid #9ae6b4;
    border-radius: 16px;
    margin: 30px 0;
}

.loaded-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.check-icon {
    color: #38a169;
    flex-shrink: 0;
}

.loaded-text {
    font-size: 16px;
    color: #38a169;
    font-weight: 600;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .products-count-info {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        align-items: center;
    }
    
    .count-text {
        align-items: center;
    }
    
    .load-more-actions {
        margin-top: 30px;
    }
    
    .load-more-btn {
        width: 100%;
        max-width: 300px;
    }
    
   
}

@media (max-width: 480px) {
    .load-more-container {
        margin: 20px 0;
    }
    
    .products-pagination-info {
        padding: 16px;
        margin-bottom: 20px;
    }
    
    .showing-info {
        font-size: 14px;
    }
    
    .remaining-info {
        font-size: 13px;
    }
    
    .items-per-page-control {
        font-size: 13px;
        gap: 8px;
    }
    
    .per-page-select {
        padding: 8px 30px 8px 12px;
        font-size: 13px;
    }
}

/* Devji Product Card Skeleton Loader */

/* Base shimmer animation */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Product card skeleton container */
.product-card-skeleton {
    display: block;
    background: white;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Product image skeleton */
.product-card-skeleton .skeleton-image-container {
    position: relative;
    width: 100%;
    height: 370px;
    overflow: hidden;
    border-radius: 0;
}

.product-card-skeleton .skeleton-main-image {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    background-image: linear-gradient(90deg, #f0f0f0, #e0e0e0, #f0f0f0);
    background-size: 200px 100%;
    background-repeat: no-repeat;
    animation: shimmer 1.5s ease-in-out infinite;
}

/* Product badge skeleton */
.product-card-skeleton .skeleton-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 60px;
    height: 20px;
    background: #e0e0e0;
    background-image: linear-gradient(90deg, #e0e0e0, #d0d0d0, #e0e0e0);
    background-size: 200px 100%;
    background-repeat: no-repeat;
    border-radius: 2px;
    animation: shimmer 1.5s ease-in-out infinite;
}

/* Wishlist button skeleton */
.product-card-skeleton .skeleton-wishlist {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: #e0e0e0;
    background-image: linear-gradient(90deg, #e0e0e0, #d0d0d0, #e0e0e0);
    background-size: 200px 100%;
    background-repeat: no-repeat;
    border-radius: 50%;
    animation: shimmer 1.5s ease-in-out infinite;
}

/* Color options skeleton */
.product-card-skeleton .skeleton-color-options {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    gap: 6px;
}

.product-card-skeleton .skeleton-color-option {
    width: 20px;
    height: 20px;
    background: #e0e0e0;
    background-image: linear-gradient(90deg, #e0e0e0, #d0d0d0, #e0e0e0);
    background-size: 200px 100%;
    background-repeat: no-repeat;
    border-radius: 50%;
    animation: shimmer 1.5s ease-in-out infinite;
}

/* Product info skeleton */
.product-card-skeleton .skeleton-product-info {
    padding: 11px 0;
}

/* Product title skeleton */
.product-card-skeleton .skeleton-title {
    width: 85%;
    height: 20px;
    margin-bottom: 8px;
    background: #f0f0f0;
    background-image: linear-gradient(90deg, #f0f0f0, #e0e0e0, #f0f0f0);
    background-size: 200px 100%;
    background-repeat: no-repeat;
    border-radius: 0;
    animation: shimmer 1.5s ease-in-out infinite;
}

.product-card-skeleton .skeleton-title-line2 {
    width: 60%;
    height: 16px;
    margin-bottom: 12px;
    background: #f0f0f0;
    background-image: linear-gradient(90deg, #f0f0f0, #e0e0e0, #f0f0f0);
    background-size: 200px 100%;
    background-repeat: no-repeat;
    border-radius: 0;
    animation: shimmer 1.5s ease-in-out infinite;
}

/* Product price skeleton */
.product-card-skeleton .skeleton-price {
    width: 70px;
    height: 18px;
    background: #f0f0f0;
    background-image: linear-gradient(90deg, #f0f0f0, #e0e0e0, #f0f0f0);
    background-size: 200px 100%;
    background-repeat: no-repeat;
    border-radius: 0;
    animation: shimmer 1.5s ease-in-out infinite;
}

/* Grid layout skeleton */
.products-skeleton-grid {
    display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
}

/* CTA Banner skeleton */
.cta-banner-skeleton {
    grid-column: 3 / 1;
    width: 100%;
    overflow: hidden;
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    margin: 20px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.cta-banner-skeleton .skeleton-banner-content {
    position: absolute;
    bottom: 30px;
    left: 35px;
    right: 35px;
}

.cta-banner-skeleton .skeleton-banner-subtitle {
    width: 120px;
    height: 12px;
    margin-bottom: 8px;
    background: #e0e0e0;
    background-image: linear-gradient(90deg, #e0e0e0, #d0d0d0, #e0e0e0);
    background-size: 200px 100%;
    background-repeat: no-repeat;
    border-radius: 4px;
    animation: shimmer 1.5s ease-in-out infinite;
}

.cta-banner-skeleton .skeleton-banner-title {
    width: 60%;
    height: 32px;
    margin-bottom: 20px;
    background: #e0e0e0;
    background-image: linear-gradient(90deg, #e0e0e0, #d0d0d0, #e0e0e0);
    background-size: 200px 100%;
    background-repeat: no-repeat;
    border-radius: 4px;
    animation: shimmer 1.5s ease-in-out infinite;
}

.cta-banner-skeleton .skeleton-banner-button {
    width: 140px;
    height: 40px;
    background: #e0e0e0;
    background-image: linear-gradient(90deg, #e0e0e0, #d0d0d0, #e0e0e0);
    background-size: 200px 100%;
    background-repeat: no-repeat;
    border-radius: 20px;
    animation: shimmer 1.5s ease-in-out infinite;
}

/* Loading overlay */
.products-loading-overlay {
    position: relative;
    min-height: 400px;
    background: rgba(255, 255, 255, 0.8);
}

.products-loading-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.5) 50%, transparent 70%);
    animation: shimmer 2s infinite;
    z-index: 1;
}

.products-loading-overlay .products-skeleton-grid {
    position: relative;
    z-index: 2;
}

/* Pulse animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.product-card-skeleton.pulse-style .skeleton-main-image,
.product-card-skeleton.pulse-style .skeleton-badge,
.product-card-skeleton.pulse-style .skeleton-wishlist,
.product-card-skeleton.pulse-style .skeleton-color-option,
.product-card-skeleton.pulse-style .skeleton-title,
.product-card-skeleton.pulse-style .skeleton-title-line2,
.product-card-skeleton.pulse-style .skeleton-price {
    animation: pulse 1.5s ease-in-out infinite;
    background: #e9ecef;
}

/* Wave animation */
@keyframes wave {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.product-card-skeleton.wave-style .skeleton-main-image,
.product-card-skeleton.wave-style .skeleton-badge,
.product-card-skeleton.wave-style .skeleton-wishlist,
.product-card-skeleton.wave-style .skeleton-color-option,
.product-card-skeleton.wave-style .skeleton-title,
.product-card-skeleton.wave-style .skeleton-title-line2,
.product-card-skeleton.wave-style .skeleton-price {
    position: relative;
    overflow: hidden;
    background: #e9ecef;
    animation: none;
}

.product-card-skeleton.wave-style .skeleton-main-image::after,
.product-card-skeleton.wave-style .skeleton-badge::after,
.product-card-skeleton.wave-style .skeleton-wishlist::after,
.product-card-skeleton.wave-style .skeleton-color-option::after,
.product-card-skeleton.wave-style .skeleton-title::after,
.product-card-skeleton.wave-style .skeleton-title-line2::after,
.product-card-skeleton.wave-style .skeleton-price::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: wave 1.8s infinite;
}

/* Responsive design */
@media (max-width: 1200px) {
    .products-skeleton-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .products-skeleton-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
        padding: 15px 0;
    }
    
    .product-card-skeleton .skeleton-image-container {
        height: 200px;
    }
    
    .product-card-skeleton .skeleton-product-info {
        padding: 12px;
    }
    
    .cta-banner-skeleton {
        height: 150px;
        margin: 15px 0;
    }
    
    .cta-banner-skeleton .skeleton-banner-content {
        bottom: 20px;
        left: 20px;
        right: 20px;
    }
    
    .cta-banner-skeleton .skeleton-banner-title {
        height: 24px;
        margin-bottom: 15px;
    }
    
    .cta-banner-skeleton .skeleton-banner-button {
        width: 120px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .products-skeleton-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.8rem;
    }
    
    .product-card-skeleton .skeleton-image-container {
        height: 150px;
    }
    
    .product-card-skeleton .skeleton-product-info {
        padding: 10px;
    }
    
    .cta-banner-skeleton {
        height: 120px;
        margin: 10px 0;
    }
}
