/* ==========================================================================
   NICO Pharma — WordPress & WooCommerce mapping
   Everything WordPress/WooCommerce renders that the static build never had:
   breadcrumbs, widget wrappers, comments, notices, the Woo loop <ul>,
   checkout/account panels, alignment classes. Design tokens come from
   theme.css (:root) — nothing is redefined here.
   1. WordPress core
   2. Breadcrumbs + page intro
   3. Widgets
   4. Comments
   5. WooCommerce: loop + toolbar
   6. WooCommerce: single product
   7. WooCommerce: cart / checkout / account
   8. Notices + mini cart
   ========================================================================== */

/* ------------------------------------------------------ 1. WordPress core */
.screen-reader-text {
  border: 0;
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  clip-path: none;
  height: auto;
  width: auto;
  left: 8px;
  top: 8px;
  z-index: 100000;
  background: #fff;
  padding: 12px 20px;
  box-shadow: var(--shadow);
}

.alignleft { float: left; margin: 6px 24px 12px 0; }
.alignright { float: right; margin: 6px 0 12px 24px; }
.aligncenter { display: block; margin: 6px auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 12.5px; color: var(--muted); padding: 6px 0; text-align: center; }
.sticky { display: block; }
.gallery-caption, .bypostauthor { display: inherit; }

.entry-content > * + * { margin-top: 1.1em; }
.entry-content h2, .entry-content h3 { margin-top: 1.6em; }
.entry-content img { max-width: 100%; height: auto; }
.entry-content blockquote {
  border-left: 3px solid var(--primary);
  background: var(--surface-soft);
  padding: 18px 22px;
  font-style: italic;
}
.entry-content a { color: var(--primary); }
.entry-content a:hover { color: var(--primary-dark); }
.page-links { margin-top: 24px; font-weight: 600; }
.page-links a, .page-links > span:not(.screen-reader-text) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  margin-left: 6px;
  border-radius: 50%;
  font-size: 13px;
}
.page-links > span:not(.screen-reader-text) { background: var(--primary); color: #fff; border-color: var(--primary); }

.custom-logo-link img, .brand-logo img { max-height: 56px; width: auto; display: block; }

/* --------------------------------------------- 2. breadcrumbs + page intro */
.nico-breadcrumbs {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.nico-breadcrumbs a { color: var(--body); }
.nico-breadcrumbs a:hover { color: var(--primary); }
.nico-breadcrumbs .crumb-sep { color: var(--line-strong); }
.nico-breadcrumbs span[aria-current] { color: var(--ink); font-weight: 500; }

.page-intro { margin-bottom: 30px; }
.page-intro h1 { font-size: 32px; margin-bottom: 6px; }
.archive-description { color: var(--body); font-size: 14px; max-width: 720px; }

/* ---------------------------------------------------------------- 3. widgets */
.widget { margin-bottom: 30px; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.widget ul li:last-child { border-bottom: 0; }
.widget ul li a { color: var(--body); }
.widget ul li a:hover { color: var(--primary); }
.widget select { width: 100%; border: 1px solid var(--line-strong); padding: 10px 12px; border-radius: var(--radius-sm); }
.widget .wp-block-search__button, .widget .search-submit { display: none; }

.footer-widget .widget-heading { color: var(--primary); }
.footer-widget ul li { border-bottom: 0; padding: 5px 0; }
.footer-widget ul li a { color: #cfd8d4; }
.footer-widget ul li a:hover { color: #fff; }

/* ----------------------------------------------------------------- 4. comments */
.comment-list { margin: 24px 0 0; }
.comment-list .comment { border-top: 1px solid var(--line); padding: 22px 0; }
.comment-list .children { list-style: none; padding-left: 34px; }
.comment-list .comment-author { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--ink); }
.comment-list .comment-author .avatar { border-radius: 50%; }
.comment-list .comment-metadata { font-size: 12px; color: var(--muted); margin: 4px 0 10px; }
.comment-list .comment-content { font-size: 13.5px; }
.comment-list .reply a { font-size: 12.5px; color: var(--primary); font-weight: 600; }
.comment-respond { margin-top: 28px; }
.comment-respond .comment-reply-title { font-size: 20px; font-family: var(--font-display); }
.comment-respond p.field, .comment-respond .comment-form-author,
.comment-respond .comment-form-email { margin-bottom: 14px; }
.comment-respond input[type="text"], .comment-respond input[type="email"],
.comment-respond textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
}
.comment-respond input:focus, .comment-respond textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14, 158, 108, .12);
}

/* ------------------------------------------------ 5. WooCommerce: loop */
ul.products {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
ul.products li.product-col { margin: 0; }
ul.products .product-card { height: 100%; }

/* ------------------------------ 5b. shop loop: grid + card corrections */

/*
 * WooCommerce clears `ul.products` with table pseudo-elements. The grid
 * treats those as grid items, which is why the shop's first tile rendered
 * empty and pushed every product one slot to the right.
 */
ul.products::before,
ul.products::after,
.woocommerce ul.products::before,
.woocommerce ul.products::after { content: none; display: none; }

/*
 * `.product-media` is a flex container, so its flex item is the <a> wrapper,
 * not the image. Shrink-to-fit sized that link to the image's intrinsic
 * width, so `width/height: 100%` on the img resolved against the image
 * itself and thumbnails never filled their tile — the ragged sizes and white
 * gutters in the grid. Making the link a full-size block fixes the whole row.
 */
.product-media > a:not(.product-cart-btn):not(.added_to_cart) {
  display: block;
  width: 100%;
  height: 100%;
}
.product-media img {
  width: 100%;
  height: 100%;
  /* `contain` keeps packaging uncropped; product thumbs are already square
     (600×600 hard crop) so this matches `cover` for real images and only
     rescues odd-sized or placeholder art. */
  object-fit: contain;
  padding: 14px;
}

/* A defined card edge, so tiles read as cards rather than floating images. */
.product-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease);
}
.product-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

/* Equal-height cards: two-line titles reserve the same space whatever the
   product name, and the price is pinned to the bottom so prices line up
   across a row. */
.product-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 16px 16px 18px;
}
.product-title {
  -webkit-line-clamp: 2;
  line-height: 1.35;
  min-height: 2.7em;
  margin-bottom: 6px;
}
.product-body .rating { margin-bottom: 4px; }
.product-price { margin-top: auto; padding-top: 10px; }

/* Quick view is an anchor, so it missed the circular treatment the button
   button gets and rendered as a bare floating icon. */
.product-actions button,
.product-actions a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateX(14px);
  transition: all .3s var(--ease);
}
.product-card:hover .product-actions a,
.product-actions a:focus-visible,
.product-actions button:focus-visible,
.product-card:hover .product-cart-btn,
.product-cart-btn:focus-visible { opacity: 1; transform: none; }
.product-actions a:hover { background: var(--primary); color: #fff; }
.product-actions a:nth-child(2) { transition-delay: .06s; }

/* Hover-revealed controls are unreachable on touch, so show them there. */
@media (hover: none) {
  .product-actions button,
  .product-actions a,
  .product-cart-btn { opacity: 1; transform: none; }
}

/*
 * The loop CTA carries WooCommerce's `button` class, and `.woocommerce
 * a.button` (0,2,1) outranks `.product-cart-btn`. That repainted it grey and,
 * worse, forced `position: relative`, dropping it out of its absolute slot at
 * the foot of the image. These selectors carry more classes and win.
 */
.product-card .product-media a.product-cart-btn,
.product-card .product-media a.product-cart-btn:hover {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  width: auto;
  height: auto;
  display: block;
  text-align: center;
  padding: 11px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  text-shadow: none;
  box-shadow: none;
}
.product-card .product-media a.product-cart-btn:hover { background: var(--primary-dark); }
/* WooCommerce appends a "View cart" link after an AJAX add; keep it out of
   the image overlay. */
.product-media a.added_to_cart { display: none; }

/*
 * paginate_links() marks the current page with a <span>, not an <a>, so it
 * missed the circular styling entirely and the green "current" background
 * collapsed into a thin sliver.
 */
.pagination-nico span,
.pagination-nico a,
.pagination-nico button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .3s var(--ease);
}
.pagination-nico .is-active,
.pagination-nico a:hover,
.pagination-nico button:hover:not([disabled]) {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.pagination-nico .dots {
  border-color: transparent;
  background: none;
  width: auto;
  min-width: 24px;
}

.shop-toolbar { border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.result-count { font-size: 13px; color: var(--muted); }
.shop-ordering select {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 9px 34px 9px 12px;
  font-size: 13px;
  color: var(--ink);
  background: #fff;
}

.price-filter input[type="number"] {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  font-size: 13px;
}
.stock-note.out { font-size: 12px; color: var(--danger); font-weight: 600; }

/* Woo price html inside theme price blocks */
.product-price del { color: var(--muted); font-weight: 400; margin-right: 8px; font-size: .9em; }
.product-price ins { text-decoration: none; }
.pdp-price del { font-size: 22px; color: var(--muted); margin-right: 10px; }
.pdp-price ins { text-decoration: none; }

/* ------------------------------------------ 6. WooCommerce: single product */
.pdp-short { font-size: 14px; color: var(--body); margin-bottom: 18px; }
.pdp-buy.cart { display: flex; align-items: stretch; gap: 12px; flex-wrap: wrap; }
.single_add_to_cart_button { display: inline-flex; align-items: center; gap: 9px; }
.pdp-ask { font-size: 13.5px; color: var(--body); display: inline-flex; align-items: center; gap: 8px; }
.pdp-ask:hover { color: var(--primary); }
.pdp-meta-footer { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 16px; margin-top: 18px; }
.pdp-meta-footer a { color: var(--body); }
.pdp-meta-footer a:hover { color: var(--primary); }
.woocommerce-product-gallery__trigger { display: none; }
.stock.in-stock { color: var(--primary); font-size: 13.5px; }
.stock.out-of-stock { color: var(--danger); font-size: 13.5px; }

/* tabs: underline row comes from .pdp-tabs; panels get the blue info card */
.pdp-tabs { list-style: none; padding-left: 0; }
.pdp-tabs li { margin: 0; }
.pdp-tabs li a {
  display: inline-block;
  padding: 12px 4px;
  margin-bottom: -1px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--body);
  border-bottom: 2px solid transparent;
}
.pdp-tabs li.active a, .pdp-tabs li a:hover { color: var(--primary); border-bottom-color: var(--primary); }
.woocommerce-Tabs-panel { margin-top: 26px; }
.woocommerce-Tabs-panel > h2:first-child { display: none; } /* Woo repeats the tab title */

/* reviews tab content mapped onto the reviews panel look */
#reviews .commentlist { list-style: none; padding: 0; }
#reviews .commentlist li { border-top: 1px solid var(--pdp-border); padding: 20px 0; }
#reviews .comment_container { display: flex; gap: 14px; }
#reviews .comment_container .avatar { border-radius: 50%; width: 46px; height: 46px; }
#reviews .comment-text .star-rating { float: none; margin-bottom: 6px; }
#reviews .meta { font-size: 12.5px; color: var(--muted); }

/* Woo's font-based star rating (used in review lists/forms) */
.star-rating {
  overflow: hidden;
  position: relative;
  height: 1em;
  line-height: 1;
  font-size: 14px;
  width: 5.4em;
  font-family: star, sans-serif;
}
.star-rating::before { content: "\2605\2605\2605\2605\2605"; color: var(--line-strong); float: left; top: 0; left: 0; position: absolute; letter-spacing: .2em; }
.star-rating span { overflow: hidden; float: left; top: 0; left: 0; position: absolute; padding-top: 1.5em; }
.star-rating span::before { content: "\2605\2605\2605\2605\2605"; color: var(--star); top: 0; position: absolute; left: 0; letter-spacing: .2em; }
p.stars a { color: var(--star); text-decoration: none; }

/* ------------------------------------ 7. WooCommerce: cart/checkout/account */
.woocommerce-cart-form [name="update_cart"] { opacity: .55; }
.woocommerce-cart-form [name="update_cart"].is-armed { opacity: 1; }
.coupon .input-text {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13.5px;
  min-width: 160px;
}
.cart-collaterals .totals-table th { vertical-align: top; }
.woocommerce-shipping-methods { list-style: none; padding: 0; margin: 0; font-size: 13.5px; }

.checkout-panel, .account-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  background: #fff;
}
.checkout-panel h3 { font-size: 19px; margin-bottom: 16px; }
.nico-checkout .form-row { margin-bottom: 14px; }
.nico-checkout label { font-size: 13px; font-weight: 500; color: var(--ink); margin-bottom: 5px; display: inline-block; }
.nico-checkout .input-text, .nico-checkout select, .nico-checkout textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  background: #fff;
}
.nico-checkout .input-text:focus, .nico-checkout select:focus, .nico-checkout textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14, 158, 108, .12);
}
.checkout-review .shop_table { width: 100%; border-collapse: collapse; }
.checkout-review .shop_table th, .checkout-review .shop_table td {
  border: 1px solid var(--line); padding: 14px 16px; font-size: 14px; text-align: left;
}
.wc_payment_methods { list-style: none; padding: 0; margin: 18px 0 0; }
.wc_payment_methods li { padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; }
.wc_payment_methods .payment_box { background: var(--surface-soft); padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13px; margin-top: 8px; }
#place_order {
  display: block; width: 100%; border: 0; background: var(--primary); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 16px; padding: 18px; margin-top: 18px;
  border-radius: 0; transition: background .25s var(--ease);
}
#place_order:hover { background: var(--primary-dark); }

.nico-account .filter-list li a.is-active { color: var(--primary); font-weight: 600; }
.woocommerce-MyAccount-content table.shop_table { width: 100%; border-collapse: collapse; font-size: 14px; }
.woocommerce-MyAccount-content table.shop_table th,
.woocommerce-MyAccount-content table.shop_table td { border: 1px solid var(--line); padding: 12px 14px; text-align: left; }
.woocommerce-MyAccount-content .woocommerce-Button, .woocommerce-MyAccount-content .button {
  background: var(--primary); color: #fff; border: 0; padding: 12px 26px; font-weight: 600; border-radius: var(--radius-sm);
}
.woocommerce-form-login, .woocommerce-form-register {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; max-width: 480px;
}
.woocommerce-form-login .input-text, .woocommerce-form-register .input-text {
  width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 4px;
}

/* --------------------------------------------------- 8. notices + mini cart */
.nico-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--primary);
  background: var(--primary-soft);
  color: var(--ink);
  font-size: 13.5px;
  padding: 14px 18px;
  margin: 0 0 18px;
}
.nico-notice i { margin-top: 2px; color: var(--primary); }
.nico-notice-error { border-left-color: var(--danger); background: #fdecee; }
.nico-notice-error i { color: var(--danger); }
.nico-notice-info { border-left-color: #1668a8; background: #eaf4fc; }
.nico-notice-info i { color: #1668a8; }
.nico-notice .button, .nico-notice .wc-forward { margin-left: auto; color: var(--primary-dark); font-weight: 600; white-space: nowrap; }
.woocommerce-notices-wrapper:empty { display: none; }

.mini-cart-list .mini-cart-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; position: relative; }
.mini-cart-list img { width: 46px; height: 46px; object-fit: contain; }
.mini-cart-list .remove { color: var(--danger); order: 3; margin-left: auto; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 991.98px) {
  ul.products { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .page-intro h1 { font-size: 26px; }
}
@media (max-width: 575.98px) {
  ul.products { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .shop-toolbar { flex-direction: column; align-items: flex-start !important; }
  .checkout-panel, .account-panel { padding: 18px 16px; }
}

/* ------------------------------------------------- text brand (no logo yet) */
.brand-logo-text { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-logo-text .brand-mark {
  width: 42px; height: 42px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff; font-size: 18px; flex: 0 0 auto;
}
.brand-logo-text .brand-text {
  font-family: var(--font-display); font-weight: 700; font-size: 21px;
  color: var(--ink); line-height: 1.1; letter-spacing: .2px;
}
.site-footer .brand-logo-text .brand-text { color: #fff; }
.mobile-drawer .brand-logo-text .brand-text { font-size: 18px; }

/* ==========================================================================
   My Account
   WooCommerce's own stylesheet floats .woocommerce-MyAccount-navigation at
   30% and the content at 68%. Nested inside our Bootstrap columns that
   resolved to 30% of an already-narrow col-lg-3, which is what squashed the
   nav into a sliver. Reset both to full width of their column.
   ========================================================================== */
.nico-account .woocommerce-MyAccount-navigation,
.nico-account .woocommerce-MyAccount-content {
  float: none;
  width: 100%;
  margin: 0;
}

.nico-account .woocommerce-MyAccount-navigation {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--shadow-sm);
}
.nico-account .woocommerce-MyAccount-navigation .widget-title { margin-bottom: 14px; }

.nico-account .woocommerce-MyAccount-navigation ul { margin: 0; }
.nico-account .woocommerce-MyAccount-navigation li { margin: 0; }
.nico-account .woocommerce-MyAccount-navigation li a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--body);
  font-size: 14.5px;
  line-height: 1.4;
  white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nico-account .woocommerce-MyAccount-navigation li a i {
  width: 17px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  transition: color .2s var(--ease);
}
.nico-account .woocommerce-MyAccount-navigation li a:hover {
  background: var(--primary-soft);
  color: var(--primary);
}
.nico-account .woocommerce-MyAccount-navigation li a:hover i { color: var(--primary); }
.nico-account .woocommerce-MyAccount-navigation li.is-active > a,
.nico-account .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--is-active > a {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}
.nico-account .woocommerce-MyAccount-navigation li.is-active > a i,
.nico-account .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--is-active > a i { color: #fff; }

/* Logout sits apart from the navigation proper. */
.nico-account .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

/* --- Dashboard ----------------------------------------------------------- */
.account-greeting { margin-bottom: 22px; }
.account-greeting h2 { font-size: 22px; margin-bottom: 6px; }
.account-greeting p { color: var(--body); margin: 0; }

.account-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}
.account-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px;
  background: var(--surface);
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.account-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}
.account-card .account-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 16px;
  margin-bottom: 13px;
}
.account-card h3 {
  font-size: 16px;
  margin-bottom: 4px;
  color: var(--ink);
}
.account-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--body);
  line-height: 1.6;
}

@media (max-width: 991px) {
  .nico-account .woocommerce-MyAccount-navigation { margin-bottom: 20px; }
  .nico-account .woocommerce-MyAccount-navigation ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .nico-account .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }
}
