/* ===== ILAW – Product CTA area (success + buttons) ===== */

/* Container is the product's add-to-cart block Elementor renders */
.elementor-add-to-cart form.cart{
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: auto;
  gap: 14px;
  align-items: center;
}



/* Purchased notice: take full width (first row) */
.elementor-add-to-cart form.cart .ilaw-owned{
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #22c55e;
  background: #ecfdf5;
  color: #065f46;
  border-radius: 12px;
  line-height: 1.4;
  box-shadow: 0 10px 30px -15px rgba(16,185,129,.45);
  position: relative;
  overflow: hidden;
}

/* Enter animation (Pure CSS) */
div.product form.cart .ilaw-owned{
  animation: ilawFadeInUp 0.35s cubic-bezier(.16,1,.3,1) forwards;
}

@keyframes ilawFadeInUp {
  0%   { transform: translateY(6px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Subtle left highlight */
div.product form.cart .ilaw-owned::before{
  content:"";
  position:absolute;
  inset-inline-start:0;
  top:0;
  bottom:0;
  width:6px;
  background: #22c55e;
  opacity:.7;
}

/* Wraps for the two links Elementor prints */
div.product form.cart .ilaw-read-now-wrap{
  margin: 0 !important;
}

/* Allow native grid auto-placement so ANY number of buttons forms 2 columns naturally */
div.product form.cart .ilaw-read-now-wrap {
  grid-column: span 1;
}

/* Make the buttons uniform width and change the background to #2E55A5 */
div.product form.cart .ilaw-read-now-wrap .button{
  width: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 800;
  letter-spacing: .2px;
  border: 1px solid rgba(46, 85, 165, .08);
  background: #2E55A5 !important; /* requested brand color */
  color: #fff !important;
  box-shadow: 0 10px 30px -12px rgba(46, 85, 165, .45);
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease;
}
div.product form.cart .ilaw-read-now-wrap .button:hover{
  transform: translateY(-1px);
  box-shadow: 0 16px 40px -16px rgba(46, 85, 165, .60);
  background: #25468B !important;
}
div.product form.cart .ilaw-read-now-wrap .button:active{
  transform: translateY(0);
}

/* If there’s only one CTA, let it span both columns */
div.product form.cart.ilaw-one-cta{
  grid-template-columns: 1fr;
}
div.product form.cart.ilaw-one-cta .ilaw-read-now-wrap{
  grid-column: 1 / -1 !important;
}

/* Small screens: stack buttons under each other */
@media (max-width: 520px){
  div.product form.cart{
    grid-template-columns: 1fr;
  }
  div.product form.cart .ilaw-read-now-wrap{
    grid-column: 1 / -1 !important;
  }
}

/* Optional: tiny ripple for button clicks (JS toggles .ilaw-ripple) */
.button.ilaw-ripple {
  position: relative;
  overflow: hidden;
}
.button.ilaw-ripple::after{
  content:"";
  position:absolute;
  width:8px;height:8px;border-radius:999px;
  background: rgba(255,255,255,.55);
  transform: scale(1);
  opacity: 0;
  pointer-events:none;
}
.button.ilaw-ripple.is-rippling::after{
  animation: ilawRipple .5s ease-out forwards;
}
@keyframes ilawRipple{
  from { transform: translate(var(--rx,0), var(--ry,0)) scale(1); opacity:.6; }
}

/* ==================================================== */
/* Global Image Corners & Product Grid Uniformity       */
/* ==================================================== */

/* globally force all image corners (strong override) */
img {
    border-radius: 12px !important;
}
/* exclude icons and SVG */
img.wd-icon, 
img.wd-logo, 
.site-logo img, 
.wd-header-logo img,
img[src$=".svg"],
svg {
    border-radius: 0 !important;
}

/* Force all product grid images to be the exact same size/ratio globally */
.product-grid-item img,
.product-element-top img,
.product-image-link img,
div.product img.attachment-woocommerce_thumbnail {
    aspect-ratio: 1 / 1.35 !important;
    object-fit: cover !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 12px !important;
}

/* Ensure the wrappers don't crop weirdly */
.product-element-top, 
.product-image-link {
    border-radius: 12px !important;
    overflow: hidden !important;
    display: block !important;
}

/* ==================================================== */
/* Premium Publishers / Brands Grid Enhancement V2      */
/* ==================================================== */

.brands-widget {
    padding: 10px 0 30px;
}

.brands-widget .wd-brand-item {
    background: #ffffff !important;
    border: 1px solid #edf2f7 !important;
    border-radius: 16px !important;
    padding: 35px 20px !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important; /* Bouncy transition */
    box-shadow: 0 4px 15px rgba(0,0,0,0.02) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 160px !important;
    position: relative !important;
    overflow: hidden !important;
    z-index: 1;
}

/* Background gradient on hover */
.brands-widget .wd-brand-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #2E55A5 0%, #152b57 100%);
    z-index: -2;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* White glass reflection swipe */
.brands-widget .wd-brand-item::after {
    content: "";
    position: absolute;
    top: 0; left: -150%;
    width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.25) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    z-index: -1;
    transition: none;
}

/* Hover effects */
.brands-widget .wd-brand-item:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 0 20px 40px -10px rgba(46, 85, 165, 0.4) !important;
    border-color: transparent !important;
}

.brands-widget .wd-brand-item:hover::before {
    opacity: 1;
}

.brands-widget .wd-brand-item:hover::after {
    animation: ilaw-glass-swipe 0.8s ease-out forwards;
}

@keyframes ilaw-glass-swipe {
    0% { left: -150%; }
    100% { left: 200%; }
}

/* Typography & Layout */
.brands-widget .wd-brand-item a {
    color: #1e293b !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 1.5 !important;
    text-decoration: none !important;
    text-align: center !important;
    transition: color 0.4s ease, transform 0.4s ease !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    outline: none !important;
}

/* Icon Injection for text-only publishers */
.brands-widget .wd-brand-item a::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f19c"; /* Institution icon */
    display: block;
    font-size: 38px;
    margin-bottom: 20px;
    color: #2E55A5;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 4px 6px rgba(46,85,165,0.1));
}

/* Small decorative bar separating icon from text */
.brands-widget .wd-brand-item a::after {
    content: "";
    display: block;
    width: 30px;
    height: 3px;
    background: #2E55A5;
    border-radius: 3px;
    margin-top: 18px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0.3;
}

/* Hover color adjustments for text */
.brands-widget .wd-brand-item:hover a {
    color: #ffffff !important;
}

/* Hover effect for icon */
.brands-widget .wd-brand-item:hover a::before {
    color: #ffffff;
    transform: scale(1.1) translateY(-4px);
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.3));
}

/* Hover effect for decorative bar */
.brands-widget .wd-brand-item:hover a::after {
    background: #ffffff;
    width: 50px;
    opacity: 0.9;
    transform: translateY(2px);
}

/* ========================================== */
/* Graceful handling if publishers upload images later */
/* ========================================== */

/* Hide the FA icon and divider if the link contains an actual logo image */
.brands-widget .wd-brand-item a:has(img)::before,
.brands-widget .wd-brand-item a:has(img)::after {
    display: none !important;
}

/* Reset layout for image links so the logo fits perfectly */
.brands-widget .wd-brand-item a:has(img) img {
    max-width: 100%;
    height: auto;
    max-height: 100px;
    object-fit: contain;
    transition: all 0.4s ease !important;
    filter: grayscale(100%) opacity(0.7);
}

.brands-widget .wd-brand-item:hover a:has(img) img {
    filter: grayscale(0%) opacity(1) brightness(1.2) drop-shadow(0 8px 16px rgba(0,0,0,0.2));
    transform: scale(1.1);
}


