/*
Theme Name: Tec5 Custom Product Page
Description: Styles for custom WooCommerce single product page
*/

:root {
    --tec5-main-color: #007078;
    --tec5-secondary-color: #DA2929;
    --tec5-text-dark: #333333;
    --tec5-text-light: #777777;
    --tec5-border-color: #EEEEEE;
    --tec5-bg-light: #F9F9F9;
    --tec5-font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Base Layout */
.tec5-custom-single-product {
    font-family: var(--tec5-font-family);
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    color: var(--tec5-text-dark);
}

/* Main Layout */
.tec5-product-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 50px;
    align-items: flex-start;
}

/* Override default WooCommerce floats */
.tec5-custom-single-product div.images {
    width: 100% !important;
    float: none !important;
}

/* Left Column: Gallery */
.tec5-product-gallery-section {
    flex: 1 1 50%;
    min-width: 300px;
    background: var(--tec5-bg-light);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tec5-product-gallery-section .woocommerce-product-gallery {
    width: 100%;
}

.tec5-product-gallery-section img {
    border-radius: 8px;
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Right Column: Details */
.tec5-product-details-section {
    flex: 1 1 calc(50% - 50px);
    min-width: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tec5-product-category {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--tec5-text-light);
    margin-bottom: 10px;
}

.tec5-product-category a {
    color: var(--tec5-text-light);
    text-decoration: none;
}

.tec5-product-title {
    font-size: 2.5rem;
    font-weight: 300;
    margin: 0 0 15px 0;
    color: var(--tec5-text-dark);
    line-height: 1.2;
}

.tec5-product-rating {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tec5-product-rating .star-rating {
    color: var(--tec5-secondary-color);
    font-size: 1rem;
}

.tec5-product-rating a {
    color: var(--tec5-text-light);
    font-size: 0.9rem;
    text-decoration: none;
}

/* Price and Quantity Row */
.tec5-price-qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--tec5-border-color);
}

.tec5-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--tec5-text-light);
    display: block;
    margin-bottom: 5px;
}

.tec5-product-price .price,
.tec5-product-price .woocommerce-Price-amount {
    font-size: 1.8rem !important;
    color: var(--tec5-secondary-color) !important;
    font-weight: 500 !important;
    margin: 0;
}

.tec5-product-price .price del,
.tec5-product-price .price del .woocommerce-Price-amount {
    color: var(--tec5-text-light) !important;
    font-size: 1.2rem !important;
    margin-right: 10px;
}

.tec5-product-price .price ins {
    text-decoration: none;
}

/* Tabs */
.tec5-product-tabs {
    margin-bottom: 40px;
}

.tec5-tab-buttons {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid var(--tec5-border-color);
    margin-bottom: 20px;
}

.tec5-tab-btn {
    background: none;
    border: none;
    padding: 10px 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--tec5-text-light);
    cursor: pointer;
    position: relative;
    font-family: inherit;
}

.tec5-tab-btn.active {
    color: var(--tec5-main-color);
    font-weight: 500;
}

.tec5-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--tec5-main-color);
}

.tec5-tab-content {
    display: none;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--tec5-text-light);
}

.tec5-tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Bottom Bar: Total & Add to Cart */
.tec5-total-price-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--tec5-text-light);
    margin-bottom: 5px;
}

.tec5-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.tec5-total-price-value .price {
    font-size: 1.5rem;
    color: var(--tec5-text-dark);
    margin: 0;
}

.tec5-add-to-cart-action {
    display: flex;
    align-items: center;
}

/* WooCommerce Add to Cart Button Override */
.tec5-custom-single-product form.cart {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0;
}

.tec5-custom-single-product form.cart .quantity {
    display: flex;
    align-items: center;
    background: var(--tec5-bg-light);
    border-radius: 25px;
    padding: 5px 15px;
}

.tec5-custom-single-product form.cart .quantity input.qty {
    width: 40px;
    text-align: center;
    background: transparent;
    border: none;
    font-size: 1rem;
    padding: 0;
    -moz-appearance: textfield;
}

.tec5-custom-single-product form.cart .quantity input::-webkit-outer-spin-button,
.tec5-custom-single-product form.cart .quantity input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tec5-custom-single-product form.cart .quantity .qty-btn {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: var(--tec5-text-light);
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.tec5-custom-single-product form.cart .quantity .qty-btn:hover {
    color: var(--tec5-main-color);
}

.tec5-custom-single-product .single_add_to_cart_button,
.tec5-custom-single-product form.cart button[type="submit"] {
    background-color: var(--tec5-secondary-color) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 30px !important;
    padding: 15px 40px !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease, transform 0.2s ease !important;
    box-shadow: 0 4px 15px rgba(218, 41, 41, 0.3) !important;
}

.tec5-custom-single-product .single_add_to_cart_button:hover,
.tec5-custom-single-product form.cart button[type="submit"]:hover {
    background-color: #bd2121 !important;
    transform: translateY(-2px) !important;
}

.tec5-product-meta {
    font-size: 0.85rem;
    color: var(--tec5-text-light);
    border-top: 1px solid var(--tec5-border-color);
    padding-top: 20px;
    margin-top: 20px;
}

.tec5-product-meta a {
    color: var(--tec5-main-color);
    text-decoration: none;
}

/* Related Products Styling */
.tec5-related-products {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}
.tec5-related-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--tec5-text-dark);
}
.tec5-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
}

.tec5-related-product-card {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.tec5-related-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,112,120,0.15); /* Teal glow */
}

.tec5-related-img-link {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

.tec5-related-img-link img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.tec5-related-product-card:hover .tec5-related-img-link img {
    transform: scale(1.05);
}

.tec5-related-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.tec5-related-name {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.tec5-related-name a {
    color: var(--tec5-text-dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

.tec5-related-name a:hover {
    color: var(--tec5-main-color);
}

.tec5-related-price {
    margin-bottom: 15px;
    margin-top: auto;
}

.tec5-related-price .price,
.tec5-related-price .woocommerce-Price-amount {
    color: var(--tec5-secondary-color) !important;
    font-weight: 600 !important;
    font-size: 1.2rem !important;
}

.tec5-related-price .price del {
    font-size: 0.9rem !important;
    color: #999 !important;
    margin-right: 5px;
}

.tec5-related-action .button {
    display: block !important;
    text-align: center !important;
    background-color: var(--tec5-main-color) !important; /* Teal button for related products to distinguish from main Red button */
    color: #fff !important;
    border-radius: 20px !important;
    padding: 10px 15px !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: background-color 0.2s ease !important;
}

.tec5-related-action .button:hover {
    background-color: #00565c !important;
}

/* Responsive */
@media (max-width: 768px) {
    .tec5-product-layout {
        flex-direction: column;
        gap: 30px;
    }
    .tec5-product-gallery-section, .tec5-product-details-section {
        flex: 1 1 100%;
    }
    .tec5-bottom-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .tec5-bottom-bar .tec5-add-to-cart-action {
        width: 100%;
    }
    .tec5-custom-single-product form.cart {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
}
