/* =========================================
   WOO PRODUCT ADDON - EVENT CARDS & STYLES
   ========================================= */

/* Grid Container */
.wc-event-grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Tablet & Desktop: 2 Spalten */
@media (min-width: 768px) {
    .wc-event-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Card Style */
.wc-event-card {
    display: flex;
    flex-direction: row;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-decoration: none !important;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
    /* Modern Inset Layout */
    padding: 15px;
    gap: 20px;
    align-items: center;
}

.wc-event-card.is-active:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #e0e0e0;
}

/* Image Area - Fixed Square 1:1 */
.wc-event-image {
    flex: 0 0 180px;
    width: 180px;
    height: 180px;
    position: relative;
    overflow: hidden;
    background: #f9f9f9;
    border-radius: 8px;
}

.wc-event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.5s ease;
    border-radius: 8px;
}

.wc-event-card.is-active:hover .wc-event-image img {
    transform: scale(1.05);
}

/* Content Area */
.wc-event-content {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.wc-event-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 700;
    color: #1a1a1a;
}

.wc-event-meta {
    margin-bottom: 15px;
}

.meta-row {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    color: #555;
    font-size: 14px;
}

.meta-row i {
    color: #333;
    margin-right: 8px;
    font-size: 16px;
    width: 16px;
    text-align: center;
}

/* Footer Area */
.wc-event-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.wc-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.wc-status-badge i {
    margin-right: 5px;
    font-size: 14px;
}

.wc-status-badge.in-stock {
    background-color: #e7f6e7;
    color: #2e7d32;
}

.wc-status-badge.sold-out {
    background-color: #f5f5f5;
    color: #888;
    text-decoration: line-through;
}

.is-sold-out .wc-event-image img {
    filter: grayscale(100%);
    opacity: 0.6;
}

.wc-arrow-link {
    font-size: 18px;
    color: #000;
    transition: transform 0.2s;
    margin-left: 10px;
}

.wc-event-card:hover .wc-arrow-link {
    transform: translateX(4px);
    color: #0071a1;
}

/* --- MOBILE OPTIMIZATION --- */
@media (max-width: 550px) {
    .wc-event-card {
        flex-direction: column;
    }
    
    .wc-event-image {
        flex: 0 0 auto;
        width: 100%;
        height: 180px;
    }
    
    .wc-event-content {
        padding: 20px;
    }
}

/* =========================================
   SINGLE PRODUCT PAGE STYLES
   ========================================= */

/* Stock Status Styling */
.stock.in-stock {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    background-color: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 30px;
    color: #1a1a1a !important; /* Force black text */
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.stock.in-stock i {
    margin-right: 8px;
    color: #1a1a1a; /* Force black icon */
    font-size: 16px;
}

/* Quantity Input Wrapper - Pill Shape */
.woocommerce div.product form.cart .quantity {
    display: flex;
    align-items: center;
    gap: 0; /* Remove gap, control with padding */
    margin-right: 0;
    float: none;
    border: 1px solid #e5e5e5;
    border-radius: 50px;
    padding: 5px;
    background: #fff;
    height: 50px; /* Fixed height */
    box-sizing: border-box;
}

/* Quantity Buttons (Custom JS injected) */
.qty-btn {
    background: transparent !important;
    border: none !important; /* Remove individual borders */
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px !important;
    font-weight: 400 !important;
    color: #333 !important;
    transition: all 0.2s;
    padding: 0 !important;
    line-height: 1 !important;
    margin: 0 !important;
}

.qty-btn:hover {
    background: #f5f5f5 !important;
    color: #000 !important;
}

/* Quantity Input Field */
.woocommerce div.product form.cart .quantity input.qty {
    width: 40px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 600;
    font-size: 16px;
    padding: 0;
    appearance: textfield;
    -moz-appearance: textfield;
    color: #1a1a1a;
}

/* Hide standard browser spinners */
.woocommerce div.product form.cart .quantity input.qty::-webkit-outer-spin-button,
.woocommerce div.product form.cart .quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Hide any other buttons that might be injected by theme/plugins */
.woocommerce div.product form.cart .quantity > *:not(input.qty):not(.qty-btn):not(label) {
    display: none !important;
}


/* Add to Cart Button */
.woocommerce div.product form.cart .button {
    background-color: #1a1a1a;
    color: #fff;
    border-radius: 50px; /* Match quantity pill */
    padding: 0 40px;
    height: 50px; /* Match quantity height */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid #1a1a1a;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0; /* Reset margin */
    flex-grow: 1; /* Fill remaining space */
    max-width: 300px; /* But don't get too huge */
}

.woocommerce div.product form.cart .button:hover {
    background-color: #fff;
    color: #1a1a1a;
}

/* Product Image - Prevent Cropping */
.woocommerce div.product div.images img {
    object-fit: contain !important;
    width: 100%;
    height: auto;
    border-radius: 12px; /* Soft corners */
    position: relative;
    z-index: 1; /* Ensure image is not covering controls if it has weird positioning */
}

/* Ensure form is clickable and aligned */
.woocommerce div.product form.cart {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Align left */
    gap: 15px; /* Space between quantity and button */
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.woocommerce div.product form.cart .button {
    /* margin-left: auto; Removed to keep them together */
}


/* Clean up Meta */
.product_meta {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 13px;
    color: #777;
}

.product_meta > span {
    display: block;
    margin-bottom: 5px;
}

/* Custom Details Section - Refined */
.custom-product-details {
    background: #ffffff;
    padding: 25px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    margin: 25px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
}

.custom-product-details h3 {
    margin-top: 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
    color: #999;
    font-weight: 600;
    border-bottom: 1px solid #f5f5f5;
    padding-bottom: 10px;
}

.custom-product-details p {
    margin-bottom: 12px;
    font-size: 15px;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed #f0f0f0;
    padding-bottom: 12px;
}

.custom-product-details p:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.custom-product-details strong {
    color: #1a1a1a;
    font-weight: 600;
}

/* More Details Button */
.more-details-button {
    display: inline-block;
    margin-top: 15px;
    margin-bottom: 10px;
    padding: 8px 20px;
    background-color: #f5f5f5;
    color: #333;
    border: none;
    border-radius: 30px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.more-details-button:hover {
    background-color: #e0e0e0;
    color: #000;
}

/* Full Description Section */
.product-full-description-section {
    margin-top: 60px;
    background: #ffffff;
    padding: 40px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    clear: both;
    width: 100%;
    max-width: 800px; /* Constrain width on desktop */
    margin-left: auto; /* Center block */
    margin-right: auto; /* Center block */
    scroll-margin-top: 120px;
    box-sizing: border-box;
}

.product-full-description-section h3 {
    font-size: 18px;
    margin-bottom: 25px;
    margin-top: 0;
    color: #1a1a1a;
    font-weight: 700;
    border-bottom: 1px solid #f5f5f5;
    padding-bottom: 15px;
}

/* Back to Shop Button */
.back-to-shop-container {
    text-align: center;
    margin-top: 50px;
    margin-bottom: 80px; /* Spacing to footer */
    clear: both;
    width: 100%;
}

.back-to-shop-button {
    display: inline-block;
    padding: 12px 35px;
    background-color: #ffffff;
    color: #333;
    border: 1px solid #e5e5e5;
    border-radius: 50px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.back-to-shop-button:hover {
    background-color: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
    transform: translateY(-2px);
}

/* Price & Tax Info Adjustments */
.woocommerce div.product p.price {
    font-size: 28px !important; /* Larger Price */
    color: #1a1a1a !important;
    margin-bottom: 0 !important; /* Pull tax info closer */
    line-height: 1.2;
}

.legal-price-info {
    margin-top: 0 !important;
    margin-bottom: 20px;
}

.wc-gzd-additional-info {
    margin-top: 0 !important;
}

.wc-gzd-additional-info .tax-info {
    font-size: 11px !important; /* Smaller Tax Info */
    color: #888;
    display: block;
    line-height: 1.2;
}


/* Product Gallery Thumbnails Customization */
.woocommerce div.product div.images .flex-control-thumbs {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-top: 15px !important;
    padding: 0 !important;
}

.woocommerce div.product div.images .flex-control-thumbs li {
    width: 11% !important; /* Fits ~8 items */
    float: none !important;
    margin: 0 !important;
    list-style: none !important;
}

.woocommerce div.product div.images .flex-control-thumbs li img {
    width: 100% !important;
    height: auto !important;
    border-radius: 4px;
    opacity: 0.5;
    transition: all 0.2s ease;
    display: block;
}

.woocommerce div.product div.images .flex-control-thumbs li img.flex-active,
.woocommerce div.product div.images .flex-control-thumbs li img:hover {
    opacity: 1;
    border: 1px solid #1a1a1a;
}

/* Single Product Title */
.woocommerce div.product .product_title {
    font-size: 1.8rem !important;
    font-weight: bolder !important;
}

/* Breadcrumb Styling - Pill Style */
.woocommerce .woocommerce-breadcrumb {
    background: #ffffff !important;
    padding: 10px 25px !important;
    border-radius: 50px !important;
    display: inline-block !important;
    border: 1px solid #e5e5e5 !important;
    font-size: 12px !important;
    color: #888 !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02) !important;
    margin-bottom: 30px !important;
}

.woocommerce .woocommerce-breadcrumb a {
    color: #1a1a1a !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    font-weight: 600 !important;
}

.woocommerce .woocommerce-breadcrumb a:hover {
    color: #555 !important;
    text-decoration: none !important;
}
