/*
 Theme Name: Flatsome Child
 Template: flatsome
 Version: 3.19.9

/* =========================================================
   GLOBAL VARIABLES
   ========================================================= */
:root {
  --ud-primary: #0f172a;
  --ud-text: #111827;
  --ud-text-soft: #4b5563;
  --ud-text-muted: #6b7280;
  --ud-accent: #dc2626;
  --ud-bg: #f9fafb;
  --ud-bg-card: #ffffff;
  --ud-border-subtle: #e5e7eb;
  --ud-font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

/* =========================================================
   SECTION A: COURSE PRODUCT STYLES
   ========================================================= */

/* 1. LOCAL VARIABLES FOR COURSE */
.course-product-shell {
  --course-bg: #ffffff;
  --course-text: #334155;
  --course-dark: #0f172a;
  --course-border: #e2e8f0;
  
  --btn-height: 44px; 
  --btn-radius: 6px;  
  
  --buy-now-bg: #0f172a; 
  --buy-now-text: #ffffff;
  
  --atc-start: #f59e0b; 
  --atc-end: #d97706;   
  --atc-shadow: rgba(217, 119, 6, 0.4);
  --atc-text: #ffffff; 
  
  --editorial-accent: #dc2626; 

  --trust-blue-bg: #eff6ff;
  --trust-blue-text: #3b82f6;
  --trust-green-bg: #f0fdf4;
  --trust-green-text: #22c55e;
  --trust-gold-bg: #fffbeb;
  --trust-gold-text: #d97706;
}

/* 2. ISOLATION & RESET */
.course-product-shell {
  background-color: var(--course-bg) !important;
  color: var(--course-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  line-height: 1.6;
  font-size: 16px;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.course-product-shell *,
.course-product-shell *::before,
.course-product-shell *::after {
  box-sizing: border-box;
}

/* Typography */
.course-product-shell h1, 
.course-product-shell h2, 
.course-product-shell h3, 
.course-product-shell h4,
.course-product-shell .course-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  letter-spacing: -0.02em !important;
  color: var(--course-dark) !important;
  font-weight: 700 !important;
  margin-top: 0;
  text-transform: none !important; 
}

.course-product-shell ul, 
.course-product-shell ol {
  padding: 0;
  margin: 0;
  list-style: none !important;
}

.course-product-shell a {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

/* 3. LAYOUT & STRUCTURE */
.course-product-shell .course-product { padding: 50px 0 20px; }

.course-product-shell .course-grid { 
  display: grid; 
  grid-template-columns: 1fr 360px; 
  gap: 60px; 
}

.course-product-shell .course-main > * + * { margin-top: 50px; }

.course-product-shell .course-sidebar-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 0 24px 24px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--course-border);
  position: sticky;
  top: 30px;
  z-index: 10;
  contain: layout paint;
}

/* 4. COMPONENT STYLES */
.course-product-shell .course-media { border-radius: 12px; overflow: hidden; margin-bottom: 20px; width: 100%; position: relative; }
.course-product-shell .course-media img { width: 100%; height: auto; display: block; pointer-events: none; }
.course-product-shell .course-media .onsale, 
.course-product-shell .course-media .badge,
.course-product-shell .course-media .zoomImg, 
.course-product-shell .course-media .zoom, 
.course-product-shell .woocommerce-product-gallery__trigger { display: none !important; pointer-events: none !important; }

.course-product-shell .course-price-wrapper { margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid #f1f5f9; }
.course-product-shell .course-price-wrapper .price { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 0; flex-direction: row; }
.course-product-shell .course-price-wrapper ins .amount { font-size: 26px; font-weight: 700; color: #0f172a; line-height: 1; letter-spacing: -0.02em; }
.course-product-shell .course-price-wrapper del .amount { font-size: 16px; color: #94a3b8; text-decoration: line-through; font-weight: 600; }
.course-product-shell .course-price-wrapper ins { text-decoration: none; display: inline-block; order: 1; opacity: 1 !important; }
.course-product-shell .course-price-wrapper del { order: 2; opacity: 1 !important; }

.course-product-shell .save-badge {
    order: 3;
    background-color: #fee2e2;
    color: #dc2626; 
    font-size: 11px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 4px;
    letter-spacing: 0.03em;
    margin-left: auto; 
    text-transform: uppercase;
}

/* 5. ACTION BUTTONS - UPDATED FOR NATIVE WOOCOMMERCE */
.course-product-shell .course-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
  width: 100%;
}

/* Hide Quantity Input (Native WC) */
.course-product-shell .course-atc-wrapper .quantity {
    display: none !important;
}

/* Reset Native Form Margins */
.course-product-shell .course-atc-wrapper form.cart {
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
}

.course-product-shell .course-btn--primary {
  background-color: var(--buy-now-bg) !important;
  color: #ffffff !important;
  width: 100%;
  border-radius: var(--btn-radius);
  padding: 0 20px;
  font-size: 15px;
  font-weight: 600; 
  border: 2px solid transparent !important; 
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  text-transform: none;
  display: flex !important; 
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px !important; 
  line-height: 1;
  text-decoration: none !important;
}

.course-product-shell .course-btn--primary:hover {
  background-color: #1e293b !important;
  border-color: #f59e0b !important;     
  transform: translateY(-2px);           
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.4); 
  color: #fff !important;                
}

.course-product-shell .course-btn--primary:focus-visible {
  outline: 2px solid #f59e0b;
  outline-offset: 2px;
}

@keyframes shine {
  0% { left: -100%; }
  20% { left: 100%; }
  100% { left: 100%; }
}

.course-product-shell .course-atc-wrapper { width: 100%; }

/* TARGET THE NATIVE BUTTON AND APPLY CUSTOM STYLES */
.course-product-shell .course-atc-wrapper .single_add_to_cart_button {
  background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%) !important;
  color: #000000 !important;
  width: 100%;
  border-radius: var(--btn-radius);
  padding: 0 20px;
  font-size: 15px;
  font-weight: 700;
  border: none !important;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.4) !important;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  text-transform: capitalize; 
  margin-bottom: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--btn-height);
  position: relative;
  overflow: hidden; 
  cursor: pointer;
  z-index: 1;
}

/* ADD CART ICON VIA CSS MASK */
.course-product-shell .course-atc-wrapper .single_add_to_cart_button::before {
    content: '';
    width: 20px;
    height: 20px;
    margin-right: 8px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17 18c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm0-3l1.1-2h7.45c.75 0 1.41-.41 1.75-1.03L21.7 4.27c.25-.45-.07-.97-.59-.97H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2z'/%3E%3C/svg%3E") no-repeat center;
    mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17 18c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm0-3l1.1-2h7.45c.75 0 1.41-.41 1.75-1.03L21.7 4.27c.25-.45-.07-.97-.59-.97H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2z'/%3E%3C/svg%3E") no-repeat center;
}

.course-product-shell .course-atc-wrapper .single_add_to_cart_button::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-20deg);
  animation: shine 4s infinite; 
  pointer-events: none;
  z-index: 2;
}

.course-product-shell .course-atc-wrapper .single_add_to_cart_button:hover {
  background: linear-gradient(180deg, #fbbf24 0%, #fbbf24 100%) !important;
  transform: translateY(-1px); 
  box-shadow: 0 4px 12px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.5) !important;
}

.course-product-shell .course-atc-wrapper .single_add_to_cart_button.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 6. TRUST BADGES */
.course-product-shell .course-trust-badges { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid #f1f5f9; }
.course-product-shell .trust-badge { display: flex; align-items: center; gap: 12px; font-size: 13px; color: #64748b; font-weight: 500; }

.course-product-shell .trust-badge-icon { 
    width: 32px; height: 32px; min-width: 32px; 
    display: flex; align-items: center; justify-content: center; 
    background: var(--trust-blue-bg); 
    border-radius: 8px; 
    color: var(--trust-blue-text); 
}
.course-product-shell .trust-badge-icon svg { width: 18px; height: 18px; stroke-width: 2; max-width: 18px !important; max-height: 18px !important; }

.course-product-shell .trust-badge-icon--check { background: var(--trust-green-bg); color: var(--trust-green-text); }
.course-product-shell .trust-badge-icon--gold { background: var(--trust-gold-bg); color: var(--trust-gold-text); }

.course-product-shell .course-payment-methods { display: flex; align-items: center; justify-content: center; padding-top: 0; }
.course-product-shell .course-payment-methods img { width: 100%; max-width: 240px; height: auto; opacity: 1; filter: none; }


/* 7. MODERN FEATURES GRID */
.modern-course-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
    margin-top: 10px;
}

.modern-feature-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: transparent;
}

.mf-icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.modern-feature-card:hover .mf-icon {
    transform: translateY(-2px);
}

.mf-icon svg {
    width: 26px;
    height: 26px;
}

/* Colors */
.feature-blue .mf-icon   { background: #eff6ff; color: #2563eb; }
.feature-purple .mf-icon { background: #f3e8ff; color: #7e22ce; }
.feature-green .mf-icon  { background: #f0fdf4; color: #16a34a; }
.feature-orange .mf-icon { background: #fff7ed; color: #ea580c; }
.feature-red .mf-icon    { background: #fff1f2; color: #e11d48; }
.feature-cyan .mf-icon   { background: #ecfeff; color: #0891b2; }

.mf-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mf-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.mf-value, .mf-value a {
    font-size: 16px;
    color: #0f172a;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
}

.mf-value a {
    color: #16a34a !important;
    text-decoration: underline !important;
    text-underline-offset: 2px;
}

.mf-value.js-preview-container a {
    display: inline-block;
    background-color: #eff6ff;
    color: #2563eb !important;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    margin-top: 2px;
}

.mf-value.js-preview-container a:hover {
    background-color: #2563eb;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    transform: translateY(-1px);
}

.modern-separator-line {
    width: 100%;
    height: 1px;
    background: #e2e8f0;
    margin: 40px 0;
}

/* 8. HERO TYPOGRAPHY & INSTRUCTOR CARD */
.course-product-shell .course-title { font-size: 2.4rem; font-weight: 800; line-height: 1.1; margin-bottom: 16px; }
.course-product-shell .course-hero-meta { display: flex; gap: 16px; align-items: center; margin-bottom: 24px; }
.course-product-shell .course-meta-chip { display: inline-flex; align-items: center; gap: 8px; background: #fffbeb; color: #b45309; padding: 4px 12px; border-radius: 100px; font-size: 13px; font-weight: 700; }

.course-product-shell .course-breadcrumbs { background: #f8fafc; border: 1px solid #e2e8f0; padding: 8px 16px; border-radius: 100px; font-size: 12px; display: inline-block; margin-bottom: 16px; text-transform: uppercase; }
.course-product-shell .course-breadcrumbs a { font-weight: 800; letter-spacing: 0.05em; color: #64748b; }
.course-product-shell .course-breadcrumbs a:hover { color: #0f172a; text-decoration: underline; }

.course-product-shell .course-tagline { font-size: 1.15rem; line-height: 1.6; color: #475569; margin-bottom: 30px; font-weight: 400; max-width: 90%; }

.course-instructor-card {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 40px;
    max-width: 100%;
}

.card-avatar img {
    width: 72px;   
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 3px solid #ffffff; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.card-info {
    display: flex;
    flex-direction: column;
}

.card-label {
    font-size: 10px;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 800;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.card-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.card-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.card-name:hover {
    color: #2563eb;
}

.card-verified {
    color: #3b82f6;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
}
.card-verified svg { width: 100%; height: 100%; }

.card-meta-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #64748b;
}

.meta-item svg {
    width: 16px;
    height: 16px;
    min-width: 16px;
    color: #94a3b8;
}

@media (max-width: 600px) {
    .course-instructor-card {
        padding: 16px;
        gap: 16px;
    }
    .card-avatar img {
        width: 60px;
        height: 60px;
    }
    .card-name {
        font-size: 1.2rem;
    }
    .card-meta-row {
        gap: 12px;
    }
}


/* 9. LEARNINGS CARD & CONTENT */
.modern-learnings-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    margin-bottom: 50px;
}

.modern-learnings-card h2,
.modern-learnings-card h3 {
    font-size: 24px;
    font-weight: 800 !important;
    color: #0f172a;
    margin-top: 0;
    margin-bottom: 30px;
}

.modern-learn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 40px;
}

.learn-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.learn-icon-check {
    min-width: 20px;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    color: #22c55e;
}

.learn-item span {
    font-size: 15px;
    line-height: 1.6;
    color: #334155;
    font-weight: 500;
}

.course-content-body { font-size: 17px; line-height: 1.75; color: #334155; max-width: 820px; }
.course-content-body p { margin-bottom: 24px; font-weight: 400; }

.course-description h2#description-heading,
.course-description h2 {
    font-size: 24px;
    font-weight: 800 !important;
    color: #0f172a;
    margin-top: 0;
    margin-bottom: 30px;
    border-left: none;
    padding-left: 0;
}

.course-content-body h2 { font-size: 1.8rem; font-weight: 700 !important; color: #0f172a; margin-top: 45px; margin-bottom: 24px; padding-left: 20px; border-left: 5px solid var(--editorial-accent); line-height: 1.25; }
.course-content-body h2:first-of-type { border-left: none !important; padding-left: 0 !important; }
.course-content-body h3 { font-size: 1.4rem; font-weight: 600 !important; color: #1e293b; margin-top: 35px; margin-bottom: 16px; padding-left: 0; border-left: none !important; }

.course-content-body a { color: var(--editorial-accent) !important; text-decoration: underline !important; text-decoration-color: var(--editorial-accent) !important; text-decoration-thickness: 1px !important; text-underline-offset: 3px; font-weight: 600; }
.course-content-body a:hover { text-decoration-thickness: 2px !important; opacity: 0.8; }

.course-content-body ul { margin: 24px 0; padding-left: 0; list-style: none !important; border: none !important; }
.course-content-body ul li { position: relative; padding-left: 24px; margin-bottom: 12px; color: #475569; }
.course-content-body ul li::before { content: "•"; color: var(--editorial-accent); font-weight: bold; font-size: 18px; position: absolute; left: 4px; top: -2px; }

.course-content-body img { border-radius: 8px; margin: 30px auto; display: block; max-width: 100%; height: auto; border: none !important; }

/* FIX: Responsive Videos in Description */
.course-content-body iframe,
.course-content-body video,
.course-content-body embed {
    max-width: 100%;
    width: 100%;
    height: auto;
    aspect-ratio: 16/9; /* يجعل الفيديو متناسقاً دائماً */
    border-radius: 8px;
    margin: 20px 0;
}

/* FIX: Tables Styling in Description */
.course-content-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden; /* للحواف الدائرية */
}

.course-content-body table th {
    background-color: #f8fafc;
    text-align: left;
    font-weight: 700;
    padding: 12px 16px;
    border-bottom: 2px solid #e2e8f0;
    color: var(--course-dark);
}

.course-content-body table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    color: var(--course-text);
}

.course-content-body table tr:last-child td {
    border-bottom: none;
}

/* 10. RELATED PRODUCTS */
.course-related-bottom-section {
    margin-top: 0;
    border-top: none;
    padding-top: 0;
    padding-bottom: 60px;
}

.wt-related-products .wt-crp-heading {
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin-bottom: 30px !important;
    margin-top: 0 !important;
    text-transform: none !important;
    letter-spacing: -0.01em !important;
}

.wt-related-products .products.row {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 24px !important;
    margin: 0 !important;
}

.wt-related-products .col {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.wt-related-products .product-small.box {
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    transition: all 0.2s ease !important;
    background: #fff !important;
    box-shadow: none !important;
}

.wt-related-products .product-small.box:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 24px -6px rgba(0,0,0,0.08) !important;
    border-color: #cbd5e1 !important;
}

.wt-related-products .box-image {
    border-radius: 0 !important;
    margin-bottom: 0 !important;
}

.wt-related-products .box-text {
    padding: 16px !important;
    text-align: left !important;
}

.wt-related-products .title-wrapper {
    margin-bottom: 8px;
}

.wt-related-products .category {
    font-size: 10px !important;
    text-transform: uppercase !important;
    color: #94a3b8 !important;
    margin-bottom: 4px !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em !important;
}

.wt-related-products .product-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.3 !important;
    height: auto !important;
    margin-bottom: 0 !important;
}
.wt-related-products .product-title a {
    color: #0f172a !important;
}

.wt-related-products .price {
    font-size: 15px !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    display: block !important;
    margin-top: 8px !important;
}
.wt-related-products del {
    font-size: 12px !important;
    color: #94a3b8 !important;
    font-weight: 400 !important;
    margin-right: 4px !important;
}

/* 11. MODAL */
.course-product-shell.course-modal { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(15, 23, 42, 0.9); opacity: 0; transition: opacity 0.3s ease; }
.course-product-shell.course-modal.is-active { display: flex; align-items: center; justify-content: center; opacity: 1; }
.course-product-shell .course-modal-box { position: relative; background-color: #fff; width: 90%; max-width: 900px; height: 80vh; border-radius: 16px; display: flex; flex-direction: column; }
.course-product-shell .course-modal-header { padding: 16px 24px; border-bottom: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: center; }
.course-product-shell .course-modal-title { font-weight: 700; font-size: 16px; }
.course-product-shell .course-modal-close { background: transparent; border: none; font-size: 28px; line-height: 1; cursor: pointer; color: #000; padding: 8px; }
.course-product-shell .course-modal-close:hover { opacity: 0.7; }
.course-product-shell .course-modal-close:focus-visible { outline: 2px solid var(--course-dark); outline-offset: 2px; }
.course-product-shell .course-modal-body { flex: 1; position: relative; background: #000; border-bottom-left-radius: 16px; border-bottom-right-radius: 16px; overflow: hidden; }
.course-product-shell .course-modal-body iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.course-product-shell .course-modal-body.has-images { background: #fff; overflow-y: auto; padding: 30px; text-align: center; }
.course-product-shell .course-modal-body.has-images img { max-width: 100%; height: auto; display: block; margin: 0 auto 30px; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1); border-radius: 8px; border: 1px solid #e2e8f0; }

/* 12. TABLET RESPONSIVE */
@media (max-width: 1024px) {
  .course-product-shell .course-grid {
      display: flex !important;
      flex-direction: column;
      gap: 40px;
  }
  
  .course-product-shell .course-sidebar {
      order: -1; 
      width: 100%;
      margin-bottom: 40px !important;
  }

  .course-product-shell .course-sidebar-card {
      display: block !important;
      position: relative;
      top: auto;
      z-index: 1;
      margin-top: 0;
      width: 100%;
      max-width: 450px;
      margin-left: auto;
      margin-right: auto;
  }

  .course-product-shell.course-sticky-mobile { display: block; }
  .course-product-shell .course-product { padding-bottom: 80px; }
}

/* 13. HIDE FLOATING BAR ON DESKTOP/TABLET */
@media (min-width: 768px) {
    .course-floating-atc-bar {
        display: none !important;
    }
}

/* 14. MOBILE HEADER TOGGLE */
.course-sidebar-mobile-header,
.course-mobile-breadcrumbs { 
    display: none; 
}

@media (max-width: 1024px) {
    .course-hero-desktop-header { 
        display: none !important; 
    }

    .course-mobile-breadcrumbs {
        display: block !important;
        padding: 16px 0 0;
    }
    
    .course-mobile-breadcrumbs .course-breadcrumbs {
        margin-top: 0 !important;
        margin-bottom: 20px !important;
        display: inline-block !important;
    }

    .course-sidebar-mobile-header { 
        display: block !important; 
        margin-top: 20px;
        margin-bottom: 10px;
        text-align: left; 
    }
}

/* 15. TRUE MOBILE (< 767px) */
@media (max-width: 767px) {
    
    .course-product-shell .course-title {
        font-size: 20px !important;
        line-height: 1.25 !important;
        margin-bottom: 10px !important;
        color: #0f172a !important;
    }

    .course-product-shell .course-tagline {
        font-size: 13px !important;
        line-height: 1.5 !important;
        color: #475569 !important;
        margin-bottom: 15px !important;
    }

    .course-content-body {
        font-size: 15px !important;
        line-height: 1.6 !important;
    }
    .course-content-body h2 { font-size: 18px !important; margin-top: 25px !important; margin-bottom: 15px !important; }
    .course-content-body h3 { font-size: 16px !important; margin-top: 20px !important; margin-bottom: 10px !important; }
    
    .modern-learnings-card h2,
    .modern-learnings-card h3 { 
        font-size: 18px !important; 
        margin-bottom: 15px !important; 
    }
    
    .course-description h2#description-heading {
        font-size: 18px !important;
        margin-bottom: 15px !important;
    }

    .course-product-shell .course-product {
        padding-top: 20px;
        padding-left: 20px !important;
        padding-right: 20px !important;
        padding-bottom: 30px !important;
    }

    .course-related-bottom-section {
        padding-bottom: 100px !important; 
    }
    .course-related-bottom-section .container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .course-product-shell .course-main {
        display: flex;
        flex-direction: column;
    }
    .course-hero-card { order: 1; display: none !important; }
    
    /* MODIFIED: SIDEBAR SPACING */
    .course-product-shell .course-sidebar {
        margin-bottom: 15px !important;
        padding-bottom: 0 !important;
    }
    
    .course-product-shell .course-sidebar-card {
        display: block !important;
        width: 100%;
        max-width: 100% !important;
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
        padding: 0 !important;
        margin-bottom: 0 !important;
    }

    /* MODIFIED: FEATURES LIST VIEW */
    .modern-course-features { 
        order: 2; 
        display: flex !important;
        flex-direction: column !important;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        overflow: hidden;
        margin-top: 0 !important;
        margin-bottom: 60px !important;
        box-shadow: 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    }
    
    .modern-feature-card {
        flex-direction: row !important;
        align-items: center !important;
        text-align: left !important;
        padding: 14px 16px !important;
        border-bottom: 1px solid #f1f5f9;
        width: 100%;
        justify-content: flex-start !important;
        background: transparent !important;
    }
    
    .modern-feature-card:last-child {
        border-bottom: none;
    }
    
    .mf-icon { 
        margin-bottom: 0 !important;
        margin-right: 16px !important;
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
    }
    
    .mf-icon svg { width: 18px !important; height: 18px !important; }
    
    .mf-content {
        align-items: flex-start !important;
        width: 100%;
    }
    
    .mf-label { font-size: 10px !important; margin-bottom: 2px !important; opacity: 0.6; }
    
    .mf-value, .mf-value a { 
        font-size: 14px !important; 
        line-height: 1.2 !important; 
        width: auto !important;
        font-weight: 600 !important;
    }
    
    .mf-value .js-trigger-image-modal, .mf-value.js-preview-container a { 
        margin-top: 0 !important; 
        padding: 4px 12px !important; 
        font-size: 11px !important; 
        display: inline-block;
    }

    .modern-separator-line { order: 3; display: none; }
    
    .course-instructor-card { 
        order: 4; 
        margin-bottom: 30px !important;
        padding: 16px;
    }
    
    .modern-learnings-card { order: 5; margin-bottom: 30px; }
    .course-description { order: 6; }
    .course-reviews { order: 7; }

    .course-product-shell .course-main > * + * { margin-top: 0; }
    
    .course-product-shell .course-trust-badges {
        margin-top: 15px !important;
        padding-top: 15px !important;
        margin-bottom: 15px !important;
        gap: 10px !important;
    }

    .course-product-shell .course-payment-methods {
        border-top: none !important;
        border-bottom: 1px solid #e2e8f0 !important;
        padding-top: 10px !important;
        padding-bottom: 15px !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
    .course-product-shell .course-payment-methods img { max-width: 220px !important; }

    .modern-learn-grid { grid-template-columns: 1fr; gap: 15px; }
    .modern-learnings-card { padding: 20px; border-radius: 12px; }

    
    .wt-related-products .products.row { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }

    /* FLOATING STICKY BAR */
    .course-floating-atc-bar {
        position: fixed;
        bottom: 0 !important;       
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 90 !important; 
        background: #ffffff !important; 
        border-top: 1px solid #e2e8f0 !important;
        box-shadow: 0 -4px 10px rgba(0,0,0,0.05) !important;
        padding: 10px 15px 15px !important;
        transform: translateY(100%); 
        transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    }
    .course-floating-atc-bar.is-visible { transform: translateY(0); }
    .course-floating-atc-bar .course-sticky-inner { max-width: 100%; display: block !important; padding: 0 !important; }

    .course-sticky-row { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
    
    .course-sticky-price-box { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; line-height: 1; }
    .sticky-price-current { font-size: 18px; font-weight: 800; color: #0f172a; }
    .sticky-price-old { font-size: 12px; text-decoration: line-through; color: #94a3b8; }
    
    .course-sticky-button-box { flex: 1; }
    .course-floating-btn {
        background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%) !important;
        color: #000000 !important;
        border-radius: 6px !important; 
        width: 100%;
        height: 44px !important;
        display: flex; align-items: center; justify-content: center;
        font-size: 16px; font-weight: 700;
        box-shadow: none !important; border: none !important; margin: 0 !important;
    }
    .course-sticky-guarantee { text-align: center; font-size: 10px; color: #64748b; width: 100%; }

    .course-hero-desktop-header { display: none !important; }
    .course-sidebar-mobile-header { display: block !important; margin-bottom: 15px; }
    .course-mobile-breadcrumbs { display: block !important; padding: 10px 0 0; }
    .course-mobile-breadcrumbs .course-breadcrumbs { margin-top: 0 !important; margin-bottom: 10px !important; }
}

@media (max-width: 767px) {
    .course-sidebar-mobile-header {
        margin-bottom: 20px;
    }
    .course-mobile-breadcrumbs {
        padding-top: 0; 
    }
}

/* 16. UTILITY CLASSES & OVERRIDES */
.single-product .woocommerce-message { display: none !important; }
.course-product-shell .variations { display: none !important; }
.woocommerce-error.message-wrapper { max-width: 1270px; margin: 20px auto 0; padding: 0 15px; box-sizing: border-box; width: 100%; position: relative; z-index: 20; }

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.course-product-shell a:focus-visible,
.course-product-shell button:focus-visible {
    outline: 2px solid var(--course-dark);
    outline-offset: 2px;
}

/* 17. REDUCED MOTION PREFERENCE */
@media (prefers-reduced-motion: reduce) {
    .course-product-shell *,
    .course-product-shell *::before,
    .course-product-shell *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .course-atc-wrapper .course-btn--atc::after {
        animation: none;
    }
}

/* 18. PRINT STYLES */
@media print {
    .course-floating-atc-bar,
    .course-modal,
    .course-action-buttons {
        display: none !important;
    }
    
    .course-product-shell .course-grid {
        display: block;
    }
    
    .course-product-shell .course-sidebar {
        display: none;
    }
}

/* =========================================================
   SECTION B: BLOG & CUSTOM PAGES (ORIGINAL)
   ========================================================= */

/* Base Styles */
.ud-blog-page { background: transparent; font-family: var(--ud-font-sans); color: var(--ud-text); scroll-behavior: smooth; width: 100%; }
.ud-blog-container { max-width: 1180px; margin: 0 auto; padding: 50px 20px 80px; }
.ud-blog-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 50px; }

/* Breadcrumbs */
.ud-bc-rankmath { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; margin-bottom: 32px; padding: 12px 20px; background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); border-radius: 12px; border: 1px solid #e2e8f0; }
.ud-bc-rankmath .rank-math-breadcrumb p { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ud-bc-rankmath .rank-math-breadcrumb a { color: var(--ud-text-muted); text-decoration: none; font-weight: 500; transition: all 0.2s ease; padding: 4px 8px; border-radius: 6px; }
.ud-bc-rankmath .rank-math-breadcrumb a:hover { color: var(--ud-accent); background: rgba(220, 38, 38, 0.05); }
.ud-bc-rankmath .rank-math-breadcrumb .last { color: var(--ud-primary); font-weight: 600; }

/* Sidebar & TOC */
.ud-blog-sidebar { position: relative; }
.ud-toc-sticky { position: sticky; top: 100px; background: var(--ud-bg-card); border: 1px solid var(--ud-border-subtle); border-radius: 20px; padding: 28px; box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06); max-height: calc(100vh - 120px); overflow-y: auto; }
.ud-toc-title { font-size: 14px; font-weight: 700; color: var(--ud-primary); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 2px solid transparent; background: linear-gradient(to right, var(--ud-accent), transparent) bottom / 100% 2px no-repeat; display: flex; align-items: center; gap: 10px; }
.ud-toc-title::before { content: "\1F512"; font-size: 18px; }
.ud-toc-list { display: flex; flex-direction: column; gap: 6px; }
.ud-toc-link { display: block; padding: 14px 18px; border-left: 3px solid transparent; border-radius: 10px; font-size: 14px; color: var(--ud-text-soft); text-decoration: none; transition: all 0.25s ease; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; }
.ud-toc-link:hover { color: var(--ud-primary); background: #f8fafc; border-left-color: var(--ud-text-muted); transform: translateX(4px); white-space: normal; overflow: visible; }
.ud-toc-link.active { color: var(--ud-accent); background: #fef2f2; border-left-color: var(--ud-accent); font-weight: 600; transform: translateX(4px); }

/* Content & Post Header */
.ud-post-header { margin-bottom: 42px; }
.ud-category-pill { 
    display: inline-flex; 
    align-items: center; 
    background: var(--ud-accent); 
    color: #fff !important; 
    font-size: 11px; 
    font-weight: 700; 
    padding: 10px 24px; 
    border-radius: 999px; 
    text-transform: uppercase; 
    letter-spacing: 0.1em; 
    margin-bottom: 20px; 
    text-decoration: none !important; 
}
.ud-category-pill a { color: #fff !important; text-decoration: none !important; }
.ud-post-title { font-size: clamp(32px, 4vw, 48px); font-weight: 900; line-height: 1.1; color: var(--ud-primary); margin-bottom: 24px; }
.ud-post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; font-size: 14px; color: var(--ud-text-muted); padding-bottom: 24px; border-bottom: 2px solid var(--ud-border-subtle); }

.ud-author-info { display: flex; align-items: center; gap: 12px; }
.ud-author-avatar { width: 48px; height: 48px; border-radius: 50%; border: 3px solid var(--ud-accent); }
.ud-author-name { font-weight: 700; color: var(--ud-text); text-decoration: none; }
.ud-reviewer-info { display: flex; align-items: center; gap: 10px; }

.pp-author-boxes-name.multiple-authors-name .name-author-category { font-size: 13px; color: var(--ud-text-muted); margin-left: 4px; }
.ud-reviewer-avatar { width: 38px; height: 38px; border-radius: 50%; border: 2px solid #e5e7eb; }
.ud-reviewer-name { font-weight: 700; color: var(--ud-text); text-decoration: none; }
.ud-meta-dot { color: #d1d5db; font-weight: 600; }

/* Featured Image */
.ud-featured-wrapper { margin: 32px 0; border-radius: 20px; overflow: hidden; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08); }
.ud-featured-image { width: 100%; display: block; transition: transform 0.4s ease; }
.ud-featured-wrapper:hover .ud-featured-image { transform: scale(1.02); }

/* Content Body */
.ud-content-body { font-size: 19px; line-height: 1.85; color: var(--ud-text-soft); }
.ud-content-body p { margin-bottom: 26px; }
.ud-content-body h2 { font-size: 32px; font-weight: 800; color: var(--ud-primary); margin: 52px 0 24px; padding-left: 24px; border-left: 5px solid var(--ud-accent); scroll-margin-top: 120px; }
.ud-content-body h3 { font-size: 24px; font-weight: 700; margin: 38px 0 18px; color: var(--ud-primary); padding-left: 24px; border-left: 4px solid var(--ud-accent); scroll-margin-top: 120px; }
.ud-content-body ul, .ud-content-body ol { margin-bottom: 26px; padding-left: 28px; }
.ud-content-body li { margin-bottom: 12px; }
.ud-content-body a { color: var(--ud-accent); text-decoration: none; border-bottom: 2px solid rgba(220,38,38,0.3); font-weight: 600; }
.ud-content-body a:hover { color: #b91c1c; border-bottom-color: #b91c1c; background: rgba(220,38,38,0.05); }
.ud-content-body img { border-radius: 16px; margin: 32px 0; box-shadow: 0 4px 16px rgba(15, 23, 42, 0.1); max-width: 100%; height: auto; }

/* Related Posts */
.related-posts-wrapper { margin-top: 56px; padding-top: 30px; border-top: 1px solid var(--ud-border-subtle); }
.related-title { font-size: 22px; font-weight: 700; color: var(--ud-primary); margin-bottom: 20px; }
.related-posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.related-post-card { display: block; background: #fff; border-radius: 12px; border: 1px solid #e5e7eb; overflow: hidden; transition: all 0.2s ease; text-decoration: none; }
.related-post-card:hover { border-color: var(--ud-accent); transform: translateY(-3px); box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12); }

/* FIXED: aspect-ratio with fallback for older browsers */
.related-thumb-wrapper { 
  position: relative;
  padding-bottom: 56.25%; /* 16:9 fallback */
  overflow: hidden; 
  background: #f3f4f6; 
}

@supports (aspect-ratio: 16/9) {
  .related-thumb-wrapper {
    padding-bottom: 0;
    aspect-ratio: 16/9;
  }
}

.related-thumb { 
  position: absolute;
  top: 0;
  left: 0;
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
}

@supports (aspect-ratio: 16/9) {
  .related-thumb {
    position: static;
  }
}

.related-content { padding: 12px 14px; }
.related-post-card h3 { font-size: 14px; font-weight: 600; color: var(--ud-primary); margin-bottom: 6px; line-height: 1.4; margin-top: 0; border: none; padding: 0; }
.rp-date { font-size: 12px; color: var(--ud-text-muted); }

/* Accessibility for Blog */
.ud-toc-link:focus-visible,
.ud-content-body a:focus-visible,
.related-post-card:focus-visible,
.ud-bc-rankmath a:focus-visible,
.ud-category-pill:focus-visible {
  outline: 3px solid var(--ud-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--ud-accent);
  outline-offset: 2px;
}

/* Reduced Motion for Blog */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .ud-blog-page { scroll-behavior: auto; }
}

/* Blog Responsive */
@media (max-width: 1024px) {
  .ud-blog-grid { grid-template-columns: 1fr; gap: 40px; }
  .ud-blog-sidebar { display: none; }
  .related-posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .ud-blog-container { padding: 40px 16px; }
  .ud-post-title { font-size: 28px; }
  .related-posts-grid { grid-template-columns: 1fr; }
}

@media only screen and (max-width: 48em) {
/*************** ADD MOBILE ONLY CSS HERE  ***************/

}

/* =========================================================
   WISER NOTIFY REVIEWS INTEGRATION
   ========================================================= */

/* Review Container Styling */
.course-section.course-reviews {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    margin-bottom: 50px;
}

.course-section.course-reviews h2 {
    font-size: 24px;
    font-weight: 800 !important;
    color: #0f172a;
    margin-top: 0;
    margin-bottom: 30px;
}

/* Rating Hero Wrapper */
.wiser-rating-hero-wrapper {
    display: inline-block;
    vertical-align: middle;
}

/* Ensure widgets don't break layout */
.wiser-rating-hero-wrapper iframe,
.wiser-nudges-wrapper iframe {
    margin: 0 !important;
    display: block !important;
}

/* Mobile Responsiveness for Reviews */
@media (max-width: 767px) {
    .course-section.course-reviews {
        padding: 20px;
        border-radius: 12px;
    }
    
    .course-section.course-reviews h2 {
        font-size: 18px !important;
        margin-bottom: 20px !important;
    }
}

/* =========================================================
   FIX: ADD TO CART LOADING STATE
   ========================================================= */

/* 1. Adjust button padding when loading */
.course-product-shell .course-atc-wrapper .single_add_to_cart_button.loading {
    padding-right: 45px !important;
    opacity: 0.8 !important;
    cursor: wait !important;
    position: relative !important;
}

/* 2. Replace shine with spinner */
.course-product-shell .course-atc-wrapper .single_add_to_cart_button.loading::after {
    background: none !important;
    transform: none !important;
    left: auto !important;
    width: 20px !important;
    height: 20px !important;
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    right: 15px !important;
    margin-top: -10px !important;
    border: 2px solid rgba(255,255,255,0.3) !important;
    border-top-color: #ffffff !important;
    border-radius: 50% !important;
    animation: course-spin 0.8s infinite linear !important;
    opacity: 1 !important;
    z-index: 10 !important;
}

/* 3. Spin Animation */
@keyframes course-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
