/**
 * Shared Product Card Styles
 * Used across multiple shortcodes and product listings
 */

/* ============================================================================
   PRODUCT CARD - MODERN ETSY-INSPIRED DESIGN
   ========================================================================== */

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.product-card > * {
    order: 2;
}

.product-card-image {
    order: 1 !important;
}

.product-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

/* ============================================================================
   IMAGE CONTAINER
   ========================================================================== */

.product-card-image {
    position: relative;
    overflow: hidden;
    background-color: #f8f9fa;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    min-height: 0;
    width: 100%;
    display: block;
}

.product-card-image a {
    display: block;
    width: 100%;
    height: 100%;
    line-height: 0;
    position: absolute;
    top: 0;
    left: 0;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    vertical-align: top;
    max-width: 100%;
    position: relative;
}

.product-card:hover .product-card-image img {
    transform: scale(1.08);
}

/* ============================================================================
   CONTENT AREA
   ========================================================================== */

.product-card-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

/* ============================================================================
   TITLE
   ========================================================================== */

.product-card-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    min-height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-title a {
    color: var(--dark-grey);
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-card-title a:hover {
    color: var(--forest-green);
}

/* ============================================================================
   PRICE
   ========================================================================== */

.product-card-price {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-grey);
    line-height: 1;
}

.product-card-price-label {
    font-size: 0.8125rem;
    font-weight: 400;
    color: #868e96;
    margin-left: 0.375rem;
}

/* ============================================================================
   STOCK WARNING
   ========================================================================== */

.product-card-stock-warning {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #dc3545;
    margin: 0;
}

/* ============================================================================
   ATTRIBUTES
   ========================================================================== */

.product-card-attributes {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-top: 0.5rem;
}

.product-card-attribute {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--dark-grey);
    padding: 0.25rem 0;
}

.product-card-attribute i {
    font-size: 0.875rem;
}

/* ============================================================================
   ADD TO CART BUTTON
   ========================================================================== */

.product-card-actions {
    margin-top: auto;
    padding-top: 0.75rem;
}

.product-card-actions .button,
.product-card-actions .add_to_cart_button,
.product-card-actions a.button,
.woocommerce .product-card-actions .button,
.woocommerce .product-card-actions a.button {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--forest-green) !important;
    color: white !important;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9375rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-card-actions .button:hover,
.product-card-actions .add_to_cart_button:hover,
.product-card-actions a.button:hover,
.woocommerce .product-card-actions .button:hover,
.woocommerce .product-card-actions a.button:hover {
    background-color: var(--dark-green-grey) !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(93, 110, 79, 0.3);
}

.product-card-actions .button:active,
.product-card-actions .add_to_cart_button:active {
    transform: translateY(0);
}

/* Loading State */
.product-card-actions .loading::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* ============================================================================
   TABLET (768px+)
   ========================================================================== */

@media (min-width: 768px) {
    .product-card-title {
        font-size: 1.0625rem;
    }

    .product-card-price {
        font-size: 1.375rem;
    }
}

/* ============================================================================
   DESKTOP (1024px+)
   ========================================================================== */

@media (min-width: 1024px) {
    .product-card-content {
        padding: 1.25rem;
    }
}

/* ============================================================================
   LARGE DESKTOP (1440px+)
   ========================================================================== */

@media (min-width: 1440px) {
    .product-card-title {
        font-size: 1.125rem;
    }
}
