/* 
 * eSIM Product Styles
 * Custom CSS for product display and search results
 */

/* Product search results spacing */
.row-cols-1.row-cols-sm-2.row-cols-lg-3.gx-4.gy-5 {
    margin-bottom: 2rem !important;
}

/* Search result item spacing */
.col {
    padding: 1rem;
    transition: transform 0.2s;
}

.col:hover {
    transform: translateY(-5px);
}

/* Product card styles */
.block2 {
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    overflow: hidden;
    height: 100%;
    transition: all 0.3s;
}

.block2:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Improved price styling */
.stext-105.cl3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333 !important;
    margin-top: 0.5rem;
}

/* Original price styling when discounted */
.product-price-regular {
    font-size: 0.9rem;
    color: #999;
    text-decoration: line-through;
    margin-left: 0.5rem;
}

/* Discount percentage style */
.product-price-saving {
    background-color: #e53935;
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 0.5rem;
}

/* Category page price display - fixing the screenshot layout */
.col > .card {
    height: 100%;
    transition: transform 0.2s, box-shadow 0.3s;
    position: relative;
}

.col > .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.product-price {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.card .product-price {
    color: #333;
    font-weight: 600;
}

/* Style for the original price when discounted */
.card .product-price-regular {
    display: block;
    width: 100%;
    margin-left: 0;
    margin-top: 0.25rem;
}

/* Discount indicator style */
.card .product-price-saving {
    margin-left: 0.5rem;
}

/* Better spacing for product information */
.block2-txt-child1 {
    padding: 0.5rem 0;
}

/* Product name styling */
.js-name-b2 {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 2.8rem;
}

/* Fix for product ratings display */
.block2-txt-child2 {
    display: flex;
    justify-content: flex-end;
}

/* Fix search result page container spacing */
.content-space-1 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* Improve product image display */
.block2-pic {
    position: relative;
    overflow: hidden;
    padding-top: 75%; /* 4:3 aspect ratio */
}

.block2-pic img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.block2:hover .block2-pic img {
    transform: scale(1.05);
}

/* Style for product block text area */
.block2-txt {
    padding: 1rem;
}

/* Japan search result specific styles */
.japan-esim-product .stext-105.cl3 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.japan-esim-product .product-price-saving {
    margin-left: 0.5rem;
}

.japan-esim-product .product-price-regular {
    flex-basis: 100%;
    margin-left: 0;
    margin-top: 0.25rem;
}

/* View Details styling */
.view-details-link {
    display: inline-block;
    background-color: #4CAF50;
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    margin-top: 0.5rem;
    text-decoration: none;
}

/* Category and Local eSIM Plans page specific styles */
.local-esim-plans .col {
    margin-bottom: 1.5rem;
}

/* Add more clarity to the price information */
.price-info {
    display: flex;
    flex-direction: column;
    margin-top: 0.5rem;
}

.price-current {
    font-weight: 700;
    color: #333;
    font-size: 1.1rem;
}

.price-old {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
}

.price-discount {
    color: #e53935;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Catalog page specific product styling */
.view-details {
    display: inline-block;
    margin-top: 8px;
    padding: 5px 10px;
    background-color: #17a2b8;
    color: white;
    border-radius: 4px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: background-color 0.3s;
}

.view-details:hover {
    background-color: #138496;
    text-decoration: none;
}

/* Styling for the specific pricing layout shown in screenshots */
.esim-package-name {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.esim-package-price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 5px;
}

.esim-current-price {
    font-weight: 700;
    color: #333;
    margin-right: 8px;
}

.esim-discount-badge {
    background-color: #e53935;
    color: white;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
}

.esim-old-price {
    font-size: 0.9rem;
    color: #999;
    text-decoration: line-through;
    margin-left: 5px;
}
