@charset "UTF-8";
/* CSS Document */


/* --- Grid Container and Item Styling (Unchanged) --- */
.wg-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px; 
}
.wg-product-grid-item {
    border: 1px solid var(--wg-medium-gray, #ccc);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

/* --- Image Container (Context for banner positioning) --- */
.wg-product-image-link {
    display: block;
    position: relative;
    margin-bottom: 20px; 
    overflow: hidden; 
    border-radius: 10px;
    line-height: 0; 
}

/* --- Product Image Styling (Unchanged) */
.wg-product-grid-item img.wg-product-grid-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

/* ------------------------------------------------ */
/* --- DISCOUNT RIBBON/BANNER STYLING --- */
/* ------------------------------------------------ */

.wg-discount-banner {
    position: absolute;
    top: 20px; /* Adjusted position */
    right: -40px; /* Adjusted position for longer banner */
    z-index: 10;
    
    /* Styling */
    background: var(--wg-gold, #FFD700); 
    color: #000;
    font-weight: bold;
    padding: 5px 30px;
    text-align: center;
    line-height: 1.2;
    font-size: 0.9em;

    /* Transformation to create the corner banner effect */
    transform: rotate(45deg);
    width: 180px; /* Increased width for better coverage */
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);

    /* --- Centering text precisely within the banner --- */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Product Name and Merchant Styling (Unchanged) --- */
.wg-product-grid-item h3 {
    margin-top: 0;
    margin-bottom: 5px; 
    font-size: 1.2em;
    line-height: 1.3;
}
.wg-product-grid-item a {
    text-decoration: none; 
    color: inherit;
}
.wg-product-grid-item a:hover h3,
.wg-product-grid-item a:hover .wg-product-merchant {
    text-decoration: underline;
}

/* *********************************************** */
/* --- Specific Discount Field Styling --- */
/* *********************************************** */
.wg-product-specific-discount {
    margin-top: 5px;
    margin-bottom: 0; 
    font-weight: bold; 
    font-size: 0.9em;
    color: var(--wg-green, #008000); 
}

/* --- Price Styling (Unchanged) --- */
.wg-product-price-container {
    margin-top: 0; 
    margin-bottom: 0;
}
.wg-product-sale-price {
    font-weight: bold;
    color: var(--wg-red, #ff0000); 
}
.wg-product-reg-price-large {
    font-weight: bold;
}
.wg-product-reg-price-small {
    font-size: 85%; 
    opacity: 0.7; 
}

/* ----------------------------------------------- */
/* --- NEW PRICE DESCRIPTION FIELD STYLING (UPDATED) --- */
/* ----------------------------------------------- */

/* Style for the description that appears BEFORE the price */
.wg-before-price-description-text {
    font-weight: bold; 
    font-size: 0.85em;
    color: inherit; /* FIX: Set to inherit to use the standard dark text color */
    margin-right: 3px; 
}

/* Style for the description that appears AFTER the price */
.wg-after-price-description-text {
    font-weight: normal; 
    font-size: 0.8em;
    color: inherit; /* FIX: Set to inherit to use the standard dark text color */
    margin-left: 3px; 
}

/* Updated legacy class to reflect new naming convention, but keep for now just in case */
.wg-price-notes-text {
    font-weight: normal; 
    font-size: 0.8em;
    color: inherit; /* FIX: Set to inherit to use the standard dark text color */
}

/* --- Pagination Styling (Unchanged) --- */
.wg-product-pagination {
    margin-top: 30px; 
    text-align: center;
    clear: both; 
}

.wg-product-price-varies {
    font-size: 1.2em; 
}


/* --- Responsive Breakpoints (Unchanged) --- */
@media (max-width: 1024px) {
    .wg-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .wg-product-grid {
        grid-template-columns: 1fr;
    }
}



/*
 * Styles for the [wg_random_recent_gift] shortcode (MODIFIED FOR FLEX LAYOUT)
 */

/* ----------------------------------------------- */
/* --- NEW FLEX CONTAINER FOR 1/3, 2/3 LAYOUT --- */
/* ----------------------------------------------- */
.wg-random-gift-flex-container {
    /* Use flexbox to organize content and image */
    display: flex;
    flex-wrap: nowrap; /* Prevent stacking on large screens */
    align-items: flex-start; /* Align content to the top */
    gap: 30px; /* Space between the info column and the image column */
    margin-bottom: 20px; /* Outer wrapper bottom margin */
}

/* 1/3 Content Column (Name/Merchant) */
.wg-random-gift-info {
    flex: 0 0 calc(33.333% - 15px); /* 1/3 width minus half the gap */
}

/* 2/3 Image Column */
.wg-random-gift-image-wrapper {
    flex: 0 0 calc(66.666% - 15px); /* 2/3 width minus half the gap */
    position: relative;
}

/* Image Styling: 100% width and 10px radius */
.wg-random-gift-image {
    max-width: 100%;
    width: 100%; 
    height: auto;
    display: block; 
    border-radius: 10px; 
    
    /* ADDED: Smooth transition for scaling */
    transition: transform 0.3s ease-in-out;
}

/* ADDED: Hover effect to increase size by 3% */
.wg-random-gift-image:hover {
    transform: scale(1.03);
}

/* Wrapper to contain the image and prevent overflow during hover */
/* Note: The image link <a> tag is inside the image wrapper DIV now */
.wg-random-gift-image-wrapper a {
    /* Hide the part of the image that might overflow the container on hover */
    overflow: hidden; 
    display: block;
    border-radius: 10px;
    line-height: 0; /* Prevents unwanted space below the image */
}

/* Title Styling: The <p> wrapper, REMOVING top margin since it's in the flex flow */
.wg-random-gift-title-p {
    margin-top: 0; /* Remove fixed top margin */
    font-size: 1.2em; 
    line-height: 1.2;
    padding: 0 !important;
}

/* Style for the merchant name paragraph */
.wg-random-gift-merchant {
    margin-top: 0;
    font-size: 0.9em; 
    margin-bottom: 0; /* Remove bottom margin to keep content tight */
}

/* Style for the placeholder when no featured image is set */
.wg-random-gift-placeholder {
    background-color: #eee;
    height: 200px; 
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #666;
    border: 1px dashed #ccc;
    border-radius: 10px; 
}

/* Added wrapper styling to ensure the hover overflow is managed */
.wg-random-recent-gift-wrapper {
    /* REMOVED: Since we are using the new flex container for layout, this wrapper only needs to manage overflow */
    position: relative;
    overflow: hidden; 
}

/* --- MOBILE STACKING (Below 1500px) --- */
/* MODIFIED: The breakpoint is changed from 1300px to 1500px */
@media (max-width: 1500px) {
    .wg-random-gift-flex-container {
        flex-direction: column; /* Stack the columns vertically */
        gap: 20px; /* Smaller gap when stacked */
    }
    .wg-random-gift-info,
    .wg-random-gift-image-wrapper {
        flex: 0 0 100%; /* Both take up full width when stacked */
    }
}