/* ============================================
   MODULE 9 - PRODUCTS & STRIPE CHECKOUT STYLES
   ============================================ */

/* ============ PRODUCT GRID ============ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}
.product-card {
    background: #fff;
    border: 1px solid var(--ip-border, #e5e7eb);
    border-radius: 20px;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(0,0,0,0.08);
    border-color: var(--ip-primary, #673DE6);
}
.product-card__link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}
.product-card__cover {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--ip-primary-soft, #f3f0ff);
}
.product-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-card__cover--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ip-primary, #673DE6), #4a1fb8);
}
.product-card__cover--placeholder span {
    color: rgba(255,255,255,0.3);
    font-size: 72px;
    font-weight: 800;
    font-family: 'Syne', sans-serif;
}
.product-card__badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.95);
    color: var(--ip-primary, #673DE6);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.product-card__body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.product-card__title {
    font-family: 'Syne', sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.3;
}
.product-card__tagline {
    font-size: 14px;
    color: var(--ip-text-muted, #6b7280);
    line-height: 1.5;
    margin: 0 0 16px;
    flex: 1;
}
.product-card__foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--ip-border, #e5e7eb);
}
.product-card__price-label {
    display: block;
    font-size: 11px;
    color: var(--ip-text-muted, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.product-card__price-amount {
    font-size: 22px;
    font-weight: 800;
    color: var(--ip-primary, #673DE6);
    font-family: 'Syne', sans-serif;
}
.product-card__link-arrow {
    color: var(--ip-primary, #673DE6);
    font-weight: 600;
    font-size: 14px;
}

/* ============ PRODUCT META ============ */
.product-meta-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 16px;
    flex-wrap: wrap;
}
.product-meta-chip {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.85);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

/* ============ CURRENCY PICKER ============ */
.currency-picker {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.currency-picker__label {
    font-size: 14px;
    color: var(--ip-text-muted, #6b7280);
}
.currency-picker__group {
    display: inline-flex;
    background: #fff;
    border: 1px solid var(--ip-border, #e5e7eb);
    border-radius: 999px;
    padding: 4px;
}
.currency-btn {
    background: transparent;
    border: none;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ip-text-muted, #6b7280);
    border-radius: 999px;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}
.currency-btn:hover {
    color: var(--ip-text, #1a1a1a);
}
.currency-btn--active {
    background: var(--ip-primary, #673DE6);
    color: #fff !important;
}

/* ============ PLANS GRID ============ */
.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}
.plan-card {
    background: #fff;
    border: 1px solid var(--ip-border, #e5e7eb);
    border-radius: 20px;
    padding: 32px 28px;
    position: relative;
    transition: transform .2s, box-shadow .2s, border-color .2s;
    display: flex;
    flex-direction: column;
}
.plan-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.plan-card--recommended {
    border-color: var(--ip-primary, #673DE6);
    border-width: 2px;
    box-shadow: 0 8px 32px rgba(103,61,230,0.12);
}
.plan-card--recommended::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(135deg, var(--ip-primary, #673DE6), #c084fc);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.4;
}
.plan-card__badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ip-primary, #673DE6);
    color: #fff;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
}
.plan-card__name {
    font-family: 'Syne', sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 6px;
}
.plan-card__desc {
    font-size: 14px;
    color: var(--ip-text-muted, #6b7280);
    margin: 0 0 24px;
    line-height: 1.5;
    min-height: 21px;
}
.plan-card__price {
    margin-bottom: 24px;
}
.plan-card__amount {
    font-family: 'Syne', sans-serif;
    font-size: 44px;
    font-weight: 800;
    color: var(--ip-primary, #673DE6);
    letter-spacing: -0.02em;
    line-height: 1;
    display: flex;
    align-items: baseline;
    gap: 2px;
}
.plan-card__currency-symbol {
    font-size: 28px;
    font-weight: 700;
}
.plan-card__cycle {
    font-size: 14px;
    color: var(--ip-text-muted, #6b7280);
    margin-top: 4px;
    font-weight: 500;
}
.plan-card__features {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    flex: 1;
}
.plan-card__features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--ip-text, #1a1a1a);
    line-height: 1.4;
}
.plan-card__features li svg {
    flex-shrink: 0;
    margin-top: 2px;
}
.plan-card__cta {
    width: 100%;
    text-align: center;
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-size: 14px;
}
.btn-cta--outline {
    background: transparent !important;
    color: var(--ip-primary, #673DE6) !important;
    border: 2px solid var(--ip-primary, #673DE6);
}
.btn-cta--outline:hover {
    background: var(--ip-primary, #673DE6) !important;
    color: #fff !important;
}

.section-title--center {
    text-align: center;
    margin-bottom: 40px !important;
}

/* ============ PRODUCT GALLERY ============ */
.product-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}
.product-gallery img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

/* ============ CHECKOUT MODAL ============ */
.checkout-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.checkout-modal[hidden] { display: none; }
.checkout-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn .2s ease;
}
.checkout-modal__panel {
    position: relative;
    background: #fff;
    border-radius: 20px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 36px 32px;
    box-shadow: 0 24px 48px rgba(0,0,0,0.2);
    animation: slideUp .25s ease;
}
@keyframes fadeIn { from {opacity:0} to {opacity:1} }
@keyframes slideUp { from {opacity:0; transform: translateY(20px)} to {opacity:1; transform: translateY(0)} }

.checkout-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0,0,0,0.05);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ip-text-muted, #6b7280);
    transition: background .15s;
}
.checkout-modal__close:hover {
    background: rgba(0,0,0,0.1);
    color: var(--ip-text, #1a1a1a);
}
.checkout-modal__title {
    font-family: 'Syne', sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px;
}
.checkout-modal__subtitle {
    color: var(--ip-text-muted, #6b7280);
    font-size: 14px;
    margin: 0 0 28px;
    padding: 12px 16px;
    background: var(--ip-primary-soft, #f3f0ff);
    border-radius: 12px;
}
.checkout-form .field__label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
}
.checkout-form .field__input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--ip-border, #e5e7eb);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
    background: #fff;
    color: var(--ip-text, #1a1a1a);
}
.checkout-form .field__input:focus {
    outline: none;
    border-color: var(--ip-primary, #673DE6);
    box-shadow: 0 0 0 3px rgba(103,61,230,0.1);
}
.checkout-form .field__help {
    font-size: 12px;
    color: var(--ip-text-muted, #6b7280);
    margin: 6px 0 0;
}
.checkout-form .field__error {
    font-size: 12px;
    color: #dc2626;
    margin: 6px 0 0;
}
.checkout-form .required {
    color: #dc2626;
}
.checkbox {
    display: flex;
    gap: 10px;
    cursor: pointer;
    align-items: flex-start;
}
.checkbox input { margin-top: 3px; flex-shrink: 0; cursor: pointer; }
.checkbox__label {
    font-size: 13px;
    color: var(--ip-text, #1a1a1a);
    line-height: 1.5;
}
.checkbox__label a {
    color: var(--ip-primary, #673DE6);
    text-decoration: underline;
}
.checkout-modal__secure {
    text-align: center;
    margin: 16px 0 0;
    font-size: 12px;
    color: var(--ip-text-muted, #6b7280);
    padding-top: 16px;
    border-top: 1px solid var(--ip-border, #e5e7eb);
}

/* ============ SUCCESS / CANCEL SCREEN ============ */
.success-screen {
    text-align: center;
    background: #fff;
    border-radius: 24px;
    padding: 48px 32px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.04);
}
.success-screen__icon {
    margin: 0 auto 24px;
    display: flex;
    justify-content: center;
}
.success-screen__title {
    font-family: 'Syne', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #10b981;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
}
.success-screen__lead {
    color: var(--ip-text-muted, #6b7280);
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 32px;
}
.success-screen__detail {
    background: #fafafa;
    border-radius: 16px;
    padding: 20px 24px;
    margin: 0 0 24px;
    text-align: left;
}
.success-screen__row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
}
.success-screen__row:last-child { border-bottom: 0; }
.success-screen__row span { color: var(--ip-text-muted, #6b7280); }
.success-screen__note {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 16px 20px;
    border-radius: 8px;
    text-align: left;
    margin: 0 0 24px;
}
.success-screen__note strong { color: #92400e; }
.success-screen__note p { margin: 6px 0 0; color: #78350f; font-size: 14px; }
.success-screen__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
