/*
Theme Name:       InstaDigital Shop (Divi Child)
Theme URI:        https://instadigital.shop
Description:      A highly optimized Divi child theme for selling digital products, clip art, KDP interiors, and design bundles.
Author:           Principal WordPress Architect
Author URI:       https://instadigital.shop
Template:         Divi
Version:          1.0.0
License:          GNU General Public License v2 or later
License URI:      http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:      instadigital-shop
*/

/* ==========================================================================
   WooCommerce Digital Product Grid Enhancements
   ========================================================================== */

/* Equalize product heights for a clean grid layout */
.woocommerce ul.products li.product {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding-bottom: 20px;
    overflow: hidden;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 1.1rem;
    padding: 15px 15px 0 15px;
    margin-bottom: 10px;
    text-align: center;
}

.woocommerce ul.products li.product .price {
    text-align: center;
    color: #333333;
    font-weight: 700;
    margin-bottom: 15px;
}

.woocommerce ul.products li.product .button {
    margin: 0 15px;
    border-radius: 4px;
    text-align: center;
}

/* ==========================================================================
   Custom "Instant Download" Badge Styling
   ========================================================================== */

.woocommerce span.onsale, 
.woocommerce-page span.onsale,
.instadigital-badge {
    background: #27ae60 !important;
    color: #ffffff !important;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: absolute;
    top: 10px;
    left: 10px;
    right: auto;
    min-height: auto;
    min-width: auto;
    line-height: 1;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(39, 174, 96, 0.4);
}

/* ==========================================================================
   Responsive Checkout Styling (Streamlined for Digital)
   ========================================================================== */

.woocommerce-checkout .woocommerce {
    max-width: 900px;
    margin: 0 auto;
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.woocommerce-checkout #customer_details {
    margin-bottom: 40px;
}

.woocommerce-checkout .col2-set .col-1, 
.woocommerce-checkout .col2-set .col-2 {
    width: 100%;
    float: none;
}

/* Hide Order Notes label if empty, otherwise style nicely */
.woocommerce-checkout .woocommerce-additional-fields h3 {
    display: none;
}

/* Make checkout fields look modern */
.woocommerce form .form-row input.input-text, 
.woocommerce form .form-row textarea {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px 15px;
    background: #fafafa;
    transition: border-color 0.3s ease;
}

.woocommerce form .form-row input.input-text:focus, 
.woocommerce form .form-row textarea:focus {
    border-color: #0073aa;
    background: #ffffff;
    outline: none;
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
    .woocommerce-checkout .woocommerce {
        padding: 20px;
    }
    
    .woocommerce ul.products li.product {
        margin-bottom: 20px;
    }
}




/* ==========================================================================
   InstaDigital Modern UI Overhaul (Gumroad/Minimalist Style)
   ========================================================================== */

/* 1. Global Typography & Spacing */
body, .et_pb_module, .woocommerce ul.products li.product h3 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    color: #1a1a1a;
}

/* 2. Modernize the Buttons (Flat, Rounded, Hover Lift) */
.woocommerce a.button, 
.woocommerce button.button, 
.woocommerce input.button, 
.woocommerce #respond input#submit,
.instadigital-direct-btn {
    background-color: #000000 !important; /* Sleek dark mode button */
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important; /* Soft corners */
    padding: 14px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-transform: none !important; /* Remove dated uppercase */
    letter-spacing: 0px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: auto;
}

.woocommerce a.button:hover, 
.woocommerce button.button:hover, 
.instadigital-direct-btn:hover {
    background-color: #333333 !important;
    transform: translateY(-2px) !important; /* Modern hover lift */
    box-shadow: 0 8px 16px rgba(0,0,0,0.15) !important;
}

/* Make the Direct Download button full width on single product pages */
.instadigital-direct-download .button {
    width: 100% !important;
    padding: 18px 24px !important;
    font-size: 18px !important;
}

/* 3. Soften the Product Grid Cards */
.woocommerce ul.products li.product {
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    background: #ffffff;
    padding: 0 0 20px 0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.woocommerce ul.products li.product:hover {
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    transform: translateY(-4px);
}

/* Clean up product images within the grid */
.woocommerce ul.products li.product img {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    margin-bottom: 15px;
    width: 100%;
    height: auto;
}

/* Clean up product titles in the grid */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 1.15rem !important;
    font-weight: 600;
    padding: 0 15px !important;
    margin-bottom: 8px;
    line-height: 1.4;
}

/* Modernize grid pricing */
.woocommerce ul.products li.product .price {
    font-size: 1.1rem !important;
    font-weight: 700;
    color: #4a4a4a !important;
    padding: 0 15px;
}

/* 4. Modernize the Single Product Page */
.woocommerce div.product div.images img {
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.woocommerce div.product .product_title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.woocommerce div.product p.price {
    font-size: 1.75rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 25px;
}

/* Hide dated WooCommerce meta data (SKU, Categories) to keep it minimal */
.woocommerce div.product .product_meta {
    display: none !important; 
}

/* 5. Modernize Form Inputs (Checkout & Quantities) */
input[type="text"], input[type="email"], input[type="tel"], textarea {
    background-color: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 14px 16px !important;
    color: #111827 !important;
    font-size: 16px !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

input[type="text"]:focus, input[type="email"]:focus, textarea:focus {
    background-color: #ffffff !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    outline: none !important;
}






/* Update Button Colors to match the new Cyan Logo */
.woocommerce a.button, 
.woocommerce button.button, 
.woocommerce input.button, 
.instadigital-direct-btn {
    background-color: #00C2FF !important; /* The Logo Cyan */
    color: #ffffff !important;
    border-radius: 12px !important; /* Softer, thicker curves */
    font-weight: 700 !important;
}

.woocommerce a.button:hover, 
.woocommerce button.button:hover, 
.instadigital-direct-btn:hover {
    background-color: #00A6DB !important; /* Slightly darker cyan for hover */
    box-shadow: 0 8px 16px rgba(0, 194, 255, 0.25) !important; /* Cyan glow effect */
}

/* Make product prices match the brand color */
.woocommerce ul.products li.product .price,
.woocommerce div.product p.price {
    color: #00C2FF !important;
}