/* Styles for components/product-card.blade.php */
/* ========================= Enhanced Product Cards - Exact Search Blade Styles ========================= */
.shop-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 10px;
    margin: 0;
}

.shop-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* ========================= Simple Badge System ========================= */
.badge-container {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 15;
    pointer-events: none;
}

.product-card__label,
.shop-card__badge {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    background: var(--color-danger);
    color: white;
}

.product-card__label {
    background: var(--color-danger);
    color: white;
}

.shop-card__badge {
    background: var(--color-danger);
    color: white;
}

/* ========================= Compact Image Section with Padding ========================= */
.shop-card__image {
    position: relative;
    width: 100%;
    height: 0 !important;
    padding-bottom: 75% !important; /* 4:3 aspect ratio (768/1024 = 0.75) */
    overflow: hidden;
    background: linear-gradient(135deg, hsl(var(--section-bg)) 0%, hsl(var(--white)) 100%);
    border-radius: 16px;
    box-sizing: border-box;
}

.shop-card__image::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    background: linear-gradient(135deg, transparent 0%, hsl(var(--primary) / 0.03) 100%);
    z-index: 1;
    pointer-events: none;
    border-radius: 12px;
}

.shop-card__image img {
    width: calc(100% - 8px) !important;
    height: calc(100% - 8px) !important;
    object-fit: contain;
    object-position: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute !important;
    top: 4px !important;
    left: 4px !important;
    border-radius: 12px;
    box-shadow: 0 2px 12px hsl(var(--black) / 0.08);
    z-index: 2;
}

.shop-card__image .primary-image {
    opacity: 1;
    z-index: 3;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.shop-card__image .secondary-image {
    opacity: 0;
    z-index: 2;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* The photos swap only once the hover photo has loaded (site.js adds .is-hover-ready), so a card never blanks. */
.shop-card:hover .shop-card__image.is-hover-ready .primary-image {
    opacity: 0 !important;
    transform: scale(1.02) !important;
}

.shop-card:hover .shop-card__image.is-hover-ready .secondary-image {
    opacity: 1 !important;
    transform: scale(1.02) !important;
}

.shop-card:hover .shop-card__image img {
    box-shadow: 0 4px 16px hsl(var(--black) / 0.12);
}

/* ========================= Minimal Content Section ========================= */
.shop-card__content {
    padding: 8px 10px 0 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 5;
    background: linear-gradient(180deg, hsl(var(--white)) 0%, hsl(var(--white) / 0.98) 100%);
}

.shop-card__title {
    color: var(--color-text-soft);
    /* Dark color for title */
    font-size: 1.2rem;
    /* Slightly larger font for prominence */
    font-weight: bold;
    /* Bold text for product title */
    font-family: var(--font-sans);
    /* Consistent font family with other elements */
    margin-top: 5px;
  
    text-decoration: none;
    transition: color 0.3s ease;
    /* Smooth color transition on hover */
    text-align: left;
    /* Align the title to the left */
    white-space: nowrap;
    /* Prevent text wrapping */
    overflow: hidden;
    /* Hide overflowing text */
    text-overflow: ellipsis;
    /* Add ellipsis for overflowing text */
    display: inline-block;
    /* Ensure inline behavior */
}

.shop-card__title:hover {
    color: var(--base);
    text-decoration: underline;
    text-decoration-skip-ink: none;
}

/* Brand and Pricing Row */
.brand-price-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 10px 0;
    gap: 10px;
}

/* Left Column: Brand Name and SKU */
.brand-sku-column {
    display: flex;
    flex-direction: column;
    text-align: left;
    max-width: 50%;
    /* Adjust for proper column spacing */
}

.shop-card__category {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    text-decoration: none;
    color: var(--color-text-muted);
}

.shop-card__category:hover {
    color: var(--base);
    text-decoration: underline;
    text-decoration-skip-ink: none;
}

.shop-card__sku {
    font-size: 0.85rem !important;
    color: var(--color-text-muted);
    font-weight: 400 !important;
    text-decoration: none;
    white-space: nowrap;
    /* Prevent text wrapping */
    overflow: hidden;
    /* Hide overflowing text */
    text-overflow: ellipsis;
    /* Add ellipsis for overflowing text */
    display: inline-block;
    /* Ensure inline behavior */
}

.shop-card__sku:hover {
    color: var(--color-text);
}

/* Right Column: MSRP and Sale Price */
.price-column {
    display: flex;
    flex-direction: column;
    text-align: right;
    max-width: 50%;
    /* Adjust for proper column spacing */
}

.price-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
}

.price-label {
    font-size: 0.85rem !important;
    font-weight: 400;
    text-transform: uppercase;
}

.price-label.msrp {
    font-family: var(--font-sans);
    color: var(--color-text-soft);
}

.price-label.sale {
    font-family: var(--font-sans);
    color: var(--color-text-soft);
}

.price-regular {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    text-decoration: line-through;
    color: var(--color-text);
}

.price-typical {
    font-family: var(--font-sans);
    /* Standard web-safe font */
    color: var(--color-danger);
    /* Soft reddish tone from image */
    font-size: 1rem;
    font-weight: bold;
}

.price-typical:hover,
.price-regular:hover {
    text-decoration: underline;
    text-decoration-skip-ink: none;
}

.shop-card__sku-container {
    display: flex;
    /* Align wishlist, SKU, and compare buttons horizontally */
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    /* Space between elements in SKU container */
   
}

.wishlist-button {
    background: none !important;
    background-color: transparent !important;
    /* No background for the button */
    border: none !important;
    border-radius: 0 !important;
    /* No border or border radius for the button */
    padding: 0 !important;
    /* No padding for the button */
    margin: 0 !important;
    /* No margin for the button */
    cursor: pointer;
    /* Pointer cursor on hover */
    font-size: 1.2rem;
    /* Larger font size for icon */
    color: var(--color-text-muted);
    transition: color 0.3s ease;
    /* Smooth color transition */
    outline: none;
    /* Remove focus outline */
    box-shadow: none !important;
    /* Remove any box shadow */
    width: auto !important;
    height: auto !important;
    min-width: auto !important;
    min-height: auto !important;
    max-width: none !important;
    max-height: none !important;
}

.wishlist-button:hover {
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.wishlist-button i {
    transition: color 0.3s ease;
    /* Smooth transition for the heart icon */
}

.wishlist-button:hover i {
    color: var(--color-danger) !important;
    /* Only the heart icon turns red on hover */
}

.compare-button {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
    color: var(--color-text-muted);
    /* Gray color for compare button */
    transition: color 0.3s ease;
    /* Smooth color transition */
    gap: 5px;
}

.compare-button:hover {
    color: var(--color-text);
    /* Darker color on hover */
}

.shop-card__sku {
    color: var(--color-text-soft);
    /* Gray color for SKU */
    font-size: 0.9rem;
    text-decoration: none;
}

/* Image styling without enlarge effect */
.shop-card__image img {
    width: 100%;
    height: auto;
}

/* Hide the wishlist and compare buttons initially */
.wishlist-button,
.compare-button {
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.3s ease-in-out;
}

.shop-card:hover .wishlist-button,
.shop-card:hover .compare-button {
    visibility: visible;
    opacity: 1;
}

.shop-card__sku-container .wishlist-button:hover i,
.shop-card__sku-container .compare-button label:hover {
    color: #ff4b5c;
    /* Red color on hover */
}

/* ========================= Responsive Design ========================= */
@media (max-width: 768px) {
    .shop-card {
        padding: 8px;
        margin: 0;
        border-radius: 8px;
    }

    .shop-card__image {
        padding-bottom: 80% !important;
    }

    .badge-container {
        top: 14px;
        left: 14px;
        right: 14px;
    }

    .product-card__label,
    .shop-card__badge {
        padding: 6px 10px;
        font-size: var(--text-xs);
    }

    .shop-card__content {
        padding: 6px 8px 0 8px;
    }


    .brand-price-row {
        gap: 6px;
        margin-bottom: 6px;
        min-height: auto;
    }

    .brand-sku-column {
        gap: 2px;
    }

    .shop-card__category {
        font-size: 0.8rem;
    }

    .shop-card__sku {
        font-size: 0.75rem;
    }

    .price-column {
        padding: 4px 6px;
        gap: 2px;
        min-width: auto;
        border-radius: 8px;
    }

    .price-label {
        display: none;
    }

    .price-row {
        gap: 2px;
    }

    .price-regular {
        font-size: var(--text-xs);
    }

    .price-typical {
        font-size: 0.9rem;
    }

    .shop-card__sku-container {
        padding-top: 4px;
        gap: 4px;
    }

    .wishlist-button {
        width: 22px;
        height: 22px;
        font-size: var(--text-xs);
    }

    .compare-button {
        padding: 3px 6px;
        font-size: var(--text-xs);
        min-height: 22px;
    }

    .compare-label {
        font-size: var(--text-xs);
    }
}

@media (max-width: 480px) {
    .shop-card {
        padding: 6px;
    }

    .shop-card__image {
        padding-bottom: 85% !important;
    }

    .badge-container {
        top: 12px;
        left: 12px;
        right: 12px;
    }

    .product-card__label,
    .shop-card__badge {
        padding: 5px 8px;
        font-size: var(--text-xs);
    }

    .shop-card__content {
        padding: 4px 6px 0 6px;
    }

   

    .brand-price-row {
        gap: 4px;
        margin-bottom: 4px;
    }

    .shop-card__category {
        font-size: 0.75rem;
    }

    .shop-card__sku {
        font-size: var(--text-xs);
    }

    .price-column {
        padding: 3px 5px;
        gap: 1px;
    }

    .price-regular {
        font-size: var(--text-xs);
    }

    .price-typical {
        font-size: 0.85rem;
    }

    .shop-card__sku-container {
        padding-top: 3px;
    }

    .wishlist-button {
        width: 20px;
        height: 20px;
        font-size: var(--text-xs);
    }

    .compare-button {
        padding: 2px 5px;
        font-size: var(--text-xs);
        min-height: 20px;
    }

    .compare-label {
        font-size: var(--text-xs);
    }
}
