/* ========================================
   PRODUCT ARCHIVE / SHOP PAGE
   Grid view uniform image height
   ======================================== */
.archive.woocommerce-shop .woocommerce-product-gallery {
    height: 280px;
    overflow: hidden;
}

.archive.woocommerce-shop .woocommerce-product-gallery img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.archive.woocommerce-shop ul.products li.product {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.archive.woocommerce-shop ul.products li.product .woocommerce-loop-product__link {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.archive.woocommerce-shop ul.products li.product img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    object-position: center;
}

/* ========================================
   PRODUCT SPEC TABLE STYLING
   ======================================== */
.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 8px;
    overflow: hidden;
}

.spec-table thead {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
}

.spec-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 12px;
}

.spec-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e8e8e8;
    vertical-align: top;
}

.spec-table tbody tr:hover {
    background-color: #f8f9fa;
}

.spec-table .category-cell {
    background-color: #f0f4f8;
    font-weight: 600;
    color: #1a1a2e;
    vertical-align: middle;
    min-width: 120px;
}

.spec-table td[rowspan] {
    background-color: #e8eff5;
    font-weight: 600;
    color: #16213e;
    border-right: 2px solid #fff;
}

.spec-table tr:hover td[rowspan] {
    background-color: #d4e0ed;
}

/* ========================================
   PRODUCT SECTION HEADINGS
   ======================================== */
.product-section-title {
    color: #1a1a2e;
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e6ed;
}

/* ========================================
   PRODUCT SPECS SECTION
   ======================================== */
.product-specs {
    margin-bottom: 30px;
}

/* ========================================
   PRODUCT DESCRIPTION STYLING
   ======================================== */
.product-description {
    margin-top: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
}

.product-description h4 {
    color: #1a1a2e;
    font-size: 16px;
    margin: 25px 0 12px;
}

.product-description h5 {
    color: #333;
    font-size: 14px;
    margin: 20px 0 10px;
    font-weight: 600;
}

.product-description p {
    line-height: 1.8;
    color: #444;
    margin-bottom: 15px;
}

.product-description ul {
    list-style: disc;
    margin-left: 25px;
    line-height: 1.8;
    color: #444;
}

.product-description ul li {
    margin-bottom: 8px;
}

/* ========================================
   PRODUCT GALLERY (inside woocommerce wrapper)
   Fixed width items, equal height, natural wrap
   ======================================== */
.woocommerce-product-gallery__wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
}

.woocommerce-product-gallery__wrapper .product-gallery-img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.woocommerce-product-gallery__wrapper .product-gallery-img:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* ========================================
   PRODUCT GALLERY IMGS (Content area)
   ======================================== */
p .product-gallery-img {
    width: 23%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: block;
    float: left;
    margin: 1%;
}

p .product-gallery-img:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Clear float after images */
p::after {
    content: "";
    display: table;
    clear: both;
}

/* ========================================
   PRODUCT IMAGES GRID (Description section)
   ======================================== */
.product-images-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
    margin: 20px 0 30px;
    gap: 15px;
}

.product-image-item {
    flex: 1 1 0;
    width: 25%;
    min-width: 150px;
    max-width: 25%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.product-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    object-position: center;
    border-radius: 6px;
}

.product-img-caption {
    margin: 8px 0 10px;
    font-size: 13px;
    color: #555;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */
@media (max-width: 768px) {
    .spec-table {
        font-size: 13px;
    }

    .spec-table th,
    .spec-table td {
        padding: 10px 12px;
    }

    .woocommerce div.product .product_title {
        font-size: 24px;
    }

    .woocommerce-product-gallery__wrapper {
        gap: 10px;
    }

    .woocommerce-product-gallery__wrapper .product-gallery-img {
        min-width: 120px;
        height: 120px;
    }

    .product-images-grid {
        gap: 10px;
    }

    .product-image-item {
        width: 45%;
        min-width: 140px;
    }

    .product-img {
        height: 140px;
    }
}