text: Title: Card layouts break and overlap when in a container of a constrained size and expanded
  Body: <details>
      <summary>Software Version Info</summary>
  
  ```plaintext
  panel == 1.6.1
  ```
  </details>
  
  #### Description of expected behavior and the observed behavior
  I expect the cards to respect the overflow property of the container they are in and not overlap when expanded.
  
  **Example 1 overflow: auto in column container**
  
  https://github.com/user-attachments/assets/78a749ae-f82b-4836-9b04-85464a60210a
  
  **Example 2 no overflow specified**
  
  https://github.com/user-attachments/assets/d9d82ab0-a5c3-43f8-9925-07e996223b30
  
  #### Complete, minimal, self-contained example code that reproduces the issue
  
  **Example 1 overflow: auto in column container**
  
  ```python
  import panel as pn
  
  
  card1 = pn.layout.Card(pn.pane.Markdown("""
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
  Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
  Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 
  Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. 
  Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
  """), title="Card 1")
  
  card2 = pn.layout.Card(pn.pane.Markdown("""
  In a world where technology and nature coexist, 
  the balance between innovation and preservation becomes crucial. 
  As we advance into the future, we must remember the lessons of the past, 
  embracing sustainable practices that honor our planet. 
  Together, we can forge a path that respects both progress and the environment, 
  ensuring a brighter tomorrow for generations to come.
  """), title="Card 2")
  
  pn.Column(card1, card2, height=200, styles={'overflow': 'auto'}).servable()
  ```
  
  **Example 2 no overflow specified**
  
  ```python
  import panel as pn
  
  
  card1 = pn.layout.Card(pn.pane.Markdown("""
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
  Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 
  Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 
  Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. 
  Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
  """), title="Card 1")
  
  card2 = pn.layout.Card(pn.pane.Markdown("""
  In a world where technology and nature coexist, 
  the balance between innovation and preservation becomes crucial. 
  As we advance into the future, we must remember the lessons of the past, 
  embracing sustainable practices that honor our planet. 
  Together, we can forge a path that respects both progress and the environment, 
  ensuring a brighter tomorrow for generations to come.
  """), title="Card 2")
  
  pn.Column(card1, card2, height=200).servable()
  ```
  
  I think this stems from the recalculation of this style, but I'm not quite sure how to get around it:
  
  ![Image](https://github.com/user-attachments/assets/70e53e29-2737-45a3-83f7-7531e9c19817)