/* International Sires Brown Swiss IT - Category Page Styles */

/* Fix for Price and Select Options layout - make them side by side */
.product-price-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #d9eaf9;
    border-bottom: 1px solid #e0e0e0;
    padding: 10px;
    gap: 10px;
}

.product-price {
    flex: 1;
    text-align: left;
    font-size: 18px;
    font-weight: 700;
    color: #003c71;
}

/* Mobile: row stacks to column (via australian-sires-page.css 576px block),
   so price needs centering. Without this override, the default text-align:left
   above wins over australian-sires-page.css's mobile centering because this
   file loads later. */
@media (max-width: 768px) {
    .product-price {
        text-align: center;
    }
}

.product-price .inc-gst {
    font-size: 14px;
    font-weight: 400;
    color: #666;
}

.product-select-button {
    flex-shrink: 0;
}

.select-options-btn {
    background-color: #9fdacc;
    color: #ffffff;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.select-options-btn:hover {
    background-color: #7fc4b0;
    color: #ffffff;
}

/* Fix white space below fields - Override the 2-row grid */
.product-stats {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    grid-template-rows: 1fr !important; /* Single row only for Brown Swiss */
    gap: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    height: auto !important;
    min-height: 55px !important;
}

/* H28: hide the stats block on bull grid cards while the design is finalised.
   display:none drops the block out of layout entirely, so each card shrinks
   by the block's height automatically — no additional sizing work needed.
   !important is needed to win against the grid rule above (which itself uses
   !important). To restore: delete this block (the original .product-stats
   rule above is preserved untouched). */
.product-stats {
    display: none !important;
}

/* Ensure stat items don't have extra height */
.stat-item {
    height: 55px !important;
    padding: 8px 5px !important;
    margin-bottom: 0 !important;
}

/* Remove any bottom margin/padding from the product card */
.australian-sires-product-card .product-stats:last-child {
    margin-bottom: 0 !important;
}

.product-fields {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.product-fields .field-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Ensure proper spacing for the grid */
.australian-sires-products-grid .product-card {
    margin-bottom: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

/* Table view styles */
.australian-sires-data-table {
    width: 100%;
    background: #fff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: none; /* Hidden by default */
}

.australian-sires-data-table.visible {
    display: block !important;
}

.australian-sires-table {
    width: 100%;
    border-collapse: collapse;
}

.australian-sires-table thead {
    background-color: #003c71;
    color: white;
}

.australian-sires-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.australian-sires-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
}

.australian-sires-table tbody tr:hover {
    background-color: #f5f5f5;
}

.australian-sires-table td {
    padding: 10px 12px;
    font-size: 14px;
    vertical-align: middle;
}

.australian-sires-table .column-image {
    width: 80px;
    text-align: center;
}

.australian-sires-table .column-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.australian-sires-table .column-price {
    font-weight: 600;
    color: #003c71;
}

.australian-sires-table .column-actions {
    text-align: center;
}

.australian-sires-table .select-options-btn,
.australian-sires-table .select-options {
    padding: 6px 12px;
    font-size: 13px;
    background-color: #9fdacc;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.australian-sires-table .select-options-btn:hover,
.australian-sires-table .select-options:hover {
    background-color: #7fc4b0;
    color: #ffffff;
}

/* View toggle active states */
.view-toggle a {
    padding: 8px 16px;
    margin: 0 5px;
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.view-toggle a.active {
    background-color: #003c71;
    color: white;
    border-color: #003c71;
}

.view-toggle a:hover {
    background-color: #f0f0f0;
}

.view-toggle a.active:hover {
    background-color: #0f2f4f;
}

/* Hide grid when table view is active */
.table-view-active .australian-sires-products-grid {
    display: none !important;
}

.table-view-active .australian-sires-data-table {
    display: block !important;
}

/* Hide table when grid view is active */
.grid-view-active .australian-sires-data-table {
    display: none !important;
}

.grid-view-active .australian-sires-products-grid {
    display: grid !important;
}

/* Video view styles */
.video-view-active .australian-sires-products-grid {
    display: grid !important;
}

.video-view-active .product-video-container {
    display: block !important;
}

.video-view-active .product-image {
    display: none !important;
}