/*
Theme Name: buy2etsy Child
Theme URI: https://retro.tuttireal.com
Author: Daniel Collins
Description: This is a child theme for Buy2etsy
Version: 1.0
Author URI: https://retro.tuttireal.com
Template: buy2etsy
Text Domain: real-child
*/


/* Primary Menu Optimization */
.sv_primary_menu .e-con-inner {
    padding: 0;
}

/* Category Slider & Circular Images */
.sv_categorydiv .owl-item {
    float: none; /* Floats are legacy; Owl handles this now */
}

.sv_categorydiv .owl-dots, 
.sv_categorydiv .owl-nav {
    display: none !important;
}

.sv_categorydiv .owl-stage-outer {
    overflow: visible; /* Prevents "cutting off" circular borders on mobile */
}

.sv_categorydiv img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    aspect-ratio: 1 / 1; /* Forces circle even if image isn't square */
    border: 2px solid transparent; 
    transition: border-color 0.3s ease;
}

.sv_categorydiv img:hover {
    border-color: var(--tb-theme-color); /* Uses your red/orange theme color */
}

.sv_categorydiv .item p {
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
    font-weight: 500;
}

/* Newsletter Subscription - Modern Flexbox Layout */
#mc4wp-form-1 .mc4wp-form-fields,
footer .mc4wp-form-fields {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 50px;
    overflow: hidden; /* Clips the inner input/button to the radius */
    background: #fff;
}

footer .mc4wp-form-fields input[type="email"] {
    flex-grow: 1;
    border: 0;
    padding: 10px 20px;
    outline: none;
}

footer .mc4wp-form-fields button {
    border: 0;
    background: #fff;
    color: #000;
    padding: 0 25px;
    cursor: pointer;
    font-weight: 600;
    transition: color 0.3s;
}

footer .mc4wp-form-fields button:hover {
    color: var(--tb-theme-color);
}

/* Product & Grid Optimization */
.product.inner .name {
    font-weight: 600;
    margin-bottom: 0;
    line-height: 1.4;
}

.woocommerce div.product-block {
    padding: 0; 
    border: 0;
}

.product-block .image {
    border-radius: 8px; /* Slightly softer modern radius */
}

/* Posts Grid Modernization */
.elementor-widget-tbay-posts-grid .row.grid > .item .post {
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.elementor-widget-tbay-posts-grid .row.grid > .item .post:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

/* Selling Offer Panels - Responsive 4-Column Grid */
.panel-selling {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.panel-selling .panel {
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.panel-selling .panel .img-cat {
    background: url('images/hand-clap.png') no-repeat center center;
    padding: 45px 0;
    width: 100%;
    margin-top: -20px;
}

/* Dynamic Pricing Colors */
.woocommerce div.product p.price del, 
.woocommerce div.product span.price del {
    color: #258635; /* Discounted price green */
    opacity: 0.7;
}

.woocommerce div.product p.price, 
.woocommerce div.product span.price, 
.price ins {
    color: #000;
    font-weight: 700;
}

/* -------------------------------------------------------------------------
   RESPONSIVE OVERRIDES (MOBILE FIRST)
   ------------------------------------------------------------------------- */
@media (max-width: 767px) {
    .sv_categorydiv .owl-stage-outer {
        overflow: visible;
    }
    
    .sv_categorydiv .item p {
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .sv_categorydiv img {
        width: 80px; /* Smaller circles for mobile to fit more on screen */
        height: 80px;
    }

    .panel-selling .panel {
        width: 100%; /* Stack panels on mobile */
    }
}