/* ============================================
   MODERN E-COMMERCE PRODUCT CARD UI
   Clean, Minimal, Mobile-First Design
   ============================================ */

/* ============================================
   PRODUCT CARD CONTAINER
   ============================================ */
.product {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid #f0f0f0;
}

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

/* ============================================
   PRODUCT IMAGE SECTION
   ============================================ */
.product_img {
    position: relative;
    overflow: hidden;
    background: #f9fafb;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.product:hover .product_img img {
    transform: scale(1.05);
}

/* ============================================
   ACTION BUTTONS - GLASSMORPHISM DESIGN
   Top-Right Floating Position
   ============================================ */
.product_action_box {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 10 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    align-items: flex-end !important;
    justify-content: flex-start !important;
    background: none !important;
    padding: 0 !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

.pr_action_btn {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    align-items: flex-end !important;
}

.pr_action_btn li {
    margin: 0 !important;
    display: block !important;
    position: relative !important;
    opacity: 1 !important;
    transform: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* ============================================
   ACTION BUTTON STYLES - GLASSMORPHISM
   ============================================ */
.pr_action_btn li a {
    /* Glassmorphism Effect */
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(12px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(180%) !important;

    /* Size - Accessibility (44px minimum) */
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;

    /* Shape & Spacing */
    border-radius: 12px !important;
    padding: 0 !important;
    margin: 0 !important;

    /* Border & Shadow */
    border: 1.5px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15),
                0 2px 4px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;

    /* Content */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;

    /* Typography */
    color: #1f2937 !important;
    font-size: 0 !important;
    text-decoration: none !important;

    /* Transitions */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;

    /* Ensure no text overlap */
    position: relative !important;
    z-index: 10 !important;
}

/* Icon Styles - Outline Style */
.pr_action_btn li a i {
    font-size: 20px !important;
    line-height: 1 !important;
    color: #4b5563 !important;
    stroke-width: 1.5 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: block !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    text-indent: 0 !important;
}

/* Remove text from buttons - Hide all text content */
.pr_action_btn li a {
    font-size: 0 !important;
    text-indent: -9999px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
}

.pr_action_btn li a span,
.pr_action_btn li a:not(:only-child) {
    display: none !important;
    font-size: 0 !important;
    text-indent: -9999px !important;
    overflow: hidden !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
}


/* ============================================
   HOVER STATES
   ============================================ */
.pr_action_btn li a:hover {
    /* Scale slightly */
    transform: scale(1.1) !important;

    /* Color accent */
    background: rgba(102, 126, 234, 0.95) !important;
    border-color: rgba(102, 126, 234, 0.3) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3),
                0 2px 6px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.pr_action_btn li a:hover i {
    color: #ffffff !important;
    transform: scale(1.1) !important;
}

/* ============================================
   ACTIVE STATES
   ============================================ */
.pr_action_btn li a:active {
    transform: scale(0.95) !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4) !important;
}

/* ============================================
   FAVORITE BUTTON SPECIFIC STYLES
   ============================================ */
.pr_action_btn li .save,
.pr_action_btn li a.save {
    /* Same base styles as above */
}

.pr_action_btn li .save:hover,
.pr_action_btn li a.save:hover {
    background: rgba(239, 68, 68, 0.95) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3),
                0 2px 6px rgba(0, 0, 0, 0.15) !important;
}

.pr_action_btn li .save:hover i,
.pr_action_btn li a.save:hover i {
    color: #ffffff !important;
}

/* Favorite Active State */
.pr_action_btn li .save.active,
.pr_action_btn li a.save.active {
    background: rgba(239, 68, 68, 0.9) !important;
    border-color: #ef4444 !important;
}

.pr_action_btn li .save.active i,
.pr_action_btn li a.save.active i {
    color: #ffffff !important;
}

/* ============================================
   ADD TO CART BUTTON SPECIFIC STYLES
   ============================================ */
.pr_action_btn li.add-to-cart a,
.pr_action_btn li .sags {
    /* Same base styles as above */
}

.pr_action_btn li.add-to-cart a:hover,
.pr_action_btn li .sags:hover {
    background: rgba(102, 126, 234, 0.95) !important;
    border-color: rgba(102, 126, 234, 0.3) !important;
}

.pr_action_btn li.add-to-cart a:hover i,
.pr_action_btn li .sags:hover i {
    color: #ffffff !important;
}

/* ============================================
   PRODUCT INFO SECTION
   Ensure Title and Price are Always Visible
   ============================================ */
.product_info {
    padding: 1rem 1.25rem 1.25rem 1.25rem !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    background: #ffffff !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Product Title */
.product_title {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.5 !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-height: 3em !important;
    max-height: 3em !important;
}

.product_title a {
    color: #1f2937 !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
    display: block !important;
}

.product_title a:hover {
    color: #667eea !important;
}

/* Product Price */
.product_price {
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    flex-wrap: wrap !important;
}

.product_price .price {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #667eea !important;
    line-height: 1.2 !important;
    margin: 0 !important;
}

.product_price del {
    font-size: 0.9rem !important;
    color: #9ca3af !important;
    text-decoration: line-through !important;
    font-weight: 500 !important;
    margin: 0 !important;
}

.product_price .on_sale {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 8px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
}

/* Sale Badge */
.sale_percentage {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    z-index: 5 !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    font-size: 0.875rem !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

/* Ensure sale badge doesn't overlap action buttons */
.product_action_box {
    top: 12px !important;
    right: 12px !important;
}

.sale_percentage {
    top: 12px !important;
    left: 12px !important;
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ============================================ */
@media (max-width: 767px) {
    /* Smaller buttons on mobile but still accessible */
    .pr_action_btn li a {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
    }

    .pr_action_btn li a i {
        font-size: 18px !important;
    }

    .product_action_box {
        top: 8px !important;
        right: 8px !important;
        gap: 6px !important;
    }

    .sale_percentage {
        top: 8px !important;
        left: 8px !important;
        padding: 0.4rem 0.6rem !important;
        font-size: 0.8rem !important;
    }

    .product_info {
        padding: 0.875rem 1rem 1rem 1rem !important;
    }

    .product_title {
        font-size: 0.9rem !important;
    }

    .product_price .price {
        font-size: 1.1rem !important;
    }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */
.pr_action_btn li a:focus {
    outline: 3px solid rgba(102, 126, 234, 0.5) !important;
    outline-offset: 2px !important;
}

.pr_action_btn li a:focus-visible {
    outline: 3px solid rgba(102, 126, 234, 0.5) !important;
    outline-offset: 2px !important;
}

/* Screen reader only text */
.pr_action_btn li a .sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border-width: 0 !important;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product {
    animation: fadeInUp 0.4s ease-out;
}

/* ============================================
   OVERRIDE EXISTING STYLES
   ============================================ */
.product:hover .product_action_box,
.product_box:hover .product_action_box,
.product_wrap:hover .product_action_box {
    opacity: 1 !important;
    transform: none !important;
}

.product_action_box li {
    opacity: 1 !important;
    transform: none !important;
}

/* Remove old center positioning */
.product_action_box {
    text-align: right !important;
    padding-top: 0 !important;
}

/* Ensure product text is never hidden */
.product_info {
    position: relative !important;
    z-index: 2 !important;
    background: #ffffff !important;
}

/* Prevent any overlap */
.product_img {
    position: relative !important;
    z-index: 1 !important;
}

.product_action_box {
    z-index: 10 !important;
}

.sale_percentage {
    z-index: 5 !important;
}

