/* --- PRODUCT PAGE: Main Layout & Right Column --- */
#product-product #content > .row + .row > .col-sm-12 {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 40px;
    border: 1px solid #e9e9e9;
}
#product-product .col-sm-4 {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 40px;
    border: 1px solid #e9e9e9;
    align-self: flex-start;
}
@media (max-width: 767px) {
    #product-product .row { gap: 0; }
}
#product-product h1 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 10px;
    margin-bottom: 15px;
}
#product-product .list-unstyled h2 {
    font-size: 36px;
    font-weight: 700;
    color: #6f4e37;
    margin-bottom: 20px;
}
#product-product .list-unstyled li {
    font-size: 15px;
    color: #666;
    margin-bottom: 8px;
}
#product-product .list-unstyled li a {
    color: #333;
    font-weight: 600;
    text-decoration: none;
}
#product-product .list-unstyled li a:hover {
    text-decoration: underline;
}
#product {
    margin-top: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}
#product .form-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin-bottom: 0;
}
#product .form-group label.control-label {
    font-weight: 600;
    font-size: 16px;
    width: 100%;
    margin-bottom: 5px;
}
#input-quantity {
    width: 80px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    border-radius: 5px;
    height: 50px;
    border: 1px solid #ccc;
}
#button-cart {
    flex-grow: 1;
    background: #6f4e37;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 15px 20px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 16px;
    transition: background-color 0.2s ease;
    height: 50px;
}
#button-cart:hover {
    background: #5a3f2d;
}
#product-product .col-sm-4 > .btn-group {
    margin-bottom: 15px;
}
#product-product .col-sm-4 > .btn-group .btn {
    background: #fff;
    border: 1px solid #ddd;
    color: #777;
    border-radius: 5px;
}
#product-product .col-sm-4 > .btn-group .btn:hover {
    background: #6f4e37;
    border-color: #6f4e37;
    color: #fff;
}
#product-product .rating {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

/* --- PRODUCT PAGE: Left Column (Gallery & Tabs) --- */
#product-product .thumbnails {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
#product-product .thumbnails > li:first-child {
    flex-basis: 100%;
    margin-bottom: 5px;
    border: 1px solid #e9e9e9;
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
}
#product-product .thumbnails > li:first-child img {
    width: 100%;
    display: block;
}
#product-product .thumbnails > li:not(:first-child) {
    flex: 0 0 90px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}
#product-product .thumbnails > li:not(:first-child):hover,
#product-product .thumbnails > li.active {
    border-color: #6f4e37;
}
#product-product .thumbnails img {
    max-width: 100%;
    border-radius: 4px;
}
#product-product .nav-tabs {
    border-bottom: 2px solid #e9e9e9;
    margin-bottom: 25px;
    margin-top: 40px;
}
#product-product .nav-tabs > li {
    margin-bottom: -2px;
    margin-right: 25px;
}
#product-product .nav-tabs > li > a {
    border: none !important;
    border-radius: 0 !important;
    background: none !important;
    color: #666;
    font-size: 18px;
    font-weight: 600;
    padding: 10px 0;
    margin-right: 0;
    transition: color 0.2s ease;
    border-bottom: 2px solid transparent;
}
#product-product .nav-tabs > li > a:hover {
    color: #333;
}
#product-product .nav-tabs > li.active > a,
#product-product .nav-tabs > li.active > a:hover,
#product-product .nav-tabs > li.active > a:focus {
    color: #6f4e37;
    border-bottom: 2px solid #6f4e37;
}
#product-product .tab-content {
    line-height: 1.7;
    color: #444;
    padding: 15px 0;
}
#product-product .tab-content p {
    margin-bottom: 1.5em;
}
#tab-specification .table {
    border: none;
    width: 100%;
}
#tab-specification .table thead td {
    font-size: 18px;
    font-weight: 700;
    border-bottom: 2px solid #e9e9e9;
    padding: 8px 0 10px 0;
}
#tab-specification .table tbody td {
    padding: 12px 8px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 15px;
}
#tab-specification .table tbody tr:last-child td {
    border-bottom: none;
}
#tab-specification .table tbody td:first-child {
    font-weight: 600;
    color: #333;
    width: 30%;
}

#product-product .product-info-wrapper {
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

/* Override for product card button hover text color */
.product-thumb .button-group button:hover {
    color: #fff; /* White text on hover */
}

/* Align product description to the left on mobile */
@media (max-width: 767.98px) {
  #product-product .tab-content {
    text-align: left !important;
  }
}

/* --- Product Grid/List Card Styles --- */
.product-thumb {
    background: #ffffff;
    border: 1px solid #e9e9e9;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 15px;
    margin-bottom: 30px;
    overflow: hidden; /* Prevents content from spilling out */
}

.product-thumb:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.product-thumb .image {
    text-align: center;
    margin-bottom: 15px;
}

.product-thumb .image img {
    max-width: 100%;
    height: auto;
}

.product-thumb .caption {
    text-align: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-thumb .caption h4 {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
    flex-grow: 1; /* Allows title to take up space, pushing price/button down */
}

.product-thumb .caption h4 a {
    color: #333;
    text-decoration: none;
}

.product-thumb .caption p {
    font-size: 13px;
    color: #666;
    flex-grow: 1;
    margin-bottom: 15px;
}

.product-thumb .price {
    font-size: 18px;
    font-weight: 700;
    color: #6f4e37; /* Brown color from theme */
    margin-top: 10px;
    margin-bottom: 15px;
}

.product-thumb .button-group {
    margin-top: auto; /* Pushes button to the bottom */
}

.product-thumb .button-group button {
    background: #6f4e37;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
    transition: background-color 0.2s ease;
    width: 100%;
}

.product-thumb .button-group button:hover {
    background: #5a3f2d;
    color: #fff;
}

/* --- List View Specific Adjustments --- */
.product-layout.product-list .product-thumb {
    flex-direction: row;
    align-items: center;
}

.product-layout.product-list .product-thumb .image {
    flex-basis: 200px;
    flex-shrink: 0;
    margin-right: 20px;
    margin-bottom: 0;
}

.product-layout.product-list .product-thumb > div:not(.image) {
    flex-grow: 1;
}

.product-layout.product-list .product-thumb .caption {
    text-align: left;
    padding: 0;
}

.product-layout.product-list .product-thumb .button-group {
    text-align: left;
    margin-top: 15px;
}

.product-layout.product-list .product-thumb .button-group button {
    width: auto;
}
