/* single-product.css — Modern Styling for Product Details */

/* =========================================
   GLOBAL LAYOUT HELPERS
   ========================================= */

/* The Container matches your Header width (1180px) */
.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px; /* Prevents touching edges on mobile */
    width: 100%;
    box-sizing: border-box;
}

/* Fix for Images stretching too wide */
.product-gallery-column img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* Improve Breadcrumb Spacing (Home / Category...) */
.woocommerce-breadcrumb {
    margin-bottom: 20px;
    font-size: 14px;
    color: #777;
}
.woocommerce-breadcrumb a {
    color: #008f8f; /* Teal */
    text-decoration: none;
}
.product-type-simple, 
.product-type-variable {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
    line-height: 1.6;
}

/* Fix the layout spacing */
div.product {
    margin-bottom: 60px;
}

/* =========================================
   2. PRODUCT IMAGES (Left Column)
   ========================================= */
.woocommerce-product-gallery {
    position: relative;
    margin-bottom: 40px;
}

.woocommerce-product-gallery img {
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

/* =========================================
   3. PRODUCT SUMMARY (Right Column)
   ========================================= */
.summary.entry-summary {
    padding-left: 20px; /* Space between image and text */
}

/* Title */
.product_title {
    font-size: 32px;
    font-family: Georgia, serif; /* Matches your branding */
    color: #071124;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
}

/* Price */
p.price {
    font-size: 24px;
    color: #008f8f; /* Brand Teal */
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

p.price del {
    color: #999;
    font-size: 18px;
    font-weight: normal;
    text-decoration: line-through;
    opacity: 0.7;
}

p.price ins {
    text-decoration: none;
    background: #e6f7f7;
    padding: 2px 8px;
    border-radius: 4px;
}

/* Short Description (The list with leaves) */
.woocommerce-product-details__short-description {
    font-size: 16px;
    color: #555;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.woocommerce-product-details__short-description p {
    margin-bottom: 10px;
}

/* =========================================
   4. ADD TO CART SECTION
   ========================================= */
form.cart {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 30px;
}

/* Quantity Input */
.quantity input.qty {
    width: 60px;
    height: 48px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* Add to Cart Button (Fixing the Purple!) */
button.single_add_to_cart_button {
    background-color: #008f8f !important; /* Brand Teal */
    color: #fff !important;
    border: none;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 50px; /* Pill Shape */
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

button.single_add_to_cart_button:hover {
    background-color: #006666 !important; /* Darker Teal */
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 143, 143, 0.3);
}

/* Meta Data (SKU, Category) */
.product_meta {
    font-size: 13px;
    color: #777;
    border-top: 1px solid #eee;
    padding-top: 15px;
}
.product_meta span {
    display: block;
    margin-bottom: 5px;
}
.product_meta a {
    color: #008f8f;
    text-decoration: none;
    font-weight: 600;
}

/* =========================================
   5. TABS SECTION (Description & Reviews)
   ========================================= */
.woocommerce-tabs {
    margin-top: 60px;
    clear: both;
}

/* Tab Headers */
.woocommerce-tabs ul.tabs {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    display: flex;
    border-bottom: 2px solid #eee;
}

.woocommerce-tabs ul.tabs li {
    border: none;
    background: transparent;
    margin: 0;
    padding: 0;
}

.woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 15px 30px;
    font-weight: 700;
    color: #777;
    text-decoration: none;
    font-size: 16px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.woocommerce-tabs ul.tabs li.active a {
    color: #008f8f; /* Active Teal */
    border-bottom-color: #008f8f;
}

/* Tab Content Box */
.woocommerce-tabs .panel {
    background: #fff;
    padding: 30px;
    border: 1px solid #eee;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
}

.woocommerce-tabs .panel h2 {
    font-size: 24px;
    font-family: Georgia, serif;
    margin-bottom: 20px;
    color: #071124;
}

.woocommerce-tabs .panel p {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 15px;
}

/* Feature List (Checkmarks) Styling */
.woocommerce-tabs .panel ul {
    list-style: none;
    padding: 0;
}
.woocommerce-tabs .panel ul li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}
.woocommerce-tabs .panel ul li::before {
    content: "✔"; /* Adds checkmark automatically */
    color: #008f8f;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* =========================================
   6. MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 768px) {
    .summary.entry-summary {
        padding-left: 0;
        margin-top: 30px;
    }
    .product_title {
        font-size: 26px;
    }
    button.single_add_to_cart_button {
        width: 100%; /* Full width button on mobile */
        padding: 15px;
    }
    .woocommerce-tabs ul.tabs li a {
        padding: 10px 15px;
        font-size: 14px;
    }
}

/* =========================================
   7. RELATED PRODUCTS GRID FIX
   ========================================= */

/* The Container Section */
.related.products {
    margin-top: 80px;
    border-top: 1px solid #eee;
    padding-top: 50px;
    clear: both; /* Ensures it sits below everything */
}

/* The Title ("Related products") */
.related.products > h2 {
    font-size: 28px;
    font-family: Georgia, serif;
    color: #071124;
    margin-bottom: 30px;
    font-weight: 700;
}

/* FORCE GRID LAYOUT (The Main Fix) */
.related.products ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr); /* 4 Cards in a row */
    gap: 30px;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* The Product Card Box */
.related.products ul.products li.product {
    width: 100%;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 15px;
    box-sizing: border-box; /* Prevents padding from breaking width */
    transition: all 0.3s ease;
    text-align: left;
}

/* Hover Effect */
.related.products ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

/* FIX THE HUGE IMAGE */
.related.products ul.products li.product img {
    width: 100%;
    height: 200px; /* Fixed height */
    object-fit: cover; /* Crops nicely */
    border-radius: 8px;
    margin-bottom: 15px;
    display: block;
}

/* Product Title */
.related.products ul.products li.product .woocommerce-loop-product__title {
    font-size: 16px;
    font-family: -apple-system, sans-serif;
    color: #333;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
    min-height: 44px; /* Keeps alignment even */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Price */
.related.products ul.products li.product .price {
    font-size: 16px;
    color: #008f8f; /* Brand Teal */
    font-weight: 700;
    display: block;
    margin-bottom: 15px;
}

/* "Add to Cart" Button */
.related.products ul.products li.product .button {
    background-color: #008f8f;
    color: #fff;
    padding: 10px 0;
    border-radius: 50px;
    width: 100%;
    display: block;
    text-align: center;
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
}
.related.products ul.products li.product .button:hover {
    background-color: #006666;
}

/* Responsive: 2 Columns on Mobile */
@media (max-width: 768px) {
    .related.products ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    /* Slightly smaller image on mobile */
    .related.products ul.products li.product img {
        height: 160px;
    }
}