:root {
    --tpsp-black: #101010;
    --tpsp-yellow: #ffd21f;
    --tpsp-white: #ffffff;
    --tpsp-gray: #f5f5f5;
}

.tpsp-premium-theme .woocommerce,
.tpsp-dashboard-wrap {
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

.tpsp-dashboard-wrap {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
}

.tpsp-sidebar {
    background: var(--tpsp-black);
    color: var(--tpsp-white);
    border-radius: 18px;
    padding: 24px;
    position: sticky;
    top: 20px;
    height: fit-content;
}

.tpsp-sidebar h3 { color: var(--tpsp-yellow); margin-top: 0; }
.tpsp-sidebar nav { display: grid; gap: 10px; }
.tpsp-sidebar a {
    text-decoration: none;
    color: var(--tpsp-white);
    padding: 10px 12px;
    border-radius: 10px;
    transition: all .25s ease;
}
.tpsp-sidebar a:hover {
    background: var(--tpsp-yellow);
    color: var(--tpsp-black);
}

.tpsp-sidebar nav a { color: var(--tpsp-white) !important; }

.tpsp-main-panel { display: grid; gap: 20px; }
.tpsp-card {
    background: var(--tpsp-white);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #ececec;
    box-shadow: 0 12px 28px rgba(16, 16, 16, .08);
    color: #111;
}
.tpsp-welcome {
    background: linear-gradient(120deg, #1a1a1a, #333);
    color: #fff;
}
.tpsp-welcome * { color: #fff; }
.tpsp-welcome h2 { color: var(--tpsp-yellow); margin: 0 0 10px; }

.tpsp-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.tpsp-sub-card { text-align: center; }
.tpsp-sub-card strong { font-size: 28px; color: var(--tpsp-black); }

.tpsp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: var(--tpsp-yellow);
    color: var(--tpsp-black);
    text-decoration: none;
    padding: 11px 16px;
    border-radius: 12px;
    font-weight: 700;
    transition: all .25s ease;
    cursor: pointer;
}
.tpsp-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(255, 210, 31, .35); }
.tpsp-btn-secondary { background: #222; color: #fff; }
.tpsp-btn-danger { background: #aa1111; color: #fff; }

.tpsp-list { display: grid; gap: 12px; }
.tpsp-list-item {
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.tpsp-list-item small { display: block; color: #666; margin-top: 2px; }

.tpsp-form-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.tpsp-form input, .tpsp-form select, .tpsp-resend-wrap input {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #ddd;
}
.tpsp-avatar-row { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.tpsp-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--tpsp-yellow);
}

.tpsp-progress { margin-top: 12px; }
.tpsp-progress-bar { height: 10px; border-radius: 8px; background: #eee; overflow: hidden; }
.tpsp-progress-bar i { display: block; height: 100%; background: var(--tpsp-yellow); }

.tpsp-notice,
.tpsp-secure-note,
.tpsp-razorpay-hint,
.tpsp-thankyou {
    margin-top: 12px;
    border-radius: 10px;
    padding: 11px 13px;
}
.tpsp-notice.success { background: #e7f9ee; color: #17603d; }
.tpsp-notice.warning { background: #fff7df; color: #7e5a00; }
.tpsp-secure-note { background: #fff7d7; border-left: 4px solid var(--tpsp-yellow); margin-bottom: 15px; }
.tpsp-razorpay-hint { background: #eef4ff; border-left: 4px solid #1d5fca; }
.tpsp-thankyou { background: #f1fff2; border-left: 4px solid #29963f; margin-top: 20px; }

.woocommerce-cart .cart-collaterals .cart_totals {
    position: sticky;
    top: 15px;
    border-radius: 16px;
    border: 1px solid #ececec;
    padding: 15px;
    box-shadow: 0 10px 24px rgba(0,0,0,.08);
}
.woocommerce-cart table.shop_table {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #ececec;
}
.woocommerce-cart .checkout-button,
.woocommerce-checkout #place_order {
    background: var(--tpsp-yellow) !important;
    color: var(--tpsp-black) !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
}
.woocommerce-account .u-columns,
.woocommerce-account .woocommerce-MyAccount-content,
.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce {
    background: #fff;
    border-radius: 16px;
    padding: 18px;
    border: 1px solid #ececec;
    box-shadow: 0 8px 24px rgba(0,0,0,.06);
}
.tpsp-dashboard-intro {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
}
.tpsp-dashboard-intro h3 {
    margin: 0 0 8px;
}
.tpsp-dashboard-intro ul {
    margin: 0;
    padding-left: 18px;
}
.tpsp-dashboard-intro li {
    margin: 4px 0;
}
.page-id .woocommerce,
.tpsp-premium-theme .site-main > .woocommerce {
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
}
.woocommerce-checkout .col2-set,
.woocommerce-checkout .woocommerce-checkout-review-order {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 16px;
    padding: 16px;
}
.woocommerce-checkout .woocommerce-checkout-review-order-table th,
.woocommerce-checkout .woocommerce-checkout-review-order-table td {
    vertical-align: middle;
}
.woocommerce-checkout .woocommerce-checkout-review-order-table .product-name,
.woocommerce-checkout .woocommerce-checkout-review-order-table .product-total {
    text-align: left;
}
.woocommerce-checkout .cart-actions,
.woocommerce-checkout .cart-action,
.woocommerce-checkout .order-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 8px 0;
}
.woocommerce-checkout .cart-actions a,
.woocommerce-checkout .cart-action a,
.woocommerce-checkout .order-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 14px;
    border-radius: 10px;
    font-weight: 700;
    text-align: center;
}
.woocommerce-checkout .cart-actions .button,
.woocommerce-checkout .order-actions .button {
    margin: 0 !important;
}

.woocommerce-checkout a.wc-backward,
.woocommerce-checkout .wc-backward {
    background: var(--tpsp-yellow) !important;
    color: var(--tpsp-black) !important;
    border-radius: 12px !important;
    padding: 10px 14px !important;
    font-weight: 800 !important;
    text-align: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.woocommerce-checkout a.wc-backward:hover,
.woocommerce-checkout .wc-backward:hover {
    filter: brightness(0.95);
}
.woocommerce-checkout .col2-set h3,
.woocommerce-cart h2,
.woocommerce-checkout h3 {
    color: #111;
    font-weight: 800;
}
.woocommerce-checkout .col2-set h3::after,
.woocommerce-cart h2::after {
    content: "";
    display: block;
    width: 64px;
    height: 4px;
    border-radius: 4px;
    margin-top: 8px;
    background: var(--tpsp-yellow);
}
.woocommerce-cart table.cart td.product-thumbnail img {
    border-radius: 10px;
    border: 1px solid #ececec;
}
.woocommerce-cart .actions .coupon {
    display: flex;
    gap: 8px;
}
.woocommerce-cart .actions .coupon input {
    border-radius: 10px;
}
.woocommerce-cart .actions .coupon .button,
.woocommerce-cart .actions > .button {
    border-radius: 10px;
}
.woocommerce-cart td.product-quantity .quantity,
.woocommerce-cart td.product-quantity input.qty,
.woocommerce-cart .actions .button[name="update_cart"] {
    display: none !important;
}
.tpsp-qty-locked {
    display: inline-block;
    min-width: 38px;
    text-align: center;
    font-weight: 700;
    background: #111;
    color: #fff;
    border-radius: 8px;
    padding: 6px 10px;
}
.woocommerce-account .u-column1,
.woocommerce-account .u-column2 {
    background: #fafafa;
    border-radius: 12px;
    padding: 16px;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    color: #ffd21f !important;
    font-weight: 700;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
    color: #101010 !important;
    background: #ffd21f !important;
    border-radius: 8px;
}

/* Force-hide coupon links if injected by third-party account plugins. */
.woocommerce-account .woocommerce-MyAccount-navigation-link--smart-coupon,
.woocommerce-account .woocommerce-MyAccount-navigation-link--smart-coupons,
.woocommerce-account .woocommerce-MyAccount-navigation-link--my-coupon,
.woocommerce-account .woocommerce-MyAccount-navigation-link--my-coupons,
.woocommerce-account .woocommerce-MyAccount-navigation-link--coupon,
.woocommerce-account .woocommerce-MyAccount-navigation-link--coupons,
.woocommerce-account .woocommerce-MyAccount-navigation a[href*="smart-coupon"],
.woocommerce-account .woocommerce-MyAccount-navigation a[href*="my-coupon"],
.woocommerce-account .woocommerce-MyAccount-navigation a[href*="my-coupons"] {
    display: none !important;
}
.tpsp-login-panel {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    gap: 18px;
}
.tpsp-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.tpsp-profile-compact {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}
.tpsp-inline-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    border-radius: 10px;
    border: 1px solid #d8d8d8;
    padding: 10px 12px;
}

.tpsp-qty-wrap {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    overflow: hidden;
}
.tpsp-qty-wrap .qty {
    width: 52px;
    text-align: center;
    border: none !important;
}
.tpsp-qty-minus,
.tpsp-qty-plus {
    background: #111;
    color: #fff;
    border: none;
    width: 30px;
    height: 34px;
    cursor: pointer;
}
.tpsp-verification-block { margin-bottom: 18px; }

.tpsp-spinner {
    display: none;
    margin-left: 8px;
    width: 16px;
    height: 16px;
    border: 2px solid #000;
    border-top-color: transparent;
    border-radius: 50%;
    animation: tpsp-rotate .8s linear infinite;
}
@keyframes tpsp-rotate { to { transform: rotate(360deg); } }

.tpsp-popup {
    position: fixed;
    right: 16px;
    bottom: 18px;
    background: #111;
    color: #fff;
    border-left: 4px solid var(--tpsp-yellow);
    border-radius: 12px;
    padding: 12px 14px;
    z-index: 99999;
    box-shadow: 0 10px 24px rgba(0,0,0,.25);
}

@media (max-width: 991px) {
    .tpsp-dashboard-wrap { grid-template-columns: 1fr; }
    .tpsp-sidebar { position: static; }
}
