/*
 Theme Name:   Uwolnij Emocje
 Theme URI:    https://uwolnijemocje.pl/
 Description:  Motyw potomny dla Storefront (tymczasowo)
 Author:       AULON
 Author URI:   https://aulon.pl
 Template:     storefront
 Version:      1.0.0
 License:      Proprietary
 Text Domain:  uwolnijemocje
*/

/* --- UwolnijEmocje Brand Styles for WooCommerce --- */
@import url("https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Playfair+Display:wght@700&display=swap");

:root {
  --brand-purple: #583d72;
  --brand-purple-light: #c5378d;
  --brand-deep-purple: #7b4a7f;
  --brand-purple-dark: #4a3360;
  --brand-beige: #faf7f5;
  --brand-accent: #d4c2d8;
  --brand-gold: #e5c99f;
  --brand-text: #2d2d2d;
  --brand-light-text: #6b7280;
  --success-green: #34d399;
  --warning-red: #f87171;
  --font-serif: "Playfair Display", serif;
  --font-sans: "Lato", sans-serif;
}

body.woocommerce,
body.woocommerce-page {
  background-color: var(--brand-beige);
  color: var(--brand-text);
  font-family: var(--font-sans);
}

.woocommerce #content {
  margin-bottom: 0;
}

/* --- TYPOGRAPHY --- */
.woocommerce h1,
.woocommerce h2,
.woocommerce h3,
.woocommerce h4,
.woocommerce div.product .product_title {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--brand-purple);
}

.woocommerce div.product .product_title {
  font-size: 2.5rem;
  margin-bottom: 0.5em;
}
.woocommerce-cart h1,
.woocommerce-checkout h1 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 1.5em;
}

/* --- BUTTONS & FORMS --- */
.woocommerce .button,
.woocommerce button.button,
.woocommerce input.button {
  font-family: var(--font-sans);
  font-weight: 700;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  border: 2px solid transparent;
}

.woocommerce .button,
.woocommerce button.button:not(.alt),
.woocommerce .single_add_to_cart_button,
.woocommerce .wc-proceed-to-checkout a.button {
  background-color: var(--brand-purple);
  color: #fff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.woocommerce .button:hover,
.woocommerce button.button:not(.alt):hover,
.woocommerce .single_add_to_cart_button:hover,
.woocommerce .wc-proceed-to-checkout a.button:hover {
  background-color: var(--brand-purple-dark);
  color: #fff;
}

.woocommerce button.button.alt {
  background-color: transparent;
  border: 2px solid var(--brand-purple);
  color: var(--brand-purple);
  box-shadow: none;
}
.woocommerce button.button.alt:hover {
  background-color: var(--brand-purple);
  color: #fff;
}

.woocommerce a.remove {
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--warning-red) !important;
  border: 2px solid var(--warning-red);
  border-radius: 9999px;
  width: 32px;
  height: 32px;
  text-decoration: none;
  font-weight: 700;
}
.woocommerce a.remove:hover {
  background-color: var(--warning-red);
  color: #fff !important;
}

.woocommerce .quantity .qty,
.woocommerce-cart-form .coupon #coupon_code {
  border: 2px solid var(--brand-accent);
  border-radius: 9999px;
  padding: 0.75rem 1rem;
  text-align: center;
  font-weight: 700;
}
.woocommerce .quantity .qty {
  width: 80px;
}

/* --- MESSAGES & NOTICES --- */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  border-top-color: var(--brand-purple);
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
  color: var(--brand-purple);
}
.woocommerce-error {
  border-top-color: var(--warning-red);
}
.woocommerce-error::before {
  color: var(--warning-red);
}

/* --- SINGLE PRODUCT PAGE --- */
.woocommerce div.product .summary,
.woocommerce-tabs .panel {
  background-color: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  padding: 2rem;
}
.woocommerce div.product div.images.woocommerce-product-gallery {
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.woocommerce div.product p.price,
.woocommerce div.product span.price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand-purple);
  margin-bottom: 1em;
}
.woocommerce-tabs {
  margin-top: 3rem;
  display: grid;
}
.woocommerce-tabs ul.tabs {
  background: none;
  border: none;
  display: flex;
  gap: 0.5rem;
  padding-left: 0;
}
.woocommerce-tabs ul.tabs li {
  background: #fff;
  border: 1px solid var(--brand-accent);
  border-bottom: none;
  border-radius: 0.5rem 0.5rem 0 0;
  padding: 0;
}
.woocommerce-tabs ul.tabs li a {
  color: var(--brand-light-text);
  font-weight: 700;
  padding: 0.75rem 1.5rem;
}
.woocommerce-tabs ul.tabs li.active {
  background: var(--brand-purple);
  border-color: var(--brand-purple);
  z-index: 2;
}
.woocommerce-tabs ul.tabs li.active a {
  color: #fff;
}
.woocommerce-tabs .panel {
  border-radius: 0 0.75rem 0.75rem 0.75rem;
  margin: -1px 0 0 0 !important;
}

/* --- CART PAGE --- */
.woocommerce table.shop_table {
  border: none;
  border-radius: 0.75rem;
  background-color: #fff;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  padding: 1rem;
  width: 100%;
}
.woocommerce table.shop_table thead {
  display: none;
}
.woocommerce table.shop_table tbody tr {
  border-bottom: 1px solid var(--brand-accent);
}
.woocommerce table.shop_table tbody tr:last-child {
  border-bottom: none;
}
.woocommerce table.shop_table td {
  border: none;
  padding: 1.5rem 1rem;
  vertical-align: middle;
}

.woocommerce-cart-form .product-name a {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-purple);
  text-decoration: none;
}
.woocommerce-cart-form .product-thumbnail img {
  border-radius: 0.5rem;
  width: 80px;
  height: auto;
}
.woocommerce-cart-form .actions {
  padding: 2rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.woocommerce-cart-form .coupon {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.cart-collaterals {
  width: 100%;
  margin-top: 3rem;
  display: flex;
  justify-content: flex-end;
}
.cart-collaterals .cart_totals {
  width: 100%;
  max-width: 480px;
  float: none;
  background-color: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  padding: 2rem;
}
.cart_totals h2 {
  font-size: 1.75rem;
  margin-bottom: 1em;
}
.cart_totals table {
  border: none;
}
.cart_totals table th,
.cart_totals table td {
  border: none;
  padding: 0.75rem 0;
  color: var(--brand-text);
}
.cart_totals table tr {
  border-bottom: 1px solid var(--brand-accent);
}
.cart_totals table tr:last-child {
  border-bottom: none;
}
.cart_totals .order-total th,
.cart_totals .order-total td strong {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-purple);
}
.wc-proceed-to-checkout {
  padding: 1rem 0 0 0;
}
.wc-proceed-to-checkout a.button {
  width: 100%;
  display: block;
}

/* -- POPRAWIONE STYLE ZAKŁADEK -- */
.woocommerce-tabs {
  margin-top: 3rem;
}
.woocommerce-tabs ul.tabs {
  background: none;
  border: none;
  border-bottom: 1px solid var(--brand-accent);
  display: flex;
  gap: 0.5rem;
  padding-left: 0;
  margin-bottom: 0;
}
.woocommerce-tabs ul.tabs::before,
.woocommerce-tabs ul.tabs::after {
  content: none;
}

.woocommerce-tabs ul.tabs li {
  background: none;
  border: 1px solid var(--brand-accent);
  border-bottom: none;
  border-radius: 0.5rem 0.5rem 0 0;
  padding: 0;
  margin: 0 0 -1px 0;
  position: relative;
}
.woocommerce-tabs ul.tabs li a {
  color: var(--brand-light-text);
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  display: block;
}

/* Style for inactive tabs */
.woocommerce-tabs ul.tabs li:not(.active) {
  background-color: var(--brand-beige);
}
.woocommerce-tabs ul.tabs li:not(.active):hover {
  background-color: #fff;
}

/* Style for active tab */
.woocommerce-tabs ul.tabs li.active {
  background: #fff;
  border-color: var(--brand-accent);
  border-bottom-color: #fff;
  z-index: 2;
}
.woocommerce-tabs ul.tabs li.active a {
  color: var(--brand-purple);
}

/* Fixed style for panel with content */
.woocommerce-tabs .panel {
  background-color: #fff;
  padding: 2rem;
  clear: both;
  margin: 0 !important;
  border: 1px solid var(--brand-accent);
  border-top: none;
  border-radius: 0 0.75rem 0.75rem 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Additional rule to adjust the corner of the panel when the first tab is not active */
/* .woocommerce-tabs ul.tabs li:not(:first-child).active ~ .panel {
  border-top-left-radius: 0.75rem;
} */

.woocommerce-Tabs-panel {
  width: 100% !important;
}

/* -------- FIX: visible text in WooCommerce messages -------- */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  color: var(--brand-text) !important;
}

/* links in messages – without buttons */
.woocommerce-message a:not(.button),
.woocommerce-info a:not(.button),
.woocommerce-error a:not(.button) {
  color: var(--brand-purple) !important;
  text-decoration: underline;
}

/* buttons inside messages stay as they were */
.woocommerce-message a.button,
.woocommerce-info a.button,
.woocommerce-error a.button {
  color: #fff !important;
}

@media (max-width: 767px) {
  .woocommerce-message,
  .woocommerce-info,
  .woocommerce-error {
    display: grid;
    gap: 1rem;
  }
}

.woocommerce-cart #primary,
.woocommerce-checkout #primary {
  width: 100%;
}

.woocommerce-cart #primary .woocommerce-cart-form,
.woocommerce-checkout #primary .woocommerce-checkout-review-order-table {
  width: 100%;
}

/* --- ORDER RECEIVED / THANK YOU PAGE --- */
.woocommerce-order-received .woocommerce-notice--success {
  background-color: #fff;
  border-top-color: var(--success-green);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
  padding: 1.5rem;
  text-align: center;
}

.woocommerce-order-received .woocommerce-notice--success::before {
  color: var(--success-green);
}

.woocommerce-order-received .woocommerce-order-overview {
  background-color: #fff;
  border: 1px solid var(--brand-accent);
  border-radius: 0.75rem;
  padding: 1.5rem;
  list-style: none;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 2rem 0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.woocommerce-order-received .woocommerce-order-overview li {
  padding: 0;
  margin: 0;
  border: none;
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.woocommerce-order-received .woocommerce-order-overview li:last-child {
  padding-bottom: 0;
}

.woocommerce-order-received .woocommerce-order-overview li strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-purple);
}

.woocommerce-order-received .woocommerce-bacs-bank-details,
.woocommerce-order-received .woocommerce-order-details,
.woocommerce-order-received .woocommerce-customer-details {
  background-color: #fff;
  border: 1px solid var(--brand-accent);
  border-radius: 0.75rem;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.woocommerce-order-received .woocommerce-bacs-bank-details h2,
.woocommerce-order-received .woocommerce-order-details h2,
.woocommerce-order-received .woocommerce-customer-details h2 {
  font-size: 1.75rem;
  margin-top: 0;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--brand-accent);
  padding-bottom: 0.75rem;
}

.woocommerce-order-received .woocommerce-bacs-bank-details ul.wc-bacs-bank-details {
  list-style: none;
  padding: 1.5rem;
  margin: 0;
  background-color: var(--brand-beige);
  border-radius: 0.5rem;
}

.woocommerce-order-received .woocommerce-bacs-bank-details ul.wc-bacs-bank-details li {
  border-bottom: 1px solid var(--brand-accent);
  padding: 0.75rem 0;
  font-size: 1.1rem;
}
.woocommerce-order-received .woocommerce-bacs-bank-details ul.wc-bacs-bank-details li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.woocommerce-order-received .woocommerce-bacs-bank-details ul.wc-bacs-bank-details li:first-child {
  padding-top: 0;
}

.woocommerce-order-received .woocommerce-table--order-details {
  width: 100%;
  border-collapse: collapse;
}

.woocommerce-order-received .woocommerce-table--order-details th,
.woocommerce-order-received .woocommerce-table--order-details td {
  padding: 1rem;
  border-bottom: 1px solid var(--brand-accent);
  text-align: left;
  vertical-align: middle;
}

.woocommerce-order-received .woocommerce-table--order-details tfoot tr:last-child th,
.woocommerce-order-received .woocommerce-table--order-details tfoot tr:last-child td {
  border-bottom: none;
}

.woocommerce-order-received .woocommerce-customer-details address {
  font-style: normal;
  line-height: 1.6;
}

.woocommerce-order-received .woocommerce-order-overview li.order strong {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--brand-purple);
}